Repository navigation
Implement Re%2Dgrade User
Callum Newman edited this page Sep 17, 2024
·
3 revisions
To provide a workflow to easily change the membership level of a user.
- First create the buttons in the admin system group list page. Copy into the theme admin.xsl the following:
<xsl:template match="user[parent::directory/@parName='Trade Applications']" mode="bespokeUserButtons">
<br/>
<a class="btn btn-xs btn-success" href="?ewCmd=RegradeUser&parId={@parId}&id={@id}&existingGroupId={ancestor::directory/@parId}&newGroupId=2505,1293&messageId=approve"><i class="fas fa-check"> </i> Approve</a>
<a class="btn btn-xs btn-warning" href="?ewCmd=RegradeUser&parId={@parId}&id={@id}&existingGroupId={ancestor::directory/@parId}&newGroupId=3153&messageId=decline"><i class="fas fa-times"> </i> Decline</a>
</xsl:template>
Where "Trade Applications" is the name of the group you want to move members from and newGroupId is the id or the ids comma separated of the groups you want to move the users too.
-
Now we copy in the regradeUser.xml xform from common/xforms/directory to the local folder and make the appropriate changes to show the user details required here. This is where you can also add the default messages to be sent. Where the id of the message is passed from the buttons above.
-
Finally We copy in the RegradeAlert.xsl from common/xsl/email to a local folder and modify the style of this email appropriately.