Commit 703d5bd4 authored by Nigel McNie's avatar Nigel McNie
Browse files

Make sure that the institution dropdown on admin user search is set...

Make sure that the institution dropdown on admin user search is set appropriately after doing a search. Move some language strings out of view.php and update places in the admin section where they are referenced.
parent 480b736b
......@@ -55,7 +55,7 @@ if ($USER->get('admin')) {
$smarty = smarty(array('adminusersearch'));
$smarty->assign('search', $search);
$smarty->assign('alphabet', explode(',', get_string('alphabet', 'view')));
$smarty->assign('alphabet', explode(',', get_string('alphabet')));
$smarty->assign('institutions', $institutions);
$smarty->assign('results', build_admin_user_search_results($search, $offset, $limit, $sortby, $sortdir));
$smarty->display('admin/users/search.tpl');
......
......@@ -53,6 +53,7 @@ $string['none'] = 'None';
$string['at'] = 'at';
$string['From'] = 'From';
$string['To'] = 'To';
$string['All'] = 'All';
$string['next'] = 'Next';
$string['nextpage'] = 'Next page';
......@@ -697,5 +698,6 @@ $string['country.zw'] = 'Zimbabwe';
$string['system'] = 'System';
$string['done'] = 'Done';
$string['back'] = 'Back';
$string['alphabet'] = 'A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z';
?>
......@@ -115,9 +115,6 @@ $string['View'] = 'View';
$string['watchlistupdated'] = 'Your watchlist has been updated';
$string['editmyview'] = 'Edit my view';
$string['alphabet'] = 'A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z';
$string['all'] = 'All';
$string['friend'] = 'Friend';
$string['profileicon'] = 'Profile Icon';
......
......@@ -9,7 +9,7 @@
<td class="initial-label">{str tag="firstname"}:</td>
<td class="initial-letters">
<span class="first-initial{if empty($search->f)} selected{/if} all">
<a href="{$WWWROOT}admin/users/search.php{if $search->l}?l={$search->l|escape}{/if}">{str tag="all" section="view"}</a>
<a href="{$WWWROOT}admin/users/search.php{if $search->l}?l={$search->l|escape}{/if}">{str tag="All"}</a>
</span>
{foreach from=$alphabet item=a}
<span class="first-initial{if $a == $search->f} selected{/if}">
......@@ -22,7 +22,7 @@
<td class="initial-label">{str tag="lastname"}:</td>
<td class="initial-letters">
<span class="last-initial{if empty($search->l)} selected{/if} all">
<a href="{$WWWROOT}admin/users/search.php{if $search->f}?f={$search->f|escape}{/if}">{str tag="all" section="view"}</a>
<a href="{$WWWROOT}admin/users/search.php{if $search->f}?f={$search->f|escape}{/if}">{str tag="All"}</a>
</span>
{foreach from=$alphabet item=a}
<span class="last-initial{if $a == $search->l} selected{/if}">
......@@ -43,11 +43,11 @@
{if $USER->get('admin')}
<select name="institution" id="institution">
{else}
<select name="institution_requested" id="institution">
<select name="institution_requested" id="institution_requested">
{/if}
<option value="all" selected>{str tag=all}</option>
<option value="all"{if !$smarty.request.institution} selected="selected"{/if}>{str tag=All}</option>
{foreach from=$institutions item=i}
<option value={$i->name|escape}>{$i->displayname|escape}</option>
<option value="{$i->name|escape}"{if $i->name == $smarty.request.institution}" selected="selected"{/if}>{$i->displayname|escape}</option>
{/foreach}
</select>
</label>
......
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