Commit bcb5a507 authored by Son Nguyen's avatar Son Nguyen Committed by Gerrit Code Review
Browse files

Merge changes I659f2daf,I6af2a13c

* changes:
  Altering 'cancel' on addblock to 'undo' to avoid clash
  Adding the id to alt/title text for blocks (Bug #1428456)
parents ed2aeb92 b454a9ae
......@@ -853,8 +853,8 @@ class BlockInstance {
$configtitle = $title == '' ? call_static_method($blocktypeclass, 'get_title') : $title;
$smarty = smarty_core();
$smarty->assign('id', $this->get('id'));
$id = $this->get('id');
$smarty->assign('id', $id);
$smarty->assign('viewid', $this->get('view'));
$smarty->assign('title', $title);
$smarty->assign('row', $this->get('row'));
......@@ -869,8 +869,8 @@ class BlockInstance {
$smarty->assign('javascript', defined('JSON'));
$smarty->assign('strnotitle', get_string('notitle', 'view'));
$smarty->assign('strmovetitletext', $title == '' ? get_string('movethisblock', 'view') : get_string('moveblock', 'view', "'$title'"));
$smarty->assign('strconfigtitletext', $title == '' ? get_string('configurethisblock', 'view') : get_string('configureblock', 'view', "'$title'"));
$smarty->assign('strremovetitletext', $title == '' ? get_string('removethisblock', 'view') : get_string('removeblock', 'view', "'$title'"));
$smarty->assign('strconfigtitletext', $title == '' ? get_string('configurethisblock1', 'view', $id) : get_string('configureblock1', 'view', "'$title'", $id));
$smarty->assign('strremovetitletext', $title == '' ? get_string('removethisblock1', 'view', $id) : get_string('removeblock1', 'view', "'$title'", $id));
if (!$configure && $title) {
$configdata = $this->get('configdata');
......
......@@ -21,6 +21,7 @@ $string['editaccess'] = 'Edit access';
$string['next'] = 'Next';
$string['back'] = 'Back';
$string['title'] = 'Page title';
$string['undo'] = 'Undo';
$string['viewurl'] = 'Page URL';
$string['viewurldescription'] = 'A readable URL for your page. This field must be between 3 and 100 characters long.';
$string['userviewurltaken'] = 'This URL is already taken. Please choose another one.';
......@@ -273,11 +274,11 @@ $string['movethisblockright'] = "Move this block right";
$string['moveblock'] = 'Move %s block';
$string['movethisblock'] = 'Move this block';
$string['Configure'] = 'Configure';
$string['configureblock'] = 'Configure %s block';
$string['configurethisblock'] = 'Configure this block';
$string['configureblock1'] = 'Configure %s block (ID %s)';
$string['configurethisblock1'] = 'Configure this block (ID %s)';
$string['closeconfiguration'] = 'Close configuration';
$string['removeblock'] = 'Remove %s block';
$string['removethisblock'] = 'Remove this block';
$string['removeblock1'] = 'Remove %s block (ID %s)';
$string['removethisblock1'] = 'Remove this block (ID %s)';
$string['blocktitle'] = 'Block title';
$string['changemyviewlayout'] = 'Change my page layout';
......
......@@ -4,8 +4,8 @@
{if $retractable && !$configure}
<img src="{theme_image_url filename=retractable}" alt="{str tag='retractable' section='view'}" title="{str tag='retractable' section='view'}" class="retractablebtn">
{/if}
{if $configurable && !$configure} <input type="image" src="{theme_image_url filename=btn_configure}" class="configurebutton" name="action_configureblockinstance_id_{$id}" alt="{$strconfigtitletext}">{/if}
{if $configure}<input type="image" src="{theme_image_url filename=btn_close}" class="deletebutton" name="action_removeblockinstance_id_{$id}" alt="{str tag=Close}">{else}<input type="image" src="{theme_image_url filename=btn_deleteremove}" class="deletebutton" name="action_removeblockinstance_id_{$id}" alt="{$strremovetitletext}">{/if}
{if $configurable && !$configure} <input type="image" src="{theme_image_url filename=btn_configure}" class="configurebutton" name="action_configureblockinstance_id_{$id}" alt="{$strconfigtitletext}" title="{$strconfigtitletext}">{/if}
{if $configure}<input type="image" src="{theme_image_url filename=btn_close}" class="deletebutton" name="action_removeblockinstance_id_{$id}" alt="{str tag=Close}">{else}<input type="image" src="{theme_image_url filename=btn_deleteremove}" class="deletebutton" name="action_removeblockinstance_id_{$id}" alt="{$strremovetitletext}" title="{$strremovetitletext}">{/if}
</div>
<div class="blockinstance-header">
<h2 class="title">{if $configure}{$configtitle}: {str tag=Configure section=view}{else}{$title|default:"[$strnotitle]"}{/if}</h2>
......
......@@ -177,7 +177,7 @@ $addform = pieform(array(
),
'submit' => array(
'type' => 'submitcancel',
'value' => array(get_string('add'), get_string('cancel')),
'value' => array(get_string('add'), get_string('undo', 'view')),
),
),
));
......
Supports Markdown
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