From 67be7760ff7835daf5b7d508526d630f9fde2d9b Mon Sep 17 00:00:00 2001 From: Chandra Lash Date: Mon, 7 Nov 2016 03:42:18 -0600 Subject: [PATCH] Added script for removing file upload errors (#895) * Added script for removing file upload errors --- cadasta/core/static/js/file-upload.js | 5 ++++ .../organization/project_add_details.html | 26 +++++++++---------- .../organization/project_edit_details.html | 2 +- 3 files changed, 19 insertions(+), 14 deletions(-) diff --git a/cadasta/core/static/js/file-upload.js b/cadasta/core/static/js/file-upload.js index d8add2641..9506f177d 100644 --- a/cadasta/core/static/js/file-upload.js +++ b/cadasta/core/static/js/file-upload.js @@ -24,4 +24,9 @@ $(function() { }); + $('a.file-remove').click(function() { + $('.file-well .errorlist').addClass('hidden'); + $(this).parents('.form-group').removeClass('has-error'); + }); + }); diff --git a/cadasta/templates/organization/project_add_details.html b/cadasta/templates/organization/project_add_details.html index 051cc1e98..430746053 100644 --- a/cadasta/templates/organization/project_add_details.html +++ b/cadasta/templates/organization/project_add_details.html @@ -8,19 +8,19 @@ {% block extra_script %} {{ form.media }} {% endblock %} diff --git a/cadasta/templates/organization/project_edit_details.html b/cadasta/templates/organization/project_edit_details.html index 995908e99..166bf5ecd 100644 --- a/cadasta/templates/organization/project_edit_details.html +++ b/cadasta/templates/organization/project_edit_details.html @@ -5,7 +5,7 @@ {% load widget_tweaks %} {% block extra_script %} - {{ form.media }} +{{ form.media }} {% endblock %} {% block page_title %}{% trans "Edit project details" %} | {% endblock %}