username.html 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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. {{ form_theme.hidden_fields(form) }}
  17. <div class="form-fields">
  18. {% if changes_left == 0 %}
  19. {{ form_theme.row(form.username, attrs={'class': 'span9', 'disabled': 'disabled'}) }}
  20. {% else %}
  21. {{ form_theme.row(form.username, attrs={'class': 'span9'}) }}
  22. {% endif %}
  23. </div>
  24. <div class="form-actions">
  25. <button name="save" type="submit" class="btn btn-primary"{% if changes_left == 0 %} disabled="disabled"{% endif %}>{% trans %}Change Name{% endtrans %}</button>
  26. <span class="form-actions-protip">{% if changes_left > 0 -%}
  27. {% trans changes=changes_left -%}
  28. You can change your username one more time.
  29. {%- pluralize -%}
  30. You can change your username {{ changes }} more times.
  31. {%- endtrans %}
  32. {%- elif acl.usercp.changes_expire() -%}
  33. {% trans next_change=next_change|reldate|low %}You will be able to change your username on {{ next_change }}{% endtrans %}
  34. {%- else -%}
  35. {% trans %}You have exceeded the maximum number of name changes.{% endtrans %}
  36. {%- endif %}
  37. </span>
  38. </div>
  39. </form>
  40. </div>
  41. {% endblock %}