|
Lines 689-703
Link Here
|
| 689 |
$(".customization_note").hide(); |
689 |
$(".customization_note").hide(); |
| 690 |
$( "#" + location + "_notes" ).show(); |
690 |
$( "#" + location + "_notes" ).show(); |
| 691 |
} |
691 |
} |
| 692 |
function checkLang() { |
692 |
function checkLocation( location ) { |
| 693 |
if ( $('#lang').val().includes('SelfRegistrationInstructions_') ) { |
693 |
if ( location == "SelfRegistrationInstructions") { |
| 694 |
$('#branch option[value=""]').prop('selected' , true); |
694 |
$('#branchcode').val("").prop('disabled' , true) |
| 695 |
$('#branch').prop('disabled' , true) |
|
|
| 696 |
} else { |
695 |
} else { |
| 697 |
$('#branch').prop('disabled' , false) |
696 |
$('#branchcode').prop('disabled' , false) |
| 698 |
} |
697 |
} |
| 699 |
} |
698 |
} |
| 700 |
checkLang(); |
699 |
checkLocation( $("#location").val() ); |
| 701 |
$(document).ready(function() { |
700 |
$(document).ready(function() { |
| 702 |
[% IF category == 'news' %] |
701 |
[% IF category == 'news' %] |
| 703 |
$("#add_additional_content").validate({ |
702 |
$("#add_additional_content").validate({ |
|
Lines 728-744
Link Here
|
| 728 |
|
727 |
|
| 729 |
$("#location").on("change", function(){ |
728 |
$("#location").on("change", function(){ |
| 730 |
showLocationNotes( $(this).val() ); |
729 |
showLocationNotes( $(this).val() ); |
| 731 |
}); |
730 |
checkLocation( $(this).val() ); |
|
|
731 |
}).select2({ width: '50%' }); |
| 732 |
|
732 |
|
| 733 |
$("#submit_form").on("click",function(){ |
733 |
$("#submit_form").on("click",function(){ |
| 734 |
$("#add_additional_content").submit(); |
734 |
$("#add_additional_content").submit(); |
| 735 |
}); |
735 |
}); |
| 736 |
|
|
|
| 737 |
$("#location").select2({ width: '50%' }); |
| 738 |
|
| 739 |
$('#lang').change( function() { |
| 740 |
checkLang(); |
| 741 |
}); |
| 742 |
}); |
736 |
}); |
| 743 |
</script> |
737 |
</script> |
| 744 |
[% END %] |
738 |
[% END %] |
| 745 |
- |
|
|