<?php

namespace PHPMaker2023\Jack_Jill_school;

// Page object
$VolontaireEdit = &$Page;
?>
<script>
loadjs.ready("head", function () {
    // Write your table-specific client script here, no need to add script tags.
});
</script>
<?php $Page->showPageHeader(); ?>
<?php
$Page->showMessage();
?>
<main class="edit">
<?php if (!$Page->IsModal) { ?>
<?php if (!$Page->isConfirm()) { // Confirm page ?>
<?= $Page->Pager->render() ?>
<?php } ?>
<?php } ?>
<?php if (!$Page->IsModal) { ?>
<div class="col-md-12">
  <div class="card shadow-sm">
    <div class="card-header">
	  <h4 class="card-title"><?php echo Language()->phrase("EditCaption"); ?></h4>
	  <div class="card-tools">
	  <button type="button" class="btn btn-tool" data-card-widget="maximize"><i class="fas fa-expand"></i>
	  </button>
	  </div>
	  <!-- /.card-tools -->
    </div>
    <!-- /.card-header -->
    <div class="card-body">
<?php } ?>
<form name="fvolontaireedit" id="fvolontaireedit" class="<?= $Page->FormClassName ?> form-wizard" action="<?= CurrentPageUrl(false) ?>" method="post" style="width:100% !important;">
<script>
var currentTable = <?= JsonEncode($Page->toClientVar()) ?>;
ew.deepAssign(ew.vars, { tables: { volontaire: currentTable } });
var currentPageID = ew.PAGE_ID = "edit";
var currentForm;
var fvolontaireedit;
loadjs.ready(["wrapper", "head"], function () {
    let $ = jQuery;
    let fields = currentTable.fields;

    // Form object
    let form = new ew.FormBuilder()
        .setId("fvolontaireedit")
        .setPageId("edit")

        // Add fields
        .setFields([
            ["Carte_No", [fields.Carte_No.visible && fields.Carte_No.required ? ew.Validators.required(fields.Carte_No.caption) : null], fields.Carte_No.isInvalid],
            ["NIP", [fields.NIP.visible && fields.NIP.required ? ew.Validators.required(fields.NIP.caption) : null], fields.NIP.isInvalid],
            ["Nom", [fields.Nom.visible && fields.Nom.required ? ew.Validators.required(fields.Nom.caption) : null], fields.Nom.isInvalid],
            ["Prenom", [fields.Prenom.visible && fields.Prenom.required ? ew.Validators.required(fields.Prenom.caption) : null], fields.Prenom.isInvalid],
            ["Sexe", [fields.Sexe.visible && fields.Sexe.required ? ew.Validators.required(fields.Sexe.caption) : null], fields.Sexe.isInvalid],
            ["DateNaissance", [fields.DateNaissance.visible && fields.DateNaissance.required ? ew.Validators.required(fields.DateNaissance.caption) : null, ew.Validators.datetime(fields.DateNaissance.clientFormatPattern)], fields.DateNaissance.isInvalid],
            ["Lieu", [fields.Lieu.visible && fields.Lieu.required ? ew.Validators.required(fields.Lieu.caption) : null], fields.Lieu.isInvalid],
            ["Photo", [fields.Photo.visible && fields.Photo.required ? ew.Validators.fileRequired(fields.Photo.caption) : null], fields.Photo.isInvalid],
            ["Unique_QR", [fields.Unique_QR.visible && fields.Unique_QR.required ? ew.Validators.required(fields.Unique_QR.caption) : null], fields.Unique_QR.isInvalid],
            ["Groupe_Sanguin", [fields.Groupe_Sanguin.visible && fields.Groupe_Sanguin.required ? ew.Validators.required(fields.Groupe_Sanguin.caption) : null], fields.Groupe_Sanguin.isInvalid],
            ["Delivree", [fields.Delivree.visible && fields.Delivree.required ? ew.Validators.required(fields.Delivree.caption) : null, ew.Validators.datetime(fields.Delivree.clientFormatPattern)], fields.Delivree.isInvalid],
            ["Expire", [fields.Expire.visible && fields.Expire.required ? ew.Validators.required(fields.Expire.caption) : null, ew.Validators.datetime(fields.Expire.clientFormatPattern)], fields.Expire.isInvalid],
            ["Localite", [fields.Localite.visible && fields.Localite.required ? ew.Validators.required(fields.Localite.caption) : null], fields.Localite.isInvalid],
            ["Prevenir", [fields.Prevenir.visible && fields.Prevenir.required ? ew.Validators.required(fields.Prevenir.caption) : null], fields.Prevenir.isInvalid],
            ["Prevenir_Tel", [fields.Prevenir_Tel.visible && fields.Prevenir_Tel.required ? ew.Validators.required(fields.Prevenir_Tel.caption) : null], fields.Prevenir_Tel.isInvalid],
            ["Reference", [fields.Reference.visible && fields.Reference.required ? ew.Validators.required(fields.Reference.caption) : null], fields.Reference.isInvalid],
            ["EmployeeID", [fields.EmployeeID.visible && fields.EmployeeID.required ? ew.Validators.required(fields.EmployeeID.caption) : null], fields.EmployeeID.isInvalid],
            ["Statut", [fields.Statut.visible && fields.Statut.required ? ew.Validators.required(fields.Statut.caption) : null], fields.Statut.isInvalid]
        ])

        // Form_CustomValidate
        .setCustomValidate(
            function (fobj) { // DO NOT CHANGE THIS LINE! (except for adding "async" keyword)!
                    // Your custom validation code here, return false if invalid.
                    return true;
                }
        )

        // Use JavaScript validation or not
        .setValidateRequired(ew.CLIENT_VALIDATE)

        // Multi-Page
        .setMultiPage(true)

        // Dynamic selection lists
        .setLists({
            "Carte_No": <?= $Page->Carte_No->toClientList($Page) ?>,
            "NIP": <?= $Page->NIP->toClientList($Page) ?>,
            "Nom": <?= $Page->Nom->toClientList($Page) ?>,
            "Sexe": <?= $Page->Sexe->toClientList($Page) ?>,
            "Lieu": <?= $Page->Lieu->toClientList($Page) ?>,
            "Unique_QR": <?= $Page->Unique_QR->toClientList($Page) ?>,
            "Localite": <?= $Page->Localite->toClientList($Page) ?>,
            "Statut": <?= $Page->Statut->toClientList($Page) ?>,
        })
        .build();
    window[form.id] = form;
    currentForm = form;
    loadjs.done(form.id);
});
</script>
<?php if (Config("CHECK_TOKEN")) { ?>
<input type="hidden" name="<?= $TokenNameKey ?>" value="<?= $TokenName ?>"><!-- CSRF token name -->
<input type="hidden" name="<?= $TokenValueKey ?>" value="<?= $TokenValue ?>"><!-- CSRF token value -->
<?php } ?>
<input type="hidden" name="t" value="volontaire">
<input type="hidden" name="k_hash" id="k_hash" value="<?= $Page->HashValue ?>">
<?php if ($Page->UpdateConflict == "U") { // Record already updated by other user ?>
<input type="hidden" name="conflict" id="conflict" value="1">
<?php } ?>
<?php if ($Page->isConfirm()) { // Confirm page ?>
<input type="hidden" name="action" id="action" value="update">
<input type="hidden" name="confirm" id="confirm" value="confirm">
<?php } else { ?>
<input type="hidden" name="action" id="action" value="confirm">
<?php // Begin of added to handle confirmation dialog not showing in masinoew.js by UDS Hub, September 25, 2022 ?>
<input type="hidden" name="confirm" id="confirm" value="">
<?php // End of added to handle confirmation dialog not showing in masinoew.js by UDS Hub, September 25, 2022 ?>
<?php } ?>
<input type="hidden" name="modal" value="<?= (int)$Page->IsModal ?>">
<?php if (IsJsonResponse()) { ?>
<input type="hidden" name="json" value="1">
<?php } ?>
<input type="hidden" name="<?= $Page->OldKeyName ?>" value="<?= $Page->OldKey ?>">
<div class="ew-multi-page"><!-- multi-page -->
<div id="pages_VolontaireEdit" class="sw sw-theme-arrows sw-justified"><!-- multi-page tabs -->
    <ul class="nav nav-progress">
        <li class="nav-item"><a class="nav-link" href="#tab_volontaire1"><span class="num">1</span><?= $Page->pageCaption(1) ?></a></li>
        <li class="nav-item"><a class="nav-link" href="#tab_volontaire2"><span class="num">2</span><?= $Page->pageCaption(2) ?></a></li>
        <li class="nav-item"><a class="nav-link" href="#tab_volontaire3"><span class="num">3</span><?= $Page->pageCaption(3) ?></a></li>
        <li class="nav-item"><a class="nav-link" href="#tab_volontaire4"><span class="num">4</span><?= $Page->pageCaption(4) ?></a></li>
        <li class="nav-item"><a class="nav-link" href="#tab_volontaire5"><span class="num">5</span><?= $Page->pageCaption(5) ?></a></li>
    </ul>
    <div class="<?= $Page->MultiPages->tabContentClasses() ?>"><!-- multi-page tabs .tab-content -->
        <div class="tab-pane" id="tab_volontaire1" role="tabpanel"><!-- multi-page .tab-pane -->
<div class="ew-edit-div"><!-- page* -->
<?php if ($Page->Carte_No->Visible) { // Carte_No ?>
    <div id="r_Carte_No"<?= $Page->Carte_No->rowAttributes() ?>>
        <label id="elh_volontaire_Carte_No" class="<?= $Page->LeftColumnClass ?>"><?= $Page->Carte_No->caption() ?><?= $Page->Carte_No->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
        <div class="<?= $Page->RightColumnClass ?>"><div<?= $Page->Carte_No->cellAttributes() ?>>
<?php if (!$Page->isConfirm()) { ?>
<span id="el_volontaire_Carte_No">
<?php
if (IsRTL()) {
    $Page->Carte_No->EditAttrs["dir"] = "rtl";
}
?>
<span id="as_x_Carte_No" class="ew-auto-suggest">
    <input type="<?= $Page->Carte_No->getInputTextType() ?>" class="form-control" name="sv_x_Carte_No" id="sv_x_Carte_No" value="<?= RemoveHtml($Page->Carte_No->EditValue) ?>" autocomplete="off" size="30" maxlength="20" placeholder="<?= HtmlEncode($Page->Carte_No->getPlaceHolder()) ?>" data-placeholder="<?= HtmlEncode($Page->Carte_No->getPlaceHolder()) ?>" data-format-pattern="<?= HtmlEncode($Page->Carte_No->formatPattern()) ?>"<?= $Page->Carte_No->editAttributes() ?> aria-describedby="x_Carte_No_help">
</span>
<selection-list hidden class="form-control" data-table="volontaire" data-field="x_Carte_No" data-input="sv_x_Carte_No" data-page="1" data-value-separator="<?= $Page->Carte_No->displayValueSeparatorAttribute() ?>" name="x_Carte_No" id="x_Carte_No" value="<?= HtmlEncode($Page->Carte_No->CurrentValue) ?>"></selection-list>
<?= $Page->Carte_No->getCustomMessage() ?>
<div class="invalid-feedback"><?= $Page->Carte_No->getErrorMessage() ?></div>
<script>
loadjs.ready("fvolontaireedit", function() {
    fvolontaireedit.createAutoSuggest(Object.assign({"id":"x_Carte_No","forceSelect":false}, { lookupAllDisplayFields: <?= $Page->Carte_No->Lookup->LookupAllDisplayFields ? "true" : "false" ?> }, ew.vars.tables.volontaire.fields.Carte_No.autoSuggestOptions));
});
</script>
<?= $Page->Carte_No->Lookup->getParamTag($Page, "p_x_Carte_No") ?>
</span>
<?php } else { ?>
<span id="el_volontaire_Carte_No">
<span<?= $Page->Carte_No->viewAttributes() ?>>
<span class="form-control-plaintext"><?= $Page->Carte_No->getDisplayValue($Page->Carte_No->ViewValue) ?></span></span>
<input type="hidden" data-table="volontaire" data-field="x_Carte_No" data-hidden="1" data-page="1" name="x_Carte_No" id="x_Carte_No" value="<?= HtmlEncode($Page->Carte_No->FormValue) ?>">
</span>
<?php } ?>
</div></div>
    </div>
<?php } ?>
<?php if ($Page->NIP->Visible) { // NIP ?>
    <div id="r_NIP"<?= $Page->NIP->rowAttributes() ?>>
        <label id="elh_volontaire_NIP" class="<?= $Page->LeftColumnClass ?>"><?= $Page->NIP->caption() ?><?= $Page->NIP->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
        <div class="<?= $Page->RightColumnClass ?>"><div<?= $Page->NIP->cellAttributes() ?>>
<?php if (!$Page->isConfirm()) { ?>
<span id="el_volontaire_NIP">
<?php
if (IsRTL()) {
    $Page->NIP->EditAttrs["dir"] = "rtl";
}
?>
<span id="as_x_NIP" class="ew-auto-suggest">
    <input type="<?= $Page->NIP->getInputTextType() ?>" class="form-control" name="sv_x_NIP" id="sv_x_NIP" value="<?= RemoveHtml($Page->NIP->EditValue) ?>" autocomplete="off" size="30" maxlength="57" placeholder="<?= HtmlEncode($Page->NIP->getPlaceHolder()) ?>" data-placeholder="<?= HtmlEncode($Page->NIP->getPlaceHolder()) ?>" data-format-pattern="<?= HtmlEncode($Page->NIP->formatPattern()) ?>"<?= $Page->NIP->editAttributes() ?> aria-describedby="x_NIP_help">
</span>
<selection-list hidden class="form-control" data-table="volontaire" data-field="x_NIP" data-input="sv_x_NIP" data-page="1" data-value-separator="<?= $Page->NIP->displayValueSeparatorAttribute() ?>" name="x_NIP" id="x_NIP" value="<?= HtmlEncode($Page->NIP->CurrentValue) ?>"></selection-list>
<?= $Page->NIP->getCustomMessage() ?>
<div class="invalid-feedback"><?= $Page->NIP->getErrorMessage() ?></div>
<script>
loadjs.ready("fvolontaireedit", function() {
    fvolontaireedit.createAutoSuggest(Object.assign({"id":"x_NIP","forceSelect":false}, { lookupAllDisplayFields: <?= $Page->NIP->Lookup->LookupAllDisplayFields ? "true" : "false" ?> }, ew.vars.tables.volontaire.fields.NIP.autoSuggestOptions));
});
</script>
<?= $Page->NIP->Lookup->getParamTag($Page, "p_x_NIP") ?>
</span>
<?php } else { ?>
<span id="el_volontaire_NIP">
<span<?= $Page->NIP->viewAttributes() ?>>
<span class="form-control-plaintext"><?= $Page->NIP->getDisplayValue($Page->NIP->ViewValue) ?></span></span>
<input type="hidden" data-table="volontaire" data-field="x_NIP" data-hidden="1" data-page="1" name="x_NIP" id="x_NIP" value="<?= HtmlEncode($Page->NIP->FormValue) ?>">
</span>
<?php } ?>
</div></div>
    </div>
<?php } ?>
<?php if ($Page->Nom->Visible) { // Nom ?>
    <div id="r_Nom"<?= $Page->Nom->rowAttributes() ?>>
        <label id="elh_volontaire_Nom" class="<?= $Page->LeftColumnClass ?>"><?= $Page->Nom->caption() ?><?= $Page->Nom->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
        <div class="<?= $Page->RightColumnClass ?>"><div<?= $Page->Nom->cellAttributes() ?>>
<?php if (!$Page->isConfirm()) { ?>
<span id="el_volontaire_Nom">
<?php
if (IsRTL()) {
    $Page->Nom->EditAttrs["dir"] = "rtl";
}
?>
<span id="as_x_Nom" class="ew-auto-suggest">
    <input type="<?= $Page->Nom->getInputTextType() ?>" class="form-control" name="sv_x_Nom" id="sv_x_Nom" value="<?= RemoveHtml($Page->Nom->EditValue) ?>" autocomplete="off" size="30" maxlength="60" placeholder="<?= HtmlEncode($Page->Nom->getPlaceHolder()) ?>" data-placeholder="<?= HtmlEncode($Page->Nom->getPlaceHolder()) ?>" data-format-pattern="<?= HtmlEncode($Page->Nom->formatPattern()) ?>"<?= $Page->Nom->editAttributes() ?> aria-describedby="x_Nom_help">
</span>
<selection-list hidden class="form-control" data-table="volontaire" data-field="x_Nom" data-input="sv_x_Nom" data-page="1" data-value-separator="<?= $Page->Nom->displayValueSeparatorAttribute() ?>" name="x_Nom" id="x_Nom" value="<?= HtmlEncode($Page->Nom->CurrentValue) ?>"></selection-list>
<?= $Page->Nom->getCustomMessage() ?>
<div class="invalid-feedback"><?= $Page->Nom->getErrorMessage() ?></div>
<script>
loadjs.ready("fvolontaireedit", function() {
    fvolontaireedit.createAutoSuggest(Object.assign({"id":"x_Nom","forceSelect":false}, { lookupAllDisplayFields: <?= $Page->Nom->Lookup->LookupAllDisplayFields ? "true" : "false" ?> }, ew.vars.tables.volontaire.fields.Nom.autoSuggestOptions));
});
</script>
<?= $Page->Nom->Lookup->getParamTag($Page, "p_x_Nom") ?>
</span>
<?php } else { ?>
<span id="el_volontaire_Nom">
<span<?= $Page->Nom->viewAttributes() ?>>
<span class="form-control-plaintext"><?= $Page->Nom->getDisplayValue($Page->Nom->ViewValue) ?></span></span>
<input type="hidden" data-table="volontaire" data-field="x_Nom" data-hidden="1" data-page="1" name="x_Nom" id="x_Nom" value="<?= HtmlEncode($Page->Nom->FormValue) ?>">
</span>
<?php } ?>
</div></div>
    </div>
<?php } ?>
<?php if ($Page->Prenom->Visible) { // Prenom ?>
    <div id="r_Prenom"<?= $Page->Prenom->rowAttributes() ?>>
        <label id="elh_volontaire_Prenom" for="x_Prenom" class="<?= $Page->LeftColumnClass ?>"><?= $Page->Prenom->caption() ?><?= $Page->Prenom->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
        <div class="<?= $Page->RightColumnClass ?>"><div<?= $Page->Prenom->cellAttributes() ?>>
<?php if (!$Page->isConfirm()) { ?>
<span id="el_volontaire_Prenom">
<input type="<?= $Page->Prenom->getInputTextType() ?>" name="x_Prenom" id="x_Prenom" data-table="volontaire" data-field="x_Prenom" value="<?= $Page->Prenom->EditValue ?>" data-page="1" size="30" maxlength="60" placeholder="<?= HtmlEncode($Page->Prenom->getPlaceHolder()) ?>" data-format-pattern="<?= HtmlEncode($Page->Prenom->formatPattern()) ?>"<?= $Page->Prenom->editAttributes() ?> aria-describedby="x_Prenom_help">
<?= $Page->Prenom->getCustomMessage() ?>
<div class="invalid-feedback"><?= $Page->Prenom->getErrorMessage() ?></div>
</span>
<?php } else { ?>
<span id="el_volontaire_Prenom">
<span<?= $Page->Prenom->viewAttributes() ?>>
<input type="text" readonly class="form-control-plaintext" value="<?= HtmlEncode(RemoveHtml($Page->Prenom->getDisplayValue($Page->Prenom->ViewValue))) ?>"></span>
<input type="hidden" data-table="volontaire" data-field="x_Prenom" data-hidden="1" data-page="1" name="x_Prenom" id="x_Prenom" value="<?= HtmlEncode($Page->Prenom->FormValue) ?>">
</span>
<?php } ?>
</div></div>
    </div>
<?php } ?>
<?php if ($Page->Photo->Visible) { // Photo ?>
    <div id="r_Photo"<?= $Page->Photo->rowAttributes() ?>>
        <label id="elh_volontaire_Photo" class="<?= $Page->LeftColumnClass ?>"><?= $Page->Photo->caption() ?><?= $Page->Photo->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
        <div class="<?= $Page->RightColumnClass ?>"><div<?= $Page->Photo->cellAttributes() ?>>
<?php if (!$Page->isConfirm()) { ?>
<span id="el_volontaire_Photo">
<div id="fd_x_Photo" class="fileinput-button ew-file-drop-zone">
    <input
        type="file"
        id="x_Photo"
        name="x_Photo"
        class="form-control ew-file-input"
        title="<?= $Page->Photo->title() ?>"
        lang="<?= CurrentLanguageID() ?>"
        data-table="volontaire"
        data-field="x_Photo"
        data-size="60"
        data-accept-file-types="<?= $Page->Photo->acceptFileTypes() ?>"
        data-max-file-size="<?= $Page->Photo->UploadMaxFileSize ?>"
        data-max-number-of-files="null"
        data-disable-image-crop="<?= $Page->Photo->ImageCropper ? 0 : 1 ?>"
        data-page="1"
        aria-describedby="x_Photo_help"
        <?= ($Page->Photo->ReadOnly || $Page->Photo->Disabled) ? " disabled" : "" ?>
        <?= $Page->Photo->editAttributes() ?>
    >
    <div class="text-muted ew-file-text"><?= $Language->phrase("ChooseFile") ?></div>
</div>
<?= $Page->Photo->getCustomMessage() ?>
<div class="invalid-feedback"><?= $Page->Photo->getErrorMessage() ?></div>
<input type="hidden" name="fn_x_Photo" id= "fn_x_Photo" value="<?= $Page->Photo->Upload->FileName ?>">
<input type="hidden" name="fa_x_Photo" id= "fa_x_Photo" value="<?= (Post("fa_x_Photo") == "0") ? "0" : "1" ?>">
<table id="ft_x_Photo" class="table table-sm float-start ew-upload-table"><tbody class="files"></tbody></table>
</span>
<?php } else { ?>
<span id="el_volontaire_Photo">
<div id="fd_x_Photo">
    <input
        type="file"
        id="x_Photo"
        name="x_Photo"
        class="form-control ew-file-input d-none"
        title="<?= $Page->Photo->title() ?>"
        lang="<?= CurrentLanguageID() ?>"
        data-table="volontaire"
        data-field="x_Photo"
        data-size="60"
        data-accept-file-types="<?= $Page->Photo->acceptFileTypes() ?>"
        data-max-file-size="<?= $Page->Photo->UploadMaxFileSize ?>"
        data-max-number-of-files="null"
        data-disable-image-crop="<?= $Page->Photo->ImageCropper ? 0 : 1 ?>"
        data-page="1"
        aria-describedby="x_Photo_help"
        <?= $Page->Photo->editAttributes() ?>
    >
</div>
<?= $Page->Photo->getCustomMessage() ?>
<div class="invalid-feedback"><?= $Page->Photo->getErrorMessage() ?></div>
<input type="hidden" name="fn_x_Photo" id= "fn_x_Photo" value="<?= $Page->Photo->Upload->FileName ?>">
<input type="hidden" name="fa_x_Photo" id= "fa_x_Photo" value="<?= (Post("fa_x_Photo") == "0") ? "0" : "1" ?>">
<table id="ft_x_Photo" class="table table-sm float-start ew-upload-table"><tbody class="files"></tbody></table>
</span>
<?php } ?>
</div></div>
    </div>
<?php } ?>
<?php if ($Page->Unique_QR->Visible) { // Unique_QR ?>
    <div id="r_Unique_QR"<?= $Page->Unique_QR->rowAttributes() ?>>
        <label id="elh_volontaire_Unique_QR" class="<?= $Page->LeftColumnClass ?>"><?= $Page->Unique_QR->caption() ?><?= $Page->Unique_QR->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
        <div class="<?= $Page->RightColumnClass ?>"><div<?= $Page->Unique_QR->cellAttributes() ?>>
<?php if (!$Page->isConfirm()) { ?>
<span id="el_volontaire_Unique_QR">
<?php
if (IsRTL()) {
    $Page->Unique_QR->EditAttrs["dir"] = "rtl";
}
?>
<span id="as_x_Unique_QR" class="ew-auto-suggest">
    <input type="<?= $Page->Unique_QR->getInputTextType() ?>" class="form-control" name="sv_x_Unique_QR" id="sv_x_Unique_QR" value="<?= RemoveHtml($Page->Unique_QR->EditValue) ?>" autocomplete="off" size="30" maxlength="12" placeholder="<?= HtmlEncode($Page->Unique_QR->getPlaceHolder()) ?>" data-placeholder="<?= HtmlEncode($Page->Unique_QR->getPlaceHolder()) ?>" data-format-pattern="<?= HtmlEncode($Page->Unique_QR->formatPattern()) ?>"<?= $Page->Unique_QR->editAttributes() ?> aria-describedby="x_Unique_QR_help">
</span>
<selection-list hidden class="form-control" data-table="volontaire" data-field="x_Unique_QR" data-input="sv_x_Unique_QR" data-page="1" data-value-separator="<?= $Page->Unique_QR->displayValueSeparatorAttribute() ?>" name="x_Unique_QR" id="x_Unique_QR" value="<?= HtmlEncode($Page->Unique_QR->CurrentValue) ?>"></selection-list>
<?= $Page->Unique_QR->getCustomMessage() ?>
<div class="invalid-feedback"><?= $Page->Unique_QR->getErrorMessage() ?></div>
<script>
loadjs.ready("fvolontaireedit", function() {
    fvolontaireedit.createAutoSuggest(Object.assign({"id":"x_Unique_QR","forceSelect":false}, { lookupAllDisplayFields: <?= $Page->Unique_QR->Lookup->LookupAllDisplayFields ? "true" : "false" ?> }, ew.vars.tables.volontaire.fields.Unique_QR.autoSuggestOptions));
});
</script>
<?= $Page->Unique_QR->Lookup->getParamTag($Page, "p_x_Unique_QR") ?>
</span>
<?php } else { ?>
<span id="el_volontaire_Unique_QR">
<span>
<?= GetImageViewTag($Page->Unique_QR, $Page->Unique_QR->ViewValue) ?></span>
<input type="hidden" data-table="volontaire" data-field="x_Unique_QR" data-hidden="1" data-page="1" name="x_Unique_QR" id="x_Unique_QR" value="<?= HtmlEncode($Page->Unique_QR->FormValue) ?>">
</span>
<?php } ?>
</div></div>
    </div>
<?php } ?>
<?php if ($Page->Statut->Visible) { // Statut ?>
    <div id="r_Statut"<?= $Page->Statut->rowAttributes() ?>>
        <label id="elh_volontaire_Statut" for="x_Statut" class="<?= $Page->LeftColumnClass ?>"><?= $Page->Statut->caption() ?><?= $Page->Statut->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
        <div class="<?= $Page->RightColumnClass ?>"><div<?= $Page->Statut->cellAttributes() ?>>
<?php if (!$Page->isConfirm()) { ?>
<span id="el_volontaire_Statut">
    <select
        id="x_Statut"
        name="x_Statut"
        class="form-select ew-select<?= $Page->Statut->isInvalidClass() ?>"
        <?php if (!$Page->Statut->IsNativeSelect) { ?>
        data-select2-id="fvolontaireedit_x_Statut"
        <?php } ?>
        data-table="volontaire"
        data-field="x_Statut"
        data-page="1"
        data-value-separator="<?= $Page->Statut->displayValueSeparatorAttribute() ?>"
        data-placeholder="<?= HtmlEncode($Page->Statut->getPlaceHolder()) ?>"
        <?= $Page->Statut->editAttributes() ?>>
        <?= $Page->Statut->selectOptionListHtml("x_Statut") ?>
    </select>
    <?= $Page->Statut->getCustomMessage() ?>
    <div class="invalid-feedback"><?= $Page->Statut->getErrorMessage() ?></div>
<?php if (!$Page->Statut->IsNativeSelect) { ?>
<script>
loadjs.ready("fvolontaireedit", function() {
    var options = { name: "x_Statut", selectId: "fvolontaireedit_x_Statut" },
        el = document.querySelector("select[data-select2-id='" + options.selectId + "']");
    if (!el)
        return;
    options.closeOnSelect = !options.multiple;
    options.dropdownParent = el.closest("#ew-modal-dialog, #ew-add-opt-dialog");
    if (fvolontaireedit.lists.Statut?.lookupOptions.length) {
        options.data = { id: "x_Statut", form: "fvolontaireedit" };
    } else {
        options.ajax = { id: "x_Statut", form: "fvolontaireedit", limit: ew.LOOKUP_PAGE_SIZE };
    }
    options.minimumResultsForSearch = Infinity;
    options = Object.assign({}, ew.selectOptions, options, ew.vars.tables.volontaire.fields.Statut.selectOptions);
    ew.createSelect(options);
});
</script>
<?php } ?>
</span>
<?php } else { ?>
<span id="el_volontaire_Statut">
<span<?= $Page->Statut->viewAttributes() ?>>
<span class="form-control-plaintext"><?= $Page->Statut->getDisplayValue($Page->Statut->ViewValue) ?></span></span>
<input type="hidden" data-table="volontaire" data-field="x_Statut" data-hidden="1" data-page="1" name="x_Statut" id="x_Statut" value="<?= HtmlEncode($Page->Statut->FormValue) ?>">
</span>
<?php } ?>
</div></div>
    </div>
<?php } ?>
</div><!-- /page* -->
        </div><!-- /multi-page .tab-pane -->
        <div class="tab-pane" id="tab_volontaire2" role="tabpanel"><!-- multi-page .tab-pane -->
<div class="ew-edit-div"><!-- page* -->
<?php if ($Page->Sexe->Visible) { // Sexe ?>
    <div id="r_Sexe"<?= $Page->Sexe->rowAttributes() ?>>
        <label id="elh_volontaire_Sexe" class="<?= $Page->LeftColumnClass ?>"><?= $Page->Sexe->caption() ?><?= $Page->Sexe->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
        <div class="<?= $Page->RightColumnClass ?>"><div<?= $Page->Sexe->cellAttributes() ?>>
<?php if (!$Page->isConfirm()) { ?>
<span id="el_volontaire_Sexe">
<template id="tp_x_Sexe">
    <div class="form-check">
        <input type="radio" class="form-check-input" data-table="volontaire" data-field="x_Sexe" name="x_Sexe" id="x_Sexe"<?= $Page->Sexe->editAttributes() ?>>
        <label class="form-check-label"></label>
    </div>
</template>
<div id="dsl_x_Sexe" class="ew-item-list"></div>
<selection-list hidden
    id="x_Sexe"
    name="x_Sexe"
    value="<?= HtmlEncode($Page->Sexe->CurrentValue) ?>"
    data-type="select-one"
    data-template="tp_x_Sexe"
    data-target="dsl_x_Sexe"
    data-repeatcolumn="5"
    class="form-control<?= $Page->Sexe->isInvalidClass() ?>"
    data-table="volontaire"
    data-field="x_Sexe"
    data-page="2"
    data-value-separator="<?= $Page->Sexe->displayValueSeparatorAttribute() ?>"
    <?= $Page->Sexe->editAttributes() ?>></selection-list>
<?= $Page->Sexe->getCustomMessage() ?>
<div class="invalid-feedback"><?= $Page->Sexe->getErrorMessage() ?></div>
</span>
<?php } else { ?>
<span id="el_volontaire_Sexe">
<span<?= $Page->Sexe->viewAttributes() ?>>
<span class="form-control-plaintext"><?= $Page->Sexe->getDisplayValue($Page->Sexe->ViewValue) ?></span></span>
<input type="hidden" data-table="volontaire" data-field="x_Sexe" data-hidden="1" data-page="2" name="x_Sexe" id="x_Sexe" value="<?= HtmlEncode($Page->Sexe->FormValue) ?>">
</span>
<?php } ?>
</div></div>
    </div>
<?php } ?>
<?php if ($Page->DateNaissance->Visible) { // DateNaissance ?>
    <div id="r_DateNaissance"<?= $Page->DateNaissance->rowAttributes() ?>>
        <label id="elh_volontaire_DateNaissance" for="x_DateNaissance" class="<?= $Page->LeftColumnClass ?>"><?= $Page->DateNaissance->caption() ?><?= $Page->DateNaissance->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
        <div class="<?= $Page->RightColumnClass ?>"><div<?= $Page->DateNaissance->cellAttributes() ?>>
<?php if (!$Page->isConfirm()) { ?>
<span id="el_volontaire_DateNaissance">
<input type="<?= $Page->DateNaissance->getInputTextType() ?>" name="x_DateNaissance" id="x_DateNaissance" data-table="volontaire" data-field="x_DateNaissance" value="<?= $Page->DateNaissance->EditValue ?>" data-page="2" placeholder="<?= HtmlEncode($Page->DateNaissance->getPlaceHolder()) ?>" data-format-pattern="<?= HtmlEncode($Page->DateNaissance->formatPattern()) ?>"<?= $Page->DateNaissance->editAttributes() ?> aria-describedby="x_DateNaissance_help">
<?= $Page->DateNaissance->getCustomMessage() ?>
<div class="invalid-feedback"><?= $Page->DateNaissance->getErrorMessage() ?></div>
<?php if (!$Page->DateNaissance->ReadOnly && !$Page->DateNaissance->Disabled && !isset($Page->DateNaissance->EditAttrs["readonly"]) && !isset($Page->DateNaissance->EditAttrs["disabled"])) { ?>
<script>
loadjs.ready(["fvolontaireedit", "datetimepicker"], function () {
    let format = "<?= DateFormat(7) ?>",
        options = {
            localization: {
                locale: ew.LANGUAGE_ID + "-u-nu-" + ew.getNumberingSystem(),
                hourCycle: format.match(/H/) ? "h24" : "h12",
                format,
                ...ew.language.phrase("datetimepicker")
            },
            display: {
                icons: {
                    previous: ew.IS_RTL ? "fa-solid fa-chevron-right" : "fa-solid fa-chevron-left",
                    next: ew.IS_RTL ? "fa-solid fa-chevron-left" : "fa-solid fa-chevron-right"
                },
                components: {
                    hours: !!format.match(/h/i),
                    minutes: !!format.match(/m/),
                    seconds: !!format.match(/s/i)
                },
                theme: ew.isDark() ? "dark" : "auto"
            }
        };
    ew.createDateTimePicker("fvolontaireedit", "x_DateNaissance", ew.deepAssign({"useCurrent":false,"display":{"sideBySide":false}}, options));
});
</script>
<?php } ?>
</span>
<?php } else { ?>
<span id="el_volontaire_DateNaissance">
<span<?= $Page->DateNaissance->viewAttributes() ?>>
<input type="text" readonly class="form-control-plaintext" value="<?= HtmlEncode(RemoveHtml($Page->DateNaissance->getDisplayValue($Page->DateNaissance->ViewValue))) ?>"></span>
<input type="hidden" data-table="volontaire" data-field="x_DateNaissance" data-hidden="1" data-page="2" name="x_DateNaissance" id="x_DateNaissance" value="<?= HtmlEncode($Page->DateNaissance->FormValue) ?>">
</span>
<?php } ?>
</div></div>
    </div>
<?php } ?>
<?php if ($Page->Lieu->Visible) { // Lieu ?>
    <div id="r_Lieu"<?= $Page->Lieu->rowAttributes() ?>>
        <label id="elh_volontaire_Lieu" class="<?= $Page->LeftColumnClass ?>"><?= $Page->Lieu->caption() ?><?= $Page->Lieu->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
        <div class="<?= $Page->RightColumnClass ?>"><div<?= $Page->Lieu->cellAttributes() ?>>
<?php if (!$Page->isConfirm()) { ?>
<span id="el_volontaire_Lieu">
<?php
if (IsRTL()) {
    $Page->Lieu->EditAttrs["dir"] = "rtl";
}
?>
<span id="as_x_Lieu" class="ew-auto-suggest">
    <input type="<?= $Page->Lieu->getInputTextType() ?>" class="form-control" name="sv_x_Lieu" id="sv_x_Lieu" value="<?= RemoveHtml($Page->Lieu->EditValue) ?>" autocomplete="off" size="30" maxlength="50" placeholder="<?= HtmlEncode($Page->Lieu->getPlaceHolder()) ?>" data-placeholder="<?= HtmlEncode($Page->Lieu->getPlaceHolder()) ?>" data-format-pattern="<?= HtmlEncode($Page->Lieu->formatPattern()) ?>"<?= $Page->Lieu->editAttributes() ?> aria-describedby="x_Lieu_help">
</span>
<selection-list hidden class="form-control" data-table="volontaire" data-field="x_Lieu" data-input="sv_x_Lieu" data-page="2" data-value-separator="<?= $Page->Lieu->displayValueSeparatorAttribute() ?>" name="x_Lieu" id="x_Lieu" value="<?= HtmlEncode($Page->Lieu->CurrentValue) ?>"></selection-list>
<?= $Page->Lieu->getCustomMessage() ?>
<div class="invalid-feedback"><?= $Page->Lieu->getErrorMessage() ?></div>
<script>
loadjs.ready("fvolontaireedit", function() {
    fvolontaireedit.createAutoSuggest(Object.assign({"id":"x_Lieu","forceSelect":false}, { lookupAllDisplayFields: <?= $Page->Lieu->Lookup->LookupAllDisplayFields ? "true" : "false" ?> }, ew.vars.tables.volontaire.fields.Lieu.autoSuggestOptions));
});
</script>
<?= $Page->Lieu->Lookup->getParamTag($Page, "p_x_Lieu") ?>
</span>
<?php } else { ?>
<span id="el_volontaire_Lieu">
<span<?= $Page->Lieu->viewAttributes() ?>>
<span class="form-control-plaintext"><?= $Page->Lieu->getDisplayValue($Page->Lieu->ViewValue) ?></span></span>
<input type="hidden" data-table="volontaire" data-field="x_Lieu" data-hidden="1" data-page="2" name="x_Lieu" id="x_Lieu" value="<?= HtmlEncode($Page->Lieu->FormValue) ?>">
</span>
<?php } ?>
</div></div>
    </div>
<?php } ?>
<?php if ($Page->Groupe_Sanguin->Visible) { // Groupe_Sanguin ?>
    <div id="r_Groupe_Sanguin"<?= $Page->Groupe_Sanguin->rowAttributes() ?>>
        <label id="elh_volontaire_Groupe_Sanguin" for="x_Groupe_Sanguin" class="<?= $Page->LeftColumnClass ?>"><?= $Page->Groupe_Sanguin->caption() ?><?= $Page->Groupe_Sanguin->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
        <div class="<?= $Page->RightColumnClass ?>"><div<?= $Page->Groupe_Sanguin->cellAttributes() ?>>
<?php if (!$Page->isConfirm()) { ?>
<span id="el_volontaire_Groupe_Sanguin">
<input type="<?= $Page->Groupe_Sanguin->getInputTextType() ?>" name="x_Groupe_Sanguin" id="x_Groupe_Sanguin" data-table="volontaire" data-field="x_Groupe_Sanguin" value="<?= $Page->Groupe_Sanguin->EditValue ?>" data-page="2" size="30" maxlength="23" placeholder="<?= HtmlEncode($Page->Groupe_Sanguin->getPlaceHolder()) ?>" data-format-pattern="<?= HtmlEncode($Page->Groupe_Sanguin->formatPattern()) ?>"<?= $Page->Groupe_Sanguin->editAttributes() ?> aria-describedby="x_Groupe_Sanguin_help">
<?= $Page->Groupe_Sanguin->getCustomMessage() ?>
<div class="invalid-feedback"><?= $Page->Groupe_Sanguin->getErrorMessage() ?></div>
</span>
<?php } else { ?>
<span id="el_volontaire_Groupe_Sanguin">
<span<?= $Page->Groupe_Sanguin->viewAttributes() ?>>
<input type="text" readonly class="form-control-plaintext" value="<?= HtmlEncode(RemoveHtml($Page->Groupe_Sanguin->getDisplayValue($Page->Groupe_Sanguin->ViewValue))) ?>"></span>
<input type="hidden" data-table="volontaire" data-field="x_Groupe_Sanguin" data-hidden="1" data-page="2" name="x_Groupe_Sanguin" id="x_Groupe_Sanguin" value="<?= HtmlEncode($Page->Groupe_Sanguin->FormValue) ?>">
</span>
<?php } ?>
</div></div>
    </div>
<?php } ?>
</div><!-- /page* -->
        </div><!-- /multi-page .tab-pane -->
        <div class="tab-pane" id="tab_volontaire3" role="tabpanel"><!-- multi-page .tab-pane -->
<div class="ew-edit-div"><!-- page* -->
<?php if ($Page->Delivree->Visible) { // Delivree ?>
    <div id="r_Delivree"<?= $Page->Delivree->rowAttributes() ?>>
        <label id="elh_volontaire_Delivree" for="x_Delivree" class="<?= $Page->LeftColumnClass ?>"><?= $Page->Delivree->caption() ?><?= $Page->Delivree->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
        <div class="<?= $Page->RightColumnClass ?>"><div<?= $Page->Delivree->cellAttributes() ?>>
<?php if (!$Page->isConfirm()) { ?>
<span id="el_volontaire_Delivree">
<input type="<?= $Page->Delivree->getInputTextType() ?>" name="x_Delivree" id="x_Delivree" data-table="volontaire" data-field="x_Delivree" value="<?= $Page->Delivree->EditValue ?>" data-page="3" placeholder="<?= HtmlEncode($Page->Delivree->getPlaceHolder()) ?>" data-format-pattern="<?= HtmlEncode($Page->Delivree->formatPattern()) ?>"<?= $Page->Delivree->editAttributes() ?> aria-describedby="x_Delivree_help">
<?= $Page->Delivree->getCustomMessage() ?>
<div class="invalid-feedback"><?= $Page->Delivree->getErrorMessage() ?></div>
<?php if (!$Page->Delivree->ReadOnly && !$Page->Delivree->Disabled && !isset($Page->Delivree->EditAttrs["readonly"]) && !isset($Page->Delivree->EditAttrs["disabled"])) { ?>
<script>
loadjs.ready(["fvolontaireedit", "datetimepicker"], function () {
    let format = "<?= DateFormat(7) ?>",
        options = {
            localization: {
                locale: ew.LANGUAGE_ID + "-u-nu-" + ew.getNumberingSystem(),
                hourCycle: format.match(/H/) ? "h24" : "h12",
                format,
                ...ew.language.phrase("datetimepicker")
            },
            display: {
                icons: {
                    previous: ew.IS_RTL ? "fa-solid fa-chevron-right" : "fa-solid fa-chevron-left",
                    next: ew.IS_RTL ? "fa-solid fa-chevron-left" : "fa-solid fa-chevron-right"
                },
                components: {
                    hours: !!format.match(/h/i),
                    minutes: !!format.match(/m/),
                    seconds: !!format.match(/s/i)
                },
                theme: ew.isDark() ? "dark" : "auto"
            }
        };
    ew.createDateTimePicker("fvolontaireedit", "x_Delivree", ew.deepAssign({"useCurrent":false,"display":{"sideBySide":false}}, options));
});
</script>
<?php } ?>
</span>
<?php } else { ?>
<span id="el_volontaire_Delivree">
<span<?= $Page->Delivree->viewAttributes() ?>>
<input type="text" readonly class="form-control-plaintext" value="<?= HtmlEncode(RemoveHtml($Page->Delivree->getDisplayValue($Page->Delivree->ViewValue))) ?>"></span>
<input type="hidden" data-table="volontaire" data-field="x_Delivree" data-hidden="1" data-page="3" name="x_Delivree" id="x_Delivree" value="<?= HtmlEncode($Page->Delivree->FormValue) ?>">
</span>
<?php } ?>
</div></div>
    </div>
<?php } ?>
<?php if ($Page->Expire->Visible) { // Expire ?>
    <div id="r_Expire"<?= $Page->Expire->rowAttributes() ?>>
        <label id="elh_volontaire_Expire" for="x_Expire" class="<?= $Page->LeftColumnClass ?>"><?= $Page->Expire->caption() ?><?= $Page->Expire->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
        <div class="<?= $Page->RightColumnClass ?>"><div<?= $Page->Expire->cellAttributes() ?>>
<?php if (!$Page->isConfirm()) { ?>
<span id="el_volontaire_Expire">
<input type="<?= $Page->Expire->getInputTextType() ?>" name="x_Expire" id="x_Expire" data-table="volontaire" data-field="x_Expire" value="<?= $Page->Expire->EditValue ?>" data-page="3" placeholder="<?= HtmlEncode($Page->Expire->getPlaceHolder()) ?>" data-format-pattern="<?= HtmlEncode($Page->Expire->formatPattern()) ?>"<?= $Page->Expire->editAttributes() ?> aria-describedby="x_Expire_help">
<?= $Page->Expire->getCustomMessage() ?>
<div class="invalid-feedback"><?= $Page->Expire->getErrorMessage() ?></div>
<?php if (!$Page->Expire->ReadOnly && !$Page->Expire->Disabled && !isset($Page->Expire->EditAttrs["readonly"]) && !isset($Page->Expire->EditAttrs["disabled"])) { ?>
<script>
loadjs.ready(["fvolontaireedit", "datetimepicker"], function () {
    let format = "<?= DateFormat(7) ?>",
        options = {
            localization: {
                locale: ew.LANGUAGE_ID + "-u-nu-" + ew.getNumberingSystem(),
                hourCycle: format.match(/H/) ? "h24" : "h12",
                format,
                ...ew.language.phrase("datetimepicker")
            },
            display: {
                icons: {
                    previous: ew.IS_RTL ? "fa-solid fa-chevron-right" : "fa-solid fa-chevron-left",
                    next: ew.IS_RTL ? "fa-solid fa-chevron-left" : "fa-solid fa-chevron-right"
                },
                components: {
                    hours: !!format.match(/h/i),
                    minutes: !!format.match(/m/),
                    seconds: !!format.match(/s/i)
                },
                theme: ew.isDark() ? "dark" : "auto"
            }
        };
    ew.createDateTimePicker("fvolontaireedit", "x_Expire", ew.deepAssign({"useCurrent":false,"display":{"sideBySide":false}}, options));
});
</script>
<?php } ?>
</span>
<?php } else { ?>
<span id="el_volontaire_Expire">
<span<?= $Page->Expire->viewAttributes() ?>>
<input type="text" readonly class="form-control-plaintext" value="<?= HtmlEncode(RemoveHtml($Page->Expire->getDisplayValue($Page->Expire->ViewValue))) ?>"></span>
<input type="hidden" data-table="volontaire" data-field="x_Expire" data-hidden="1" data-page="3" name="x_Expire" id="x_Expire" value="<?= HtmlEncode($Page->Expire->FormValue) ?>">
</span>
<?php } ?>
</div></div>
    </div>
<?php } ?>
<?php if ($Page->Localite->Visible) { // Localite ?>
    <div id="r_Localite"<?= $Page->Localite->rowAttributes() ?>>
        <label id="elh_volontaire_Localite" class="<?= $Page->LeftColumnClass ?>"><?= $Page->Localite->caption() ?><?= $Page->Localite->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
        <div class="<?= $Page->RightColumnClass ?>"><div<?= $Page->Localite->cellAttributes() ?>>
<?php if (!$Page->isConfirm()) { ?>
<span id="el_volontaire_Localite">
<?php
if (IsRTL()) {
    $Page->Localite->EditAttrs["dir"] = "rtl";
}
?>
<span id="as_x_Localite" class="ew-auto-suggest">
    <input type="<?= $Page->Localite->getInputTextType() ?>" class="form-control" name="sv_x_Localite" id="sv_x_Localite" value="<?= RemoveHtml($Page->Localite->EditValue) ?>" autocomplete="off" size="30" maxlength="60" placeholder="<?= HtmlEncode($Page->Localite->getPlaceHolder()) ?>" data-placeholder="<?= HtmlEncode($Page->Localite->getPlaceHolder()) ?>" data-format-pattern="<?= HtmlEncode($Page->Localite->formatPattern()) ?>"<?= $Page->Localite->editAttributes() ?> aria-describedby="x_Localite_help">
</span>
<selection-list hidden class="form-control" data-table="volontaire" data-field="x_Localite" data-input="sv_x_Localite" data-page="3" data-value-separator="<?= $Page->Localite->displayValueSeparatorAttribute() ?>" name="x_Localite" id="x_Localite" value="<?= HtmlEncode($Page->Localite->CurrentValue) ?>"></selection-list>
<?= $Page->Localite->getCustomMessage() ?>
<div class="invalid-feedback"><?= $Page->Localite->getErrorMessage() ?></div>
<script>
loadjs.ready("fvolontaireedit", function() {
    fvolontaireedit.createAutoSuggest(Object.assign({"id":"x_Localite","forceSelect":false}, { lookupAllDisplayFields: <?= $Page->Localite->Lookup->LookupAllDisplayFields ? "true" : "false" ?> }, ew.vars.tables.volontaire.fields.Localite.autoSuggestOptions));
});
</script>
<?= $Page->Localite->Lookup->getParamTag($Page, "p_x_Localite") ?>
</span>
<?php } else { ?>
<span id="el_volontaire_Localite">
<span<?= $Page->Localite->viewAttributes() ?>>
<span class="form-control-plaintext"><?= $Page->Localite->getDisplayValue($Page->Localite->ViewValue) ?></span></span>
<input type="hidden" data-table="volontaire" data-field="x_Localite" data-hidden="1" data-page="3" name="x_Localite" id="x_Localite" value="<?= HtmlEncode($Page->Localite->FormValue) ?>">
</span>
<?php } ?>
</div></div>
    </div>
<?php } ?>
</div><!-- /page* -->
        </div><!-- /multi-page .tab-pane -->
        <div class="tab-pane" id="tab_volontaire4" role="tabpanel"><!-- multi-page .tab-pane -->
<div class="ew-edit-div"><!-- page* -->
<?php if ($Page->Prevenir->Visible) { // Prevenir ?>
    <div id="r_Prevenir"<?= $Page->Prevenir->rowAttributes() ?>>
        <label id="elh_volontaire_Prevenir" for="x_Prevenir" class="<?= $Page->LeftColumnClass ?>"><?= $Page->Prevenir->caption() ?><?= $Page->Prevenir->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
        <div class="<?= $Page->RightColumnClass ?>"><div<?= $Page->Prevenir->cellAttributes() ?>>
<?php if (!$Page->isConfirm()) { ?>
<span id="el_volontaire_Prevenir">
<input type="<?= $Page->Prevenir->getInputTextType() ?>" name="x_Prevenir" id="x_Prevenir" data-table="volontaire" data-field="x_Prevenir" value="<?= $Page->Prevenir->EditValue ?>" data-page="4" size="30" maxlength="70" placeholder="<?= HtmlEncode($Page->Prevenir->getPlaceHolder()) ?>" data-format-pattern="<?= HtmlEncode($Page->Prevenir->formatPattern()) ?>"<?= $Page->Prevenir->editAttributes() ?> aria-describedby="x_Prevenir_help">
<?= $Page->Prevenir->getCustomMessage() ?>
<div class="invalid-feedback"><?= $Page->Prevenir->getErrorMessage() ?></div>
</span>
<?php } else { ?>
<span id="el_volontaire_Prevenir">
<span<?= $Page->Prevenir->viewAttributes() ?>>
<input type="text" readonly class="form-control-plaintext" value="<?= HtmlEncode(RemoveHtml($Page->Prevenir->getDisplayValue($Page->Prevenir->ViewValue))) ?>"></span>
<input type="hidden" data-table="volontaire" data-field="x_Prevenir" data-hidden="1" data-page="4" name="x_Prevenir" id="x_Prevenir" value="<?= HtmlEncode($Page->Prevenir->FormValue) ?>">
</span>
<?php } ?>
</div></div>
    </div>
<?php } ?>
<?php if ($Page->Prevenir_Tel->Visible) { // Prevenir_Tel ?>
    <div id="r_Prevenir_Tel"<?= $Page->Prevenir_Tel->rowAttributes() ?>>
        <label id="elh_volontaire_Prevenir_Tel" for="x_Prevenir_Tel" class="<?= $Page->LeftColumnClass ?>"><?= $Page->Prevenir_Tel->caption() ?><?= $Page->Prevenir_Tel->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
        <div class="<?= $Page->RightColumnClass ?>"><div<?= $Page->Prevenir_Tel->cellAttributes() ?>>
<?php if (!$Page->isConfirm()) { ?>
<span id="el_volontaire_Prevenir_Tel">
<input type="<?= $Page->Prevenir_Tel->getInputTextType() ?>" name="x_Prevenir_Tel" id="x_Prevenir_Tel" data-table="volontaire" data-field="x_Prevenir_Tel" value="<?= $Page->Prevenir_Tel->EditValue ?>" data-page="4" size="30" maxlength="25" placeholder="<?= HtmlEncode($Page->Prevenir_Tel->getPlaceHolder()) ?>" data-format-pattern="<?= HtmlEncode($Page->Prevenir_Tel->formatPattern()) ?>"<?= $Page->Prevenir_Tel->editAttributes() ?> aria-describedby="x_Prevenir_Tel_help">
<?= $Page->Prevenir_Tel->getCustomMessage() ?>
<div class="invalid-feedback"><?= $Page->Prevenir_Tel->getErrorMessage() ?></div>
</span>
<?php } else { ?>
<span id="el_volontaire_Prevenir_Tel">
<span<?= $Page->Prevenir_Tel->viewAttributes() ?>>
<input type="text" readonly class="form-control-plaintext" value="<?= HtmlEncode(RemoveHtml($Page->Prevenir_Tel->getDisplayValue($Page->Prevenir_Tel->ViewValue))) ?>"></span>
<input type="hidden" data-table="volontaire" data-field="x_Prevenir_Tel" data-hidden="1" data-page="4" name="x_Prevenir_Tel" id="x_Prevenir_Tel" value="<?= HtmlEncode($Page->Prevenir_Tel->FormValue) ?>">
</span>
<?php } ?>
</div></div>
    </div>
<?php } ?>
<?php if ($Page->Reference->Visible) { // Reference ?>
    <div id="r_Reference"<?= $Page->Reference->rowAttributes() ?>>
        <label id="elh_volontaire_Reference" for="x_Reference" class="<?= $Page->LeftColumnClass ?>"><?= $Page->Reference->caption() ?><?= $Page->Reference->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
        <div class="<?= $Page->RightColumnClass ?>"><div<?= $Page->Reference->cellAttributes() ?>>
<?php if (!$Page->isConfirm()) { ?>
<span id="el_volontaire_Reference">
<input type="<?= $Page->Reference->getInputTextType() ?>" name="x_Reference" id="x_Reference" data-table="volontaire" data-field="x_Reference" value="<?= $Page->Reference->EditValue ?>" data-page="4" size="30" maxlength="100" placeholder="<?= HtmlEncode($Page->Reference->getPlaceHolder()) ?>" data-format-pattern="<?= HtmlEncode($Page->Reference->formatPattern()) ?>"<?= $Page->Reference->editAttributes() ?> aria-describedby="x_Reference_help">
<?= $Page->Reference->getCustomMessage() ?>
<div class="invalid-feedback"><?= $Page->Reference->getErrorMessage() ?></div>
</span>
<?php } else { ?>
<span id="el_volontaire_Reference">
<span<?= $Page->Reference->viewAttributes() ?>>
<input type="text" readonly class="form-control-plaintext" value="<?= HtmlEncode(RemoveHtml($Page->Reference->getDisplayValue($Page->Reference->ViewValue))) ?>"></span>
<input type="hidden" data-table="volontaire" data-field="x_Reference" data-hidden="1" data-page="4" name="x_Reference" id="x_Reference" value="<?= HtmlEncode($Page->Reference->FormValue) ?>">
</span>
<?php } ?>
</div></div>
    </div>
<?php } ?>
</div><!-- /page* -->
        </div><!-- /multi-page .tab-pane -->
        <div class="tab-pane" id="tab_volontaire5" role="tabpanel"><!-- multi-page .tab-pane -->
<div class="ew-edit-div"><!-- page* -->
<?php if ($Page->EmployeeID->Visible) { // EmployeeID ?>
    <div id="r_EmployeeID"<?= $Page->EmployeeID->rowAttributes() ?>>
        <label id="elh_volontaire_EmployeeID" for="x_EmployeeID" class="<?= $Page->LeftColumnClass ?>"><?= $Page->EmployeeID->caption() ?><?= $Page->EmployeeID->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
        <div class="<?= $Page->RightColumnClass ?>"><div<?= $Page->EmployeeID->cellAttributes() ?>>
<?php if (!$Page->isConfirm()) { ?>
<span id="el_volontaire_EmployeeID">
<span<?= $Page->EmployeeID->viewAttributes() ?>>
<span class="form-control-plaintext"><?= $Page->EmployeeID->getDisplayValue($Page->EmployeeID->EditValue) ?></span></span>
<input type="hidden" data-table="volontaire" data-field="x_EmployeeID" data-hidden="1" data-page="5" name="x_EmployeeID" id="x_EmployeeID" value="<?= HtmlEncode($Page->EmployeeID->CurrentValue) ?>">
</span>
<?php } else { ?>
<span id="el_volontaire_EmployeeID">
<span<?= $Page->EmployeeID->viewAttributes() ?>>
<span class="form-control-plaintext"><?= $Page->EmployeeID->getDisplayValue($Page->EmployeeID->ViewValue) ?></span></span>
<input type="hidden" data-table="volontaire" data-field="x_EmployeeID" data-hidden="1" data-page="5" name="x_EmployeeID" id="x_EmployeeID" value="<?= HtmlEncode($Page->EmployeeID->FormValue) ?>">
</span>
<?php } ?>
</div></div>
    </div>
<?php } ?>
</div><!-- /page* -->
        </div><!-- /multi-page .tab-pane -->
    </div><!-- /multi-page tabs .tab-content -->
</div><!-- /multi-page tabs -->
</div><!-- /multi-page -->
    <input type="hidden" data-table="volontaire" data-field="x_volontaireID" data-hidden="1" name="x_volontaireID" id="x_volontaireID" value="<?= HtmlEncode($Page->volontaireID->CurrentValue) ?>">
<?= $Page->IsModal ? '<template class="ew-modal-buttons">' : '<div class="row ew-buttons">' ?><!-- buttons .row -->
    <div class="<?= $Page->OffsetColumnClass ?>"><!-- buttons offset -->
<?php if ($Page->UpdateConflict == "U") { // Record already updated by other user ?>
<button class="btn btn-primary ew-btn" name="btn-action" id="btn-action" type="submit" form="fvolontaireedit" data-ew-action="set-action" data-value="overwrite"><?= $Language->phrase("OverwriteBtn") ?></button>
<button class="btn btn-default ew-btn" name="btn-reload" id="btn-reload" type="submit" form="fvolontaireedit" data-ew-action="set-action" data-value="show"><?= $Language->phrase("ReloadBtn") ?></button>
<?php } else { ?>
<?php if (!$Page->isConfirm()) { // Confirm page ?>
<button class="btn btn-primary ew-btn" name="btn-action" id="btn-action" type="submit" form="fvolontaireedit" data-ew-action="set-action" data-value="confirm"><?= $Language->phrase("SaveBtn") ?></button>
<?php if (IsJsonResponse()) { ?>
<button class="btn btn-default ew-btn" name="btn-cancel" id="btn-cancel" type="button" data-bs-dismiss="modal"><?= $Language->phrase("CancelBtn") ?></button>
<?php } else { ?>
<button class="btn btn-default ew-btn" name="btn-cancel" id="btn-cancel" type="button" form="fvolontaireedit" data-href="<?= HtmlEncode(GetUrl($Page->getReturnUrl())) ?>"><?= $Language->phrase("CancelBtn") ?></button>
<?php } ?>
<?php } else { ?>
<button class="btn btn-primary ew-btn" name="btn-action" id="btn-action" type="submit" form="fvolontaireedit"><?= $Language->phrase("ConfirmBtn") ?></button>
<button class="btn btn-default ew-btn" name="btn-cancel" id="btn-cancel" type="submit" form="fvolontaireedit" data-ew-action="set-action" data-value="cancel"><?= $Language->phrase("CancelBtn") ?></button>
<?php } ?>
<?php } ?>
    </div><!-- /buttons offset -->
<?= $Page->IsModal ? "</template>" : "</div>" ?><!-- /buttons .row -->
</form>
<?php if (!$Page->IsModal) { ?>
		</div>
     <!-- /.card-body -->
     </div>
  <!-- /.card -->
</div>
<?php } ?>
<?php if (!$Page->IsModal) { ?>
<?php if (!$Page->isConfirm()) { // Confirm page ?>
<?= $Page->Pager->render() ?>
<?php } ?>
<?php } ?>
</main>
<?php
$Page->showPageFooter();
echo GetDebugMessage();
?>
<script>
// Field event handlers
loadjs.ready("head", function() {
    ew.addEventHandlers("volontaire");
});
</script>
<?php if (Config("MS_ENTER_MOVING_CURSOR_TO_NEXT_FIELD")) { ?>
<script>
loadjs.ready("head", function() { $("#fvolontaireedit:first *:input[type!=hidden]:first").focus(),$("input").keydown(function(i){if(13==i.which){var e=$(this).closest("form").find(":input:visible:enabled"),n=e.index(this);n==e.length-1||(e.eq(e.index(this)+1).focus(),i.preventDefault())}else 113==i.which&&$("#btn-action").click()}),$("select").keydown(function(i){if(13==i.which){var e=$(this).closest("form").find(":input:visible:enabled"),n=e.index(this);n==e.length-1||(e.eq(e.index(this)+1).focus(),i.preventDefault())}else 113==i.which&&$("#btn-action").click()}),$("radio").keydown(function(i){if(13==i.which){var e=$(this).closest("form").find(":input:visible:enabled"),n=e.index(this);n==e.length-1||(e.eq(e.index(this)+1).focus(),i.preventDefault())}else 113==i.which&&$("#btn-action").click()})});
</script>
<?php } ?>
<script>
loadjs.ready("load", function () {
    // Write your table-specific startup script here, no need to add script tags.
});
</script>
<?php if ($Page->isConfirm()) { // Confirm page ?>
<?php if (!$Page->IsModal && !$Page->isExport()) { ?>
<script>
loadjs.ready(["wrapper", "head", "swal"],function(){$('#btn-action').on('click',function(){if(fvolontaireedit.validateFields()){ew.prompt({title: ew.language.phrase("MessageEditConfirm"),icon:'question',showCancelButton:true},result=>{if(result)$("#fvolontaireedit").submit();});return false;} else { ew.prompt({title: ew.language.phrase("MessageInvalidForm"), icon: 'warning', showCancelButton:false}); }});});
</script>
<?php } ?>
<?php } ?>
<?php if (@$_COOKIE['theme'] == 'dark') { ?>
<style>
:root { 
  --sw-border-color: #eeeeee;
  --sw-toolbar-btn-color: #ffffff;
  --sw-toolbar-btn-background-color: #0a2730;
  --sw-anchor-default-primary-color: #757575;
  --sw-anchor-default-secondary-color: #b0b0b1;
  --sw-anchor-active-primary-color: #000000;
  --sw-anchor-active-secondary-color: #ffffff;
  --sw-anchor-done-primary-color: #333333;
  --sw-anchor-done-secondary-color: #aaaaaa;
  --sw-anchor-disabled-primary-color: #f8f9fa;
  --sw-anchor-disabled-secondary-color: #dbe0e5;
  --sw-anchor-error-primary-color: #dc3545;
  --sw-anchor-error-secondary-color: #ffffff;
  --sw-anchor-warning-primary-color: #ffc107;
  --sw-anchor-warning-secondary-color: #ffffff;
  --sw-progress-color: #0a2730;
  --sw-progress-background-color: #f8f9fa;
  --sw-loader-color: #0a2730;
  --sw-loader-background-color: #f8f9fa;
  --sw-loader-background-wrapper-color: rgba(255, 255, 255, 0.7);
}
</style>
<?php } else { ?>
<?php // Begin of BLUE COLOR THEME // ?>
<style>
:root {
  --sw-border-color: #eeeeee;
  --sw-toolbar-btn-color: #ffffff;
  --sw-toolbar-btn-background-color: #009EF7;
  --sw-anchor-default-primary-color: #f8f9fa;
  --sw-anchor-default-secondary-color: #b0b0b1;
  --sw-anchor-active-primary-color: #009EF7;
  --sw-anchor-active-secondary-color: #ffffff;
  --sw-anchor-done-primary-color: #90d4fa;
  --sw-anchor-done-secondary-color: #fefefe;
  --sw-anchor-disabled-primary-color: #f8f9fa;
  --sw-anchor-disabled-secondary-color: #dbe0e5;
  --sw-anchor-error-primary-color: #dc3545;
  --sw-anchor-error-secondary-color: #ffffff;
  --sw-anchor-warning-primary-color: #ffc107;
  --sw-anchor-warning-secondary-color: #ffffff;
  --sw-progress-color: #009EF7;
  --sw-progress-background-color: #f8f9fa;
  --sw-loader-color: #009EF7;
  --sw-loader-background-color: #f8f9fa;
  --sw-loader-background-wrapper-color: rgba(255, 255, 255, 0.7);
}
</style>
<?php // End of BLUE COLOR THEME // ?>
<?php } ?>
<script type="text/javascript">
loadjs.ready(["wrapper", "head", "formwizard"], function() {
  $('#pages_VolontaireEdit').smartWizard({
	  selected: 0,
	  theme: 'arrows', // basic, arrows, square, round, dots
	  enableURLhash: false, // Enable selection of the step based on url hash
	  justified: true, // Nav menu justification. true/false
	  autoAdjustHeight: false, // Automatically adjust content height
	  keyboardSettings: {
		  keyNavigation: false, // Enable/Disable keyboard navigation(left and right keys are used if enabled)
		  keyLeft: [37], // Left key code
		  keyRight: [39] // Right key code
	  },
	  transition: {
		  animation: 'slide-horizontal', // Effect on navigation, none/fade/slide-horizontal/slide-vertical/slide-swing
	  },
	  toolbar: {
		  showNextButton: true, // show/hide a Next button
		  showPreviousButton: true, // show/hide a Previous button
		  position: 'top' // none/top/both/bottom
	  },
	  anchorSettings: {
		  anchorClickable: true, // Enable/Disable anchor navigation
		  enableAllAnchors: true, // Activates all anchors clickable all times
		  markDoneStep: true, // Add done state on navigation
		  markAllPreviousStepsAsDone: true, // When a step selected by url hash, all previous steps are marked done
		  removeDoneStepOnNavigateBack: false, // While navigate back done step after active step will be cleared
		  enableAnchorOnDoneStep: true // Enable/Disable the done steps navigation
	  },
	  lang: { // Language variables for button
		  next: ew.language.phrase('Next'),
		  previous: ew.language.phrase('Prev')
	  }
  });
  $('#pages_VolontaireEdit').on('showStep', function(e, anchorObject, stepIndex, stepDirection, stepPosition) {
	  if (stepPosition == 'last') {
		$('#btn-action').prop('disabled', false);
		$('#btn-cancel').prop('disabled', false);
	  } else {
	    $('#btn-action').prop('disabled', true);
		$('#btn-cancel').prop('disabled', false);
	  }
  });
  <?php if (!$Page->isConfirm()) { // if not Confirm page ?>
  $('#pages_VolontaireEdit').on('leaveStep', function(e, anchorObject, currentStepIndex, nextStepIndex, stepDirection) {
    var isRequired = ew.hasValue;
    currentTab = currentStepIndex;
	ew.hasValue = function(el) {
      var $elTab = $(el).closest('.tab-pane'),
      elTabNum = $elTab.attr("id");
      if ($elTab.length && $elTab.closest(".ew-form.ew-edit-form.form-wizard")) {
        elTabNum = elTabNum.substr(elTabNum.length - 2).replace(/\D/g, '');
        return parseInt(elTabNum) <= (parseInt(currentTab) + 1) ? isRequired(el) : true;
      } else {
        return isRequired(el);
      }
    }
    var oldTab = currentTab;
    currentTab = currentStepIndex;
    if (!fvolontaireedit.validateFields()) {
      currentTab = oldTab;
      return false;
    } else {
      currentTab = nextStepIndex;
    }
  });
  <?php } ?>
});
</script>
