vwf initial approval require check

This commit is contained in:
Josh North 2021-06-21 22:37:36 -04:00
parent 8573ac5f71
commit fc66909cbb
5 changed files with 25 additions and 15 deletions

View File

@ -673,36 +673,42 @@ $form_data = filter_input_array(INPUT_POST, [
<input class="form-check-input" name="db_vendorinfo_checklistrequired" value="1" type="checkbox" id="db_vendorinfo_checklistrequired" <?php if (isset($db_vendorinfo_checklistrequired) && $db_vendorinfo_checklistrequired === 1) {echo "checked";}?>>
<label class="form-check-label" for="db_vendorinfo_checklistrequired"><span class="d-inline-block" tabindex="0" data-bs-toggle="popover" data-bs-trigger="hover focus" data-bs-content="<?php echo $transLang['STR_VENDORINFO_CHECKLISTREQUIRED_DESC']; ?>"><?php echo $transLang['STR_VENDORINFO_CHECKLISTREQUIRED_TITLE']; ?></span></label>
</div>
</div>
<div class="col d-grid gap-2">
<div class="form-check form-switch">
<input type="hidden" name="db_vendorinfo_routinework" value="0" />
<input class="form-check-input" name="db_vendorinfo_routinework" value="1" type="checkbox" id="db_vendorinfo_routinework" <?php if (isset($db_vendorinfo_routinework) && $db_vendorinfo_routinework === 1) {echo "checked";}?>>
<label class="form-check-label" for="db_vendorinfo_routinework"><span class="d-inline-block" tabindex="0" data-bs-toggle="popover" data-bs-trigger="hover focus" data-bs-content="<?php echo $transLang['STR_VENDORINFO_ROUTINEWORK_DESC']; ?>"><?php echo $transLang['STR_VENDORINFO_ROUTINEWORK_TITLE']; ?></span></label>
</div>
</div>
</div>
<div class="row row-cols-2 mb-2">
<div class="col d-grid gap-2">
<div class="form-check form-switch">
<input type="hidden" name="db_vendorinfo_coi" value="0" />
<input class="form-check-input" name="db_vendorinfo_coi" value="1" type="checkbox" id="db_vendorinfo_coi" <?php if (isset($db_vendorinfo_coi) && $db_vendorinfo_coi === 1) {echo "checked";}?>>
<label class="form-check-label" for="db_vendorinfo_coi"><span class="d-inline-block" tabindex="0" data-bs-toggle="popover" data-bs-trigger="hover focus" data-bs-content="<?php echo $transLang['STR_VENDORINFO_COI_DESC']; ?>"><?php echo $transLang['STR_VENDORINFO_COI_TITLE']; ?></span></label>
</div>
</div>
<div class="col d-grid gap-2">
<div class="col d-grid gap-2 routineornot">
<div class="form-check form-switch">
<input type="hidden" name="db_vendorinfo_routinework" value="0" />
<input class="form-check-input" name="db_vendorinfo_routinework" value="1" type="checkbox" id="db_vendorinfo_routinework" <?php if (isset($db_vendorinfo_routinework) && $db_vendorinfo_routinework === 1) {echo "checked";}?> oninvalid="this.setCustomValidity('<?php echo $transLang['STR_VENDORINFO_ROUTINEORNONROUTINE']; ?>')" onchange="this.setCustomValidity('')" required/>
<label class="form-check-label" for="db_vendorinfo_routinework"><span class="d-inline-block" tabindex="0" data-bs-toggle="popover" data-bs-trigger="hover focus" data-bs-content="<?php echo $transLang['STR_VENDORINFO_ROUTINEWORK_DESC']; ?>"><?php echo $transLang['STR_VENDORINFO_ROUTINEWORK_TITLE']; ?></span></label>
</div>
<div class="form-check form-switch">
<input type="hidden" name="db_vendorinfo_nonroutinework" value="0" />
<input class="form-check-input" name="db_vendorinfo_nonroutinework" value="1" type="checkbox" id="db_vendorinfo_nonroutinework" <?php if (isset($db_vendorinfo_nonroutinework) && $db_vendorinfo_nonroutinework === 1) echo "checked";?>>
<input class="form-check-input" name="db_vendorinfo_nonroutinework" value="1" type="checkbox" id="db_vendorinfo_nonroutinework" <?php if (isset($db_vendorinfo_nonroutinework) && $db_vendorinfo_nonroutinework === 1) {echo "checked";}?> oninvalid="this.setCustomValidity('<?php echo $transLang['STR_VENDORINFO_ROUTINEORNONROUTINE']; ?>')" onchange="this.setCustomValidity('')" required/>
<label class="form-check-label" for="db_vendorinfo_nonroutinework"><span class="d-inline-block" tabindex="0" data-bs-toggle="popover" data-bs-trigger="hover focus" data-bs-content="<?php echo $transLang['STR_VENDORINFO_NONROUTINEWORK_DESC']; ?>"><?php echo $transLang['STR_VENDORINFO_NONROUTINEWORK_TITLE']; ?></span></label>
</div>
</div>
</div>
<script>
$(function(){
var requiredCheckboxes = $('.routineornot :checkbox[required]');
requiredCheckboxes.change(function(){
if(requiredCheckboxes.is(':checked')) {
requiredCheckboxes.removeAttr('required');
} else {
requiredCheckboxes.attr('required', 'required');
}
});
});
</script>
<div class="row row-cols-1 mb-2">
<div class="col d-grid gap-2">
<div class="input-group input-group-sm mb-0">
<span class="d-inline-block" tabindex="0" data-bs-toggle="popover" data-bs-trigger="hover focus" data-bs-content="<?php echo $transLang['STR_VENDORINFO_WORKSUMMARY_DESC']; ?>"><span class="input-group-text"><?php echo $transLang['STR_VENDORINFO_WORKSUMMARY_TITLE']; ?></span></span>
<input class="form-control" id="db_vendorinfo_worksummary" name="db_vendorinfo_worksummary" placeholder="<?php echo $db_vendorinfo_worksummary; ?>" value="<?php echo $db_vendorinfo_worksummary; ?>" />
<input class="form-control" id="db_vendorinfo_worksummary" name="db_vendorinfo_worksummary" placeholder="<?php echo $db_vendorinfo_worksummary; ?>" value="<?php echo $db_vendorinfo_worksummary; ?>" required/>
</div>
</div>
</div>
@ -710,7 +716,7 @@ $form_data = filter_input_array(INPUT_POST, [
<div class="col d-grid gap-2">
<div class="input-group input-group-sm mb-0">
<span class="d-inline-block" tabindex="0" data-bs-toggle="popover" data-bs-trigger="hover focus" data-bs-content="<?php echo $transLang['STR_VENDORINFO_EQUIPMENTSUMMARY_DESC']; ?>"><span class="input-group-text"><?php echo $transLang['STR_VENDORINFO_EQUIPMENTSUMMARY_TITLE']; ?></span></span>
<input class="form-control" id="db_vendorinfo_equipmentsummary" name="db_vendorinfo_equipmentsummary" placeholder="<?php echo $db_vendorinfo_equipmentsummary; ?>" value="<?php echo $db_vendorinfo_equipmentsummary; ?>" />
<input class="form-control" id="db_vendorinfo_equipmentsummary" name="db_vendorinfo_equipmentsummary" placeholder="<?php echo $db_vendorinfo_equipmentsummary; ?>" value="<?php echo $db_vendorinfo_equipmentsummary; ?>" required />
</div>
</div>
</div>

View File

@ -143,6 +143,7 @@ STR_SIGNOUT_THANKYOU_DESC = 'Sie wurden erfolgreich abgemeldet. Danke für Ihren
STR_SIGNOUT_THANKYOU_TITLE = 'Danke!'
STR_TAGS_FORMCOMPLETE_TITLE = 'Vollständig'
STR_TAGS_FORMINCOMPLETE_TITLE = 'Unvollständig'
STR_VENDORINFO_ROUTINEORNONROUTINE = 'Muss Routine oder Nicht-Routine wählen'
STR_VENDORINFO_CHECKLISTCOMPLETED_DESC = 'Falls eine Checkliste erforderlich war, wurde diese ausgefüllt und eingereicht?'
STR_VENDORINFO_CHECKLISTCOMPLETED_TITLE = 'Checkliste abgeschlossen'
STR_VENDORINFO_CHECKLISTREQUIRED_DESC = 'Muss für diese Arbeit eine Checkliste ausgefüllt und abgegeben werden?'

View File

@ -143,6 +143,7 @@ STR_SIGNOUT_THANKYOU_DESC = 'You have been successfully signed out. Thank you fo
STR_SIGNOUT_THANKYOU_TITLE = 'Thank You!'
STR_TAGS_FORMCOMPLETE_TITLE = 'Complete'
STR_TAGS_FORMINCOMPLETE_TITLE = 'Incomplete'
STR_VENDORINFO_ROUTINEORNONROUTINE = 'Must choose Routine or Non-Routine'
STR_VENDORINFO_CHECKLISTCOMPLETED_DESC = 'If a checklist was required, has it been completed and submitted?'
STR_VENDORINFO_CHECKLISTCOMPLETED_TITLE = 'Checklist Completed'
STR_VENDORINFO_CHECKLISTREQUIRED_DESC = 'Does this work require that a checklist be completed and turned in?'

View File

@ -143,6 +143,7 @@ STR_SIGNOUT_THANKYOU_DESC = 'Se ha cerrado correctamente. Gracias por su visita.
STR_SIGNOUT_THANKYOU_TITLE = '¡Gracias!'
STR_TAGS_FORMCOMPLETE_TITLE = 'Completo'
STR_TAGS_FORMINCOMPLETE_TITLE = 'Incompleto'
STR_VENDORINFO_ROUTINEORNONROUTINE = 'Debe elegir Rutina o No Rutina'
STR_VENDORINFO_CHECKLISTCOMPLETED_DESC = 'Si se requirió una lista de verificación, ¿se ha completado y enviado?'
STR_VENDORINFO_CHECKLISTCOMPLETED_TITLE = 'Lista de verificación completada'
STR_VENDORINFO_CHECKLISTREQUIRED_DESC = '¿Requiere este trabajo que se complete y se entregue una lista de verificación?'

View File

@ -143,6 +143,7 @@ STR_SIGNOUT_THANKYOU_DESC = 'Vous avez été déconnecté avec succès. Merci po
STR_SIGNOUT_THANKYOU_TITLE = 'Merci!'
STR_TAGS_FORMCOMPLETE_TITLE = 'Rempli'
STR_TAGS_FORMINCOMPLETE_TITLE = 'Incomplet'
STR_VENDORINFO_ROUTINEORNONROUTINE = 'Doit choisir Routine ou Non-routine'
STR_VENDORINFO_CHECKLISTCOMPLETED_DESC = 'Si une liste de contrôle était requise, a-t-elle été complétée et soumise ?'
STR_VENDORINFO_CHECKLISTCOMPLETED_TITLE = 'Liste de contrôle terminée'
STR_VENDORINFO_CHECKLISTREQUIRED_DESC = 'Ce travail nécessite-t-il qu&#39;une liste de contrôle soit remplie et remise ?'