Commit e86e7068 authored by webchick's avatar webchick

Issue #1893740 by Gábor Hojtsy: Remove repeated 'Block' UI text from block editing, fix title.

parent 79ba7703
......@@ -78,7 +78,7 @@ function block_admin_edit(Block $entity) {
}
// Get the block subject for the page title.
drupal_set_title(t("%label block in %theme", array('%label' => $entity->label(), '%theme' => $theme_title)), PASS_THROUGH);
drupal_set_title(t("Configure %label block in %theme", array('%label' => $entity->label(), '%theme' => $theme_title)), PASS_THROUGH);
return entity_get_form($entity);
}
......
......@@ -51,7 +51,7 @@ public function blockForm($form, &$form_state) {
// separate interface for administering custom blocks.
$form['info'] = array(
'#type' => 'textfield',
'#title' => t('Block description'),
'#title' => t('Description'),
'#required' => TRUE,
'#default_value' => $this->configuration['info'],
'#description' => t('A brief description of your block. Used on the <a href="@overview">Blocks administration page</a>. <strong>Changing this field will change the description for all copies of this block.</strong>', array('@overview' => url('admin/structure/block'))),
......@@ -60,7 +60,7 @@ public function blockForm($form, &$form_state) {
// separate interface for administering custom blocks.
$form['body'] = array(
'#type' => 'text_format',
'#title' => t('Block body'),
'#title' => t('Body'),
'#default_value' => $this->configuration['body'],
'#format' => isset($this->configuration['format']) ? $this->configuration['format'] : filter_default_format(),
'#description' => t('The content of the block as shown to the user. <strong>Changing this field will change the block body everywhere it is used.</strong>'),
......
......@@ -236,13 +236,13 @@ public function form($form, &$form_state) {
$form['label'] = array(
'#type' => 'textfield',
'#title' => t('Block title'),
'#title' => t('Title'),
'#maxlength' => 255,
'#default_value' => !$entity->isNew() ? $entity->label() : $definition['subject'],
);
$form['machine_name'] = array(
'#type' => 'machine_name',
'#title' => t('Block machine name'),
'#title' => t('Machine name'),
'#maxlength' => 64,
'#description' => t('A unique name to save this block configuration. Must be alpha-numeric and be underscore separated.'),
'#default_value' => $entity->id(),
......
......@@ -59,7 +59,7 @@ public function testBlockUpgradeTitleLength() {
// Confirm that the custom block cannot be created with title longer than
// the maximum number of characters.
$this->assertText('Block title cannot be longer than 255 characters');
$this->assertText('Title cannot be longer than 255 characters');
}
}
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