File tree Expand file tree Collapse file tree 2 files changed +30
-0
lines changed
templates/bootstrap3/layout Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change
1
+ {% load crispy_forms_field %}
2
+
3
+ {% if field.is_hidden %}
4
+ {{ field }}
5
+ {% else %}
6
+ < div id ="div_{{ field.auto_id }} " class ="form-group{% if wrapper_class %} {{ wrapper_class }}{% endif %}{% if form_show_errors and field.errors %} has-error{% endif %}{% if field.css_classes %} {{ field.css_classes }}{% endif %} ">
7
+
8
+ {% if field.label and form_show_labels %}
9
+ < label for ="{{ field.id_for_label }} " class ="control-label {{ label_class }}{% if field.field.required %} requiredField{% endif %} ">
10
+ {{ field.label }}{% if field.field.required %}< span class ="asteriskField "> *</ span > {% endif %}
11
+ </ label >
12
+ {% endif %}
13
+
14
+ < div class ="controls {{ field_class }} ">
15
+ < div class ="input-group ">
16
+ {% if crispy_prepended_text %}< span class ="input-group-addon{% if active %} active{% endif %}{% if input_size %} {{ input_size }}{% endif %} "> {{ crispy_prepended_text|safe }}</ span > {% endif %}
17
+ {% crispy_field field 'class' 'form-control' %}
18
+ {% if crispy_appended_text %}< span class ="input-group-addon{% if active %} active{% endif %}{% if input_size %} {{ input_size }}{% endif %} "> {{ crispy_appended_text|safe }}</ span > {% endif %}
19
+ </ div >
20
+
21
+ {% include 'bootstrap3/layout/help_text_and_errors.html' %}
22
+ </ div >
23
+ </ div >
24
+ {% endif %}
Original file line number Diff line number Diff line change @@ -724,6 +724,12 @@ class G3WUserUpdateForm(G3WUserForm):
724
724
725
725
password = ReadOnlyPasswordHashField ()
726
726
727
+ def clean_username (self ):
728
+ """Reject usernames that differ only in case."""
729
+ username = self .cleaned_data .get ("username" )
730
+
731
+ return username
732
+
727
733
def clean_password (self ):
728
734
return self .initial ['password' ]
729
735
You can’t perform that action at this time.
0 commit comments