Commit 7a3827b4 authored by catch's avatar catch
Browse files

Issue #1477704 by kika, kid_icarus, andypost: Fixed Replace 'Selected'...

Issue #1477704 by kika, kid_icarus, andypost: Fixed Replace 'Selected' dropdown with checkbox in category edit form.
parent 42e17a14
......@@ -112,14 +112,9 @@ function contact_category_edit_form($form, &$form_state, array $category = array
'#description' => t('When listing categories, those with lighter (smaller) weights get listed before categories with heavier (larger) weights. Categories with equal weights are sorted alphabetically.'),
);
$form['selected'] = array(
'#type' => 'select',
'#title' => t('Selected'),
'#options' => array(
0 => t('No'),
1 => t('Yes'),
),
'#type' => 'checkbox',
'#title' => t('Make this the default category.'),
'#default_value' => $category['selected'],
'#description' => t('Set this to <em>Yes</em> if you would like this category to be selected by default.'),
);
$form['cid'] = array(
'#type' => 'value',
......
......@@ -221,7 +221,7 @@ class ContactSitewideTestCase extends WebTestBase {
$edit['category'] = $category;
$edit['recipients'] = $recipients;
$edit['reply'] = $reply;
$edit['selected'] = ($selected ? '1' : '0');
$edit['selected'] = ($selected ? TRUE : FALSE);
$this->drupalPost('admin/structure/contact/add', $edit, t('Save'));
}
......@@ -244,7 +244,7 @@ class ContactSitewideTestCase extends WebTestBase {
$edit['category'] = $category;
$edit['recipients'] = $recipients;
$edit['reply'] = $reply;
$edit['selected'] = ($selected ? '1' : '0');
$edit['selected'] = ($selected ? TRUE : FALSE);
$this->drupalPost('admin/structure/contact/edit/' . $category_id, $edit, t('Save'));
return ($category_id);
}
......
......@@ -1177,9 +1177,9 @@ protected function drupalGetAJAX($path, array $options = array(), array $headers
* @param $edit
* Field data in an associative array. Changes the current input fields
* (where possible) to the values indicated. A checkbox can be set to
* TRUE to be checked and FALSE to be unchecked. Note that when a form
* contains file upload fields, other fields cannot start with the '@'
* character.
* TRUE to be checked and should be set to FALSE to be unchecked. Note that
* when a form contains file upload fields, other fields cannot start with
* the '@' character.
*
* Multiple select fields can be set using name[] and setting each of the
* possible values. Example:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment