Commit 35b562ee6a61e7b0011f93f4760e6febc8b659aa
1 parent
2a025adb
Exists in
master
and in
5 other branches
* in required fields #211
Showing
1 changed file
with
35 additions
and
7 deletions
Show diff stats
app/templates/admin_settings.html
... | ... | @@ -59,7 +59,11 @@ |
59 | 59 | <h4><b>{% trans "Settings" %}</b></b></h4> |
60 | 60 | <hr> |
61 | 61 | <div class="form-group label-floating"> |
62 | - <label class="control-label" for="{{ form.description.auto_id }}">{{ form.description.label }}</label> | |
62 | + {% if form.description.field.required %} | |
63 | + <label class="control-label" for="{{ form.description.auto_id }}">{{ form.description.label }}<span>*</span></label> | |
64 | + {% else %} | |
65 | + <label class="control-label" for="{{ form.description.auto_id }}">{{ form.description.label }}</label> | |
66 | + {% endif %} | |
63 | 67 | {% render_field form.description class='form-control' %} |
64 | 68 | </div> |
65 | 69 | {% if form.description.errors %} |
... | ... | @@ -75,7 +79,11 @@ |
75 | 79 | </div> |
76 | 80 | {% endif %} |
77 | 81 | <div class="form-group label-floating"> |
78 | - <label class="control-label" for="{{ form.host.auto_id }}">{{ form.host.label }}</label> | |
82 | + {% if form.host.field.required %} | |
83 | + <label class="control-label" for="{{ form.host.auto_id }}">{{ form.host.label }}<span>*</span></label> | |
84 | + {% else %} | |
85 | + <label class="control-label" for="{{ form.host.auto_id }}">{{ form.host.label }}</label> | |
86 | + {% endif %} | |
79 | 87 | {% render_field form.host class='form-control' %} |
80 | 88 | </div> |
81 | 89 | {% if form.host.errors %} |
... | ... | @@ -91,7 +99,11 @@ |
91 | 99 | </div> |
92 | 100 | {% endif %} |
93 | 101 | <div class="form-group label-floating"> |
94 | - <label for="{{ form.port.auto_id }}" class="control-label">{{ form.port.label }}</label> | |
102 | + {% if form.port.field.required %} | |
103 | + <label class="control-label" for="{{ form.port.auto_id }}">{{ form.port.label }}<span>*</span></label> | |
104 | + {% else %} | |
105 | + <label class="control-label" for="{{ form.port.auto_id }}">{{ form.port.label }}</label> | |
106 | + {% endif %} | |
95 | 107 | <div class="col-md-2"> |
96 | 108 | {% render_field form.port class='form-control' onkeypress='campoNumerico(this,event);' %} |
97 | 109 | </div> |
... | ... | @@ -120,7 +132,11 @@ |
120 | 132 | <h4><b>{% trans "Security and authentication" %}</b></h4> |
121 | 133 | <hr> |
122 | 134 | <div class="form-group label-floating"> |
123 | - <label class="control-label" for="{{ form.username.auto_id }}">{{ form.username.label }}</label> | |
135 | + {% if form.username.field.required %} | |
136 | + <label class="control-label" for="{{ form.username.auto_id }}">{{ form.username.label }}<span>*</span></label> | |
137 | + {% else %} | |
138 | + <label class="control-label" for="{{ form.username.auto_id }}">{{ form.username.label }}</label> | |
139 | + {% endif %} | |
124 | 140 | {% render_field form.username class='form-control' %} |
125 | 141 | </div> |
126 | 142 | {% if form.username.errors %} |
... | ... | @@ -136,7 +152,11 @@ |
136 | 152 | </div> |
137 | 153 | {% endif %} |
138 | 154 | <div class="form-group label-floating"> |
139 | - <label class="control-label" for="{{ form.password.auto_id }}">{{ form.password.label }}</label> | |
155 | + {% if form.password.field.required %} | |
156 | + <label class="control-label" for="{{ form.password.auto_id }}">{{ form.password.label }}<span>*</span></label> | |
157 | + {% else %} | |
158 | + <label class="control-label" for="{{ form.password.auto_id }}">{{ form.password.label }}</label> | |
159 | + {% endif %} | |
140 | 160 | {% render_field form.password type='password' class='form-control' %} |
141 | 161 | </div> |
142 | 162 | {% if form.password.errors %} |
... | ... | @@ -152,7 +172,11 @@ |
152 | 172 | </div> |
153 | 173 | {% endif %} |
154 | 174 | <div class="form-group label-floating"> |
155 | - <label class="control-label" for="{{ form.default_from_email.auto_id }}">{{ form.default_from_email.label }}</label> | |
175 | + {% if form.default_from_email.field.required %} | |
176 | + <label class="control-label" for="{{ form.default_from_email.auto_id }}">{{ form.default_from_email.label }}<span>*</span></label> | |
177 | + {% else %} | |
178 | + <label class="control-label" for="{{ form.default_from_email.auto_id }}">{{ form.default_from_email.label }}</label> | |
179 | + {% endif %} | |
156 | 180 | {% render_field form.default_from_email class='form-control' %} |
157 | 181 | </div> |
158 | 182 | {% if form.default_from_email.errors %} |
... | ... | @@ -168,7 +192,11 @@ |
168 | 192 | </div> |
169 | 193 | {% endif %} |
170 | 194 | <div class="form-group"> |
171 | - <p><b>{{ form.safe.connection.label }}</b></p> | |
195 | + {% if form.safe_conection.fiel.required %} | |
196 | + <p><b>{{ form.safe_conection.label }}<span>*</span></b></p> | |
197 | + {% else %} | |
198 | + <p><b>{{ form.safe_conection.label }}</b></p> | |
199 | + {% endif %} | |
172 | 200 | <div class="col-md-10"> |
173 | 201 | <div class="radio radio-primary"> |
174 | 202 | {% for value, text in form.safe_conection.field.choices %} | ... | ... |