[14297] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
| 2 | <xsl:stylesheet version="1.0"
|
---|
| 3 | xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
---|
| 4 | xmlns:java="http://xml.apache.org/xslt/java"
|
---|
[24007] | 5 | extension-element-prefixes="java"
|
---|
| 6 | exclude-result-prefixes="java">
|
---|
[14297] | 7 |
|
---|
[17017] | 8 | <!-- style includes global params interface_name, library_name -->
|
---|
[14297] | 9 | <xsl:include href="style.xsl"/>
|
---|
| 10 | <xsl:include href="service-params.xsl"/>
|
---|
| 11 |
|
---|
[17017] | 12 | <xsl:output method="html"/>
|
---|
[14297] | 13 |
|
---|
| 14 | <xsl:template name="pageTitle">
|
---|
[24007] | 15 | <!-- differred for page title --> <span class="getTextFor null document.title.authen.authentication"></span>
|
---|
[14297] | 16 | </xsl:template>
|
---|
| 17 |
|
---|
[18331] | 18 | <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
|
---|
| 19 | <xsl:template name="pageHead">
|
---|
| 20 | <head>
|
---|
| 21 | <title>
|
---|
[24007] | 22 | <xsl:text> </xsl:text>
|
---|
[18331] | 23 | </title>
|
---|
| 24 | <xsl:call-template name="globalStyle"/>
|
---|
| 25 | <xsl:call-template name="pageStyle"/>
|
---|
| 26 | </head>
|
---|
| 27 | </xsl:template>
|
---|
| 28 |
|
---|
[14297] | 29 | <xsl:template name="pageStyle"/>
|
---|
| 30 |
|
---|
| 31 | <xsl:template match="page">
|
---|
| 32 | <html>
|
---|
| 33 | <xsl:call-template name="pageHead" />
|
---|
| 34 | <xsl:call-template name="addGroup" />
|
---|
[14405] | 35 | <body>
|
---|
[24007] | 36 |
|
---|
| 37 | <xsl:call-template name="pageTitle"/>
|
---|
[18386] | 38 | <xsl:attribute name="dir"><xsl:call-template name="direction"/></xsl:attribute>
|
---|
| 39 | <div id="page-wrapper">
|
---|
[14297] | 40 | <xsl:variable name="authen_service" select="/page/pageRequest/paramList/param[@name='s']/@value"/>
|
---|
| 41 | <xsl:variable name="sub_action" select="/page/pageRequest/@subaction"/>
|
---|
| 42 | <xsl:variable name="asn_param" select ="/page/pageRequest/paramList/param[@name='s1.asn']/@value"/>
|
---|
| 43 | <xsl:variable name="uan" select ="/page/pageRequest/paramList/param[@name='s1.uan']/@value"/>
|
---|
| 44 | <xsl:variable name="pro_action" select ="/page/pageResponse/authenticationNode/service/@aup"/>
|
---|
| 45 | <xsl:variable name="au_node" select ="/page/pageResponse/authenticationNode"/>
|
---|
| 46 | <xsl:variable name="asn" select ="/page/pageResponse/authenticationNode/service/@asn"/>
|
---|
| 47 | <xsl:variable name="info" select ="/page/pageResponse/authenticationNode/service/@info"/>
|
---|
| 48 | <xsl:variable name="err" select ="/page/pageResponse/authenticationNode/service/@err"/>
|
---|
| 49 | <xsl:variable name="rt" select="/page/pageRequest/paramList/param[@name='rt']/@value"/>
|
---|
| 50 | <xsl:variable name="un_s" select="/page/pageResponse/authenticationNode/service/@un"/>
|
---|
| 51 | <xsl:variable name="pw_s" select="/page/pageResponse/authenticationNode/service/@pw"/>
|
---|
| 52 |
|
---|
[14416] | 53 | <div align="left" >
|
---|
[14297] | 54 | <table align="left" border="0" width="100%">
|
---|
| 55 | <tr align="left">
|
---|
[24007] | 56 | <td><h2 class="getTextFor authen.authentication"></h2></td>
|
---|
[14297] | 57 | <td><xsl:if test="$un_s!=''">
|
---|
| 58 | <xsl:if test="$asn!='' and $asn!='0'">
|
---|
[24007] | 59 | <span class="getTextFor authen.username"></span> : <xsl:value-of select="$un_s"/>
|
---|
[14297] | 60 | </xsl:if>
|
---|
| 61 | </xsl:if></td>
|
---|
| 62 | </tr>
|
---|
| 63 | </table>
|
---|
| 64 | </div>
|
---|
| 65 |
|
---|
| 66 | <div id="navbar">
|
---|
| 67 | <ul id="navbarlist">
|
---|
[14357] | 68 | <!--greenstone home-->
|
---|
[24007] | 69 | <li><a href="{$library_name}"><span class="getTextFor authen.greenstone_home"></span></a></li>
|
---|
[14357] | 70 |
|
---|
| 71 | <!--list users-->
|
---|
[14297] | 72 | <li>
|
---|
| 73 | <xsl:choose>
|
---|
| 74 | <xsl:when test="$asn!='' and $asn!='0' and $un_s!=''">
|
---|
[24007] | 75 | <a href="{$library_name}?a=g&amp;rt=r&amp;sa=authen&amp;s=Authentication&amp;s1.aup=ListUsers&amp;s1.asn={$asn}&amp;s1.uan=1&amp;s1.un={$un_s}&amp;s1.pw="><span class="getTextFor authen.list_users"></span></a>
|
---|
[18316] | 76 | </xsl:when>
|
---|
| 77 | <xsl:otherwise>
|
---|
[24007] | 78 | <a href="{$library_name}?a=g&amp;rt=r&amp;sa=authen&amp;s=Authentication&amp;s1.asn=&amp;s1.aup=Login"><span class="getTextFor authen.list_users"></span></a>
|
---|
[18316] | 79 | </xsl:otherwise>
|
---|
| 80 | </xsl:choose></li>
|
---|
[14357] | 81 |
|
---|
| 82 | <!--add a new user-->
|
---|
[14297] | 83 | <li>
|
---|
| 84 | <xsl:choose>
|
---|
| 85 | <xsl:when test="$asn!='' and $asn!='0' and $un_s!=''">
|
---|
[24007] | 86 | <a href="{$library_name}?a=g&amp;rt=r&amp;sa=authen&amp;s=Authentication&amp;s1.aup=AddUser&amp;s1.asn={$asn}&amp;s1.uan=1&amp;s1.un={$un_s}&amp;s1.pw=&amp;s1.umun=&amp;s1.umpw=&amp;s1.umgp=&amp;s1.umas=&amp;s1.umc="><span class="getTextFor authen.add_a_new_user"></span></a>
|
---|
[14297] | 87 | </xsl:when>
|
---|
| 88 | <xsl:otherwise>
|
---|
[24007] | 89 | <a href="{$library_name}?a=g&amp;rt=r&amp;sa=authen&amp;s=Authentication&amp;s1.asn=&amp;s1.aup=Login"><span class="getTextFor authen.add_a_new_user"></span></a>
|
---|
[14297] | 90 | </xsl:otherwise>
|
---|
| 91 | </xsl:choose>
|
---|
| 92 | </li>
|
---|
[18316] | 93 |
|
---|
[14357] | 94 | <!-- change password-->
|
---|
[14297] | 95 | <li>
|
---|
| 96 | <xsl:choose>
|
---|
| 97 | <xsl:when test="$asn!='' and $asn!='0' and $un_s!=''">
|
---|
[24007] | 98 | <a href="{$library_name}?a=g&amp;rt=r&amp;sa=authen&amp;s=Authentication&amp;s1.aup=ModifyPassword&amp;s1.asn={$asn}&amp;s1.uan=1&amp;s1.un={$un_s}&amp;s1.pw=&amp;s1.umpw1=&amp;s1.umpw2=&amp;s1.umpw="><span class="getTextFor authen.change_password"></span></a>
|
---|
[14297] | 99 | </xsl:when>
|
---|
| 100 | <xsl:otherwise>
|
---|
[24007] | 101 | <a href="{$library_name}?a=g&amp;rt=r&amp;sa=authen&amp;s=Authentication&amp;s1.asn=&amp;s1.aup=Login"><span class="getTextFor authen.change_password"></span></a>
|
---|
[14297] | 102 | </xsl:otherwise>
|
---|
| 103 | </xsl:choose>
|
---|
| 104 | </li>
|
---|
| 105 |
|
---|
| 106 | <li>
|
---|
| 107 | <xsl:choose>
|
---|
| 108 | <xsl:when test="$un_s!='' and $asn!='' and $asn!='0'">
|
---|
[24007] | 109 | <a href="{$library_name}?a=g&amp;rt=r&amp;sa=authen&amp;s=Authentication&amp;s1.asn=&amp;s1.aup=Login&amp;s1.un=&amp;s1.pw="><span class="getTextFor authen.logout"></span></a>
|
---|
[14297] | 110 | </xsl:when>
|
---|
| 111 | <xsl:otherwise>
|
---|
[24007] | 112 | <a href="{$library_name}?a=g&amp;rt=r&amp;sa=authen&amp;s=Authentication&amp;s1.asn=&amp;s1.aup=Login"><span class="getTextFor authen.login"></span></a>
|
---|
[14297] | 113 | </xsl:otherwise>
|
---|
| 114 | </xsl:choose>
|
---|
| 115 | </li>
|
---|
| 116 | </ul>
|
---|
| 117 | </div>
|
---|
| 118 |
|
---|
| 119 | <table align="left" border="0" width="100%">
|
---|
| 120 | <tr>
|
---|
| 121 | <td>
|
---|
| 122 | <div id="content" align="center">
|
---|
| 123 | <!-- login -->
|
---|
| 124 | <xsl:if test="$pro_action='Login'">
|
---|
| 125 | <xsl:choose>
|
---|
| 126 | <xsl:when test="$asn!='' and $asn!='0'">
|
---|
[24007] | 127 | <p align="left"> <span class="getTextFor authen.login_successfully"></span></p>
|
---|
[14297] | 128 | </xsl:when>
|
---|
| 129 | <xsl:otherwise>
|
---|
| 130 |
|
---|
[18316] | 131 | <p align="left">
|
---|
[24007] | 132 | <span class="getTextFor authen.login_describe_line_3"></span><br/></p>
|
---|
[18316] | 133 | <xsl:if test="$err='un-pw-err'">
|
---|
[24007] | 134 | <p align="left"><font color='red'><span class="getTextFor authen.wrong_password_warning"></span></font></p>
|
---|
[18316] | 135 | </xsl:if>
|
---|
| 136 | <xsl:if test="$err='no-permission' and $info='Login'">
|
---|
[24007] | 137 | <p align="left"><font color='red'><span class="getTextFor authen.no_permission"></span></font></p>
|
---|
[18316] | 138 | </xsl:if>
|
---|
| 139 | <xsl:if test="$err='as-false'">
|
---|
[24007] | 140 | <p align="left"><font color='red'><span class="getTextFor authen.account_status_false"></span></font></p>
|
---|
[18316] | 141 | </xsl:if>
|
---|
| 142 | <xsl:call-template name="login">
|
---|
| 143 | <xsl:with-param name="sub_action" select="$sub_action"/>
|
---|
| 144 | <xsl:with-param name="authen_service" select="$authen_service"/>
|
---|
| 145 | <xsl:with-param name="pro_action" select="$pro_action"/>
|
---|
| 146 | </xsl:call-template>
|
---|
[14297] | 147 |
|
---|
| 148 | </xsl:otherwise>
|
---|
[18316] | 149 | </xsl:choose>
|
---|
[14297] | 150 | </xsl:if>
|
---|
| 151 |
|
---|
| 152 | <!-- list users-->
|
---|
| 153 | <xsl:if test="$pro_action='ListUsers'">
|
---|
| 154 |
|
---|
| 155 | <xsl:if test="$asn='1' and $info='all-un'">
|
---|
| 156 | <xsl:call-template name="listusers" >
|
---|
| 157 | </xsl:call-template>
|
---|
| 158 | </xsl:if>
|
---|
| 159 |
|
---|
| 160 | <xsl:if test="$info='Login'">
|
---|
| 161 | <p align="left">
|
---|
[24007] | 162 | <span class="getTextFor authen.login_describe_line_2"></span><br/></p>
|
---|
[14297] | 163 | <xsl:if test="$err='no-permission' and $info='Login'">
|
---|
[24007] | 164 | <p align="left"><font color='red'><span class="getTextFor authen.no_permission"></span></font></p>
|
---|
[14297] | 165 | </xsl:if>
|
---|
| 166 | </xsl:if>
|
---|
| 167 | </xsl:if>
|
---|
| 168 |
|
---|
| 169 | <!-- add a new user-->
|
---|
| 170 | <xsl:if test="$pro_action='AddUser'">
|
---|
[14416] | 171 | <xsl:if test="$err!='' and $err!='no-permission' and $err!='un-exist' and $err!='un-err' and $err!='pw-err'">
|
---|
[18316] | 172 | <p align="left"><font color='red'><xsl:value-of select="$err" /></font></p>
|
---|
[14297] | 173 | </xsl:if>
|
---|
| 174 |
|
---|
| 175 | <xsl:if test="$asn!='1'">
|
---|
| 176 | <p align="left">
|
---|
[24007] | 177 | <span class="getTextFor authen.login_describe_line_2"></span><br/>
|
---|
[18316] | 178 | </p>
|
---|
[14297] | 179 | <xsl:if test="$err='no-permission'">
|
---|
[24007] | 180 | <p align="left"><font color='red'><span class="getTextFor authen.no_permission"></span></font></p>
|
---|
[14297] | 181 | </xsl:if>
|
---|
| 182 | </xsl:if>
|
---|
| 183 |
|
---|
| 184 | <xsl:if test="count(/page/pageResponse/authenticationNode/service/userNodeList) = 1">
|
---|
| 185 | <xsl:call-template name="listusers" >
|
---|
| 186 | </xsl:call-template>
|
---|
| 187 | </xsl:if>
|
---|
| 188 |
|
---|
| 189 | <xsl:if test="$info='adduser_interface'">
|
---|
[24007] | 190 | <h2 align="left"><span class="getTextFor authen.add_a_new_user_title"></span></h2>
|
---|
[14297] | 191 | <xsl:if test="$err='pw-err'">
|
---|
[24007] | 192 | <p align="left"><font color="red"><span class="getTextFor authen.password_err"></span></font></p>
|
---|
[14297] | 193 | </xsl:if>
|
---|
| 194 | <xsl:if test="$err='un-err'">
|
---|
[24007] | 195 | <!-- not sure if this is meant to be unsername_err; if it is, disregard -->
|
---|
| 196 | <p align="left"><font color="red"><span class="getTextFor authen.unsername_err"></span></font></p>
|
---|
[14297] | 197 | </xsl:if>
|
---|
[18316] | 198 | <xsl:if test="$err='un-exist'">
|
---|
[24007] | 199 | <p align="left"><font color='red'><span class="getTextFor authen.user_has_existed"></span></font></p>
|
---|
[14346] | 200 | </xsl:if>
|
---|
[14297] | 201 | <xsl:call-template name="edituser" >
|
---|
| 202 | <xsl:with-param name="sub_action" select="$sub_action"/>
|
---|
| 203 | <xsl:with-param name="authen_service" select="$authen_service"/>
|
---|
| 204 | <xsl:with-param name="pro_action" select="$pro_action"/>
|
---|
| 205 | <xsl:with-param name="umun_s" />
|
---|
| 206 | <xsl:with-param name="umpw_s" />
|
---|
| 207 | <xsl:with-param name="umas_s" />
|
---|
| 208 | <xsl:with-param name="umgp_s" />
|
---|
| 209 | <xsl:with-param name="umc_s" />
|
---|
| 210 | <xsl:with-param name="oumun_s" />
|
---|
| 211 | <xsl:with-param name="un_s" select="$un_s"/>
|
---|
| 212 | <xsl:with-param name="pw_s" select="$pw_s"/>
|
---|
| 213 | <xsl:with-param name="asn" select="$asn"/>
|
---|
| 214 | </xsl:call-template>
|
---|
| 215 |
|
---|
| 216 | </xsl:if>
|
---|
| 217 | </xsl:if>
|
---|
| 218 |
|
---|
| 219 | <!-- modify the passwrod of a user-->
|
---|
| 220 | <xsl:if test="$pro_action='ModifyPassword'">
|
---|
| 221 |
|
---|
| 222 | <xsl:if test="$err!='' and $err!='umpw1-err' and $err!='umpw2-err' and $err!='pw-umpw-nm-err' and $err!='umpw-null-err' and $err!='umpw1-umpw2-nm-err' and $err!='umpw1-umpw2-null-err'"><p align="left"><font color='red'><xsl:value-of select="$err" /></font></p>
|
---|
| 223 | </xsl:if>
|
---|
| 224 |
|
---|
| 225 | <xsl:if test="$err=''">
|
---|
[24007] | 226 | <h2 align="left"><span class="getTextFor authen.change_password_title"></span></h2>
|
---|
| 227 | <p align="left"><span class="getTextFor authen.change_password_successed_content"></span></p>
|
---|
[14297] | 228 | </xsl:if>
|
---|
| 229 |
|
---|
| 230 | <xsl:if test="$asn!='0' and $info='modify_interface'">
|
---|
[24007] | 231 | <h2 align="left"><span class="getTextFor authen.change_password_title"></span></h2>
|
---|
| 232 | <p align="left"><font color="grey"><span class="getTextFor authen.change_password_describe_line_1"></span></font></p>
|
---|
[14297] | 233 |
|
---|
| 234 | <xsl:if test="$err='umpw1-err'">
|
---|
[24007] | 235 | <p align="left"><font color="red"><span class="getTextFor authen.new_password_invalid"></span></font></p>
|
---|
[14297] | 236 | </xsl:if>
|
---|
| 237 | <xsl:if test="$err='umpw2-err'">
|
---|
[24007] | 238 | <p align="left"><font color="red"><span class="getTextFor authen.retyped_password_invalid"></span>></font></p>
|
---|
[14297] | 239 | </xsl:if>
|
---|
| 240 | <xsl:if test="$err='pw-umpw-nm-err' or $err='umpw-null-err'">
|
---|
[24007] | 241 | <p align="left"><font color="red"><span class="getTextFor authen.old_password_warning"></span></font></p>
|
---|
[14297] | 242 | </xsl:if>
|
---|
| 243 | <xsl:if test="$err='umpw1-umpw2-nm-err'">
|
---|
[24007] | 244 | <p align="left"><font color="red"><span class="getTextFor authen.two_password_not_match"></span></font></p>
|
---|
[14297] | 245 | </xsl:if>
|
---|
| 246 | <xsl:if test="$err='umpw1-umpw2-null-err'">
|
---|
[24007] | 247 | <p align="left"><font color="red"><span class="getTextFor authen.password_empty_warning"></span></font></p>
|
---|
[14297] | 248 | </xsl:if>
|
---|
| 249 |
|
---|
| 250 | <xsl:call-template name="modifypassword">
|
---|
| 251 | <xsl:with-param name="sub_action" select="$sub_action"/>
|
---|
| 252 | <xsl:with-param name="authen_service" select="$authen_service"/>
|
---|
| 253 | <xsl:with-param name="pro_action" select="$pro_action"/>
|
---|
| 254 | <xsl:with-param name="un_s" select="$un_s"/>
|
---|
| 255 | <xsl:with-param name="pw_s" select="$pw_s"/>
|
---|
| 256 | <xsl:with-param name="asn" select="$asn"/>
|
---|
| 257 | </xsl:call-template>
|
---|
| 258 | </xsl:if>
|
---|
| 259 | </xsl:if>
|
---|
| 260 |
|
---|
| 261 | <!-- delete a user -->
|
---|
| 262 | <xsl:if test="$pro_action='DeleteUser'">
|
---|
| 263 | <xsl:if test="$err!=''">
|
---|
| 264 | <p align="left"><font color='red'><xsl:value-of select="$err" /></font></p>
|
---|
| 265 | </xsl:if>
|
---|
| 266 |
|
---|
| 267 | <xsl:if test="$info='confirm'">
|
---|
| 268 | <xsl:call-template name="deleteuser">
|
---|
| 269 | <xsl:with-param name="sub_action" select="$sub_action"/>
|
---|
| 270 | <xsl:with-param name="authen_service" select="$authen_service"/>
|
---|
| 271 | <xsl:with-param name="pro_action" select="$pro_action"/>
|
---|
| 272 | <xsl:with-param name="un_s" select="$un_s"/>
|
---|
| 273 | <xsl:with-param name="umun_s" select="/page/pageResponse/authenticationNode/service/@umun"/>
|
---|
| 274 | <xsl:with-param name="asn" select="$asn"/>
|
---|
| 275 | </xsl:call-template>
|
---|
| 276 | </xsl:if>
|
---|
| 277 | <xsl:if test="count(/page/pageResponse/authenticationNode/service/userNodeList) = 1">
|
---|
| 278 | <xsl:call-template name="listusers" >
|
---|
| 279 | </xsl:call-template>
|
---|
| 280 | </xsl:if>
|
---|
| 281 | </xsl:if>
|
---|
| 282 |
|
---|
| 283 | <!-- edit the user's info -->
|
---|
| 284 | <xsl:if test="$pro_action='EditUser'">
|
---|
[14346] | 285 | <xsl:if test="$err!='' and $err!='umpw-err' and $err!='umun-err' and $err!='ini-umpw-err' and $err!='un-exist'">
|
---|
[14297] | 286 | <p align="left"><font color='red'><xsl:value-of select="$err" /></font></p>
|
---|
| 287 | </xsl:if>
|
---|
| 288 |
|
---|
| 289 | <xsl:if test="$info='edituser-interface'">
|
---|
[24007] | 290 | <h2 align="left"><span class="getTextFor authen.edit_user_information"></span></h2>
|
---|
[14297] | 291 | <xsl:if test="$err='umpw-err'">
|
---|
[24007] | 292 | <p align="left"><font color="red"><span class="getTextFor authen.password_err"></span></font></p>
|
---|
[14297] | 293 | </xsl:if>
|
---|
| 294 | <xsl:if test="$err='umun-err'">
|
---|
[24007] | 295 | <p align="left"><font color="red"><span class="getTextFor authen.username_err"></span></font></p>
|
---|
[14297] | 296 | </xsl:if>
|
---|
| 297 | <xsl:if test="$err='ini-umpw-err'">
|
---|
[24007] | 298 | <p align="left"><font color="red"><span class="getTextFor authen.password_initial"></span></font></p>
|
---|
[14297] | 299 | </xsl:if>
|
---|
[18316] | 300 | <xsl:if test="$err='un-exist'">
|
---|
[24007] | 301 | <p align="left"><font color='red'><span class="getTextFor authen.user_has_existed"></span></font></p>
|
---|
[14346] | 302 | </xsl:if>
|
---|
[14297] | 303 | <xsl:call-template name="edituser" >
|
---|
| 304 | <xsl:with-param name="sub_action" select="$sub_action"/>
|
---|
| 305 | <xsl:with-param name="authen_service" select="$authen_service"/>
|
---|
| 306 | <xsl:with-param name="pro_action" select="$pro_action"/>
|
---|
| 307 | <xsl:with-param name="umun_s" select="/page/pageResponse/authenticationNode/service/@umun"/>
|
---|
| 308 | <xsl:with-param name="umpw_s" select="/page/pageResponse/authenticationNode/service/@umpw"/>
|
---|
| 309 | <xsl:with-param name="umas_s" select="/page/pageResponse/authenticationNode/service/@umas"/>
|
---|
| 310 | <xsl:with-param name="umgp_s" select="/page/pageResponse/authenticationNode/service/@umgp"/>
|
---|
| 311 | <xsl:with-param name="umc_s" select="/page/pageResponse/authenticationNode/service/@umc"/>
|
---|
| 312 | <xsl:with-param name="oumun_s" select="/page/pageResponse/authenticationNode/service/@oumun"/>
|
---|
| 313 | <xsl:with-param name="un_s" select="$un_s"/>
|
---|
| 314 | <xsl:with-param name="pw_s" select="$pw_s"/>
|
---|
| 315 | <xsl:with-param name="asn" select="$asn"/>
|
---|
| 316 | </xsl:call-template>
|
---|
| 317 | </xsl:if>
|
---|
| 318 | <xsl:if test="$info='all-un'">
|
---|
| 319 | <xsl:if test="count(/page/pageResponse/authenticationNode/service/userNodeList) = 1">
|
---|
| 320 | <xsl:call-template name="listusers" >
|
---|
| 321 | </xsl:call-template>
|
---|
| 322 | </xsl:if>
|
---|
| 323 | </xsl:if>
|
---|
| 324 | </xsl:if>
|
---|
| 325 |
|
---|
| 326 | </div>
|
---|
| 327 | </td>
|
---|
| 328 | </tr>
|
---|
| 329 | </table>
|
---|
[18386] | 330 | <div id="navbar">
|
---|
| 331 | <xsl:call-template name="greenstoneFooter" />
|
---|
| 332 | </div>
|
---|
[14297] | 333 | </div>
|
---|
| 334 | </body>
|
---|
| 335 | </html>
|
---|
| 336 | </xsl:template>
|
---|
| 337 |
|
---|
[18316] | 338 | <!--template name="login"-->
|
---|
[14297] | 339 | <xsl:template name="login">
|
---|
| 340 | <xsl:param name="sub_action"/>
|
---|
| 341 | <xsl:param name="authen_service"/>
|
---|
| 342 | <xsl:param name="pro_action"/>
|
---|
[14344] | 343 | <div>
|
---|
| 344 | <form id="LoginForm" method="get" action="{$library_name}">
|
---|
[14297] | 345 | <input type='hidden' name='a' value='g'/>
|
---|
| 346 | <input type='hidden' name='sa' value='{$sub_action}'/>
|
---|
| 347 | <input type='hidden' name='s' value='{$authen_service}'/>
|
---|
| 348 | <input type='hidden' name='rt' value='r'/>
|
---|
| 349 | <input type='hidden' name='s1.asn' value='0'/>
|
---|
| 350 | <input type='hidden' name='s1.uan' value='1'/>
|
---|
| 351 | <input type='hidden' name='s1.aup' value='{$pro_action}'/>
|
---|
| 352 | <input type='hidden' name='s1.umpw1' value=''/>
|
---|
| 353 | <input type='hidden' name='s1.umpw2' value=''/>
|
---|
| 354 | <input type='hidden' name='s1.umc' value=''/>
|
---|
| 355 | <input type='hidden' name='s1.umgp' value=''/>
|
---|
| 356 | <input type='hidden' name='s1.umun' value=''/>
|
---|
| 357 | <input type='hidden' name='s1.umpw' value=''/>
|
---|
| 358 | <input type='hidden' name='s1.umas' value=''/>
|
---|
| 359 |
|
---|
| 360 | <table align="center">
|
---|
| 361 | <tr>
|
---|
[24007] | 362 | <td><span class="getTextFor authen.username"></span></td><td><input type="string" name="s1.un" size="10" value=""/></td><td></td>
|
---|
[14297] | 363 | </tr>
|
---|
| 364 | <tr>
|
---|
[24007] | 365 | <td><span class="getTextFor authen.password"></span></td><td><input type="password" name="s1.pw" size="10" value=""/></td><td>
|
---|
[14297] | 366 | <input type="submit" value="submit"></input></td>
|
---|
| 367 | </tr>
|
---|
[18316] | 368 | </table>
|
---|
[14297] | 369 | </form>
|
---|
| 370 | </div>
|
---|
| 371 | </xsl:template>
|
---|
| 372 |
|
---|
[18316] | 373 | <!--template name="listusers"-->
|
---|
[14297] | 374 | <xsl:template name="listusers" >
|
---|
[24007] | 375 | <h2 align="left"><span class="getTextFor authen.list_of_current_users_title"></span></h2>
|
---|
[14297] | 376 |
|
---|
| 377 | <table id='mainTable' align="left" border="0" cellspacing="1" cellpadding="3" width="100%" >
|
---|
| 378 | <tr>
|
---|
[24007] | 379 | <th bgcolor="#d0d0d0" class="getTextFor authen.username"></th>
|
---|
| 380 | <th bgcolor="#d0d0d0" class="getTextFor authen.account_status"></th>
|
---|
| 381 | <th bgcolor="#d0d0d0" class="getTextFor authen.groups"></th>
|
---|
| 382 | <th bgcolor="#d0d0d0" class="getTextFor authen.comment"></th>
|
---|
[14297] | 383 | <th bgcolor="#d0d0d0"></th>
|
---|
| 384 | </tr>
|
---|
| 385 | <xsl:for-each select="/page/pageResponse/authenticationNode/service/userNodeList/userNode">
|
---|
[18316] | 386 | <tr>
|
---|
| 387 | <td bgcolor="#eeeeee"><xsl:value-of select="@umun"/></td>
|
---|
| 388 | <td id="status" bgcolor="#eeeeee">
|
---|
[14405] | 389 | <script type="text/javascript">
|
---|
| 390 | <xsl:text disable-output-escaping="yes">
|
---|
| 391 | var status="</xsl:text><xsl:value-of select="@umas"/><xsl:text disable-output-escaping="yes">";
|
---|
| 392 | if (status=="true"){
|
---|
[18316] | 393 | document.getElementById("status").innerHTML="enabled";
|
---|
[14405] | 394 | }
|
---|
| 395 | if (status=="false"){
|
---|
[18316] | 396 | document.getElementById("status").innerHTML="disabled";
|
---|
[14405] | 397 | }
|
---|
| 398 | </xsl:text>
|
---|
| 399 | </script>
|
---|
| 400 | </td>
|
---|
[18316] | 401 | <td id="group" bgcolor="#eeeeee">
|
---|
| 402 | <script type="text/javascript">
|
---|
[14405] | 403 | <xsl:text disable-output-escaping="yes">
|
---|
| 404 | var groups="</xsl:text><xsl:value-of select="@umgp"/><xsl:text disable-output-escaping="yes">";
|
---|
| 405 | var split_groups= groups.split(",");
|
---|
| 406 | var new_groups="";
|
---|
| 407 | for (j=0; j < split_groups.length ; j++){
|
---|
[18316] | 408 | new_groups+=split_groups[j]+" <br /> ";
|
---|
| 409 | }
|
---|
| 410 | document.getElementById('group').innerHTML=new_groups;
|
---|
[14405] | 411 | </xsl:text>
|
---|
| 412 | </script>
|
---|
| 413 | </td>
|
---|
[18316] | 414 | <td bgcolor="#eeeeee"><xsl:value-of select="@umc"/></td>
|
---|
| 415 | <td bgcolor="#eeeeee">
|
---|
[14297] | 416 | <form name="ListUsersForm" method="get" action="{$library_name}">
|
---|
| 417 | <input type='hidden' name='a' value='g'/>
|
---|
| 418 | <input type='hidden' name='sa' value='authen'/>
|
---|
| 419 | <input type='hidden' name='s' value='Authentication'/>
|
---|
| 420 | <input type='hidden' name='rt' value='r'/>
|
---|
| 421 | <input type='hidden' name='s1.asn' value='1'/>
|
---|
| 422 | <input type='hidden' name='s1.uan' value='1'/>
|
---|
| 423 |
|
---|
| 424 | <input type='hidden'><xsl:attribute name="name">s1.oumun</xsl:attribute><xsl:attribute name="value"><xsl:value-of select="@umun"/></xsl:attribute></input>
|
---|
| 425 | <input type='hidden'><xsl:attribute name="name">s1.umun</xsl:attribute><xsl:attribute name="value"><xsl:value-of select="@umun"/></xsl:attribute></input>
|
---|
| 426 | <input type='hidden' name='s1.cm' value=''/>
|
---|
| 427 |
|
---|
| 428 | <input type="submit"><xsl:attribute name="name">s1.aup</xsl:attribute><xsl:attribute name="value">EditUser</xsl:attribute></input>
|
---|
| 429 | <input type="submit"><xsl:attribute name="name">s1.aup</xsl:attribute><xsl:attribute name="value">DeleteUser</xsl:attribute></input>
|
---|
| 430 | </form>
|
---|
[18316] | 431 | </td>
|
---|
[14297] | 432 | </tr>
|
---|
[18316] | 433 | </xsl:for-each>
|
---|
[14405] | 434 | </table>
|
---|
[14297] | 435 | </xsl:template>
|
---|
| 436 |
|
---|
[18316] | 437 | <!--template name="modifypassword"-->
|
---|
| 438 | <xsl:template name="modifypassword" >
|
---|
[14297] | 439 | <xsl:param name="sub_action"/>
|
---|
| 440 | <xsl:param name="authen_service"/>
|
---|
| 441 | <xsl:param name="pro_action"/>
|
---|
| 442 | <xsl:param name="un_s"/>
|
---|
| 443 | <xsl:param name="pw_s"/>
|
---|
| 444 | <xsl:param name="asn"/>
|
---|
[14344] | 445 | <div>
|
---|
| 446 | <form id="modifyForm" method="get" action="{$library_name}">
|
---|
[14297] | 447 | <input type='hidden' name='a' value='g'/>
|
---|
| 448 | <input type='hidden' name='sa' value='{$sub_action}'/>
|
---|
| 449 | <input type='hidden' name='s' value='{$authen_service}'/>
|
---|
| 450 | <input type='hidden' name='rt' value='r'/>
|
---|
| 451 | <input type='hidden' name='s1.un' value='{$un_s}'/>
|
---|
| 452 | <input type='hidden' name='s1.pw' value='{$pw_s}'/>
|
---|
| 453 | <input type='hidden' name='s1.asn' value='{$asn}'/>
|
---|
| 454 | <input type='hidden' name='s1.uan' value='1'/>
|
---|
| 455 | <input type='hidden' name='s1.aup' value='{$pro_action}'/>
|
---|
| 456 |
|
---|
[24007] | 457 | <table align="center"><tr><td align="right" class="getTextFor authen.old_password">
|
---|
| 458 | </td><td><input type="password" name="s1.umpw" size="10" value=""/></td></tr>
|
---|
| 459 | <tr><td align="right" class="getTextFor authen.new_password">
|
---|
| 460 | </td><td><input type="password" name="s1.umpw1" size="10" value=""/></td></tr>
|
---|
| 461 | <tr><td align="right" class="getTextFor authen.retype_new_password">
|
---|
| 462 | </td><td><input type="password" name="s1.umpw2" size="10" value=""/></td></tr>
|
---|
[14297] | 463 | <tr><td></td><td>
|
---|
[18316] | 464 | <input type="submit" value="submit"></input></td>
|
---|
| 465 | </tr>
|
---|
| 466 | </table>
|
---|
| 467 | </form>
|
---|
| 468 | </div>
|
---|
[14297] | 469 | </xsl:template>
|
---|
| 470 |
|
---|
[18316] | 471 | <!--template name="deleteuser"-->
|
---|
[14297] | 472 | <xsl:template name="deleteuser">
|
---|
| 473 | <xsl:param name="sub_action"/>
|
---|
| 474 | <xsl:param name="authen_service"/>
|
---|
| 475 | <xsl:param name="pro_action"/>
|
---|
| 476 | <xsl:param name="un_s"/>
|
---|
| 477 | <xsl:param name="umun_s"/>
|
---|
| 478 | <xsl:param name="asn"/>
|
---|
[14344] | 479 | <div >
|
---|
| 480 | <form id="deleteForm" method="get" action="{$library_name}">
|
---|
[14297] | 481 | <input type='hidden' name='a' value='g'/>
|
---|
| 482 | <input type='hidden' name='sa' value='{$sub_action}'/>
|
---|
| 483 | <input type='hidden' name='s' value='{$authen_service}'/>
|
---|
| 484 | <input type='hidden' name='rt' value='r'/>
|
---|
| 485 | <input type='hidden' name='s1.aup' value='{$pro_action}'/>
|
---|
| 486 | <input type='hidden' name='s1.asn' value='{$asn}'/>
|
---|
| 487 | <input type='hidden' name='s1.uan' value='1'/>
|
---|
| 488 | <input type='hidden' name='s1.umun' value='{$umun_s}'/>
|
---|
[24007] | 489 | <p><font color='red' class="getTextFor authen.do_you_really_want_to_permanently_remove_user"> <xsl:value-of select="$umun_s"/>" ?</font></p>
|
---|
[14297] | 490 | <input type="submit" value="yes"><xsl:attribute name="name">s1.cm</xsl:attribute></input>
|
---|
| 491 | <input type="submit" value="no"><xsl:attribute name="name">s1.cm</xsl:attribute></input>
|
---|
| 492 | </form>
|
---|
| 493 | </div>
|
---|
| 494 | </xsl:template>
|
---|
| 495 |
|
---|
[18316] | 496 | <!--template name="edituser"-->
|
---|
[14297] | 497 | <xsl:template name="edituser" >
|
---|
| 498 | <xsl:param name="sub_action"/>
|
---|
| 499 | <xsl:param name="authen_service"/>
|
---|
| 500 | <xsl:param name="pro_action"/>
|
---|
| 501 | <xsl:param name="un_s"/>
|
---|
| 502 | <xsl:param name="pw_s"/>
|
---|
| 503 | <xsl:param name="umun_s"/>
|
---|
| 504 | <xsl:param name="umpw_s"/>
|
---|
| 505 | <xsl:param name="umas_s"/>
|
---|
| 506 | <xsl:param name="umgp_s"/>
|
---|
| 507 | <xsl:param name="umc_s"/>
|
---|
| 508 | <xsl:param name="oumun_s"/>
|
---|
| 509 | <xsl:param name="asn"/>
|
---|
[14344] | 510 | <div>
|
---|
| 511 | <form id="editForm" method="get" action="{$library_name}">
|
---|
[14297] | 512 | <input type='hidden' name='a' value='g'/>
|
---|
| 513 | <input type='hidden' name='sa' value='{$sub_action}'/>
|
---|
| 514 | <input type='hidden' name='s' value='{$authen_service}'/>
|
---|
| 515 | <input type='hidden' name='rt' value='r'/>
|
---|
| 516 | <input type='hidden' name='s1.asn' value='{$asn}'/>
|
---|
| 517 | <input type='hidden' name='s1.uan' value='1'/>
|
---|
| 518 | <input type='hidden' name='s1.aup' value='{$pro_action}'/>
|
---|
| 519 | <input type='hidden' name='s1.un' value='{$un_s}'/>
|
---|
| 520 | <input type='hidden' name='s1.pw' value='{$pw_s}'/>
|
---|
| 521 |
|
---|
[24007] | 522 | <table align="left" ><tr><td class="getTextFor authen.username">
|
---|
| 523 | </td><td><input type="text" name="s1.umun" size="15" value="{$umun_s}"/></td><td><font color="gray" class="getTextFor authen.username_describe"></font></td></tr>
|
---|
| 524 | <tr><td class="getTextFor authen.password">
|
---|
| 525 | </td><td><input type="password" name="s1.umpw" size="15" value="{$umpw_s}"/></td><td><font color="gray" class="getTextFor authen.password_describe"></font></td></tr>
|
---|
| 526 | <tr><td class="getTextFor authen.account_status">
|
---|
| 527 | </td><td>
|
---|
[14297] | 528 | <select name="s1.umas">
|
---|
| 529 | <xsl:if test="$umas_s=''">
|
---|
[24007] | 530 | <option value="true" selected="selected" class="getTextFor authen.enabled"></option>
|
---|
| 531 | <option value="false" class="getTextFor authen.disabled"></option>
|
---|
[14297] | 532 | </xsl:if>
|
---|
| 533 | <xsl:if test="$umas_s='true'">
|
---|
[24007] | 534 | <option value="true" selected="selected" class="getTextFor authen.enabled"></option>
|
---|
| 535 | <option value="false" class="getTextFor authen.disabled"></option>
|
---|
[14297] | 536 | </xsl:if>
|
---|
| 537 | <xsl:if test="$umas_s='false'">
|
---|
[24007] | 538 | <option value="true" class="getTextFor authen.enabled"></option>
|
---|
| 539 | <option value="false" selected="selected" class="getTextFor authen.disabled"></option>
|
---|
[14297] | 540 | </xsl:if>
|
---|
| 541 | </select></td><td></td></tr>
|
---|
[24007] | 542 | <tr><td class="getTextFor authen.groups">
|
---|
| 543 | </td><td><input type="text" id="group" name="s1.umgp" size="70" value="{$umgp_s}"/></td><td><font color="gray" class="getTextFor authen.groups_describe"></font></td></tr>
|
---|
[14297] | 544 | <tr>
|
---|
| 545 | <td></td>
|
---|
[14405] | 546 | <td align="right"> <select id="groups" size="0">
|
---|
| 547 | <script type="text/javascript">
|
---|
[18316] | 548 | <xsl:text disable-output-escaping="yes">
|
---|
[14405] | 549 | var group_arr=Array("administrator","all-collections-editor","personal-collections-editor");
|
---|
| 550 | var group_string=document.getElementById("group").value;
|
---|
| 551 | var split_group_string=group_string.split(",");
|
---|
| 552 | var find=0;
|
---|
| 553 | for (i=0; i < group_arr.length; i++){
|
---|
[18316] | 554 | find=0;
|
---|
| 555 | for (j=0; j < group_arr.length; j++){
|
---|
| 556 | if (split_group_string[j]==group_arr[i]){
|
---|
| 557 | find=1;
|
---|
| 558 | }
|
---|
| 559 | }
|
---|
| 560 | if (find==0){
|
---|
| 561 | op = document.createElement('option');
|
---|
| 562 | op.innerHTML = group_arr[i];
|
---|
| 563 | op.setAttribute("value", group_arr[i]);
|
---|
| 564 | document.getElementById("groups").appendChild(op);
|
---|
| 565 | }
|
---|
[14405] | 566 | }
|
---|
[18316] | 567 |
|
---|
[14405] | 568 | </xsl:text>
|
---|
| 569 | </script>
|
---|
| 570 | </select></td><td><input type="button" name="addGroupButton" value="add" onClick="addGroup('groups')"/></td>
|
---|
[14297] | 571 | </tr>
|
---|
[14405] | 572 | <tr>
|
---|
| 573 | <td></td>
|
---|
| 574 | <td align="right">
|
---|
| 575 | <select id="collects" size="0">
|
---|
| 576 | <xsl:for-each select="/page/pageResponse/collectionList/collection">
|
---|
| 577 | <script type="text/javascript">
|
---|
| 578 | <xsl:text disable-output-escaping="yes">
|
---|
| 579 | var group="</xsl:text><xsl:value-of select="@name"/>-collection-editor<xsl:text disable-output-escaping="yes">";
|
---|
| 580 | var group_string=document.getElementById("group").value;
|
---|
| 581 | var split_group_string=group_string.split(",");
|
---|
| 582 | var find=0;
|
---|
| 583 | for (i=0; i < split_group_string.length; i++){
|
---|
[18316] | 584 | if (split_group_string[i]==group){
|
---|
| 585 | find=1;
|
---|
| 586 | }
|
---|
[14405] | 587 | }
|
---|
| 588 | if (find==0){
|
---|
[18316] | 589 | op = document.createElement('option');
|
---|
| 590 | op.innerHTML = group;
|
---|
| 591 | op.setAttribute("value", group);
|
---|
| 592 | document.getElementById("collects").appendChild(op);
|
---|
[14405] | 593 | }
|
---|
| 594 | </xsl:text>
|
---|
| 595 | </script>
|
---|
[18316] | 596 | </xsl:for-each>
|
---|
[14405] | 597 | </select>
|
---|
| 598 | </td>
|
---|
| 599 | <td><input type="button" name="addGroupButton" value="add" onClick="addGroup('collects')"/></td>
|
---|
| 600 | </tr>
|
---|
[24007] | 601 | <tr><td class="getTextFor authen.comment">
|
---|
| 602 | </td><td colspan="2"><div><textarea cols="40" rows="5" name="s1.umc"><xsl:value-of select="$umc_s"/>
|
---|
[14297] | 603 |
|
---|
[18316] | 604 | </textarea></div></td></tr>
|
---|
[14297] | 605 | <tr>
|
---|
| 606 |
|
---|
[18316] | 607 | <td></td><td>
|
---|
[14297] | 608 | <input type="submit" value="submit"><xsl:attribute name="name">s1.cm</xsl:attribute></input>
|
---|
[18316] | 609 | <xsl:if test="$pro_action!='AddUser'">
|
---|
| 610 | <input type="submit" value="cancel"><xsl:attribute name="name">s1.cm</xsl:attribute></input>
|
---|
| 611 | </xsl:if>
|
---|
[14297] | 612 | </td><td></td></tr>
|
---|
| 613 | </table>
|
---|
| 614 | <input type='hidden' name='s1.oumun' value='{$oumun_s}'/>
|
---|
| 615 | </form>
|
---|
| 616 | </div>
|
---|
| 617 | </xsl:template>
|
---|
| 618 |
|
---|
[18316] | 619 | <!-- addGroup() javascript -->
|
---|
[14297] | 620 | <xsl:template name="addGroup">
|
---|
| 621 | <script type="text/javascript">
|
---|
| 622 | <xsl:text disable-output-escaping="yes">
|
---|
[14405] | 623 | function addGroup(g){
|
---|
[18316] | 624 | var itemSelected;
|
---|
| 625 | var splitGroup;
|
---|
| 626 | var groupExit;
|
---|
[14297] | 627 |
|
---|
[18316] | 628 | if (document.getElementById("editForm")!=null){
|
---|
[14405] | 629 | //itemSelected=document.getElementById("editForm").groups.options.selectedIndex;
|
---|
| 630 | itemSelected=document.getElementById(g).options.selectedIndex;
|
---|
| 631 | if (document.getElementById(g).options[itemSelected].text!=""){
|
---|
[18316] | 632 | if (document.getElementById("group").value==""){
|
---|
| 633 | document.getElementById("group").value=document.getElementById("group").value+document.getElementById(g).options[itemSelected].text;
|
---|
| 634 | }else{
|
---|
| 635 | splitGroup=document.getElementById("group").value.split(",");
|
---|
| 636 | for (var i=0; i < splitGroup.length; i++){
|
---|
| 637 | if (splitGroup[i]==document.getElementById(g).options[itemSelected].text){
|
---|
| 638 | alert(document.getElementById(g).options[itemSelected].text + " has been added.");
|
---|
| 639 | groupExit=1;
|
---|
| 640 | break;
|
---|
| 641 | }
|
---|
| 642 | }
|
---|
| 643 | if (groupExit!=1) {
|
---|
| 644 | document.getElementById("group").value=document.getElementById("group").value+","+document.getElementById(g).options[itemSelected].text;
|
---|
| 645 | }
|
---|
| 646 | }
|
---|
| 647 | document.getElementById(g).options[itemSelected]=new Option("",itemSelected);
|
---|
| 648 | }
|
---|
| 649 | }
|
---|
[14297] | 650 | }
|
---|
| 651 | </xsl:text>
|
---|
| 652 | </script>
|
---|
| 653 | </xsl:template>
|
---|
| 654 |
|
---|
| 655 | </xsl:stylesheet>
|
---|
| 656 |
|
---|