username.html 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. {% extends "cranefly/usercp/layout.html" %}
  2. {% import "_forms.html" as form_theme with context %}
  3. {% import "cranefly/macros.html" as macros with context %}
  4. {% block title %}{{ macros.page_title(title=_('Change your Username')) }}{% endblock %}
  5. {% block action %}
  6. <div class="form-container">
  7. <div class="form-header">
  8. <h1>{% trans %}Change your Username{% endtrans %}</h1>
  9. </div>
  10. {% if message %}
  11. <div class="messages-list">
  12. {{ macros.draw_message(message) }}
  13. </div>
  14. {% endif %}
  15. <form action="{{ url('usercp_username') }}" method="post">
  16. <div class="form-fields">
  17. {% if changes_left == 0 %}
  18. {% do form.fields['username']['attrs'].update({'disabled': 'disabled'}) %}
  19. {% endif %}
  20. {{ form_theme.form_widget(form, width=9) }}
  21. </div>
  22. <div class="form-actions">
  23. <button name="save" type="submit" class="btn btn-primary"{% if changes_left == 0 %} disabled="disabled"{% endif %}>{% trans %}Change Name{% endtrans %}</button>
  24. <span class="form-actions-protip">{% if changes_left > 0 -%}
  25. {% trans changes=changes_left -%}
  26. You can change your username one more time.
  27. {%- pluralize -%}
  28. You can change your username {{ changes }} more times.
  29. {%- endtrans %}
  30. {%- elif acl.usercp.changes_expire() -%}
  31. {% trans next_change=next_change|reldate|low %}You will be able to change your username on {{ next_change }}{% endtrans %}
  32. {%- else -%}
  33. {% trans %}You have exceeded the maximum number of name changes.{% endtrans %}
  34. {%- endif %}
  35. </span>
  36. </div>
  37. </form>
  38. </div>
  39. {% endblock %}