allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kentontay...@apache.org
Subject [allura] 02/02: Site admin: only show pwd reset related buttons if user is enabled
Date Wed, 18 Mar 2020 15:46:30 GMT
This is an automated email from the ASF dual-hosted git repository.

kentontaylor pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/allura.git

commit 887f87cf0b1c8534cba0fb40057257f0ecb64ee1
Author: Dave Brondsema <dave@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>


Mime
View raw message