diff --git a/gadjo/static/css/_forms.scss b/gadjo/static/css/_forms.scss index 7a5dc4a..016769d 100644 --- a/gadjo/static/css/_forms.scss +++ b/gadjo/static/css/_forms.scss @@ -703,3 +703,23 @@ div.godo--editor { } } } + +.gadjo-password-field { + position: relative; + .title label { + padding-right: 6em; + } +} + +.password-visibility-checkbox { + display: flex; + position: absolute; + top: 0; + right: 0; + input + label { + margin: 0; + } + input { + margin: 0 0.25em 0 0; + } +} diff --git a/gadjo/templates/gadjo/password-widget.html b/gadjo/templates/gadjo/password-widget.html new file mode 100644 index 0000000..d176452 --- /dev/null +++ b/gadjo/templates/gadjo/password-widget.html @@ -0,0 +1,25 @@ +{% extends "gadjo/widget.html" %} +{% load i18n %} + +{% block widget-css-classes %}{{ block.super }} gadjo-password-field{% endblock %} + +{% block widget-bottom %} +
+ + +
+ +{% endblock %} diff --git a/gadjo/templates/gadjo/widget.html b/gadjo/templates/gadjo/widget.html index 505b1d7..db345be 100644 --- a/gadjo/templates/gadjo/widget.html +++ b/gadjo/templates/gadjo/widget.html @@ -1,9 +1,9 @@ {% load gadjo i18n %} -
{% block widget-title %}
@@ -34,6 +34,7 @@
{{ field.help_text|safe }}
{% endif %} {% endblock %} + {% block widget-bottom %}{% endblock %}
{% endblock %}