summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwebchick <webchick@24967.no-reply.drupal.org>2012-03-25 10:29:38 -0600
committerwebchick <webchick@24967.no-reply.drupal.org>2012-03-25 10:29:38 -0600
commite224129315a72d5e42ccf889bdf9c66b44775d34 (patch)
tree505e5e77da4827ecd334ede4667d7f04abd87d9e
parenta6e6b2e96b3bb174a656b71149808add7d488b39 (diff)
downloadbrdo-e224129315a72d5e42ccf889bdf9c66b44775d34.tar.gz
brdo-e224129315a72d5e42ccf889bdf9c66b44775d34.tar.bz2
Revert "Issue #1475666 by filijonka, Niklas Fiekas, Devin Carlson, Kevin Morse, tstoeckler: Fixed PHP error because of typo in form.inc line 3025."
This reverts commit ea8e74bbd494ce2f8d6e5bf38e1596fe014a1b85.
-rw-r--r--includes/form.inc2
-rw-r--r--modules/simpletest/tests/form.test5
-rw-r--r--modules/simpletest/tests/form_test.module9
3 files changed, 1 insertions, 15 deletions
diff --git a/includes/form.inc b/includes/form.inc
index a7803448d..c3e59540a 100644
--- a/includes/form.inc
+++ b/includes/form.inc
@@ -3084,7 +3084,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') . ')';
}
}
diff --git a/modules/simpletest/tests/form.test b/modules/simpletest/tests/form.test
index 1766126a8..ec7df2c33 100644
--- a/modules/simpletest/tests/form.test
+++ b/modules/simpletest/tests/form.test
@@ -703,11 +703,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.');
}
}
diff --git a/modules/simpletest/tests/form_test.module b/modules/simpletest/tests/form_test.module
index 3a8c4ca12..1c16c39c7 100644
--- a/modules/simpletest/tests/form_test.module
+++ b/modules/simpletest/tests/form_test.module
@@ -795,15 +795,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;
}