Changeset 35427
- Timestamp:
- 2021-09-20T10:10:25+12:00 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/web/interfaces/default/transform/pages/authen.xsl
r33755 r35427 275 275 </xsl:choose> 276 276 <xsl:if test="/page/pageResponse/authenticationNode/service/@operation = 'EditUser'"> 277 <!-- if you want to add a group by default to a user, so that it shows up automatically in the edit user page, use this instead of the following 278 <xsl:call-template name="addGroupInputField"><xsl:with-param name="default_value"><xsl:call-template name="addDefaultGroupToExistingGroups"/></xsl:with-param></xsl:call-template> --> 277 279 <xsl:call-template name="addGroupInputField"><xsl:with-param name="default_value"><xsl:value-of select="/page/pageResponse/authenticationNode/service/userNodeList/userNode/@groups"/></xsl:with-param></xsl:call-template> 278 280 <tr> … … 361 363 </tr> 362 364 <xsl:if test="/page/pageResponse/authenticationNode/service/@operation = 'AddUser'"> 363 <xsl:call-template name="addGroupInputField"/> 365 <!-- if you want to add a default group to the groups field with AdddUser, then use this instead, replacing xxx with the default group/s 366 <xsl:call-template name="addGroupInputField"><xsl:with-param name="default_value">xxx</xsl:with-param></xsl:call-template>--> 367 <xsl:call-template name="addGroupInputField"/> 364 368 <tr> 365 369 <td><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.comment')"/><xsl:text>: </xsl:text></td> … … 461 465 462 466 </xsl:template> 463 467 468 <!-- replace xxx here with the group/s you want added by default --> 469 <xsl:template name="addDefaultGroupToExistingGroups"><xsl:variable name="default">xxx</xsl:variable><xsl:variable name="current_groups"><xsl:value-of select="/page/pageResponse/authenticationNode/service/userNodeList/userNode/@groups"/></xsl:variable><xsl:if test="not(contains($current_groups, $default))"><xsl:value-of select="$default"/>,</xsl:if><xsl:value-of select="$current_groups"/></xsl:template> 470 464 471 <xsl:template name="addPasswordCheckJavascript"> 465 472 <script type="text/javascript">
Note:
See TracChangeset
for help on using the changeset viewer.