[sagenb] 57/157: Different error messages when adding users

felix salfelder felix-guest at moszumanska.debian.org
Mon Dec 22 16:51:48 UTC 2014


This is an automated email from the git hooks/post-receive script.

felix-guest pushed a commit to branch master
in repository sagenb.

commit 84df6d7ad6631a26625117cef69b97d1ead288b9
Author: J. Miguel Farto <migeruhito at gmail.com>
Date:   Wed Sep 17 00:13:30 2014 +0200

    Different error messages when adding users
---
 sagenb/data/sage/html/settings/admin_add_user.html | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/sagenb/data/sage/html/settings/admin_add_user.html b/sagenb/data/sage/html/settings/admin_add_user.html
index e6be20a..b2c626f 100644
--- a/sagenb/data/sage/html/settings/admin_add_user.html
+++ b/sagenb/data/sage/html/settings/admin_add_user.html
@@ -4,25 +4,24 @@
 
 {% block main %}
 <h1>{{ gettext('Add New User') }}</h1>
-{% if error %}
-<h2 class="error_found">{{ gettext('Username Error') }}</h2>
-{% endif %}
 <form method="POST" action="/adduser">
   <ol>
     <li><h2>{{ gettext('Pick a username') }}</h2>
       <p>{{ gettext('The username must start with a letter and be between 4 and 32 characters long. It can only consist of letters, numbers, underscores, and one dot (.).') }}</p>
       <input type="text" name="username" value="{{ username_input if username_input else '' }}" />
-      {% if username_error %}
-      {% if username_error == 'invalid' %}
+      {% if error %}
+      {% if error == 'username_invalid' %}
       <p><span class="error">{{ gettext('Error') }}:</span> {{ gettext('Invalid username') }}</p>
-      {% else %}
+      {% elif error == 'username_taken' %}
       <p><span class="error">{{ gettext('Error') }}:</span> {{ gettext('Username taken') }}</p>
+      {% else %}
+      <p><span class="error">{{ gettext('Error') }}:</span> {{ gettext('Username Error') }}</p>
       {% endif %}
       {% endif %}
     </li>
   </ol>
   <div id="buttons">
-    <button type="submit" name="cancel" value="">{{ gettext('Create Account') }}</buttoN>
+    <button type="submit" name="cancel" value="">{{ gettext('Create Account') }}</button>
     <button type="submit" name="cancel" value="yes">{{ gettext('Cancel') }}</button>
   </div>
 </form>

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/sagenb.git



More information about the debian-science-commits mailing list