⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 accountpage.tmpl

📁 监控大型网络的软件。能够自动发现拓扑结构
💻 TMPL
字号:
## $Id: AccountPage.tmpl 4174 2007-08-23 12:52:56Z jodal $## Extends the UserAdmin template for common useradmin structure.## Builds html for the edit Account screen of the useradmin module.#### Copyright 2003, 2004 Norwegian University of Science and Technology#### This file is part of Network Administration Visualized (NAV)#### NAV is free software; you can redistribute it and/or modify## it under the terms of the GNU General Public License as published by## the Free Software Foundation; either version 2 of the License, or## (at your option) any later version.#### NAV is distributed in the hope that it will be useful,## but WITHOUT ANY WARRANTY; without even the implied warranty of## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the## GNU General Public License for more details.#### You should have received a copy of the GNU General Public License## along with NAV; if not, write to the Free Software## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA###### Authors: Morten Vold <morten.vold@itea.ntnu.no>###extends UserAdmin#def textfield($name, $value, $maxLength=0, $forceEditable=0, $password=False)#if $password#set $inputtype = "password"#else#set $inputtype = "text"#end if#if $editable or $forceEditable  <input type="$inputtype" name="$name" value="$value" />#else  <i>$value</i>#end if#end def#def add_group($group, $add=False)    <li>        <a href="/useradmin/group?id=$group.id">$group.name</a> -        $group.description#if $add        [<a href="/useradmin/link?gid=$group.id&uid=$account.id&source=account">Add</a>]#else        [<a href="/useradmin/unlink?gid=$group.id&uid=$account.id&source=account">Remove</a>]#end if    </li>#end def#def add_orgtree($tree, $level=0)#set $levelled = '&nbsp;&nbsp;' * $level#set $orgs = $tree.keys()$orgs.sort()#for $org in $orgs    <option value="$org">$levelled$org</option>#if len($tree[$org]) > 0$add_orgtree($tree[$org], $level+1)#end if#end for#end def#block useradmin<form action="accountsubmit" method="post">#if not $newAccount<input type="hidden" name="id" value="$account.id">#end if<table class="vertitable">    <tr>        <th>Login</th>        <td>$textfield('login', $account.login)</td>    </tr>    <tr>        <th>Name</th>        <td>$textfield('name', $account.name, forceEditable=1)</td>    </tr>    <tr>        <th>External</th>        <td>        #if $account.ext_sync            $account.ext_sync        #else            [None]        #end if        </td>    </tr>#unless $account.ext_sync    <tr>        <th>Password</th>        <td>$textfield('password', '', password=True)</td>    </tr>    <tr>        <th>Confirm password</th>        <td>$textfield('passwordConfirm', '', password=True)</td>    </tr>#end unless    <tr>        <th></th>        <td><button type="submit">Submit changes</button></td>    </tr></table></form>#if not $newAccount<p>[<a href="accountdel?id=$account.id">Delete account</a>]</p><h3>Organizations</h3>#if len($account.organizations) > 0<p>Member of the following organizations:</p><ul>#for $org in $account.organizations    <li>$org [<a href="orgunlink?uid=$account.id&orgid=$org">Remove</a>]</li>#end for</ul>#else<p>Not a member of any organizations.</p>#end if<form name="organizations" method="POST" action="orglink">    <input type="hidden" name="uid" value="$account.id" />    <select name="orgid">    $add_orgtree($orgTree)    </select>    <button type="submit">Add organization</button></form><h3>Group memberships</h3><ul>#for $group in $account.groups$add_group($group)#end for</ul><h3>Group non-memberships</h3><ul>#for $group in $account.nongroups$add_group($group, add=True)#end for</ul>#end if#end block useradmin

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -