Skip to content

Commit

Permalink
Move JS into static/js/file-upload.js
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverroick committed Nov 7, 2016
1 parent ea4ec9f commit 83ecd70
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 14 deletions.
5 changes: 5 additions & 0 deletions cadasta/core/static/js/file-upload.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,9 @@ $(function() {

});

$('a.file-remove').click(function() {
$('.file-well .errorlist').addClass('hidden');
$(this).parents('.form-group').removeClass('has-error');
});

});
5 changes: 0 additions & 5 deletions cadasta/templates/organization/project_add_details.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@
img.css('display', 'none');
}
});
$('a.file-remove').click(function() {
$('.file-well .errorlist').addClass('hidden');
$(this).parents('.form-group')
.removeClass('has-error');
});
});
</script>
{% endblock %}
Expand Down
9 changes: 0 additions & 9 deletions cadasta/templates/organization/project_edit_details.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,6 @@

{% block extra_script %}
{{ form.media }}
<script>
$(document).ready(function () {
$('a.file-remove').click(function() {
$('.file-well .errorlist').addClass('hidden');
$(this).parents('.form-group')
.removeClass('has-error');
});
});
</script>
{% endblock %}

{% block page_title %}{% trans "Edit project details" %} | {% endblock %}
Expand Down

0 comments on commit 83ecd70

Please sign in to comment.