<?php
namespace PHPMaker2020\hostelmgr20;

// Session
if (session_status() !== PHP_SESSION_ACTIVE)
	session_start(); // Init session data

// Output buffering
ob_start();

// Autoload
include_once "autoload.php";
?>
<?php

// Write header
WriteHeader(FALSE);

// Create page object
$activity_edit = new activity_edit();

// Run the page
$activity_edit->run();

// Setup login status
SetupLoginStatus();
SetClientVar("login", LoginStatus());

// Global Page Rendering event (in userfn*.php)
Page_Rendering();

// Page Rendering event
$activity_edit->Page_Render();
?>
<?php include_once "header.php"; ?>
<script>
var factivityedit, currentPageID;
loadjs.ready("head", function() {

	// Form object
	currentPageID = ew.PAGE_ID = "edit";
	factivityedit = currentForm = new ew.Form("factivityedit", "edit");

	// Validate form
	factivityedit.validate = function() {
		if (!this.validateRequired)
			return true; // Ignore validation
		var $ = jQuery, fobj = this.getForm(), $fobj = $(fobj);
		if ($fobj.find("#confirm").val() == "F")
			return true;
		var elm, felm, uelm, addcnt = 0;
		var $k = $fobj.find("#" + this.formKeyCountName); // Get key_count
		var rowcnt = ($k[0]) ? parseInt($k.val(), 10) : 1;
		var startcnt = (rowcnt == 0) ? 0 : 1; // Check rowcnt == 0 => Inline-Add
		var gridinsert = ["insert", "gridinsert"].includes($fobj.find("#action").val()) && $k[0];
		for (var i = startcnt; i <= rowcnt; i++) {
			var infix = ($k[0]) ? String(i) : "";
			$fobj.data("rowindex", infix);
			<?php if ($activity_edit->id->Required) { ?>
				elm = this.getElements("x" + infix + "_id");
				if (elm && !ew.isHidden(elm) && !ew.hasValue(elm))
					return this.onError(elm, "<?php echo JsEncode(str_replace("%s", $activity_edit->id->caption(), $activity_edit->id->RequiredErrorMessage)) ?>");
			<?php } ?>
			<?php if ($activity_edit->HotelID->Required) { ?>
				elm = this.getElements("x" + infix + "_HotelID");
				if (elm && !ew.isHidden(elm) && !ew.hasValue(elm))
					return this.onError(elm, "<?php echo JsEncode(str_replace("%s", $activity_edit->HotelID->caption(), $activity_edit->HotelID->RequiredErrorMessage)) ?>");
			<?php } ?>
			<?php if ($activity_edit->RollNo->Required) { ?>
				elm = this.getElements("x" + infix + "_RollNo");
				if (elm && !ew.isHidden(elm) && !ew.hasValue(elm))
					return this.onError(elm, "<?php echo JsEncode(str_replace("%s", $activity_edit->RollNo->caption(), $activity_edit->RollNo->RequiredErrorMessage)) ?>");
			<?php } ?>
			<?php if ($activity_edit->Name->Required) { ?>
				elm = this.getElements("x" + infix + "_Name");
				if (elm && !ew.isHidden(elm) && !ew.hasValue(elm))
					return this.onError(elm, "<?php echo JsEncode(str_replace("%s", $activity_edit->Name->caption(), $activity_edit->Name->RequiredErrorMessage)) ?>");
			<?php } ?>
			<?php if ($activity_edit->Hostel->Required) { ?>
				elm = this.getElements("x" + infix + "_Hostel");
				if (elm && !ew.isHidden(elm) && !ew.hasValue(elm))
					return this.onError(elm, "<?php echo JsEncode(str_replace("%s", $activity_edit->Hostel->caption(), $activity_edit->Hostel->RequiredErrorMessage)) ?>");
			<?php } ?>
			<?php if ($activity_edit->Floor->Required) { ?>
				elm = this.getElements("x" + infix + "_Floor");
				if (elm && !ew.isHidden(elm) && !ew.hasValue(elm))
					return this.onError(elm, "<?php echo JsEncode(str_replace("%s", $activity_edit->Floor->caption(), $activity_edit->Floor->RequiredErrorMessage)) ?>");
			<?php } ?>
			<?php if ($activity_edit->Room_No->Required) { ?>
				elm = this.getElements("x" + infix + "_Room_No");
				if (elm && !ew.isHidden(elm) && !ew.hasValue(elm))
					return this.onError(elm, "<?php echo JsEncode(str_replace("%s", $activity_edit->Room_No->caption(), $activity_edit->Room_No->RequiredErrorMessage)) ?>");
			<?php } ?>
			<?php if ($activity_edit->Health_issue->Required) { ?>
				elm = this.getElements("x" + infix + "_Health_issue[]");
				if (elm && !ew.isHidden(elm) && !ew.hasValue(elm))
					return this.onError(elm, "<?php echo JsEncode(str_replace("%s", $activity_edit->Health_issue->caption(), $activity_edit->Health_issue->RequiredErrorMessage)) ?>");
			<?php } ?>
			<?php if ($activity_edit->Indiscipline_activity->Required) { ?>
				elm = this.getElements("x" + infix + "_Indiscipline_activity[]");
				if (elm && !ew.isHidden(elm) && !ew.hasValue(elm))
					return this.onError(elm, "<?php echo JsEncode(str_replace("%s", $activity_edit->Indiscipline_activity->caption(), $activity_edit->Indiscipline_activity->RequiredErrorMessage)) ?>");
			<?php } ?>
			<?php if ($activity_edit->Involvement->Required) { ?>
				elm = this.getElements("x" + infix + "_Involvement");
				if (elm && !ew.isHidden(elm) && !ew.hasValue(elm))
					return this.onError(elm, "<?php echo JsEncode(str_replace("%s", $activity_edit->Involvement->caption(), $activity_edit->Involvement->RequiredErrorMessage)) ?>");
			<?php } ?>
			<?php if ($activity_edit->Remarks->Required) { ?>
				elm = this.getElements("x" + infix + "_Remarks");
				if (elm && !ew.isHidden(elm) && !ew.hasValue(elm))
					return this.onError(elm, "<?php echo JsEncode(str_replace("%s", $activity_edit->Remarks->caption(), $activity_edit->Remarks->RequiredErrorMessage)) ?>");
			<?php } ?>
				elm = this.getElements("x" + infix + "_Remarks");
				if (elm && !ew.checkInteger(elm.value))
					return this.onError(elm, "<?php echo JsEncode($activity_edit->Remarks->errorMessage()) ?>");
			<?php if ($activity_edit->Others->Required) { ?>
				elm = this.getElements("x" + infix + "_Others");
				if (elm && !ew.isHidden(elm) && !ew.hasValue(elm))
					return this.onError(elm, "<?php echo JsEncode(str_replace("%s", $activity_edit->Others->caption(), $activity_edit->Others->RequiredErrorMessage)) ?>");
			<?php } ?>
			<?php if ($activity_edit->Updatedby->Required) { ?>
				elm = this.getElements("x" + infix + "_Updatedby");
				if (elm && !ew.isHidden(elm) && !ew.hasValue(elm))
					return this.onError(elm, "<?php echo JsEncode(str_replace("%s", $activity_edit->Updatedby->caption(), $activity_edit->Updatedby->RequiredErrorMessage)) ?>");
			<?php } ?>
			<?php if ($activity_edit->Updated_Date->Required) { ?>
				elm = this.getElements("x" + infix + "_Updated_Date");
				if (elm && !ew.isHidden(elm) && !ew.hasValue(elm))
					return this.onError(elm, "<?php echo JsEncode(str_replace("%s", $activity_edit->Updated_Date->caption(), $activity_edit->Updated_Date->RequiredErrorMessage)) ?>");
			<?php } ?>

				// Call Form_CustomValidate event
				if (!this.Form_CustomValidate(fobj))
					return false;
		}

		// Process detail forms
		var dfs = $fobj.find("input[name='detailpage']").get();
		for (var i = 0; i < dfs.length; i++) {
			var df = dfs[i], val = df.value;
			if (val && ew.forms[val])
				if (!ew.forms[val].validate())
					return false;
		}
		return true;
	}

	// Form_CustomValidate
	factivityedit.Form_CustomValidate = function(fobj) { // DO NOT CHANGE THIS LINE!

		// Your custom validation code here, return false if invalid.
		return true;
	}

	// Use JavaScript validation or not
	factivityedit.validateRequired = <?php echo Config("CLIENT_VALIDATE") ? "true" : "false" ?>;

	// Dynamic selection lists
	factivityedit.lists["x_Hostel"] = <?php echo $activity_edit->Hostel->Lookup->toClientList($activity_edit) ?>;
	factivityedit.lists["x_Hostel"].options = <?php echo JsonEncode($activity_edit->Hostel->lookupOptions()) ?>;
	factivityedit.lists["x_Floor"] = <?php echo $activity_edit->Floor->Lookup->toClientList($activity_edit) ?>;
	factivityedit.lists["x_Floor"].options = <?php echo JsonEncode($activity_edit->Floor->lookupOptions()) ?>;
	factivityedit.lists["x_Room_No"] = <?php echo $activity_edit->Room_No->Lookup->toClientList($activity_edit) ?>;
	factivityedit.lists["x_Room_No"].options = <?php echo JsonEncode($activity_edit->Room_No->lookupOptions()) ?>;
	factivityedit.lists["x_Health_issue[]"] = <?php echo $activity_edit->Health_issue->Lookup->toClientList($activity_edit) ?>;
	factivityedit.lists["x_Health_issue[]"].options = <?php echo JsonEncode($activity_edit->Health_issue->lookupOptions()) ?>;
	factivityedit.lists["x_Indiscipline_activity[]"] = <?php echo $activity_edit->Indiscipline_activity->Lookup->toClientList($activity_edit) ?>;
	factivityedit.lists["x_Indiscipline_activity[]"].options = <?php echo JsonEncode($activity_edit->Indiscipline_activity->lookupOptions()) ?>;
	factivityedit.lists["x_Involvement"] = <?php echo $activity_edit->Involvement->Lookup->toClientList($activity_edit) ?>;
	factivityedit.lists["x_Involvement"].options = <?php echo JsonEncode($activity_edit->Involvement->lookupOptions()) ?>;
	loadjs.done("factivityedit");
});
</script>
<script>
loadjs.ready("head", function() {

	// Client script
	// Write your client script here, no need to add script tags.

});
</script>
<?php $activity_edit->showPageHeader(); ?>
<?php
$activity_edit->showMessage();
?>
<form name="factivityedit" id="factivityedit" class="<?php echo $activity_edit->FormClassName ?>" action="<?php echo CurrentPageName() ?>" method="post">
<?php if ($Page->CheckToken) { ?>
<input type="hidden" name="<?php echo Config("TOKEN_NAME") ?>" value="<?php echo $Page->Token ?>">
<?php } ?>
<input type="hidden" name="t" value="activity">
<input type="hidden" name="action" id="action" value="update">
<input type="hidden" name="modal" value="<?php echo (int)$activity_edit->IsModal ?>">
<?php if ($activity->getCurrentMasterTable() == "admission") { ?>
<input type="hidden" name="<?php echo Config("TABLE_SHOW_MASTER") ?>" value="admission">
<input type="hidden" name="fk_HostelID" value="<?php echo $activity_edit->HotelID->getSessionValue() ?>">
<input type="hidden" name="fk_RollNo" value="<?php echo $activity_edit->RollNo->getSessionValue() ?>">
<input type="hidden" name="fk_Name" value="<?php echo $activity_edit->Name->getSessionValue() ?>">
<input type="hidden" name="fk_Hostel" value="<?php echo $activity_edit->Hostel->getSessionValue() ?>">
<input type="hidden" name="fk_Floor" value="<?php echo $activity_edit->Floor->getSessionValue() ?>">
<input type="hidden" name="fk_RoomNo" value="<?php echo $activity_edit->Room_No->getSessionValue() ?>">
<?php } ?>
<?php if ($activity->getCurrentMasterTable() == "indiscipline") { ?>
<input type="hidden" name="<?php echo Config("TABLE_SHOW_MASTER") ?>" value="indiscipline">
<input type="hidden" name="fk_id" value="<?php echo $activity_edit->Indiscipline_activity->getSessionValue() ?>">
<?php } ?>
<div class="ew-edit-div"><!-- page* -->
<?php if ($activity_edit->id->Visible) { // id ?>
	<div id="r_id" class="form-group row">
		<label id="elh_activity_id" class="<?php echo $activity_edit->LeftColumnClass ?>"><?php echo $activity_edit->id->caption() ?><?php echo $activity_edit->id->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $activity_edit->RightColumnClass ?>"><div <?php echo $activity_edit->id->cellAttributes() ?>>
<span id="el_activity_id">
<span<?php echo $activity_edit->id->viewAttributes() ?>><input type="text" readonly class="form-control-plaintext" value="<?php echo HtmlEncode(RemoveHtml($activity_edit->id->EditValue)) ?>"></span>
</span>
<input type="hidden" data-table="activity" data-field="x_id" name="x_id" id="x_id" value="<?php echo HtmlEncode($activity_edit->id->CurrentValue) ?>">
<?php echo $activity_edit->id->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($activity_edit->HotelID->Visible) { // HotelID ?>
	<div id="r_HotelID" class="form-group row">
		<label id="elh_activity_HotelID" for="x_HotelID" class="<?php echo $activity_edit->LeftColumnClass ?>"><?php echo $activity_edit->HotelID->caption() ?><?php echo $activity_edit->HotelID->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $activity_edit->RightColumnClass ?>"><div <?php echo $activity_edit->HotelID->cellAttributes() ?>>
<?php if ($activity_edit->HotelID->getSessionValue() != "") { ?>
<span id="el_activity_HotelID">
<span<?php echo $activity_edit->HotelID->viewAttributes() ?>><input type="text" readonly class="form-control-plaintext" value="<?php echo HtmlEncode(RemoveHtml($activity_edit->HotelID->ViewValue)) ?>"></span>
</span>
<input type="hidden" id="x_HotelID" name="x_HotelID" value="<?php echo HtmlEncode($activity_edit->HotelID->CurrentValue) ?>">
<?php } else { ?>
<span id="el_activity_HotelID">
<input type="text" data-table="activity" data-field="x_HotelID" name="x_HotelID" id="x_HotelID" size="30" maxlength="12" placeholder="<?php echo HtmlEncode($activity_edit->HotelID->getPlaceHolder()) ?>" value="<?php echo $activity_edit->HotelID->EditValue ?>"<?php echo $activity_edit->HotelID->editAttributes() ?>>
</span>
<?php } ?>
<?php echo $activity_edit->HotelID->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($activity_edit->RollNo->Visible) { // RollNo ?>
	<div id="r_RollNo" class="form-group row">
		<label id="elh_activity_RollNo" for="x_RollNo" class="<?php echo $activity_edit->LeftColumnClass ?>"><?php echo $activity_edit->RollNo->caption() ?><?php echo $activity_edit->RollNo->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $activity_edit->RightColumnClass ?>"><div <?php echo $activity_edit->RollNo->cellAttributes() ?>>
<?php if ($activity_edit->RollNo->getSessionValue() != "") { ?>
<span id="el_activity_RollNo">
<span<?php echo $activity_edit->RollNo->viewAttributes() ?>><input type="text" readonly class="form-control-plaintext" value="<?php echo HtmlEncode(RemoveHtml($activity_edit->RollNo->ViewValue)) ?>"></span>
</span>
<input type="hidden" id="x_RollNo" name="x_RollNo" value="<?php echo HtmlEncode($activity_edit->RollNo->CurrentValue) ?>">
<?php } else { ?>
<span id="el_activity_RollNo">
<input type="text" data-table="activity" data-field="x_RollNo" name="x_RollNo" id="x_RollNo" size="30" maxlength="12" placeholder="<?php echo HtmlEncode($activity_edit->RollNo->getPlaceHolder()) ?>" value="<?php echo $activity_edit->RollNo->EditValue ?>"<?php echo $activity_edit->RollNo->editAttributes() ?>>
</span>
<?php } ?>
<?php echo $activity_edit->RollNo->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($activity_edit->Name->Visible) { // Name ?>
	<div id="r_Name" class="form-group row">
		<label id="elh_activity_Name" for="x_Name" class="<?php echo $activity_edit->LeftColumnClass ?>"><?php echo $activity_edit->Name->caption() ?><?php echo $activity_edit->Name->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $activity_edit->RightColumnClass ?>"><div <?php echo $activity_edit->Name->cellAttributes() ?>>
<?php if ($activity_edit->Name->getSessionValue() != "") { ?>
<span id="el_activity_Name">
<span<?php echo $activity_edit->Name->viewAttributes() ?>><input type="text" readonly class="form-control-plaintext" value="<?php echo HtmlEncode(RemoveHtml($activity_edit->Name->ViewValue)) ?>"></span>
</span>
<input type="hidden" id="x_Name" name="x_Name" value="<?php echo HtmlEncode($activity_edit->Name->CurrentValue) ?>">
<?php } else { ?>
<span id="el_activity_Name">
<input type="text" data-table="activity" data-field="x_Name" name="x_Name" id="x_Name" size="30" maxlength="55" placeholder="<?php echo HtmlEncode($activity_edit->Name->getPlaceHolder()) ?>" value="<?php echo $activity_edit->Name->EditValue ?>"<?php echo $activity_edit->Name->editAttributes() ?>>
</span>
<?php } ?>
<?php echo $activity_edit->Name->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($activity_edit->Hostel->Visible) { // Hostel ?>
	<div id="r_Hostel" class="form-group row">
		<label id="elh_activity_Hostel" for="x_Hostel" class="<?php echo $activity_edit->LeftColumnClass ?>"><?php echo $activity_edit->Hostel->caption() ?><?php echo $activity_edit->Hostel->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $activity_edit->RightColumnClass ?>"><div <?php echo $activity_edit->Hostel->cellAttributes() ?>>
<?php if ($activity_edit->Hostel->getSessionValue() != "") { ?>
<span id="el_activity_Hostel">
<span<?php echo $activity_edit->Hostel->viewAttributes() ?>><input type="text" readonly class="form-control-plaintext" value="<?php echo HtmlEncode(RemoveHtml($activity_edit->Hostel->ViewValue)) ?>"></span>
</span>
<input type="hidden" id="x_Hostel" name="x_Hostel" value="<?php echo HtmlEncode($activity_edit->Hostel->CurrentValue) ?>">
<?php } else { ?>
<span id="el_activity_Hostel">
<?php $activity_edit->Hostel->EditAttrs->prepend("onchange", "ew.updateOptions.call(this);"); ?>
<div class="input-group">
	<select class="custom-select ew-custom-select" data-table="activity" data-field="x_Hostel" data-value-separator="<?php echo $activity_edit->Hostel->displayValueSeparatorAttribute() ?>" id="x_Hostel" name="x_Hostel"<?php echo $activity_edit->Hostel->editAttributes() ?>>
			<?php echo $activity_edit->Hostel->selectOptionListHtml("x_Hostel") ?>
		</select>
</div>
<?php echo $activity_edit->Hostel->Lookup->getParamTag($activity_edit, "p_x_Hostel") ?>
</span>
<?php } ?>
<?php echo $activity_edit->Hostel->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($activity_edit->Floor->Visible) { // Floor ?>
	<div id="r_Floor" class="form-group row">
		<label id="elh_activity_Floor" for="x_Floor" class="<?php echo $activity_edit->LeftColumnClass ?>"><?php echo $activity_edit->Floor->caption() ?><?php echo $activity_edit->Floor->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $activity_edit->RightColumnClass ?>"><div <?php echo $activity_edit->Floor->cellAttributes() ?>>
<?php if ($activity_edit->Floor->getSessionValue() != "") { ?>
<span id="el_activity_Floor">
<span<?php echo $activity_edit->Floor->viewAttributes() ?>><input type="text" readonly class="form-control-plaintext" value="<?php echo HtmlEncode(RemoveHtml($activity_edit->Floor->ViewValue)) ?>"></span>
</span>
<input type="hidden" id="x_Floor" name="x_Floor" value="<?php echo HtmlEncode($activity_edit->Floor->CurrentValue) ?>">
<?php } else { ?>
<span id="el_activity_Floor">
<?php $activity_edit->Floor->EditAttrs->prepend("onchange", "ew.updateOptions.call(this);"); ?>
<div class="input-group">
	<select class="custom-select ew-custom-select" data-table="activity" data-field="x_Floor" data-value-separator="<?php echo $activity_edit->Floor->displayValueSeparatorAttribute() ?>" id="x_Floor" name="x_Floor"<?php echo $activity_edit->Floor->editAttributes() ?>>
			<?php echo $activity_edit->Floor->selectOptionListHtml("x_Floor") ?>
		</select>
</div>
<?php echo $activity_edit->Floor->Lookup->getParamTag($activity_edit, "p_x_Floor") ?>
</span>
<?php } ?>
<?php echo $activity_edit->Floor->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($activity_edit->Room_No->Visible) { // Room_No ?>
	<div id="r_Room_No" class="form-group row">
		<label id="elh_activity_Room_No" for="x_Room_No" class="<?php echo $activity_edit->LeftColumnClass ?>"><?php echo $activity_edit->Room_No->caption() ?><?php echo $activity_edit->Room_No->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $activity_edit->RightColumnClass ?>"><div <?php echo $activity_edit->Room_No->cellAttributes() ?>>
<?php if ($activity_edit->Room_No->getSessionValue() != "") { ?>
<span id="el_activity_Room_No">
<span<?php echo $activity_edit->Room_No->viewAttributes() ?>><input type="text" readonly class="form-control-plaintext" value="<?php echo HtmlEncode(RemoveHtml($activity_edit->Room_No->ViewValue)) ?>"></span>
</span>
<input type="hidden" id="x_Room_No" name="x_Room_No" value="<?php echo HtmlEncode($activity_edit->Room_No->CurrentValue) ?>">
<?php } else { ?>
<span id="el_activity_Room_No">
<div class="input-group">
	<select class="custom-select ew-custom-select" data-table="activity" data-field="x_Room_No" data-value-separator="<?php echo $activity_edit->Room_No->displayValueSeparatorAttribute() ?>" id="x_Room_No" name="x_Room_No"<?php echo $activity_edit->Room_No->editAttributes() ?>>
			<?php echo $activity_edit->Room_No->selectOptionListHtml("x_Room_No") ?>
		</select>
</div>
<?php echo $activity_edit->Room_No->Lookup->getParamTag($activity_edit, "p_x_Room_No") ?>
</span>
<?php } ?>
<?php echo $activity_edit->Room_No->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($activity_edit->Health_issue->Visible) { // Health_issue ?>
	<div id="r_Health_issue" class="form-group row">
		<label id="elh_activity_Health_issue" class="<?php echo $activity_edit->LeftColumnClass ?>"><?php echo $activity_edit->Health_issue->caption() ?><?php echo $activity_edit->Health_issue->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $activity_edit->RightColumnClass ?>"><div <?php echo $activity_edit->Health_issue->cellAttributes() ?>>
<span id="el_activity_Health_issue">
<div class="input-group ew-lookup-list">
	<div class="form-control ew-lookup-text" tabindex="-1" id="lu_x_Health_issue"><?php echo EmptyValue(strval($activity_edit->Health_issue->ViewValue)) ? $Language->phrase("PleaseSelect") : $activity_edit->Health_issue->ViewValue ?></div>
	<div class="input-group-append">
		<button type="button" title="<?php echo HtmlEncode(str_replace("%s", RemoveHtml($activity_edit->Health_issue->caption()), $Language->phrase("LookupLink", TRUE))) ?>" class="ew-lookup-btn btn btn-default"<?php echo ($activity_edit->Health_issue->ReadOnly || $activity_edit->Health_issue->Disabled) ? " disabled" : "" ?> onclick="ew.modalLookupShow({lnk:this,el:'x_Health_issue[]',m:1,n:10});"><i class="fas fa-search ew-icon"></i></button>
	</div>
</div>
<?php echo $activity_edit->Health_issue->Lookup->getParamTag($activity_edit, "p_x_Health_issue") ?>
<input type="hidden" data-table="activity" data-field="x_Health_issue" data-multiple="1" data-lookup="1" data-value-separator="<?php echo $activity_edit->Health_issue->displayValueSeparatorAttribute() ?>" name="x_Health_issue[]" id="x_Health_issue[]" value="<?php echo $activity_edit->Health_issue->CurrentValue ?>"<?php echo $activity_edit->Health_issue->editAttributes() ?>>
</span>
<?php echo $activity_edit->Health_issue->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($activity_edit->Indiscipline_activity->Visible) { // Indiscipline_activity ?>
	<div id="r_Indiscipline_activity" class="form-group row">
		<label id="elh_activity_Indiscipline_activity" class="<?php echo $activity_edit->LeftColumnClass ?>"><?php echo $activity_edit->Indiscipline_activity->caption() ?><?php echo $activity_edit->Indiscipline_activity->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $activity_edit->RightColumnClass ?>"><div <?php echo $activity_edit->Indiscipline_activity->cellAttributes() ?>>
<?php if ($activity_edit->Indiscipline_activity->getSessionValue() != "") { ?>
<span id="el_activity_Indiscipline_activity">
<span<?php echo $activity_edit->Indiscipline_activity->viewAttributes() ?>><input type="text" readonly class="form-control-plaintext" value="<?php echo HtmlEncode(RemoveHtml($activity_edit->Indiscipline_activity->ViewValue)) ?>"></span>
</span>
<input type="hidden" id="x_Indiscipline_activity" name="x_Indiscipline_activity" value="<?php echo HtmlEncode($activity_edit->Indiscipline_activity->CurrentValue) ?>">
<?php } else { ?>
<span id="el_activity_Indiscipline_activity">
<div class="input-group ew-lookup-list">
	<div class="form-control ew-lookup-text" tabindex="-1" id="lu_x_Indiscipline_activity"><?php echo EmptyValue(strval($activity_edit->Indiscipline_activity->ViewValue)) ? $Language->phrase("PleaseSelect") : $activity_edit->Indiscipline_activity->ViewValue ?></div>
	<div class="input-group-append">
		<button type="button" title="<?php echo HtmlEncode(str_replace("%s", RemoveHtml($activity_edit->Indiscipline_activity->caption()), $Language->phrase("LookupLink", TRUE))) ?>" class="ew-lookup-btn btn btn-default"<?php echo ($activity_edit->Indiscipline_activity->ReadOnly || $activity_edit->Indiscipline_activity->Disabled) ? " disabled" : "" ?> onclick="ew.modalLookupShow({lnk:this,el:'x_Indiscipline_activity[]',m:1,n:10});"><i class="fas fa-search ew-icon"></i></button>
	</div>
</div>
<?php echo $activity_edit->Indiscipline_activity->Lookup->getParamTag($activity_edit, "p_x_Indiscipline_activity") ?>
<input type="hidden" data-table="activity" data-field="x_Indiscipline_activity" data-multiple="1" data-lookup="1" data-value-separator="<?php echo $activity_edit->Indiscipline_activity->displayValueSeparatorAttribute() ?>" name="x_Indiscipline_activity[]" id="x_Indiscipline_activity[]" value="<?php echo $activity_edit->Indiscipline_activity->CurrentValue ?>"<?php echo $activity_edit->Indiscipline_activity->editAttributes() ?>>
</span>
<?php } ?>
<?php echo $activity_edit->Indiscipline_activity->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($activity_edit->Involvement->Visible) { // Involvement ?>
	<div id="r_Involvement" class="form-group row">
		<label id="elh_activity_Involvement" for="x_Involvement" class="<?php echo $activity_edit->LeftColumnClass ?>"><?php echo $activity_edit->Involvement->caption() ?><?php echo $activity_edit->Involvement->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $activity_edit->RightColumnClass ?>"><div <?php echo $activity_edit->Involvement->cellAttributes() ?>>
<span id="el_activity_Involvement">
<div class="input-group">
	<select class="custom-select ew-custom-select" data-table="activity" data-field="x_Involvement" data-value-separator="<?php echo $activity_edit->Involvement->displayValueSeparatorAttribute() ?>" id="x_Involvement" name="x_Involvement"<?php echo $activity_edit->Involvement->editAttributes() ?>>
			<?php echo $activity_edit->Involvement->selectOptionListHtml("x_Involvement") ?>
		</select>
</div>
<?php echo $activity_edit->Involvement->Lookup->getParamTag($activity_edit, "p_x_Involvement") ?>
</span>
<?php echo $activity_edit->Involvement->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($activity_edit->Remarks->Visible) { // Remarks ?>
	<div id="r_Remarks" class="form-group row">
		<label id="elh_activity_Remarks" for="x_Remarks" class="<?php echo $activity_edit->LeftColumnClass ?>"><?php echo $activity_edit->Remarks->caption() ?><?php echo $activity_edit->Remarks->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $activity_edit->RightColumnClass ?>"><div <?php echo $activity_edit->Remarks->cellAttributes() ?>>
<span id="el_activity_Remarks">
<input type="text" data-table="activity" data-field="x_Remarks" name="x_Remarks" id="x_Remarks" size="30" placeholder="<?php echo HtmlEncode($activity_edit->Remarks->getPlaceHolder()) ?>" value="<?php echo $activity_edit->Remarks->EditValue ?>"<?php echo $activity_edit->Remarks->editAttributes() ?>>
</span>
<?php echo $activity_edit->Remarks->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($activity_edit->Others->Visible) { // Others ?>
	<div id="r_Others" class="form-group row">
		<label id="elh_activity_Others" for="x_Others" class="<?php echo $activity_edit->LeftColumnClass ?>"><?php echo $activity_edit->Others->caption() ?><?php echo $activity_edit->Others->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $activity_edit->RightColumnClass ?>"><div <?php echo $activity_edit->Others->cellAttributes() ?>>
<span id="el_activity_Others">
<input type="text" data-table="activity" data-field="x_Others" name="x_Others" id="x_Others" size="30" maxlength="120" placeholder="<?php echo HtmlEncode($activity_edit->Others->getPlaceHolder()) ?>" value="<?php echo $activity_edit->Others->EditValue ?>"<?php echo $activity_edit->Others->editAttributes() ?>>
</span>
<?php echo $activity_edit->Others->CustomMsg ?></div></div>
	</div>
<?php } ?>
</div><!-- /page* -->
<?php if (!$activity_edit->IsModal) { ?>
<div class="form-group row"><!-- buttons .form-group -->
	<div class="<?php echo $activity_edit->OffsetColumnClass ?>"><!-- buttons offset -->
<button class="btn btn-primary ew-btn" name="btn-action" id="btn-action" type="submit"><?php echo $Language->phrase("SaveBtn") ?></button>
<button class="btn btn-default ew-btn" name="btn-cancel" id="btn-cancel" type="button" data-href="<?php echo $activity_edit->getReturnUrl() ?>"><?php echo $Language->phrase("CancelBtn") ?></button>
	</div><!-- /buttons offset -->
</div><!-- /buttons .form-group -->
<?php } ?>
</form>
<?php
$activity_edit->showPageFooter();
if (Config("DEBUG"))
	echo GetDebugMessage();
?>
<script>
loadjs.ready("load", function() {

	// Startup script
	// Write your table-specific startup script here
	// console.log("page loaded");

});
</script>
<?php include_once "footer.php"; ?>
<?php
$activity_edit->terminate();
?>