hide fields on guard page when vwf not completed

This commit is contained in:
Josh North 2021-06-25 17:02:06 -04:00
parent 3ae19a8ea5
commit 4d1471ace8

View File

@ -999,6 +999,7 @@ if ($db_vendorinfo_workcompleted === 1 && $db_vendorinfo_sitecleanup === 1) { $f
</div> </div>
</td> </td>
<?php } else { ?> <?php } else { ?>
<?php if($isvendor===1 && $initialvendorformcomplete===1) { ?>
<div class="input-group input-group-sm mb-0"> <div class="input-group input-group-sm mb-0">
<span class="input-group-text"><?php echo $transLang['ID_TYPE']; ?></span> <span class="input-group-text"><?php echo $transLang['ID_TYPE']; ?></span>
<select class="form-control form-control-sm bg-white form-select<?php if( isset($id_type_error) && $id_type_error===1 && $_POST['approvevisit'] == $visitid ) { echo " is-invalid"; } ?>" id="id_type-<?php echo $visitid; ?>" name="id_type"> <select class="form-control form-control-sm bg-white form-select<?php if( isset($id_type_error) && $id_type_error===1 && $_POST['approvevisit'] == $visitid ) { echo " is-invalid"; } ?>" id="id_type-<?php echo $visitid; ?>" name="id_type">
@ -1026,7 +1027,8 @@ if ($db_vendorinfo_workcompleted === 1 && $db_vendorinfo_sitecleanup === 1) { $f
} }
}); });
$('#id_type-<?php echo $visitid; ?>').trigger("change"); $('#id_type-<?php echo $visitid; ?>').trigger("change");
</script> </script></td>
<?php } ?>
<?php if($SiteInfo->getSite($siteid, $uid, "0", "0")[0]["sites_region"] == "US") { ?> <?php if($SiteInfo->getSite($siteid, $uid, "0", "0")[0]["sites_region"] == "US") { ?>
<div class="input-group input-group-sm mb-0"> <div class="input-group input-group-sm mb-0">
<span class="input-group-text"><?php echo $transLang['COUNTRY']; ?></span> <span class="input-group-text"><?php echo $transLang['COUNTRY']; ?></span>
@ -1054,14 +1056,16 @@ if ($db_vendorinfo_workcompleted === 1 && $db_vendorinfo_sitecleanup === 1) { $f
} }
}); });
$('#citizen-<?php echo $visitid; ?>').trigger("change"); $('#citizen-<?php echo $visitid; ?>').trigger("change");
</script> </script></td>
<?php } ?> <?php } ?>
<td class="small"> <td class="small">
<?php if($isvendor===1 && $initialvendorformcomplete===1) { ?>
<div class="input-group input-group-sm mb-0"> <div class="input-group input-group-sm mb-0">
<span class="input-group-text"><?php echo $transLang['BADGE']; ?></span> <span class="input-group-text"><?php echo $transLang['BADGE']; ?></span>
<input type="text" id="badge" name="badge" class="form-control form-control-sm bg-white<?php if( isset($badge_error) && $badge_error===1 && $_POST['approvevisit'] == $visitid ) { echo " is-invalid"; } ?>" autofocus maxlength="15"> <input type="text" id="badge" name="badge" class="form-control form-control-sm bg-white<?php if( isset($badge_error) && $badge_error===1 && $_POST['approvevisit'] == $visitid ) { echo " is-invalid"; } ?>" autofocus maxlength="15">
<div class="invalid-feedback"><?php echo $transLang['STR_COMMON_REQUIRED']; ?></div> <div class="invalid-feedback"><?php echo $transLang['STR_COMMON_REQUIRED']; ?></div>
</div> </div>
<?php } ?>
<?php if($isvendor===1) { ?> <?php if($isvendor===1) { ?>
<div class="input-group input-group-sm mb-0"> <div class="input-group input-group-sm mb-0">
<?php if(empty($initialvendorformcomplete)) {$initialvendorformcomplete=0;}; if ($initialvendorformcomplete===1) { ?> <?php if(empty($initialvendorformcomplete)) {$initialvendorformcomplete=0;}; if ($initialvendorformcomplete===1) { ?>