removes error message from new type/group form [fixes SCI-805]

This commit is contained in:
zmagod 2016-12-15 16:17:34 +01:00
parent 7e5d748fc1
commit fffa0d91da

View file

@ -11,9 +11,12 @@
function newSampleTypeFormCancel() { function newSampleTypeFormCancel() {
$('#remove').off(); $('#remove').off();
$('#remove').on('click', function() { $('#remove').on('click', function(ev) {
ev.preventDefault();
$('#name-input').val(''); $('#name-input').val('');
$('.new-resource-form').slideUp(); $('.new-resource-form').slideUp();
$('#new_sample_type').clearFormErrors();
$('#new_sample_group').clearFormErrors();
}); });
} }
@ -31,7 +34,7 @@
var li = $(this).closest('li'); var li = $(this).closest('li');
var href = $(this).attr('data-element'); var href = $(this).attr('data-element');
var id = $(li).attr('data-id'); var id = $(li).attr('data-id');
$().clearFormErrors(); $(li).clearFormErrors();
$.ajax({ $.ajax({
url: href, url: href,
data: { id: id }, data: { id: id },