<?php

namespace PHPMaker2023\Jack_Jill_school;

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

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

        // Add fields
        .setFields([
            ["Announcement_ID", [fields.Announcement_ID.visible && fields.Announcement_ID.required ? ew.Validators.required(fields.Announcement_ID.caption) : null], fields.Announcement_ID.isInvalid],
            ["Is_Active", [fields.Is_Active.visible && fields.Is_Active.required ? ew.Validators.required(fields.Is_Active.caption) : null], fields.Is_Active.isInvalid],
            ["Topic", [fields.Topic.visible && fields.Topic.required ? ew.Validators.required(fields.Topic.caption) : null], fields.Topic.isInvalid],
            ["_Message", [fields._Message.visible && fields._Message.required ? ew.Validators.required(fields._Message.caption) : null], fields._Message.isInvalid],
            ["Date_LastUpdate", [fields.Date_LastUpdate.visible && fields.Date_LastUpdate.required ? ew.Validators.required(fields.Date_LastUpdate.caption) : null, ew.Validators.datetime(fields.Date_LastUpdate.clientFormatPattern)], fields.Date_LastUpdate.isInvalid],
            ["_Language", [fields._Language.visible && fields._Language.required ? ew.Validators.required(fields._Language.caption) : null], fields._Language.isInvalid],
            ["Auto_Publish", [fields.Auto_Publish.visible && fields.Auto_Publish.required ? ew.Validators.required(fields.Auto_Publish.caption) : null], fields.Auto_Publish.isInvalid],
            ["Date_Start", [fields.Date_Start.visible && fields.Date_Start.required ? ew.Validators.required(fields.Date_Start.caption) : null, ew.Validators.datetime(fields.Date_Start.clientFormatPattern)], fields.Date_Start.isInvalid],
            ["Date_End", [fields.Date_End.visible && fields.Date_End.required ? ew.Validators.required(fields.Date_End.caption) : null, ew.Validators.datetime(fields.Date_End.clientFormatPattern)], fields.Date_End.isInvalid],
            ["Date_Created", [fields.Date_Created.visible && fields.Date_Created.required ? ew.Validators.required(fields.Date_Created.caption) : null, ew.Validators.datetime(fields.Date_Created.clientFormatPattern)], fields.Date_Created.isInvalid],
            ["Created_By", [fields.Created_By.visible && fields.Created_By.required ? ew.Validators.required(fields.Created_By.caption) : null], fields.Created_By.isInvalid],
            ["Translated_ID", [fields.Translated_ID.visible && fields.Translated_ID.required ? ew.Validators.required(fields.Translated_ID.caption) : null, ew.Validators.integer], fields.Translated_ID.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({
            "Is_Active": <?= $Page->Is_Active->toClientList($Page) ?>,
            "Auto_Publish": <?= $Page->Auto_Publish->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="announcement">
<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->Announcement_ID->Visible) { // Announcement_ID ?>
    <div id="r_Announcement_ID"<?= $Page->Announcement_ID->rowAttributes() ?>>
        <label id="elh_announcement_Announcement_ID" class="<?= $Page->LeftColumnClass ?>"><?= $Page->Announcement_ID->caption() ?><?= $Page->Announcement_ID->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
        <div class="<?= $Page->RightColumnClass ?>"><div<?= $Page->Announcement_ID->cellAttributes() ?>>
<span id="el_announcement_Announcement_ID">
<span<?= $Page->Announcement_ID->viewAttributes() ?>>
<input type="text" readonly class="form-control-plaintext" value="<?= HtmlEncode(RemoveHtml($Page->Announcement_ID->getDisplayValue($Page->Announcement_ID->EditValue))) ?>"></span>
<input type="hidden" data-table="announcement" data-field="x_Announcement_ID" data-hidden="1" name="x_Announcement_ID" id="x_Announcement_ID" value="<?= HtmlEncode($Page->Announcement_ID->CurrentValue) ?>">
</span>
</div></div>
    </div>
<?php } ?>
<?php if ($Page->Is_Active->Visible) { // Is_Active ?>
    <div id="r_Is_Active"<?= $Page->Is_Active->rowAttributes() ?>>
        <label id="elh_announcement_Is_Active" class="<?= $Page->LeftColumnClass ?>"><?= $Page->Is_Active->caption() ?><?= $Page->Is_Active->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
        <div class="<?= $Page->RightColumnClass ?>"><div<?= $Page->Is_Active->cellAttributes() ?>>
<span id="el_announcement_Is_Active">
<div class="form-check form-switch d-inline-block">
    <input type="checkbox" class="form-check-input<?= $Page->Is_Active->isInvalidClass() ?>" data-table="announcement" data-field="x_Is_Active" data-boolean name="x_Is_Active" id="x_Is_Active" value="1"<?= ConvertToBool($Page->Is_Active->CurrentValue) ? " checked" : "" ?><?= $Page->Is_Active->editAttributes() ?> aria-describedby="x_Is_Active_help">
    <div class="invalid-feedback"><?= $Page->Is_Active->getErrorMessage() ?></div>
</div>
<?= $Page->Is_Active->getCustomMessage() ?>
</span>
</div></div>
    </div>
<?php } ?>
<?php if ($Page->Topic->Visible) { // Topic ?>
    <div id="r_Topic"<?= $Page->Topic->rowAttributes() ?>>
        <label id="elh_announcement_Topic" for="x_Topic" class="<?= $Page->LeftColumnClass ?>"><?= $Page->Topic->caption() ?><?= $Page->Topic->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
        <div class="<?= $Page->RightColumnClass ?>"><div<?= $Page->Topic->cellAttributes() ?>>
<span id="el_announcement_Topic">
<input type="<?= $Page->Topic->getInputTextType() ?>" name="x_Topic" id="x_Topic" data-table="announcement" data-field="x_Topic" value="<?= $Page->Topic->EditValue ?>" size="30" maxlength="50" placeholder="<?= HtmlEncode($Page->Topic->getPlaceHolder()) ?>" data-format-pattern="<?= HtmlEncode($Page->Topic->formatPattern()) ?>"<?= $Page->Topic->editAttributes() ?> aria-describedby="x_Topic_help">
<?= $Page->Topic->getCustomMessage() ?>
<div class="invalid-feedback"><?= $Page->Topic->getErrorMessage() ?></div>
</span>
</div></div>
    </div>
<?php } ?>
<?php if ($Page->_Message->Visible) { // Message ?>
    <div id="r__Message"<?= $Page->_Message->rowAttributes() ?>>
        <label id="elh_announcement__Message" for="x__Message" class="<?= $Page->LeftColumnClass ?>"><?= $Page->_Message->caption() ?><?= $Page->_Message->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
        <div class="<?= $Page->RightColumnClass ?>"><div<?= $Page->_Message->cellAttributes() ?>>
<span id="el_announcement__Message">
<textarea data-table="announcement" data-field="x__Message" name="x__Message" id="x__Message" cols="35" rows="4" placeholder="<?= HtmlEncode($Page->_Message->getPlaceHolder()) ?>"<?= $Page->_Message->editAttributes() ?> aria-describedby="x__Message_help"><?= $Page->_Message->EditValue ?></textarea>
<?= $Page->_Message->getCustomMessage() ?>
<div class="invalid-feedback"><?= $Page->_Message->getErrorMessage() ?></div>
</span>
</div></div>
    </div>
<?php } ?>
<?php if ($Page->Date_LastUpdate->Visible) { // Date_LastUpdate ?>
    <div id="r_Date_LastUpdate"<?= $Page->Date_LastUpdate->rowAttributes() ?>>
        <label id="elh_announcement_Date_LastUpdate" for="x_Date_LastUpdate" class="<?= $Page->LeftColumnClass ?>"><?= $Page->Date_LastUpdate->caption() ?><?= $Page->Date_LastUpdate->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
        <div class="<?= $Page->RightColumnClass ?>"><div<?= $Page->Date_LastUpdate->cellAttributes() ?>>
<span id="el_announcement_Date_LastUpdate">
<input type="<?= $Page->Date_LastUpdate->getInputTextType() ?>" name="x_Date_LastUpdate" id="x_Date_LastUpdate" data-table="announcement" data-field="x_Date_LastUpdate" value="<?= $Page->Date_LastUpdate->EditValue ?>" placeholder="<?= HtmlEncode($Page->Date_LastUpdate->getPlaceHolder()) ?>" data-format-pattern="<?= HtmlEncode($Page->Date_LastUpdate->formatPattern()) ?>"<?= $Page->Date_LastUpdate->editAttributes() ?> aria-describedby="x_Date_LastUpdate_help">
<?= $Page->Date_LastUpdate->getCustomMessage() ?>
<div class="invalid-feedback"><?= $Page->Date_LastUpdate->getErrorMessage() ?></div>
<?php if (!$Page->Date_LastUpdate->ReadOnly && !$Page->Date_LastUpdate->Disabled && !isset($Page->Date_LastUpdate->EditAttrs["readonly"]) && !isset($Page->Date_LastUpdate->EditAttrs["disabled"])) { ?>
<script>
loadjs.ready(["fannouncementedit", "datetimepicker"], function () {
    let format = "<?= DateFormat(0) ?>",
        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("fannouncementedit", "x_Date_LastUpdate", ew.deepAssign({"useCurrent":false,"display":{"sideBySide":false}}, options));
});
</script>
<?php } ?>
</span>
</div></div>
    </div>
<?php } ?>
<?php if ($Page->_Language->Visible) { // Language ?>
    <div id="r__Language"<?= $Page->_Language->rowAttributes() ?>>
        <label id="elh_announcement__Language" for="x__Language" class="<?= $Page->LeftColumnClass ?>"><?= $Page->_Language->caption() ?><?= $Page->_Language->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
        <div class="<?= $Page->RightColumnClass ?>"><div<?= $Page->_Language->cellAttributes() ?>>
<span id="el_announcement__Language">
<input type="<?= $Page->_Language->getInputTextType() ?>" name="x__Language" id="x__Language" data-table="announcement" data-field="x__Language" value="<?= $Page->_Language->EditValue ?>" size="30" maxlength="5" placeholder="<?= HtmlEncode($Page->_Language->getPlaceHolder()) ?>" data-format-pattern="<?= HtmlEncode($Page->_Language->formatPattern()) ?>"<?= $Page->_Language->editAttributes() ?> aria-describedby="x__Language_help">
<?= $Page->_Language->getCustomMessage() ?>
<div class="invalid-feedback"><?= $Page->_Language->getErrorMessage() ?></div>
</span>
</div></div>
    </div>
<?php } ?>
<?php if ($Page->Auto_Publish->Visible) { // Auto_Publish ?>
    <div id="r_Auto_Publish"<?= $Page->Auto_Publish->rowAttributes() ?>>
        <label id="elh_announcement_Auto_Publish" class="<?= $Page->LeftColumnClass ?>"><?= $Page->Auto_Publish->caption() ?><?= $Page->Auto_Publish->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
        <div class="<?= $Page->RightColumnClass ?>"><div<?= $Page->Auto_Publish->cellAttributes() ?>>
<span id="el_announcement_Auto_Publish">
<div class="form-check form-switch d-inline-block">
    <input type="checkbox" class="form-check-input<?= $Page->Auto_Publish->isInvalidClass() ?>" data-table="announcement" data-field="x_Auto_Publish" data-boolean name="x_Auto_Publish" id="x_Auto_Publish" value="1"<?= ConvertToBool($Page->Auto_Publish->CurrentValue) ? " checked" : "" ?><?= $Page->Auto_Publish->editAttributes() ?> aria-describedby="x_Auto_Publish_help">
    <div class="invalid-feedback"><?= $Page->Auto_Publish->getErrorMessage() ?></div>
</div>
<?= $Page->Auto_Publish->getCustomMessage() ?>
</span>
</div></div>
    </div>
<?php } ?>
<?php if ($Page->Date_Start->Visible) { // Date_Start ?>
    <div id="r_Date_Start"<?= $Page->Date_Start->rowAttributes() ?>>
        <label id="elh_announcement_Date_Start" for="x_Date_Start" class="<?= $Page->LeftColumnClass ?>"><?= $Page->Date_Start->caption() ?><?= $Page->Date_Start->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
        <div class="<?= $Page->RightColumnClass ?>"><div<?= $Page->Date_Start->cellAttributes() ?>>
<span id="el_announcement_Date_Start">
<input type="<?= $Page->Date_Start->getInputTextType() ?>" name="x_Date_Start" id="x_Date_Start" data-table="announcement" data-field="x_Date_Start" value="<?= $Page->Date_Start->EditValue ?>" placeholder="<?= HtmlEncode($Page->Date_Start->getPlaceHolder()) ?>" data-format-pattern="<?= HtmlEncode($Page->Date_Start->formatPattern()) ?>"<?= $Page->Date_Start->editAttributes() ?> aria-describedby="x_Date_Start_help">
<?= $Page->Date_Start->getCustomMessage() ?>
<div class="invalid-feedback"><?= $Page->Date_Start->getErrorMessage() ?></div>
<?php if (!$Page->Date_Start->ReadOnly && !$Page->Date_Start->Disabled && !isset($Page->Date_Start->EditAttrs["readonly"]) && !isset($Page->Date_Start->EditAttrs["disabled"])) { ?>
<script>
loadjs.ready(["fannouncementedit", "datetimepicker"], function () {
    let format = "<?= DateFormat(0) ?>",
        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("fannouncementedit", "x_Date_Start", ew.deepAssign({"useCurrent":false,"display":{"sideBySide":false}}, options));
});
</script>
<?php } ?>
</span>
</div></div>
    </div>
<?php } ?>
<?php if ($Page->Date_End->Visible) { // Date_End ?>
    <div id="r_Date_End"<?= $Page->Date_End->rowAttributes() ?>>
        <label id="elh_announcement_Date_End" for="x_Date_End" class="<?= $Page->LeftColumnClass ?>"><?= $Page->Date_End->caption() ?><?= $Page->Date_End->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
        <div class="<?= $Page->RightColumnClass ?>"><div<?= $Page->Date_End->cellAttributes() ?>>
<span id="el_announcement_Date_End">
<input type="<?= $Page->Date_End->getInputTextType() ?>" name="x_Date_End" id="x_Date_End" data-table="announcement" data-field="x_Date_End" value="<?= $Page->Date_End->EditValue ?>" placeholder="<?= HtmlEncode($Page->Date_End->getPlaceHolder()) ?>" data-format-pattern="<?= HtmlEncode($Page->Date_End->formatPattern()) ?>"<?= $Page->Date_End->editAttributes() ?> aria-describedby="x_Date_End_help">
<?= $Page->Date_End->getCustomMessage() ?>
<div class="invalid-feedback"><?= $Page->Date_End->getErrorMessage() ?></div>
<?php if (!$Page->Date_End->ReadOnly && !$Page->Date_End->Disabled && !isset($Page->Date_End->EditAttrs["readonly"]) && !isset($Page->Date_End->EditAttrs["disabled"])) { ?>
<script>
loadjs.ready(["fannouncementedit", "datetimepicker"], function () {
    let format = "<?= DateFormat(0) ?>",
        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("fannouncementedit", "x_Date_End", ew.deepAssign({"useCurrent":false,"display":{"sideBySide":false}}, options));
});
</script>
<?php } ?>
</span>
</div></div>
    </div>
<?php } ?>
<?php if ($Page->Date_Created->Visible) { // Date_Created ?>
    <div id="r_Date_Created"<?= $Page->Date_Created->rowAttributes() ?>>
        <label id="elh_announcement_Date_Created" for="x_Date_Created" class="<?= $Page->LeftColumnClass ?>"><?= $Page->Date_Created->caption() ?><?= $Page->Date_Created->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
        <div class="<?= $Page->RightColumnClass ?>"><div<?= $Page->Date_Created->cellAttributes() ?>>
<span id="el_announcement_Date_Created">
<input type="<?= $Page->Date_Created->getInputTextType() ?>" name="x_Date_Created" id="x_Date_Created" data-table="announcement" data-field="x_Date_Created" value="<?= $Page->Date_Created->EditValue ?>" placeholder="<?= HtmlEncode($Page->Date_Created->getPlaceHolder()) ?>" data-format-pattern="<?= HtmlEncode($Page->Date_Created->formatPattern()) ?>"<?= $Page->Date_Created->editAttributes() ?> aria-describedby="x_Date_Created_help">
<?= $Page->Date_Created->getCustomMessage() ?>
<div class="invalid-feedback"><?= $Page->Date_Created->getErrorMessage() ?></div>
<?php if (!$Page->Date_Created->ReadOnly && !$Page->Date_Created->Disabled && !isset($Page->Date_Created->EditAttrs["readonly"]) && !isset($Page->Date_Created->EditAttrs["disabled"])) { ?>
<script>
loadjs.ready(["fannouncementedit", "datetimepicker"], function () {
    let format = "<?= DateFormat(0) ?>",
        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("fannouncementedit", "x_Date_Created", ew.deepAssign({"useCurrent":false,"display":{"sideBySide":false}}, options));
});
</script>
<?php } ?>
</span>
</div></div>
    </div>
<?php } ?>
<?php if ($Page->Created_By->Visible) { // Created_By ?>
    <div id="r_Created_By"<?= $Page->Created_By->rowAttributes() ?>>
        <label id="elh_announcement_Created_By" for="x_Created_By" class="<?= $Page->LeftColumnClass ?>"><?= $Page->Created_By->caption() ?><?= $Page->Created_By->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
        <div class="<?= $Page->RightColumnClass ?>"><div<?= $Page->Created_By->cellAttributes() ?>>
<span id="el_announcement_Created_By">
<input type="<?= $Page->Created_By->getInputTextType() ?>" name="x_Created_By" id="x_Created_By" data-table="announcement" data-field="x_Created_By" value="<?= $Page->Created_By->EditValue ?>" size="30" maxlength="200" placeholder="<?= HtmlEncode($Page->Created_By->getPlaceHolder()) ?>" data-format-pattern="<?= HtmlEncode($Page->Created_By->formatPattern()) ?>"<?= $Page->Created_By->editAttributes() ?> aria-describedby="x_Created_By_help">
<?= $Page->Created_By->getCustomMessage() ?>
<div class="invalid-feedback"><?= $Page->Created_By->getErrorMessage() ?></div>
</span>
</div></div>
    </div>
<?php } ?>
<?php if ($Page->Translated_ID->Visible) { // Translated_ID ?>
    <div id="r_Translated_ID"<?= $Page->Translated_ID->rowAttributes() ?>>
        <label id="elh_announcement_Translated_ID" for="x_Translated_ID" class="<?= $Page->LeftColumnClass ?>"><?= $Page->Translated_ID->caption() ?><?= $Page->Translated_ID->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
        <div class="<?= $Page->RightColumnClass ?>"><div<?= $Page->Translated_ID->cellAttributes() ?>>
<span id="el_announcement_Translated_ID">
<input type="<?= $Page->Translated_ID->getInputTextType() ?>" name="x_Translated_ID" id="x_Translated_ID" data-table="announcement" data-field="x_Translated_ID" value="<?= $Page->Translated_ID->EditValue ?>" size="30" placeholder="<?= HtmlEncode($Page->Translated_ID->getPlaceHolder()) ?>" data-format-pattern="<?= HtmlEncode($Page->Translated_ID->formatPattern()) ?>"<?= $Page->Translated_ID->editAttributes() ?> aria-describedby="x_Translated_ID_help">
<?= $Page->Translated_ID->getCustomMessage() ?>
<div class="invalid-feedback"><?= $Page->Translated_ID->getErrorMessage() ?></div>
<script type="text/javascript">
loadjs.ready(["fannouncementedit", "jquerynumber"], function() {
	ew.createjQueryNumber("fannouncementedit", "x_Translated_ID", {"number": true, "decimals": 0, "dec_point": "<?php echo $DECIMAL_SEPARATOR ?>", "thousands_sep" : "<?php echo $GROUPING_SEPARATOR ?>"});
});
</script>
</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="fannouncementedit"><?= $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="fannouncementedit" 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("announcement");
});
</script>
<?php if (Config("MS_ENTER_MOVING_CURSOR_TO_NEXT_FIELD")) { ?>
<script>
loadjs.ready("head", function() { $("#fannouncementedit: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(fannouncementedit.validateFields()){ew.prompt({title: ew.language.phrase("MessageEditConfirm"),icon:'question',showCancelButton:true},result=>{if(result)$("#fannouncementedit").submit();});return false;} else { ew.prompt({title: ew.language.phrase("MessageInvalidForm"), icon: 'warning', showCancelButton:false}); }});});
</script>
<?php } ?>
