updating js call - close #391

This commit is contained in:
Marc Ducobu 2015-01-30 12:28:06 +01:00
parent fdf6ac0bbf
commit 31f76d1339
2 changed files with 2 additions and 3 deletions

View File

@ -33,6 +33,6 @@
{% block js %}
<script type="text/javascript">
chill.protectUnsavedDataForFrom('form[name="{{ edit_form.vars.form.vars.name }}"]', '{{ "You are going to leave a page with unsubmitted data. Are you sure you want to leave ?"|trans }}');
chill.displayAlertWhenLeavingModifiedForm('form[name="{{ edit_form.vars.form.vars.name }}"]', '{{ "You are going to leave a page with unsubmitted data. Are you sure you want to leave ?"|trans }}');
</script>
{% endblock %}

View File

@ -26,13 +26,12 @@
{{ form_widget(form) }}
<div class="grid-12 centered sticky-form-buttons">
<button class="sc-button green margin-10" type="submit"><i class="fa fa-save"></i> {{ 'Add report'|trans }}</button>
<button class="sc-button red margin-10" type="reset"><i class="fa fa-eraser"></i> {{ 'Reset report'|trans }}</button>
</div>
{{ form_end(form) }}
{% endblock %}
{% block js %}
<script type="text/javascript">
chill.protectUnsavedDataForFrom('form[name="{{ form.vars.form.vars.name }}"]', '{{ "You are going to leave a page with unsubmitted data. Are you sure you want to leave ?"|trans }}');
chill.displayAlertWhenLeavingUnsubmittedForm('form[name="{{ form.vars.form.vars.name }}"]', '{{ "You are going to leave a page with unsubmitted data. Are you sure you want to leave ?"|trans }}');
</script>
{% endblock %}