Various UI mobile fix

This commit is contained in:
Éloi Rivard 2021-07-01 09:55:40 +02:00
parent e090723b46
commit 00386ef482
4 changed files with 49 additions and 30 deletions

View file

@ -33,14 +33,18 @@
{{ form.hidden_tag() if form.hidden_tag }}
{{ sui.render_field(form.login, icon="user") }}
<button type="submit" class="ui right floated {% if request.method != "POST" or form.errors %}primary {% endif %}button">
{% if request.method == "POST" %}
{{ _("Send again") }}
{% else %}
{{ _("Send") }}
{% endif %}
</button>
<a type="button" class="ui right floated button" href="{{ url_for('account.login') }}">{{ _("Login page") }}</a>
<div class="ui right aligned container">
<div class="ui stackable buttons">
<a type="button" class="ui right floated button" href="{{ url_for('account.login') }}">{{ _("Login page") }}</a>
<button type="submit" class="ui right floated {% if request.method != "POST" or form.errors %}primary {% endif %}button">
{% if request.method == "POST" %}
{{ _("Send again") }}
{% else %}
{{ _("Send") }}
{% endif %}
</button>
</div>
</div>
</form>
</div>
</div>

View file

@ -34,8 +34,12 @@
{{ sui.render_field(form.password, icon="lock") }}
{% endif %}
<button type="submit" class="ui right floated primary button">{{ _("Continue") }}</button>
<a type="button" class="ui right floated button" href="{{ url_for('account.forgotten') }}">{{ _("Forgotten password") }}</a>
<div class="ui right aligned container">
<div class="ui stackable buttons">
<a type="button" class="ui right floated button" href="{{ url_for('account.forgotten') }}">{{ _("Forgotten password") }}</a>
<button type="submit" class="ui right floated primary button">{{ _("Continue") }}</button>
</div>
</div>
</form>
</div>
{% endblock %}

View file

@ -31,9 +31,13 @@
{{ form.hidden_tag() if form.hidden_tag }}
{{ sui.render_field(form.password, icon="lock") }}
<button type="submit" class="ui right floated primary button">{{ _("Sign in") }}</button>
<a type="button" class="ui right floated button" href="{{ url_for('account.forgotten') }}">{{ _("Forgotten password") }}</a>
<a type="button" class="ui right floated button" href="{{ url_for('account.login') }}">{{ _("I am not %(username)s", username=username) }}</a>
<div class="ui right aligned container">
<div class="ui stackable buttons">
<a type="button" class="ui right floated button" href="{{ url_for('account.login') }}">{{ _("I am not %(username)s", username=username) }}</a>
<a type="button" class="ui right floated button" href="{{ url_for('account.forgotten') }}">{{ _("Forgotten password") }}</a>
<button type="submit" class="ui right floated primary button">{{ _("Sign in") }}</button>
</div>
</div>
</form>
</div>
{% endblock %}

View file

@ -153,23 +153,30 @@
{% endif %}
<button type="submit" class="ui right floated primary button" name="action" value="edit" id="edit">
{{ _("Submit") }}
</button>
{% if user.admin and edited_user and user.uid != edited_user.uid %}
<a href="{{ url_for('account.impersonate', username=edited_user.uid[0]) }}" class="ui right floated basic button" name="action" value="impersonate" id="impersonate">
{{ _("Impersonate") }}
</a>
{% endif %}
{% if user.moderator and edited_user or self_deletion %}
<button type="submit" class="ui right floated basic negative button confirm" name="action" value="delete" id="delete">
{% if user.uid != edited_user.uid %}
{{ _("Delete the user") }}
{% else %}
{{ _("Delete my account") }}
{% endif %}
</button>
{% endif %}
<div class="ui right aligned container">
<div class="ui stackable buttons">
{% if user.moderator and edited_user or self_deletion %}
<button type="submit" class="ui right floated basic negative button confirm" name="action" value="delete" id="delete">
{% if user.uid != edited_user.uid %}
{{ _("Delete the user") }}
{% else %}
{{ _("Delete my account") }}
{% endif %}
</button>
{% endif %}
{% if user.admin and edited_user and user.uid != edited_user.uid %}
<a href="{{ url_for('account.impersonate', username=edited_user.uid[0]) }}" class="ui right floated basic button" name="action" value="impersonate" id="impersonate">
{{ _("Impersonate") }}
</a>
{% endif %}
<button type="submit" class="ui right floated primary button" name="action" value="edit" id="edit">
{{ _("Submit") }}
</button>
</div>
</div>
</form>
</div>
{% endblock %}