mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-13 19:18:16 -06:00
[FIX] putting the labels of the forms above the fields
This commit is contained in:
parent
b4486b4d30
commit
957df53b52
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
{# NetBox logo #}
|
{# NetBox logo #}
|
||||||
<div class="text-center mb-4">
|
<div class="text-center mb-4">
|
||||||
<img src="{% static 'netbox_logo.svg' %}" height="80" alt="{% trans "NetBox logo" %}" />
|
<img src="{% static 'netbox_logo.svg' %}" height="80" alt="{% trans "NetBox logo" %}"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{# Login banner #}
|
{# Login banner #}
|
||||||
@ -41,12 +41,24 @@
|
|||||||
|
|
||||||
{# Set post-login URL #}
|
{# Set post-login URL #}
|
||||||
{% if 'next' in request.GET %}
|
{% if 'next' in request.GET %}
|
||||||
<input type="hidden" name="next" value="{{ request.GET.next }}" />
|
<input type="hidden" name="next" value="{{ request.GET.next }}"/>
|
||||||
{% elif 'next' in request.POST %}
|
{% elif 'next' in request.POST %}
|
||||||
<input type="hidden" name="next" value="{{ request.POST.next }}" />
|
<input type="hidden" name="next" value="{{ request.POST.next }}"/>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% render_form form %}
|
{% for field in form %}
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="{{ field.id_for_label }}">{{ field.label }}</label>
|
||||||
|
{{ field }}
|
||||||
|
{% if field.errors %}
|
||||||
|
<ul class="errorlist">
|
||||||
|
{% for error in field.errors %}
|
||||||
|
<li>{{ error }}</li>
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
<div class="form-footer">
|
<div class="form-footer">
|
||||||
<button type="submit" class="btn btn-primary w-100">
|
<button type="submit" class="btn btn-primary w-100">
|
||||||
@ -55,6 +67,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
{# SSO login #}
|
{# SSO login #}
|
||||||
{% if auth_backends %}
|
{% if auth_backends %}
|
||||||
|
Loading…
Reference in New Issue
Block a user