Commit 4914ff1c authored by webchick's avatar webchick

Revert "Issue #1475666 by filijonka, Devin Carlson, Kevin Morse, tstoeckler,...

Revert "Issue #1475666 by filijonka, Devin Carlson, Kevin Morse, tstoeckler, Niklas Fiekas: Fixed PHP error because of typo in form.inc line 3025."

This reverts commit c804c2bc.
parent bb3270d8
......@@ -3094,7 +3094,7 @@ function form_pre_render_conditional_form_element($element) {
$element['#attributes']['title'] = $element['#title'];
if (!empty($element['#required'])) {
// Append an indication that this field is required.
$element['#attributes']['title'] .= ' (' . t('Required') . ')';
$element['#attributes']['title'] .= ' (' . $t('Required') . ')';
}
}
......
......@@ -740,11 +740,6 @@ class FormsElementsLabelsTestCase extends DrupalWebTestCase {
$elements = $this->xpath('//div[@id="form-test-textfield-title-suffix"]/preceding-sibling::div[contains(@class, \'form-item-form-textfield-test-title\')]');
$this->assertTrue(isset($elements[0]), t("Properly places the #suffix element before the form item."));
// Check that required checkboxes with #title_display attribute have
// a description but no title is displayed.
$this->assertFieldByXPath('//div[contains(@class, "form-item-form-checkboxes-test-title-display-attribute")]/div[contains(@class, "description")]', NULL, 'Description displayed for #title_display attribute.');
$this->assertNoFieldByXPath('//label[@for="edit-form-checkboxes-test-title-display-attribute"]', NULL, 'No title displayed for #title_display attribute.');
}
}
......
......@@ -821,15 +821,6 @@ function form_label_test_form() {
$form['form_textfield_test_title_no_show'] = array(
'#type' => 'textfield',
);
// Test required checkboxes with #title_display attribute and a description.
$form['form_checkboxes_test_title_display_attribute'] = array(
'#type' => 'checkboxes',
'#title' => 'Checkboxes, #title_display attribute',
'#title_display' => 'attribute',
'#required' => TRUE,
'#description' => 'Required checkboxes with #title_display attribute and a description.',
'#options' => drupal_map_assoc(array('foo', 'bar', 'baz')),
);
return $form;
}
......
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