mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Adding new options into doc blocks.
Removing todo as its implemented already.
This commit is contained in:
parent
ac302bb6c2
commit
9ed7a5cd55
2 changed files with 5 additions and 3 deletions
|
@ -889,11 +889,11 @@ class FormHelper extends AppHelper {
|
|||
*
|
||||
* - `value` - the value of the checkbox
|
||||
* - `checked` - boolean indicate that this checkbox is checked.
|
||||
* - `hiddenField` - boolean to indicate if you want the results of radio() to include
|
||||
* a hidden input with a value of ''. This is useful for creating radio sets that non-continuous
|
||||
*
|
||||
* @param string $fieldName Name of a field, like this "Modelname.fieldname"
|
||||
* @param array $options Array of HTML attributes.
|
||||
* @todo Right now, automatically setting the 'checked' value is dependent on whether or not the
|
||||
* checkbox is bound to a model. This should probably be re-evaluated in future versions.
|
||||
* @return string An HTML text input element
|
||||
*/
|
||||
function checkbox($fieldName, $options = array()) {
|
||||
|
@ -934,6 +934,8 @@ class FormHelper extends AppHelper {
|
|||
* - `legend` - control whether or not the widget set has a fieldset & legend
|
||||
* - `value` - indicate a value that is should be checked
|
||||
* - `label` - boolean to indicate whether or not labels for widgets show be displayed
|
||||
* - `hiddenField` - boolean to indicate if you want the results of radio() to include
|
||||
* a hidden input with a value of ''. This is useful for creating radio sets that non-continuous
|
||||
*
|
||||
* @param string $fieldName Name of a field, like this "Modelname.fieldname"
|
||||
* @param array $options Radio button options array.
|
||||
|
|
|
@ -3279,7 +3279,7 @@ class FormHelperTest extends CakeTestCase {
|
|||
|
||||
$this->Form->validationErrors['Model']['field'] = 1;
|
||||
$this->Form->data['Contact']['published'] = 1;
|
||||
$result = $this->Form->checkbox('Contact.published', array('id'=>'theID'));
|
||||
$result = $this->Form->checkbox('Contact.published', array('id' => 'theID'));
|
||||
$expected = array(
|
||||
'input' => array('type' => 'hidden', 'name' => 'data[Contact][published]', 'value' => '0', 'id' => 'theID_'),
|
||||
array('input' => array('type' => 'checkbox', 'name' => 'data[Contact][published]', 'value' => '1', 'id' => 'theID', 'checked' => 'checked'))
|
||||
|
|
Loading…
Reference in a new issue