12345678910111213141516171819202122232425262728293031323334353637383940 |
- function validateSyncForm()
- {
- document.getElementById("fsync-datatype-error").style.display = "none";
- document.getElementById("fsync-authform-error").style.display = "none";
- if(document.getElementById("fsync_datatype").value == '')
- {
- document.getElementById("fsync-datatype-error").style.display = "block";
- return false;
- }
- if(
- document.getElementById("fsync_auth_apikey").value == '' ||
- document.getElementById("fsync_auth_username").value == '' ||
- document.getElementById("fsync_auth_password").value == '' ||
- document.getElementById("fsync_auth_fiscalcode").value == ''
- )
- {
- document.getElementById("fsync-authform-error").style.display = "block";
- return false;
- }
- return true;
- }
- function submitSyncForm()
- {
- if(validateSyncForm())
- {
- document.getElementById('btn_sync_form').disabled = true;
- var alertboxes = document.getElementsByClassName("alert-box");
- for (var i = 0, length = alertboxes.length; i < length; i++) {
- alertboxes[i].style.display = "none";
- }
- document.getElementById("alert-sync").style.display = "block";
- document.getElementById('sync_form').submit();
- }
- }
|