Lines 14-21
$(document).ready(function() {
Link Here
|
14 |
var action = $("#action").val(); |
14 |
var action = $("#action").val(); |
15 |
if ( action == 'move_field' || action == 'copy_field' || action == 'copy_and_replace_field') { |
15 |
if ( action == 'move_field' || action == 'copy_field' || action == 'copy_and_replace_field') { |
16 |
if ( $("#from_subfield").val().length != $("#to_subfield").val().length ) { |
16 |
if ( $("#from_subfield").val().length != $("#to_subfield").val().length ) { |
17 |
alert( __("Both subfield values should be filled or empty.") ); |
17 |
if ( ( $("#to_field").val() >= 10 && $("#to_subfield").val().length > 0 ) && |
18 |
return false; |
18 |
( $("#from_field").val() >= 10 && $("#from_subfield").val().length > 0 ) ) { |
|
|
19 |
alert( __("Both subfield values should be filled or empty.") ); |
20 |
return false; |
21 |
} |
19 |
} |
22 |
} |
20 |
if ( $("#to_field").val().length <= 0 ) { |
23 |
if ( $("#to_field").val().length <= 0 ) { |
21 |
alert( __("The destination should be filled.") ); |
24 |
alert( __("The destination should be filled.") ); |
Lines 26-36
$(document).ready(function() {
Link Here
|
26 |
alert( __("If the field is a control field, the subfield should be empty") ); |
29 |
alert( __("If the field is a control field, the subfield should be empty") ); |
27 |
return false; |
30 |
return false; |
28 |
} |
31 |
} |
29 |
if ( ( $("#from_field").val() < 10 && $("#to_field").val() >= 10 ) || |
|
|
30 |
( $("#to_field").val() < 10 && $("#from_field").val() >= 10 ) ) { |
31 |
alert( __("A control field cannot be used with a regular field.") ); |
32 |
return false; |
33 |
} |
34 |
} |
32 |
} |
35 |
if ( action == 'update_field' ) { |
33 |
if ( action == 'update_field' ) { |
36 |
if ( $("#from_subfield").val().length <= 0 ) { |
34 |
if ( $("#from_subfield").val().length <= 0 ) { |
37 |
- |
|
|