Commit 139f666d authored by Patrick's avatar Patrick

Sticky update button on forms

parent ca15fb3b
...@@ -363,3 +363,8 @@ ul.djng-field-errors li.valid::before { ...@@ -363,3 +363,8 @@ ul.djng-field-errors li.valid::before {
pointer-events: none; pointer-events: none;
cursor: default; cursor: default;
} }
/* sticky "Update" button */
.form-sticky-update-button{
position:sticky;
bottom:65px;
}
...@@ -5,10 +5,10 @@ ...@@ -5,10 +5,10 @@
{% if update == "Nok" %}<div class="has-error"><span class="help-block"><strong>{% trans "Update not done." %}</strong></span></div>{% endif %} {% if update == "Nok" %}<div class="has-error"><span class="help-block"><strong>{% trans "Update not done." %}</strong></span></div>{% endif %}
<form name="{{ form.form_name }}" method="post" action="." validate> <form name="{{ form.form_name }}" method="post" action="." validate>
{% csrf_token %} {% csrf_token %}
<div class="form-group"><button type="submit" ng-disabled="{{ form.form_name }}.$invalid" class="btn btn-default pull-right">{% trans "Update" %}</button></div>
{% trans "All informations bellow are visible to all members except your phone and email. You have the choice to specify if your phone and/or mail are visible to others members." %} {% trans "All informations bellow are visible to all members except your phone and email. You have the choice to specify if your phone and/or mail are visible to others members." %}
<p>{% if membership_fee_valid_until %}<i>{% trans "Your membership fee is valid until" %} : <u>{{ membership_fee_valid_until }}</u></i>{% endif %}</p> <p>{% if membership_fee_valid_until %}<i>{% trans "Your membership fee is valid until" %} : <u>{{ membership_fee_valid_until }}</u></i>{% endif %}</p>
{{ form.as_div }} {{ form.as_div }}
<div class="form-group form-sticky-update-button"><button type="submit" ng-disabled="{{ form.form_name }}.$invalid" class="btn btn-default pull-right">{% trans "Update" %}</button></div>
</form> </form>
{% addtoblock "css" %}{{ form.media.css }}{% endaddtoblock %} {% addtoblock "css" %}{{ form.media.css }}{% endaddtoblock %}
{% addtoblock "jshead" %}{{ form.media.js }}{% endaddtoblock %} {% addtoblock "jshead" %}{{ form.media.js }}{% endaddtoblock %}
......
...@@ -4,9 +4,6 @@ ...@@ -4,9 +4,6 @@
{% if update == '2' %}<p class="bg-success">{% trans "The mail has been send" %}</p>{% endif %} {% if update == '2' %}<p class="bg-success">{% trans "The mail has been send" %}</p>{% endif %}
<form name="{{ form.form_name }}" method="post" action="." validate> <form name="{{ form.form_name }}" method="post" action="." validate>
{% csrf_token %} {% csrf_token %}
{% if update != '2' %}
<div class="form-group"><button type="submit" ng-disabled="{{ form.form_name }}.$invalid" class="btn btn-default pull-right">{% trans "Send e-mail" %}</button></div>
{% endif %}
{% if coordinator %} {% if coordinator %}
<div class="bg-danger"> <div class="bg-danger">
<blockquote><small> <blockquote><small>
...@@ -17,6 +14,9 @@ ...@@ -17,6 +14,9 @@
{% trans "This message will be send only to members who accept to show they email." %} {% trans "This message will be send only to members who accept to show they email." %}
{% endif %} {% endif %}
{{ form.as_div }} {{ form.as_div }}
{% if update != '2' %}
<div class="form-group form-sticky-update-button"><button type="submit" ng-disabled="{{ form.form_name }}.$invalid" class="btn btn-default pull-right">{% trans "Send e-mail" %}</button></div>
{% endif %}
</form> </form>
{% addtoblock "css" %}{{ form.media.css }}{% endaddtoblock %} {% addtoblock "css" %}{{ form.media.css }}{% endaddtoblock %}
{% addtoblock "jshead" %}{{ form.media.js }}{% endaddtoblock %} {% addtoblock "jshead" %}{{ form.media.js }}{% endaddtoblock %}
......
...@@ -5,11 +5,12 @@ ...@@ -5,11 +5,12 @@
{% if update == '2' %}<p class="bg-success">{% trans "The mail has been send" %}</p>{% endif %} {% if update == '2' %}<p class="bg-success">{% trans "The mail has been send" %}</p>{% endif %}
<form name="{{ form.form_name }}" method="post" action="." validate> <form name="{{ form.form_name }}" method="post" action="." validate>
{% csrf_token %} {% csrf_token %}
{% if update != '2' %}
<div class="form-group"><button type="submit" ng-disabled="{{ form.form_name }}.$invalid" class="btn btn-default pull-right">{% trans "Send e-mail" %}</button></div>
{% endif %}
<b>{% trans "This message will be send only to coordinators you have selected." %}</b><p></p> <b>{% trans "This message will be send only to coordinators you have selected." %}</b><p></p>
{{ form.as_div }} {{ form.as_div }}
{% if update != '2' %}
<div class="form-group form-sticky-update-button"><button type="submit" ng-disabled="{{ form.form_name }}.$invalid" class="btn btn-default pull-right">{% trans "Send e-mail" %}</button></div>
{% endif %}
</form> </form>
{% addtoblock "css" %}{{ form.media.css }}{% endaddtoblock %} {% addtoblock "css" %}{{ form.media.css }}{% endaddtoblock %}
{% addtoblock "jshead" %}{{ form.media.js }}{% endaddtoblock %} {% addtoblock "jshead" %}{{ form.media.js }}{% endaddtoblock %}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment