You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2020/03/17 19:16:08 UTC

[allura] 02/02: Site admin: only show pwd reset related buttons if user is enabled

This is an automated email from the ASF dual-hosted git repository.

brondsem pushed a commit to branch db/user_admin_details_improvements
in repository https://gitbox.apache.org/repos/asf/allura.git

commit 2a81940109e0b0723e872d021071020e2e20e71f
Author: Dave Brondsema <da...@brondsema.net>
AuthorDate: Tue Mar 17 14:56:53 2020 -0400

    Site admin: only show pwd reset related buttons if user is enabled
---
 Allura/allura/templates/site_admin_user_details.html | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/Allura/allura/templates/site_admin_user_details.html b/Allura/allura/templates/site_admin_user_details.html
index 38e4a5f..d491307 100644
--- a/Allura/allura/templates/site_admin_user_details.html
+++ b/Allura/allura/templates/site_admin_user_details.html
@@ -42,15 +42,16 @@
 
         <div class="grid-6">
         <form action='/nf/admin/user/set_status' method="POST">
-          <div class='grid-6'>
+          Account Status:<br>
             <label><input type="radio" name="status" value="enable"{% if status == 'enabled' %} checked="checked"{% endif %}>Enabled</label><br>
             <label><input type="radio" name="status" value="disable"{% if status == 'disabled' %} checked="checked"{% endif %}>Disabled</label><br>
             <label><input type="radio" name="status" value="pending"{% if status == 'pending' %} checked="checked"{% endif %}>Pending</label>
-          </div>
           <input type='hidden' name='username' value='{{ user.username }}'>
           {{lib.csrf_token()}}
         </form>
 
+        {% if status == 'enabled' %}
+        <br>
         <form action='/nf/admin/user/set_random_password' method="POST">
           <input type="submit" value="Set random password">
           <input type='hidden' name='username' value='{{ user.username }}'>
@@ -75,6 +76,7 @@
             <a href="#" id="password_reset_url_copy">copy</a>
             <p>Whenever you regenerate a new password reset URL, previous URLs are invalidated.</p>
         </div>
+        {% endif %}
 
         </div>
       </fieldset>