cakephp/cakephp — pull request #363 by ProLoser (2011-12-08 08:31:39+00:00)
Title: Removed 'type' => 'submit' by default for FormHelper::button()

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.