<?php

namespace PHPMaker2023\Jack_Jill_school;

// Page object
$TasksEdit = &$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) { ?>
<?= $Page->Pager->render() ?>
<?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="ftasksedit" id="ftasksedit" 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: { tasks: currentTable } });
var currentPageID = ew.PAGE_ID = "edit";
var currentForm;
var ftasksedit;
loadjs.ready(["wrapper", "head"], function () {
    let $ = jQuery;
    let fields = currentTable.fields;

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

        // Add fields
        .setFields([
            ["TaskID", [fields.TaskID.visible && fields.TaskID.required ? ew.Validators.required(fields.TaskID.caption) : null], fields.TaskID.isInvalid],
            ["TaskName", [fields.TaskName.visible && fields.TaskName.required ? ew.Validators.required(fields.TaskName.caption) : null], fields.TaskName.isInvalid],
            ["ResourceID", [fields.ResourceID.visible && fields.ResourceID.required ? ew.Validators.required(fields.ResourceID.caption) : null], fields.ResourceID.isInvalid],
            ["Start", [fields.Start.visible && fields.Start.required ? ew.Validators.required(fields.Start.caption) : null, ew.Validators.datetime(fields.Start.clientFormatPattern)], fields.Start.isInvalid],
            ["End", [fields.End.visible && fields.End.required ? ew.Validators.required(fields.End.caption) : null, ew.Validators.datetime(fields.End.clientFormatPattern)], fields.End.isInvalid],
            ["Description", [fields.Description.visible && fields.Description.required ? ew.Validators.required(fields.Description.caption) : null], fields.Description.isInvalid],
            ["Milestone", [fields.Milestone.visible && fields.Milestone.required ? ew.Validators.required(fields.Milestone.caption) : null, ew.Validators.datetime(fields.Milestone.clientFormatPattern)], fields.Milestone.isInvalid],
            ["Duration", [fields.Duration.visible && fields.Duration.required ? ew.Validators.required(fields.Duration.caption) : null, ew.Validators.float], fields.Duration.isInvalid],
            ["PercentComplete", [fields.PercentComplete.visible && fields.PercentComplete.required ? ew.Validators.required(fields.PercentComplete.caption) : null, ew.Validators.float], fields.PercentComplete.isInvalid],
            ["Dependencies", [fields.Dependencies.visible && fields.Dependencies.required ? ew.Validators.required(fields.Dependencies.caption) : null], fields.Dependencies.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)

        // Dynamic selection lists
        .setLists({
        })
        .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="tasks">
<input type="hidden" name="action" id="action" value="update">
<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-edit-div"><!-- page* -->
<?php if ($Page->TaskID->Visible) { // TaskID ?>
    <div id="r_TaskID"<?= $Page->TaskID->rowAttributes() ?>>
        <label id="elh_tasks_TaskID" for="x_TaskID" class="<?= $Page->LeftColumnClass ?>"><?= $Page->TaskID->caption() ?><?= $Page->TaskID->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
        <div class="<?= $Page->RightColumnClass ?>"><div<?= $Page->TaskID->cellAttributes() ?>>
<span id="el_tasks_TaskID">
<input type="<?= $Page->TaskID->getInputTextType() ?>" name="x_TaskID" id="x_TaskID" data-table="tasks" data-field="x_TaskID" value="<?= $Page->TaskID->EditValue ?>" size="30" maxlength="50" placeholder="<?= HtmlEncode($Page->TaskID->getPlaceHolder()) ?>" data-format-pattern="<?= HtmlEncode($Page->TaskID->formatPattern()) ?>"<?= $Page->TaskID->editAttributes() ?> aria-describedby="x_TaskID_help">
<?= $Page->TaskID->getCustomMessage() ?>
<div class="invalid-feedback"><?= $Page->TaskID->getErrorMessage() ?></div>
<input type="hidden" data-table="tasks" data-field="x_TaskID" data-hidden="1" data-old name="o_TaskID" id="o_TaskID" value="<?= HtmlEncode($Page->TaskID->OldValue ?? $Page->TaskID->CurrentValue) ?>">
</span>
</div></div>
    </div>
<?php } ?>
<?php if ($Page->TaskName->Visible) { // TaskName ?>
    <div id="r_TaskName"<?= $Page->TaskName->rowAttributes() ?>>
        <label id="elh_tasks_TaskName" for="x_TaskName" class="<?= $Page->LeftColumnClass ?>"><?= $Page->TaskName->caption() ?><?= $Page->TaskName->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
        <div class="<?= $Page->RightColumnClass ?>"><div<?= $Page->TaskName->cellAttributes() ?>>
<span id="el_tasks_TaskName">
<input type="<?= $Page->TaskName->getInputTextType() ?>" name="x_TaskName" id="x_TaskName" data-table="tasks" data-field="x_TaskName" value="<?= $Page->TaskName->EditValue ?>" size="30" maxlength="50" placeholder="<?= HtmlEncode($Page->TaskName->getPlaceHolder()) ?>" data-format-pattern="<?= HtmlEncode($Page->TaskName->formatPattern()) ?>"<?= $Page->TaskName->editAttributes() ?> aria-describedby="x_TaskName_help">
<?= $Page->TaskName->getCustomMessage() ?>
<div class="invalid-feedback"><?= $Page->TaskName->getErrorMessage() ?></div>
</span>
</div></div>
    </div>
<?php } ?>
<?php if ($Page->ResourceID->Visible) { // ResourceID ?>
    <div id="r_ResourceID"<?= $Page->ResourceID->rowAttributes() ?>>
        <label id="elh_tasks_ResourceID" for="x_ResourceID" class="<?= $Page->LeftColumnClass ?>"><?= $Page->ResourceID->caption() ?><?= $Page->ResourceID->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
        <div class="<?= $Page->RightColumnClass ?>"><div<?= $Page->ResourceID->cellAttributes() ?>>
<span id="el_tasks_ResourceID">
<input type="<?= $Page->ResourceID->getInputTextType() ?>" name="x_ResourceID" id="x_ResourceID" data-table="tasks" data-field="x_ResourceID" value="<?= $Page->ResourceID->EditValue ?>" size="30" maxlength="50" placeholder="<?= HtmlEncode($Page->ResourceID->getPlaceHolder()) ?>" data-format-pattern="<?= HtmlEncode($Page->ResourceID->formatPattern()) ?>"<?= $Page->ResourceID->editAttributes() ?> aria-describedby="x_ResourceID_help">
<?= $Page->ResourceID->getCustomMessage() ?>
<div class="invalid-feedback"><?= $Page->ResourceID->getErrorMessage() ?></div>
</span>
</div></div>
    </div>
<?php } ?>
<?php if ($Page->Start->Visible) { // Start ?>
    <div id="r_Start"<?= $Page->Start->rowAttributes() ?>>
        <label id="elh_tasks_Start" for="x_Start" class="<?= $Page->LeftColumnClass ?>"><?= $Page->Start->caption() ?><?= $Page->Start->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
        <div class="<?= $Page->RightColumnClass ?>"><div<?= $Page->Start->cellAttributes() ?>>
<span id="el_tasks_Start">
<input type="<?= $Page->Start->getInputTextType() ?>" name="x_Start" id="x_Start" data-table="tasks" data-field="x_Start" value="<?= $Page->Start->EditValue ?>" size="12" maxlength="10" placeholder="<?= HtmlEncode($Page->Start->getPlaceHolder()) ?>" data-format-pattern="<?= HtmlEncode($Page->Start->formatPattern()) ?>"<?= $Page->Start->editAttributes() ?> aria-describedby="x_Start_help">
<?= $Page->Start->getCustomMessage() ?>
<div class="invalid-feedback"><?= $Page->Start->getErrorMessage() ?></div>
<?php if (!$Page->Start->ReadOnly && !$Page->Start->Disabled && !isset($Page->Start->EditAttrs["readonly"]) && !isset($Page->Start->EditAttrs["disabled"])) { ?>
<script>
loadjs.ready(["ftasksedit", "datetimepicker"], function () {
    let format = "<?= DateFormat(2) ?>",
        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("ftasksedit", "x_Start", ew.deepAssign({"useCurrent":false,"display":{"sideBySide":false}}, options));
});
</script>
<?php } ?>
</span>
</div></div>
    </div>
<?php } ?>
<?php if ($Page->End->Visible) { // End ?>
    <div id="r_End"<?= $Page->End->rowAttributes() ?>>
        <label id="elh_tasks_End" for="x_End" class="<?= $Page->LeftColumnClass ?>"><?= $Page->End->caption() ?><?= $Page->End->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
        <div class="<?= $Page->RightColumnClass ?>"><div<?= $Page->End->cellAttributes() ?>>
<span id="el_tasks_End">
<input type="<?= $Page->End->getInputTextType() ?>" name="x_End" id="x_End" data-table="tasks" data-field="x_End" value="<?= $Page->End->EditValue ?>" size="12" maxlength="10" placeholder="<?= HtmlEncode($Page->End->getPlaceHolder()) ?>" data-format-pattern="<?= HtmlEncode($Page->End->formatPattern()) ?>"<?= $Page->End->editAttributes() ?> aria-describedby="x_End_help">
<?= $Page->End->getCustomMessage() ?>
<div class="invalid-feedback"><?= $Page->End->getErrorMessage() ?></div>
<?php if (!$Page->End->ReadOnly && !$Page->End->Disabled && !isset($Page->End->EditAttrs["readonly"]) && !isset($Page->End->EditAttrs["disabled"])) { ?>
<script>
loadjs.ready(["ftasksedit", "datetimepicker"], function () {
    let format = "<?= DateFormat(2) ?>",
        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("ftasksedit", "x_End", ew.deepAssign({"useCurrent":false,"display":{"sideBySide":false}}, options));
});
</script>
<?php } ?>
</span>
</div></div>
    </div>
<?php } ?>
<?php if ($Page->Description->Visible) { // Description ?>
    <div id="r_Description"<?= $Page->Description->rowAttributes() ?>>
        <label id="elh_tasks_Description" for="x_Description" class="<?= $Page->LeftColumnClass ?>"><?= $Page->Description->caption() ?><?= $Page->Description->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
        <div class="<?= $Page->RightColumnClass ?>"><div<?= $Page->Description->cellAttributes() ?>>
<span id="el_tasks_Description">
<input type="<?= $Page->Description->getInputTextType() ?>" name="x_Description" id="x_Description" data-table="tasks" data-field="x_Description" value="<?= $Page->Description->EditValue ?>" size="50" maxlength="50" placeholder="<?= HtmlEncode($Page->Description->getPlaceHolder()) ?>" data-format-pattern="<?= HtmlEncode($Page->Description->formatPattern()) ?>"<?= $Page->Description->editAttributes() ?> aria-describedby="x_Description_help">
<?= $Page->Description->getCustomMessage() ?>
<div class="invalid-feedback"><?= $Page->Description->getErrorMessage() ?></div>
</span>
</div></div>
    </div>
<?php } ?>
<?php if ($Page->Milestone->Visible) { // Milestone ?>
    <div id="r_Milestone"<?= $Page->Milestone->rowAttributes() ?>>
        <label id="elh_tasks_Milestone" for="x_Milestone" class="<?= $Page->LeftColumnClass ?>"><?= $Page->Milestone->caption() ?><?= $Page->Milestone->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
        <div class="<?= $Page->RightColumnClass ?>"><div<?= $Page->Milestone->cellAttributes() ?>>
<span id="el_tasks_Milestone">
<input type="<?= $Page->Milestone->getInputTextType() ?>" name="x_Milestone" id="x_Milestone" data-table="tasks" data-field="x_Milestone" value="<?= $Page->Milestone->EditValue ?>" maxlength="10" placeholder="<?= HtmlEncode($Page->Milestone->getPlaceHolder()) ?>" data-format-pattern="<?= HtmlEncode($Page->Milestone->formatPattern()) ?>"<?= $Page->Milestone->editAttributes() ?> aria-describedby="x_Milestone_help">
<?= $Page->Milestone->getCustomMessage() ?>
<div class="invalid-feedback"><?= $Page->Milestone->getErrorMessage() ?></div>
<?php if (!$Page->Milestone->ReadOnly && !$Page->Milestone->Disabled && !isset($Page->Milestone->EditAttrs["readonly"]) && !isset($Page->Milestone->EditAttrs["disabled"])) { ?>
<script>
loadjs.ready(["ftasksedit", "datetimepicker"], function () {
    let format = "<?= DateFormat(2) ?>",
        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("ftasksedit", "x_Milestone", ew.deepAssign({"useCurrent":false,"display":{"sideBySide":false}}, options));
});
</script>
<?php } ?>
</span>
</div></div>
    </div>
<?php } ?>
<?php if ($Page->Duration->Visible) { // Duration ?>
    <div id="r_Duration"<?= $Page->Duration->rowAttributes() ?>>
        <label id="elh_tasks_Duration" for="x_Duration" class="<?= $Page->LeftColumnClass ?>"><?= $Page->Duration->caption() ?><?= $Page->Duration->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
        <div class="<?= $Page->RightColumnClass ?>"><div<?= $Page->Duration->cellAttributes() ?>>
<span id="el_tasks_Duration">
<input type="<?= $Page->Duration->getInputTextType() ?>" name="x_Duration" id="x_Duration" data-table="tasks" data-field="x_Duration" value="<?= $Page->Duration->EditValue ?>" size="30" placeholder="<?= HtmlEncode($Page->Duration->getPlaceHolder()) ?>" data-format-pattern="<?= HtmlEncode($Page->Duration->formatPattern()) ?>"<?= $Page->Duration->editAttributes() ?> aria-describedby="x_Duration_help">
<?= $Page->Duration->getCustomMessage() ?>
<div class="invalid-feedback"><?= $Page->Duration->getErrorMessage() ?></div>
<script type="text/javascript">
loadjs.ready(["ftasksedit", "jquerynumber"], function() {
	ew.createjQueryNumber("ftasksedit", "x_Duration", {"number": true, "decimals": 0, "dec_point": "<?php echo $DECIMAL_SEPARATOR ?>", "thousands_sep" : "<?php echo $GROUPING_SEPARATOR ?>"});
});
</script>
</span>
</div></div>
    </div>
<?php } ?>
<?php if ($Page->PercentComplete->Visible) { // PercentComplete ?>
    <div id="r_PercentComplete"<?= $Page->PercentComplete->rowAttributes() ?>>
        <label id="elh_tasks_PercentComplete" for="x_PercentComplete" class="<?= $Page->LeftColumnClass ?>"><?= $Page->PercentComplete->caption() ?><?= $Page->PercentComplete->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
        <div class="<?= $Page->RightColumnClass ?>"><div<?= $Page->PercentComplete->cellAttributes() ?>>
<span id="el_tasks_PercentComplete">
<input type="<?= $Page->PercentComplete->getInputTextType() ?>" name="x_PercentComplete" id="x_PercentComplete" data-table="tasks" data-field="x_PercentComplete" value="<?= $Page->PercentComplete->EditValue ?>" size="30" placeholder="<?= HtmlEncode($Page->PercentComplete->getPlaceHolder()) ?>" data-format-pattern="<?= HtmlEncode($Page->PercentComplete->formatPattern()) ?>"<?= $Page->PercentComplete->editAttributes() ?> aria-describedby="x_PercentComplete_help">
<?= $Page->PercentComplete->getCustomMessage() ?>
<div class="invalid-feedback"><?= $Page->PercentComplete->getErrorMessage() ?></div>
<script type="text/javascript">
loadjs.ready(["ftasksedit", "jquerynumber"], function() {
	ew.createjQueryNumber("ftasksedit", "x_PercentComplete", {"number": true, "decimals": 0, "dec_point": "<?php echo $DECIMAL_SEPARATOR ?>", "thousands_sep" : "<?php echo $GROUPING_SEPARATOR ?>"});
});
</script>
</span>
</div></div>
    </div>
<?php } ?>
<?php if ($Page->Dependencies->Visible) { // Dependencies ?>
    <div id="r_Dependencies"<?= $Page->Dependencies->rowAttributes() ?>>
        <label id="elh_tasks_Dependencies" for="x_Dependencies" class="<?= $Page->LeftColumnClass ?>"><?= $Page->Dependencies->caption() ?><?= $Page->Dependencies->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
        <div class="<?= $Page->RightColumnClass ?>"><div<?= $Page->Dependencies->cellAttributes() ?>>
<span id="el_tasks_Dependencies">
<input type="<?= $Page->Dependencies->getInputTextType() ?>" name="x_Dependencies" id="x_Dependencies" data-table="tasks" data-field="x_Dependencies" value="<?= $Page->Dependencies->EditValue ?>" size="30" maxlength="50" placeholder="<?= HtmlEncode($Page->Dependencies->getPlaceHolder()) ?>" data-format-pattern="<?= HtmlEncode($Page->Dependencies->formatPattern()) ?>"<?= $Page->Dependencies->editAttributes() ?> aria-describedby="x_Dependencies_help">
<?= $Page->Dependencies->getCustomMessage() ?>
<div class="invalid-feedback"><?= $Page->Dependencies->getErrorMessage() ?></div>
</span>
</div></div>
    </div>
<?php } ?>
</div><!-- /page* -->
<?= $Page->IsModal ? '<template class="ew-modal-buttons">' : '<div class="row ew-buttons">' ?><!-- buttons .row -->
    <div class="<?= $Page->OffsetColumnClass ?>"><!-- buttons offset -->
<button class="btn btn-primary ew-btn" name="btn-action" id="btn-action" type="submit" form="ftasksedit"><?= $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="ftasksedit" data-href="<?= HtmlEncode(GetUrl($Page->getReturnUrl())) ?>"><?= $Language->phrase("CancelBtn") ?></button>
<?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) { ?>
<?= $Page->Pager->render() ?>
<?php } ?>
</main>
<?php
$Page->showPageFooter();
echo GetDebugMessage();
?>
<script>
// Field event handlers
loadjs.ready("head", function() {
    ew.addEventHandlers("tasks");
});
</script>
<?php if (Config("MS_ENTER_MOVING_CURSOR_TO_NEXT_FIELD")) { ?>
<script>
loadjs.ready("head", function() { $("#ftasksedit: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->IsModal && !$Page->isExport()) { ?>
<script>
loadjs.ready(["wrapper", "head", "swal"],function(){$('#btn-action').on('click',function(){if(ftasksedit.validateFields()){ew.prompt({title: ew.language.phrase("MessageEditConfirm"),icon:'question',showCancelButton:true},result=>{if(result)$("#ftasksedit").submit();});return false;} else { ew.prompt({title: ew.language.phrase("MessageInvalidForm"), icon: 'warning', showCancelButton:false}); }});});
</script>
<?php } ?>
