list.php, list.tpl:

- use smarty-style dropdown for admin dropdown instead of select_options()
- only display admin dropdown if more than one admin is available
  (which basically means hiding it for domain admins)


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1723 a1433add-5e2c-0410-b055-b7f2511e0802
pull/2/head
Christian Boltz 10 years ago
parent b5a6417a6e
commit 1e35c579b6

@ -48,7 +48,8 @@ authentication_require_role($formconf['required_role']);
$handler->getList('');
$items = $handler->result();
$smarty->assign ('select_options', select_options($list_admins, array ($fUsername)), false);
$smarty->assign('admin_list', $list_admins);
$smarty->assign('admin_selected', $username);
#if ($is_superadmin) {
$smarty->assign('smarty_template', 'list');
$smarty->assign('struct', $handler->getStruct());

@ -1,9 +1,9 @@
<div id="overview">
<form name="frmOverview" method="post" action="">
<select name="username" onchange="this.form.submit();">
{$select_options}
</select>
<input class="button" type="submit" name="go" value="{$PALANG.go}" />
{if ($admin_list|count > 1)}
{html_options name='username' output=$admin_list values=$admin_list selected=$admin_selected onchange="this.form.submit();"}
<input class="button" type="submit" name="go" value="{$PALANG.go}" />
{/if}
</form>
{#form_search#}
</div>

Loading…
Cancel
Save