Bug 15774: Fix JS check when AV and MARC field are both selected
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This commit is contained in:
parent
695ce65132
commit
feb866a618
1 changed files with 7 additions and 5 deletions
|
@ -189,11 +189,13 @@
|
|||
return confirm(_("Are you sure you want to delete this field?"));
|
||||
});
|
||||
|
||||
$("#add_field").on('submit', function(){
|
||||
if ( $("#marcfield").val().length > 0
|
||||
&& $("select[name='authorised_value_category']" ).val().length > 0 ) {
|
||||
alert("You cannot select an authorised value category and a marcfield");
|
||||
return false;
|
||||
$("#add_field").on('submit', function() {
|
||||
if ( $("#marcfield").length && $("select[name='authorised_value_category']").length ) {
|
||||
if ( $("#marcfield").val().length > 0
|
||||
&& $("select[name='authorised_value_category']" ).val().length > 0 ) {
|
||||
alert("You cannot select an authorised value category and a marcfield");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue