$info_msg = ""; ?> <script type="text/javascript" src="<?php echo $webroot ?>/interface/main/tabs/js/include_opener.js"></script> <script type="text/javascript" src="<?php echo $GLOBALS['assets_static_relative'] ?>/jquery-min-1-9-1/index.js"></script> <!-- validation library --> <!--//Not lbf forms use the new validation, please make sure you have the corresponding values in the list Page validation--> <?php $use_validate_js = 1;?> <?php require_once($GLOBALS['srcdir'] . "/validation/validation_script.js.php"); ?> <?php require_once($GLOBALS['srcdir'] . "/validation/validate_core.php"); ?> <?php //Gets validation rules from Page Validation list. //Note that for technical reasons, we are bypassing the standard validateUsingPageRules() call. $collectthis = collectValidationPageRules("/interface/main/calendar/add_edit_event.php"); if (empty($collectthis)) { $collectthis = "undefined"; } else { $collectthis = $collectthis["theform"]["rules"]; } ?> <?php function InsertEventFull() { global $new_multiple_value,$provider,$event_date,$duration,$recurrspec,$starttime,$endtime,$locationspec; // ======================================= // multi providers case
<!-- validation library --> <!--//Not lbf forms use the new validation, please make sure you have the corresponding values in the list Page validation--> <?php $use_validate_js = 1; ?> <?php require_once $GLOBALS['srcdir'] . "/validation/validation_script.js.php"; ?> <?php require_once $GLOBALS['srcdir'] . "/validation/validate_core.php"; ?> <?php //Gets validation rules from Page Validation list. //Note that for technical reasons, we are bypassing the standard validateUsingPageRules() call. $collectthis = collectValidationPageRules("/interface/usergroup/facility_admin.php"); if (empty($collectthis)) { $collectthis = "undefined"; } else { $collectthis = $collectthis["facility-form"]["rules"]; } ?> <script type="text/javascript"> /* * validation on the form with new client side validation (using validate.js). * this enable to add new rules for this form in the pageValidation list. * */ var collectvalidation = <?php echo $collectthis;
// Process click on issue title. function newissue() { dlgopen('../../patient_file/summary/add_edit_issue.php', '_blank', 800, 600); return false; } // callback from add_edit_issue.php: function refreshIssue(issue, title) { var s = document.forms[0]['issues[]']; s.options[s.options.length] = new Option(title, issue, true, true); } <?php //Gets validation rules from Page Validation list. //Note that for technical reasons, we are bypassing the standard validateUsingPageRules() call. $collectthis = collectValidationPageRules("/interface/forms/newpatient/common.php"); if (empty($collectthis)) { $collectthis = "undefined"; } else { $collectthis = $collectthis["new_encounter"]["rules"]; } ?> var collectvalidation = <?php echo $collectthis; ?> ; $(document).ready(function(){ window.saveClicked = function(event) { var submit = submitme(1, event, 'new-encounter-form', collectvalidation); if (submit) { top.restoreSession();
function validateUsingPageRules($fileNamePath) { $path=''; if($GLOBALS['webroot']!='') { $path= str_replace($GLOBALS['webroot'], '',$fileNamePath); } else{ $path=$fileNamePath; } print '<!--Page Form Validations-->'; //if we would like to get all the page forms rules we need to call collectValidationPageRules($title) this way there is a $collectThis=collectValidationPageRules($path); if ($collectThis) { print '<!---Start of page form validation-->'; print '<!--//include new rules of submitme functionallity-->'; echo("\r\n"); //Not lbf forms use the new validation, please make sure you have the corresponding values in the list Page validation $use_validate_js = 1; require_once($GLOBALS['srcdir'] . "/validation/validation_script.js.php"); echo("\r\n"); print '<script type="text/javascript">'; echo ("$(document).ready(function(){"); echo("\r\n"); foreach ($collectThis as $key => $value) { echo("try{"); echo("\r\n"); echo('if(document.getElementsByName("' . $key . '").length>0)'); echo("\r\n"); echo('{'); echo("\r\n"); echo('var form = document.getElementsByName("'.$key.'");'); echo("\r\n"); echo('form[0].setAttribute("id","'. $key.'");'); echo("\r\n"); echo('//Use validation script js Validations-'); echo("\r\n"); echo('$("#'.$key.'").submit(function(event){'); echo("\r\n"); echo("\r\n"); echo ('var submitvalue = submitme(' . $use_validate_js . ',event,"' . $key . '",' . $collectThis[$key]['rules'] . ');'); echo("\r\n"); echo(' if(submitvalue){'); echo("\r\n"); echo(" "); echo("\r\n"); echo('}'); echo("\r\n"); echo('else{'); echo("\r\n"); echo (" event.preventDefault();"); echo("\r\n"); echo('}'); echo("\r\n"); echo('});}}'); //echo('$("#'.$key.'").prop("onclick", \'return '); echo("\r\n"); echo('catch(err)'); echo("\r\n"); echo('{'); echo("\r\n"); echo('//log err - console.log(err)'); echo("\r\n"); echo('}'); } echo ("});"); echo("\r\n"); echo('</script>'); print '<!---End of page form validation-->'; } }
<script type="text/javascript" src="<?php echo $GLOBALS['webroot']; ?> /library/js/fancybox/jquery.fancybox-1.2.6.js"></script> <script src="checkpwd_validation.js" type="text/javascript"></script> <!-- validation library --> <!--//Not lbf forms use the new validation, please make sure you have the corresponding values in the list Page validation--> <?php $use_validate_js = 1; require_once $GLOBALS['srcdir'] . "/validation/validation_script.js.php"; require_once $GLOBALS['srcdir'] . "/validation/validate_core.php"; //Gets validation rules from Page Validation list. //Note that for technical reasons, we are bypassing the standard validateUsingPageRules() call. $collectthis = collectValidationPageRules("/interface/usergroup/usergroup_admin_add.php"); if (empty($collectthis)) { $collectthis = "undefined"; } else { $collectthis = $collectthis["new_user"]["rules"]; } ?> <script language="JavaScript"> /* * validation on the form with new client side validation (using validate.js). * this enable to add new rules for this form in the pageValidation list. * */ var collectvalidation = <?php echo $collectthis; ?>