Skip to content

Commit

Permalink
Bugfix/Cadasta#1220: Clear error messages during create organization.
Browse files Browse the repository at this point in the history
  • Loading branch information
khantaalaman committed Mar 31, 2017
1 parent 378ea3a commit 8e8e77e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
8 changes: 8 additions & 0 deletions cadasta/templates/organization/organization_add.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,12 @@ <h3 class="modal-title">{% trans "Add organization" %}</h3>

{% block extra_script %}
{{ form.media }}
<script>
// Any visible error message to be clear upon form submission
$('.modal-organization-add').submit(function() {
$('.error-block').html('');
$('.parsley-errors-list').remove();
return true;
});
</script>
{% endblock %}
8 changes: 7 additions & 1 deletion cadasta/templates/organization/project_add_details.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@
}
});
});
// any visible error message to be cleared upon clicking Next
$('#submit_details').click(function() {
$('.error-block').html('');
$('.parsley-errors-list').remove();
return true;
});
</script>
{% endblock %}

Expand Down Expand Up @@ -138,7 +144,7 @@ <h3>{% trans "3. Contacts" %}</h3>

{% block step_content_buttons %}
<div class="btn-group btn-reverse" role="group">
<button class="btn btn-primary pull-right" type="submit">
<button class="btn btn-primary pull-right" type="submit" id="submit_details">
{% trans 'Next' %}
<span class="glyphicon glyphicon-triangle-right"></span>
</button>
Expand Down

0 comments on commit 8e8e77e

Please sign in to comment.