mirror of
https://gitlab.com/SIGBUS/nyaa.git
synced 2025-01-26 06:45:13 +00:00
user: clean up admin_form HTML (#400)
Properly scaffold it, remove a superfluous form-group div, and style the select properly.
This commit is contained in:
parent
d00f3686f7
commit
362b3e3dfa
|
@ -120,8 +120,12 @@
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{{ field.label(class='control-label') }}
|
{{ field.label(class='control-label') }}
|
||||||
{{ field(title=field.description,**kwargs) | safe }}
|
<div class="input-group input-group-sm">
|
||||||
|
{{ field(title=field.description, class_="form-control",**kwargs) | safe }}
|
||||||
|
<div class="input-group-btn">
|
||||||
<button type="submit" class="btn btn-primary">Apply</button>
|
<button type="submit" class="btn btn-primary">Apply</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
{% if field.errors %}
|
{% if field.errors %}
|
||||||
<div class="help-block">
|
<div class="help-block">
|
||||||
{% if field.errors|length < 2 %}
|
{% if field.errors|length < 2 %}
|
||||||
|
|
|
@ -21,6 +21,8 @@
|
||||||
<a href="{{ url_for('users.view_user_comments', user_name=user.username) }}">View all comments</a>
|
<a href="{{ url_for('users.view_user_comments', user_name=user.username) }}">View all comments</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
<dl class="dl-horizontal">
|
<dl class="dl-horizontal">
|
||||||
<dt>User ID:</dt>
|
<dt>User ID:</dt>
|
||||||
<dd>{{ user.id }}</dd>
|
<dd>{{ user.id }}</dd>
|
||||||
|
@ -37,14 +39,17 @@
|
||||||
<dd>{{ user.ip_string }}</dd><br>
|
<dd>{{ user.ip_string }}</dd><br>
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
</dl>
|
</dl>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
{% if admin_form %}
|
{% if admin_form %}
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-6">
|
||||||
<form method="POST">
|
<form method="POST">
|
||||||
{{ admin_form.csrf_token }}
|
{{ admin_form.csrf_token }}
|
||||||
|
|
||||||
<div class="form-group">
|
|
||||||
{{ render_menu_with_button(admin_form.user_class) }}
|
{{ render_menu_with_button(admin_form.user_class) }}
|
||||||
</div>
|
|
||||||
</form>
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<br>
|
<br>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue