Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Removed 'type' => 'submit' by default for FormHelper::button() #364

Closed
wants to merge 31 commits into
from

Conversation

Projects
None yet
7 participants

ProLoser commented Dec 8, 2011

Why? Because:

  • The type attribute is not required for buttons, so there's no real reason to include
  • 'Submit' is a very unsafe default behavior. When people don't explicitly wish to use submit buttons, such as for cancel, expand, js-related, etc, submitting the form is not something people will want to override. Especially because of the first point.
  • Follow the rule of design to expectation. The button should do what people expect it to. If no type is set, don't add one.
  • When calling $this->Form->input('Call JS', array('type' => 'button')) the type is always 'submit' and cannot be changed. This is the main reason for this fix. Since type is already passed (to input()) it is impossible to correct this behavior.

markstory and others added some commits Dec 3, 2011

@markstory markstory Fix issue with incorrect date handling.
Fixes #2321
0670b96
@markstory markstory Move viewVars assignment after callbacks.
Assigning the controller viewVars after callbacks
allows the controller callbacks to assign additional
viewVars, or manipulate existing ones.

Fixes #2335
457dd73
@markstory markstory Unskip some tests. 71b41ed
@markstory markstory Add usage to HttpSocket::configAuth()
Fixes #2336
1bc3583
@shama shama Skip testSchemaReadWithConfigPrefix test if an existing prefix has al…
…ready been set
42583ff
@shama shama Fix CakeSession testCheckKeyWithSpaces and testUsingPluginHandler tes…
…t cases
8e70f4a
@shama shama Fix DatabaseSessionTest garbage collection test case 66b3e9a
@shama shama Consistently setting setUp() and tearDown() on test cases 5388237
@ADmad ADmad Merge pull request #353 from shama/patch-cakesession-test-fix
Fix CakeSession test cases
dde7982
@ADmad ADmad Merge pull request #354 from shama/patch-databasesession-test-fix
Fix DatabaseSessionTest garbage collection test case
a062135
@ceeram ceeram Making non-interactive behave same as interactive with odd table names e4e26a8
@ceeram ceeram Fix failing tests by 1 second difference 09a623e
@ceeram ceeram Fix other failing test by 1 second difference 3b8990f
@markstory markstory Merge pull request #355 from shama/patch-casing
Consistently setting setUp() and tearDown() on test cases
a32eabe
@markstory markstory Merge pull request #352 from shama/patch-cakeschema-test-fix
CakeSchemaTest: Skip testSchemaReadWithConfigPrefix test if an existing prefix has been set
ba81754
@shama shama Fix TextHelper excerpt method to work as documented
Fixes #2339
7f22fcd
@dereuromark @markstory dereuromark Translation fix
Fixes #2340

Signed-off-by: mark_story <mark@mark-story.com>
f9d1256
@markstory markstory Merge pull request #359 from shama/patch-texthelper
Fix TextHelper excerpt method to work as documented
a44c4aa
@shama shama Code consistency formatting tweaks 1e1c7a0
@markstory markstory Fix bare require() to use App::uses()
Fixes #2346
e7a7e57
@markstory markstory Adding test for #2345 495b7f2
@dereuromark @markstory dereuromark Typo fix in HttpSocket
`schema` should be `scheme`, this Fixes the only use of
schema in HttpSocket.

Fixes #2345

Signed-off-by: mark_story <mark@mark-story.com>
be770bd
@shama shama Move Route docblocks to make text available in the API 3974ea8
@lorenzo lorenzo Merge pull request #360 from shama/patch-code-formatting
Code consistency formatting tweaks
dfced8b
@lorenzo lorenzo Merge pull request #361 from shama/patch-route-docblocks
Move Route docblocks to make text available in the API
9b4d830
@markstory markstory Fix fatal error with abstract/interface classes
Abstract/Interface classes + ClassRegistry::init() should
raise an exception, not cause fatal errors.

Update CakeSchema to swallow and ignore any exceptions coming from
ClassRegistry.

Fixes #2328
bc8ae11
@lorenzo lorenzo Lazy-loading the $tablePrefix property in models, Fixes #2277 73aeb6b
Dean Sofer Removed 'type' => 'submit' by default for <button> elements. 3c3d73a
Dean Sofer Forgot to change the code apparently... 873d245
Dean Sofer Changed the testButton() accordingly. However unsure what to do about…
… the other 3 cases
b4ba333
Dean Sofer Added type=>submit to FormHelper::postButton() fc661e3

@ProLoser ProLoser closed this Dec 8, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment