Files
octopus/myproject/accounts/templates/accounts/password_input.html

29 lines
1.1 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!-- Компонент для поля ввода пароля с возможностью показать/скрыть -->
{% comment %}
Использование:
{% include 'accounts/password_input.html' with field_name='password1' field_label='Пароль' required=True %}
{% endcomment %}
<div class="mb-3">
<label for="{{ field_name }}" class="form-label">{{ field_label|default:"Пароль" }}</label>
<div class="input-group">
<input
type="password"
class="form-control"
id="{{ field_name }}"
name="{{ field_name }}"
{% if required %}required{% endif %}
{% if placeholder %}placeholder="{{ placeholder }}"{% endif %}
>
<button
type="button"
class="btn btn-outline-secondary show-password-btn"
data-target="{{ field_name }}"
>
<i class="bi bi-eye"></i>
</button>
</div>
{% if field_errors %}
<div class="text-danger">{{ field_errors }}</div>
{% endif %}
</div>