Commit 566360c2 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Enable auto_escape in account templates


Signed-off-by: default avatarRichard Mansfield <richardm@catalyst.net.nz>
parent 4325e9e6
...@@ -186,10 +186,6 @@ function delete_all_notifications_submit() { ...@@ -186,10 +186,6 @@ function delete_all_notifications_submit() {
} }
$smarty = smarty(array('paginator')); $smarty = smarty(array('paginator'));
$smarty->assign('selectallread', 'toggleChecked(\'tocheckread\'); return false;');
$smarty->assign('selectalldel', 'toggleChecked(\'tocheckdel\'); return false;');
$smarty->assign('markread', 'markread(this, \'read\'); return false;');
$smarty->assign('markdel', 'markread(document.notificationlist, \'del\'); return false;');
$smarty->assign('options', $options); $smarty->assign('options', $options);
$smarty->assign('type', $type); $smarty->assign('type', $type);
$smarty->assign('INLINEJAVASCRIPT', $javascript); $smarty->assign('INLINEJAVASCRIPT', $javascript);
......
...@@ -98,10 +98,10 @@ $prefsform = pieform(array( ...@@ -98,10 +98,10 @@ $prefsform = pieform(array(
)); ));
$smarty = smarty(); $smarty = smarty();
$smarty->assign('prefsdescr', get_string('prefsdescr', 'activity')); $smarty->assign('pagedescription', get_string('prefsdescr', 'activity'));
$smarty->assign('form', $prefsform); $smarty->assign('form', $prefsform);
$smarty->assign('PAGEHEADING', hsc(get_string('notifications'))); $smarty->assign('PAGEHEADING', hsc(get_string('notifications')));
$smarty->display('account/activity/preferences/index.tpl'); $smarty->display('form.tpl');
function activityprefs_submit(Pieform $form, $values) { function activityprefs_submit(Pieform $form, $values) {
global $activitytypes, $admintypes, $USER; global $activitytypes, $admintypes, $USER;
......
{auto_escape off}
{include file="header.tpl"} {include file="header.tpl"}
<div id="notifications"> <div id="notifications">
...@@ -11,33 +10,32 @@ ...@@ -11,33 +10,32 @@
{/foreach} {/foreach}
</select>{contextualhelp plugintype='core' pluginname='activity' section='activitytypeselect'} </select>{contextualhelp plugintype='core' pluginname='activity' section='activitytypeselect'}
</form> </form>
<form name="notificationlist" method="post" onSubmit="{$markread}"> <form name="notificationlist" method="post" onSubmit="markread(this, 'read'); return false;">
<table id="activitylist" class="fullwidth"> <table id="activitylist" class="fullwidth">
<thead> <thead>
<tr> <tr>
<th width="10"></th> <th width="10"></th>
<th>{str section='activity' tag='subject'}</th> <th>{str section='activity' tag='subject'}</th>
<th width="60">{str section='activity' tag='date'}</th> <th width="60">{str section='activity' tag='date'}</th>
<th width="50" class="center">{str section='activity' tag='read'}<br><a href="" onclick="{$selectallread}">{str section='activity' tag='selectall'}</a></th> <th width="50" class="center">{str section='activity' tag='read'}<br><a href="" onclick="toggleChecked('tocheckread'); return false;">{str section='activity' tag='selectall'}</a></th>
<th width="50" class="center">{str tag='delete'}<br><a href="" onclick="{$selectalldel}">{str section='activity' tag='selectall'}</a></th> <th width="50" class="center">{str tag='delete'}<br><a href="" onclick="toggleChecked('tocheckdel'); return false;">{str section='activity' tag='selectall'}</a></th>
</tr> </tr>
</thead> </thead>
<tfoot> <tfoot>
<tr> <tr>
<td colspan="5" class="right"> <td colspan="5" class="right">
<input class="submit" type="submit" value="{str tag='markasread' section='activity'}" /> <input class="submit" type="submit" value="{str tag='markasread' section='activity'}" />
<input class="submit btn-delete" type="button" value="{str tag='delete'}" onClick="{$markdel}" /> <input class="submit btn-delete" type="button" value="{str tag='delete'}" onClick="markread(document.notificationlist, 'del'); return false;" />
</td> </td>
</tr> </tr>
</tfoot> </tfoot>
<tbody> <tbody>
{$activitylist.tablerows} {$activitylist.tablerows|safe}
</tbody> </tbody>
</table> </table>
{$activitylist.pagination} {$activitylist.pagination|safe}
</form> </form>
</div> </div>
<div class="left">{$deleteall}</div> <div class="left">{$deleteall|safe}</div>
{include file="footer.tpl"} {include file="footer.tpl"}
{/auto_escape}
{auto_escape off}
{include file="header.tpl"}
{$prefsdescr}
{$form}
{include file="footer.tpl"}
{/auto_escape}
{auto_escape off}
{include file="header.tpl"} {include file="header.tpl"}
<div id="deleteaccount"> <div id="deleteaccount">
<h1>{str tag=deleteaccount section=account}</h1> <h1>{str tag=deleteaccount section=account}</h1>
<p>{str tag=deleteaccountdescription section=account}</p> <p>{str tag=deleteaccountdescription section=account}</p>
{$form} {$form|safe}
</div> </div>
{include file="footer.tpl"} {include file="footer.tpl"}
{/auto_escape}
{auto_escape off}
{include file="header.tpl"} {include file="header.tpl"}
{if $candeleteself}<div class="rbuttons"><a href="{$WWWROOT}account/delete.php">{str tag=deleteaccount section=account}</a></div>{/if} {if $candeleteself}<div class="rbuttons"><a href="{$WWWROOT}account/delete.php">{str tag=deleteaccount section=account}</a></div>{/if}
{$form} {$form|safe}
{include file="footer.tpl"} {include file="footer.tpl"}
{/auto_escape}
{auto_escape off}
{include file="header.tpl"} {include file="header.tpl"}
<p>{str tag="institutionmembershipdescription"}</p> <p>{str tag="institutionmembershipdescription"}</p>
{if $memberform} {if $memberform}
<h3>{str tag=Memberships}</h3> <h3>{str tag=Memberships}</h3>
{$memberform} {$memberform|safe}
{/if} {/if}
{if $requestedform} {if $requestedform}
<h3>{str tag=Requests}</h3> <h3>{str tag=Requests}</h3>
{$requestedform} {$requestedform|safe}
{/if} {/if}
{if $invitedform} {if $invitedform}
<h3>{str tag=Invitations}</h3> <h3>{str tag=Invitations}</h3>
{$invitedform} {$invitedform|safe}
{/if} {/if}
{if $joinform} {if $joinform}
<h3>{str tag="requestmembershipofaninstitution"}</h3> <h3>{str tag="requestmembershipofaninstitution"}</h3>
{$joinform} {$joinform|safe}
{/if} {/if}
{include file="footer.tpl"} {include file="footer.tpl"}
{/auto_escape}
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