mirror of
https://gitlab.xiph.org/xiph/icecast-server.git
synced 2024-12-04 14:46:30 -05:00
Feature: Ask for confirmation before killing a client or deleting a user
This commit is contained in:
parent
7b7d73dee2
commit
9de77f596c
@ -37,7 +37,7 @@
|
||||
<td><xsl:value-of select="connected" /></td>
|
||||
<td><xsl:value-of select="useragent" /></td>
|
||||
<td class="actions">
|
||||
<a class="critical" href="/admin/killclient.xsl?mount={../@mount}&id={id}">Kick</a>
|
||||
<a class="critical" href="/admin/ui/confirmkillclient.xsl?mount={../@mount}&id={id}">Kick</a>
|
||||
<a href="/admin/moveclients.xsl?mount={../@mount}&id={id}">Move</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -37,7 +37,7 @@
|
||||
<td><xsl:value-of select="username" /></td>
|
||||
<xsl:if test="../../@can-deleteuser = 'true'">
|
||||
<td class="actions">
|
||||
<a class="critical" href="/admin/manageauth.xsl?id={../../@id}&username={username}&action=delete">Delete</a>
|
||||
<a class="critical" href="/admin/ui/confirmdeleteuser.xsl?id={../../@id}&username={username}">Delete</a>
|
||||
</td>
|
||||
</xsl:if>
|
||||
</tr>
|
||||
|
24
admin/ui/confirmdeleteuser.xsl
Normal file
24
admin/ui/confirmdeleteuser.xsl
Normal file
@ -0,0 +1,24 @@
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:xt="http://www.jclark.com/xt" extension-element-prefixes="xt" exclude-result-prefixes="xt">
|
||||
<!-- Import include files -->
|
||||
<xsl:include href="includes/confirm.xsl"/>
|
||||
<xsl:variable name="title">Confirm killing source</xsl:variable>
|
||||
<xsl:template name="content">
|
||||
<xsl:for-each select="/report/incident">
|
||||
<xsl:variable name="get-parameters" select="resource[@type='parameter']/value[@member='get-parameters']" />
|
||||
<xsl:variable name="id" select="$get-parameters/value[@member='id']" />
|
||||
<xsl:call-template name="confirm">
|
||||
<xsl:with-param name="text">Please confirm deleting user <code><xsl:value-of select="$get-parameters/value[@member='username']/@value" /></code>.</xsl:with-param>
|
||||
<xsl:with-param name="action-cancel">/admin/manageauth.xsl</xsl:with-param>
|
||||
<xsl:with-param name="action-confirm">/admin/manageauth.xsl</xsl:with-param>
|
||||
<xsl:with-param name="params-cancel">
|
||||
<xsl:copy-of select="$id" />
|
||||
</xsl:with-param>
|
||||
<xsl:with-param name="params-confirm">
|
||||
<xsl:copy-of select="$get-parameters/value[@member='username']" />
|
||||
<xsl:copy-of select="$id" />
|
||||
<value member="action" value="delete" />
|
||||
</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
23
admin/ui/confirmkillclient.xsl
Normal file
23
admin/ui/confirmkillclient.xsl
Normal file
@ -0,0 +1,23 @@
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:xt="http://www.jclark.com/xt" extension-element-prefixes="xt" exclude-result-prefixes="xt">
|
||||
<!-- Import include files -->
|
||||
<xsl:include href="includes/confirm.xsl"/>
|
||||
<xsl:variable name="title">Confirm killing source</xsl:variable>
|
||||
<xsl:template name="content">
|
||||
<xsl:for-each select="/report/incident">
|
||||
<xsl:variable name="get-parameters" select="resource[@type='parameter']/value[@member='get-parameters']" />
|
||||
<xsl:variable name="mount" select="$get-parameters/value[@member='mount']" />
|
||||
<xsl:call-template name="confirm">
|
||||
<xsl:with-param name="text">Please confirm killing the client <code><xsl:value-of select="$get-parameters/value[@member='id']/@value" /></code> on <code><xsl:value-of select="$mount/@value" /></code>.</xsl:with-param>
|
||||
<xsl:with-param name="action-cancel">/admin/listclients.xsl</xsl:with-param>
|
||||
<xsl:with-param name="action-confirm">/admin/killclient.xsl</xsl:with-param>
|
||||
<xsl:with-param name="params-cancel">
|
||||
<xsl:copy-of select="$mount" />
|
||||
</xsl:with-param>
|
||||
<xsl:with-param name="params-confirm">
|
||||
<xsl:copy-of select="$mount" />
|
||||
<xsl:copy-of select="$get-parameters/value[@member='id']" />
|
||||
</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
Loading…
Reference in New Issue
Block a user