Commit 714c5f93 authored by Nigel McNie's avatar Nigel McNie

Put all of the delete confirmation messages into message divs, so that a) they...

Put all of the delete confirmation messages into message divs, so that a) they wrap and b) the buttons are centred under the messages.
parent 73b2c1a2
......@@ -48,12 +48,12 @@ $views = count_records_sql(
$form = pieform(array(
'name' => 'deletegroup',
'renderer' => 'div',
'autofocus' => false,
'method' => 'post',
'elements' => array(
'submit' => array(
'type' => 'submitcancel',
'title' => $views ? get_string('groupconfirmdeletehasviews', 'group') : get_string('groupconfirmdelete', 'group'),
'value' => array(get_string('yes'), get_string('no')),
'goto' => get_config('wwwroot') . 'group/view.php?id=' . $groupid
)
......@@ -62,6 +62,7 @@ $form = pieform(array(
$smarty = smarty();
$smarty->assign('heading', TITLE);
$smarty->assign('message', $views ? get_string('groupconfirmdeletehasviews', 'group') : get_string('groupconfirmdelete', 'group'));
$smarty->assign('form', $form);
$smarty->display('group/delete.tpl');
......
......@@ -61,12 +61,12 @@ $views = count_records_sql(
$form = pieform(array(
'name' => 'leavegroup',
'renderer' => 'div',
'autofocus' => false,
'method' => 'post',
'elements' => array(
'submit' => array(
'type' => 'submitcancel',
'title' => $views ? get_string('groupconfirmleavehasviews', 'group') : get_string('groupconfirmleave', 'group'),
'value' => array(get_string('yes'), get_string('no')),
'goto' => get_config('wwwroot') . ($returnto == 'find' ? 'group/find.php' : 'group/mygroups.php')
),
......@@ -80,6 +80,7 @@ $form = pieform(array(
$smarty = smarty();
$smarty->assign('heading', TITLE);
$smarty->assign('form', $form);
$smarty->assign('message', $views ? get_string('groupconfirmleavehasviews', 'group') : get_string('groupconfirmleave', 'group'));
$smarty->assign('group', $group);
$smarty->display('group/leave.tpl');
......
......@@ -53,10 +53,8 @@ $returnto = param_alpha('returnto', 'view');
$form = pieform(array(
'name' => 'delete_interaction',
'renderer' => 'div',
'elements' => array(
'title' => array(
'value' => get_string('deleteinteractionsure', 'group'),
),
'id' => array(
'type' => 'hidden',
'value' => $id,
......@@ -73,6 +71,7 @@ $form = pieform(array(
$smarty = smarty(array('tablerenderer'), array(), array(), array('sideblocks' => array(interaction_sideblock($group->id))));
$smarty->assign('form', $form);
$smarty->assign('heading', TITLE);
$smarty->assign('message', get_string('deleteinteractionsure', 'group'));
$smarty->assign('group', $group);
$smarty->display('interaction/delete.tpl');
......
......@@ -98,6 +98,7 @@ $breadcrumbs = array(
$form = pieform(array(
'name' => 'deletepost',
'renderer' => 'div',
'autofocus' => false,
'elements' => array(
'title' => array(
......
......@@ -96,6 +96,7 @@ $breadcrumbs = array(
$form = pieform(array(
'name' => 'deletetopic',
'renderer' => 'div',
'autofocus' => false,
'elements' => array(
'title' => array(
......
......@@ -3,6 +3,9 @@
{include file="columnleftstart.tpl"}
<h2>{$heading|escape}</h2>
<div class="message">
<p>{$message}</p>
{$form}
</div>
{include file="columnleftend.tpl"}
{include file="footer.tpl"}
......@@ -4,6 +4,9 @@
{include file="columnleftstart.tpl"}
<h2>{$heading|escape}</h2>
{include file="group/simplegroup.tpl" group=$group}
<div class="message">
<p>{$message}</p>
{$form}
</div>
{include file="columnleftend.tpl"}
{include file="footer.tpl"}
......@@ -3,8 +3,11 @@
{include file="columnleftstart.tpl"}
<h2>{$group->name|escape}</h2>
<div class="message">
<h3>{$heading|escape}</h3>
<p>{$message}</p>
{$form}
</div>
{include file="columnleftend.tpl"}
{include file="footer.tpl"}
......@@ -3,6 +3,9 @@
{include file="columnleftstart.tpl"}
<h2>{$heading|escape}</h2>
<div class="message">
<p>{$message}</p>
{$form}
</div>
{include file="columnleftend.tpl"}
{include file="footer.tpl"}
......@@ -47,8 +47,6 @@ $group = get_record_sql(
);
if (!$view || !$group || $view->submittedto) {
log_debug($view);
log_debug($group);
throw new AccessDeniedException(get_string('cantsubmitviewtogroup', 'view'));
}
......@@ -56,12 +54,12 @@ define('TITLE', get_string('submitviewtogroup', 'view', $view->title, $group->na
$form = pieform(array(
'name' => 'submitview',
'renderer' => 'div',
'autofocus' => false,
'method' => 'post',
'elements' => array(
'submit' => array(
'type' => 'submitcancel',
'title' => get_string('submitviewconfirm', 'view', $view->title, $group->name),
'value' => array(get_string('yes'), get_string('no')),
'goto' => get_config('wwwroot') . 'view/'
)
......@@ -70,6 +68,7 @@ $form = pieform(array(
$smarty = smarty();
$smarty->assign('heading', TITLE);
$smarty->assign('message', get_string('submitviewconfirm', 'view', $view->title, $group->name));
$smarty->assign('form', $form);
$smarty->display('view/submit.tpl');
......
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