Commit 9d8aa135 authored by alexpott's avatar alexpott
Browse files

Issue #1919916 by oadaeh, larowlan, jessehs, babruix: Change label of custom...

Issue #1919916 by oadaeh, larowlan, jessehs, babruix: Change label of custom block default body field from "Block body" to just "Body".
parent ed6861bc
......@@ -107,12 +107,12 @@ function custom_block_entity_bundle_info() {
* @param string $block_type_id
* Id of the block type.
* @param string $label
* (optional) The label for the body instance. Defaults to 'Block body'
* (optional) The label for the body instance. Defaults to 'Body'
*
* @return array()
* Body field instance.
*/
function custom_block_add_body_field($block_type_id, $label = 'Block body') {
function custom_block_add_body_field($block_type_id, $label = 'Body') {
// Add or remove the body field, as needed.
$field = field_info_field('custom_block', 'body');
$instance = field_info_instance('custom_block', 'body', $block_type_id);
......
......@@ -79,12 +79,12 @@ public function testCustomBlockTypeEditing() {
$this->createCustomBlockType('other');
$instance = field_info_instance('custom_block', 'body', 'basic');
$this->assertEqual($instance->getLabel(), 'Block body', 'Body field was found.');
$this->assertEqual($instance->getLabel(), 'Body', 'Body field was found.');
// Verify that title and body fields are displayed.
$this->drupalGet('block/add/basic');
$this->assertRaw('Block description', 'Block info field was found.');
$this->assertRaw('Block body', 'Body field was found.');
$this->assertRaw('Body', 'Body field was found.');
// Change the block type name.
$edit = array(
......@@ -104,7 +104,7 @@ public function testCustomBlockTypeEditing() {
$this->drupalPostForm('admin/structure/block/custom-blocks/manage/basic', array(), t('Save'));
// Check that the body field doesn't exist.
$this->drupalGet('block/add/basic');
$this->assertNoRaw('Block body', 'Body field was not found.');
$this->assertNoRaw('Body', 'Body field was not found.');
}
/**
......
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