[Solar-talk] Isn't 'submit' a bad name for form fields?
Paul M Jones
pmjones at ciaweb.net
Sat Jan 6 12:41:45 PST 2007
On Jan 5, 2007, at 3:18 PM, Paul M Jones wrote:
> On Jan 5, 2007, at 3:09 PM, Rodrigo Moraes wrote:
>
>> On 1/5/07, Paul M Jones wrote:
>>>> I would be for Process. Controller has Actions (display thing) and
>>>> Processes (do things) - or that's what a year and a half with the
>>>> Celini
>>>> framework drilled in to me :-)
>>>
>>> Hey Travis -- great minds, etc etc. I like "process" too.
>>
>> Yes, it is good enough! :-)
>
> OK cool, look for this change in SVN soon.
The change has been committed across the whole codebase; for those of
you not watching SVN, here is the commit message.
STANDARDS CHANGE AND WIDE BC BREAK
==================================
Previously, we had "controller", "action", "submit", and submission
buttons
were named 'submit'. Rodrigo Moraes pointed out, and Clay Loveless
verified,
that having buttons named 'submit' makes it difficult to work in
JavaScript
(such as calling a submit() method on a button named 'submit', etc).
To fix this, we need a standards change. Henceforth, we will use
"process" in
place of "submit". So the progression is now "controller", "action",
"process". Also, locale keys are changed from SUBMIT_* to PROCESS_*.
This changeset effects the new standard across the entire Solar code
base, and
is essentially a global search-and-replace from 'submit' to
'process'. Notable
exceptions are these classes:
* Solar_Form
* Solar_View_Helper_Form
* Solar_View_Helper_FormSubmit
The remaining notes detail the specific changes; related
documentation has been
updated as well.
* Solar_App_Bookmarks
* All actions and views use a 'process' name and ID for all
submit buttons.
* All locale strings for SUBMIT_* are now PROCESS_*.
* All calls to _isSubmit() are now _isProcess().
* Solar_Controller_Page
* Changed property $_submit_key to $_process_key.
* Changed method _isSubmit() to _isProcess().
* All locale string comparisons on SUBMIT_* are now on PROCESS_*.
* Solar/Locale/*
* All SUBMIT_* keys are now PROCESS_* keys.
* Solar_Auth_Adapter
* Config keys for 'source_submit', 'submit_login', and
'submit_logout' are
now 'source_process', 'process_login', and 'process_logout'
respectively.
* Solar_Access_Adapter_*
* All 'submit' keys in access lists are now 'process' keys.
* Solar_View_Helper_TypekeyLink
* Adds a config key 'process_key' with a default value of
'process'. This
helps avoid double-logins by checking the current process value.
--
Paul M. Jones <http://paul-m-jones.com>
Solar: Simple Object Library and Application Repository
for PHP5. <http://solarphp.com>
Join the Solar community wiki! <http://solarphp.org>
Savant: The simple, elegant, and powerful solution for
templates in PHP. <http://phpsavant.com>
More information about the solar-talk
mailing list