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

📄 accountpage.tmpl

📁 Network Administration Visualized 网络管理可视化源码
💻 TMPL
字号:
## $Id: AccountPage.tmpl 3104 2005-01-19 10:21:30Z mortenv $## 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)  <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  <br>#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<table border=0><form method="POST" action="accountsubmit">#if not $newAccount  <input type="hidden" name="id" value="$account.id">#end if  <tr><td><b>Login:</b></td><td>$textfield('login', $account.login)</td></tr>  <tr><td><b>Name:</b></td><td>$textfield('name', $account.name, forceEditable=1)</td></tr>  <tr><td><b>External:</b></td><td> <i>#if $account.ext_sync$account.ext_sync#else[None]#end if  </i></td></tr>#unless $account.ext_sync  <tr><td><b>Password:</b></td><td>$textfield('password', '', password=True)</td></tr>  <tr><td><b>Confirm password:</b></td><td>$textfield('passwordConfirm', '', password=True)</td></tr>#end unless  <tr><td colspan="2"><input type="submit" value="Submit changes" /></td></tr></form></table>#if not $newAccount<p><a href="accountdel?id=$account.id">DELETE</a> this account</p><h3>Organizations</h3><p>#if len($account.organizations) > 0#set $organizations = map(lambda s: "<a href=\"orgunlink?uid=%s&orgid=%s\">%s</a>" % ($account.id, s,s), $account.organizations)#set $orglist = ", ".join($organizations)  Member of the following organizations (click one to remove): <i>$orglist</i>#else  Not a member of any organizations.#end if</p><form name="organizations" method="POST" action="orglink">  <input type="hidden" name="uid" value="$account.id" />  <select name="orgid" size="8" multiple>$add_orgtree($orgTree)  </select><br>  <input type="submit" value="Add to selected organizations" /></form><h3>Group memberships</h3>#for $group in $account.groups$add_group($group)#end for<h3>Group non-memberships</h3>#for $group in $account.nongroups$add_group($group, add=True)#end for#end if#end block useradmin

⌨️ 快捷键说明

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