123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- function validateOption()
- {
- document.getElementById("fsync_option_proformaserie_error").style.display = "none";
- document.getElementById("fsync_option_daysago_error").style.display = "none";
- var days = document.getElementById("fsync_option_daysago").value;
- $error = false;
- if(days == '' || !days.match(/^\d+$/))
- {
- document.getElementById("fsync_option_daysago_error").style.display = "block";
- $error = true;
- }
- var radios = document.getElementsByClassName("fsync_option_syncordersas");
- for (var i = 0, length = radios.length; i < length; i++) {
- if (radios[i].checked) {
- if(radios[i].value == 'proforma' && document.getElementById("fsync_option_proformaserie").value == '')
- {
- document.getElementById("fsync_option_proformaserie_error").style.display = "block";
- $error = true;
- }
- }
- }
- if($error)
- {
- return false;
- }
- else
- {
- return true;
- }
-
- }
- function submitOrderOptionForm()
- {
- if(validateOption()) {
- document.getElementById('save-oo-btn').classList.remove('btn-green');
- document.getElementById('save-oo-btn').innerHTML = '<img src="View/img/loader.gif" />';
- document.getElementById('order_option_form').submit();
- }
- }
- function showOrHideProformaSerie()
- {
- var radios = document.getElementsByClassName("fsync_option_syncordersas");
- for (var i = 0, length = radios.length; i < length; i++) {
- if (radios[i].checked) {
- if(radios[i].value == 'proforma')
- {
- document.getElementById("fsync_option_proformaserie").parentElement.parentElement.style.display = 'block';
- }
- else
- {
- document.getElementById("fsync_option_proformaserie").parentElement.parentElement.style.display = 'none';
- }
- break;
- }
- }
- }
|