Commit 57fdb946 authored by alexpott's avatar alexpott

Issue #1867030 by larowlan, Berdir, Oleksiy, andypost, fil00dl: Contact...

Issue #1867030 by larowlan, Berdir, Oleksiy, andypost, fil00dl: Contact message preview appears at random form position after sorting fields in Manage fields
parent 8f2befb3
......@@ -69,6 +69,11 @@ function contact_entity_extra_field_info() {
'weight' => -30,
);
}
$fields['contact_message'][$bundle]['form']['preview'] = array(
'label' => t('Preview sender message'),
'description' => t('Preview'),
'weight' => 40,
);
$fields['contact_message'][$bundle]['form']['copy'] = array(
'label' => t('Send copy to sender'),
'description' => t('Option'),
......
......@@ -50,6 +50,7 @@ function testSiteWideContact() {
'administer users',
'administer account settings',
'administer contact_message fields',
'administer contact_message form display',
]);
$this->drupalLogin($admin_user);
......@@ -283,6 +284,10 @@ function testSiteWideContact() {
$this->fieldUIAddNewField(NULL, $field_name, $field_label, 'text');
$field_name = 'field_' . $field_name;
// Check preview field can be ordered.
$this->drupalGet('admin/structure/contact/manage/' . $contact_form . '/form-display');
$this->assertText(t('Preview'));
// Check that the field is displayed.
$this->drupalGet('contact/' . $contact_form);
$this->assertText($field_label);
......
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