<?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_add = new activity_add();

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

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

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

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

	// Form object
	currentPageID = ew.PAGE_ID = "add";
	factivityadd = currentForm = new ew.Form("factivityadd", "add");

	// Validate form
	factivityadd.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_add->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_add->HotelID->caption(), $activity_add->HotelID->RequiredErrorMessage)) ?>");
			<?php } ?>
			<?php if ($activity_add->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_add->RollNo->caption(), $activity_add->RollNo->RequiredErrorMessage)) ?>");
			<?php } ?>
			<?php if ($activity_add->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_add->Name->caption(), $activity_add->Name->RequiredErrorMessage)) ?>");
			<?php } ?>
			<?php if ($activity_add->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_add->Hostel->caption(), $activity_add->Hostel->RequiredErrorMessage)) ?>");
			<?php } ?>
			<?php if ($activity_add->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_add->Floor->caption(), $activity_add->Floor->RequiredErrorMessage)) ?>");
			<?php } ?>
			<?php if ($activity_add->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_add->Room_No->caption(), $activity_add->Room_No->RequiredErrorMessage)) ?>");
			<?php } ?>
			<?php if ($activity_add->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_add->Health_issue->caption(), $activity_add->Health_issue->RequiredErrorMessage)) ?>");
			<?php } ?>
			<?php if ($activity_add->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_add->Indiscipline_activity->caption(), $activity_add->Indiscipline_activity->RequiredErrorMessage)) ?>");
			<?php } ?>
			<?php if ($activity_add->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_add->Involvement->caption(), $activity_add->Involvement->RequiredErrorMessage)) ?>");
			<?php } ?>
			<?php if ($activity_add->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_add->Remarks->caption(), $activity_add->Remarks->RequiredErrorMessage)) ?>");
			<?php } ?>
				elm = this.getElements("x" + infix + "_Remarks");
				if (elm && !ew.checkInteger(elm.value))
					return this.onError(elm, "<?php echo JsEncode($activity_add->Remarks->errorMessage()) ?>");
			<?php if ($activity_add->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_add->Others->caption(), $activity_add->Others->RequiredErrorMessage)) ?>");
			<?php } ?>
			<?php if ($activity_add->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_add->Updatedby->caption(), $activity_add->Updatedby->RequiredErrorMessage)) ?>");
			<?php } ?>
			<?php if ($activity_add->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_add->Updated_Date->caption(), $activity_add->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
	factivityadd.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
	factivityadd.validateRequired = <?php echo Config("CLIENT_VALIDATE") ? "true" : "false" ?>;

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

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

});
</script>
<?php $activity_add->showPageHeader(); ?>
<?php
$activity_add->showMessage();
?>
<form name="factivityadd" id="factivityadd" class="<?php echo $activity_add->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="insert">
<input type="hidden" name="modal" value="<?php echo (int)$activity_add->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_add->HotelID->getSessionValue() ?>">
<input type="hidden" name="fk_RollNo" value="<?php echo $activity_add->RollNo->getSessionValue() ?>">
<input type="hidden" name="fk_Name" value="<?php echo $activity_add->Name->getSessionValue() ?>">
<input type="hidden" name="fk_Hostel" value="<?php echo $activity_add->Hostel->getSessionValue() ?>">
<input type="hidden" name="fk_Floor" value="<?php echo $activity_add->Floor->getSessionValue() ?>">
<input type="hidden" name="fk_RoomNo" value="<?php echo $activity_add->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_add->Indiscipline_activity->getSessionValue() ?>">
<?php } ?>
<div class="ew-add-div"><!-- page* -->
<?php if ($activity_add->HotelID->Visible) { // HotelID ?>
	<div id="r_HotelID" class="form-group row">
		<label id="elh_activity_HotelID" for="x_HotelID" class="<?php echo $activity_add->LeftColumnClass ?>"><?php echo $activity_add->HotelID->caption() ?><?php echo $activity_add->HotelID->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $activity_add->RightColumnClass ?>"><div <?php echo $activity_add->HotelID->cellAttributes() ?>>
<?php if ($activity_add->HotelID->getSessionValue() != "") { ?>
<span id="el_activity_HotelID">
<span<?php echo $activity_add->HotelID->viewAttributes() ?>><input type="text" readonly class="form-control-plaintext" value="<?php echo HtmlEncode(RemoveHtml($activity_add->HotelID->ViewValue)) ?>"></span>
</span>
<input type="hidden" id="x_HotelID" name="x_HotelID" value="<?php echo HtmlEncode($activity_add->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_add->HotelID->getPlaceHolder()) ?>" value="<?php echo $activity_add->HotelID->EditValue ?>"<?php echo $activity_add->HotelID->editAttributes() ?>>
</span>
<?php } ?>
<?php echo $activity_add->HotelID->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($activity_add->RollNo->Visible) { // RollNo ?>
	<div id="r_RollNo" class="form-group row">
		<label id="elh_activity_RollNo" for="x_RollNo" class="<?php echo $activity_add->LeftColumnClass ?>"><?php echo $activity_add->RollNo->caption() ?><?php echo $activity_add->RollNo->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $activity_add->RightColumnClass ?>"><div <?php echo $activity_add->RollNo->cellAttributes() ?>>
<?php if ($activity_add->RollNo->getSessionValue() != "") { ?>
<span id="el_activity_RollNo">
<span<?php echo $activity_add->RollNo->viewAttributes() ?>><input type="text" readonly class="form-control-plaintext" value="<?php echo HtmlEncode(RemoveHtml($activity_add->RollNo->ViewValue)) ?>"></span>
</span>
<input type="hidden" id="x_RollNo" name="x_RollNo" value="<?php echo HtmlEncode($activity_add->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_add->RollNo->getPlaceHolder()) ?>" value="<?php echo $activity_add->RollNo->EditValue ?>"<?php echo $activity_add->RollNo->editAttributes() ?>>
</span>
<?php } ?>
<?php echo $activity_add->RollNo->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($activity_add->Name->Visible) { // Name ?>
	<div id="r_Name" class="form-group row">
		<label id="elh_activity_Name" for="x_Name" class="<?php echo $activity_add->LeftColumnClass ?>"><?php echo $activity_add->Name->caption() ?><?php echo $activity_add->Name->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $activity_add->RightColumnClass ?>"><div <?php echo $activity_add->Name->cellAttributes() ?>>
<?php if ($activity_add->Name->getSessionValue() != "") { ?>
<span id="el_activity_Name">
<span<?php echo $activity_add->Name->viewAttributes() ?>><input type="text" readonly class="form-control-plaintext" value="<?php echo HtmlEncode(RemoveHtml($activity_add->Name->ViewValue)) ?>"></span>
</span>
<input type="hidden" id="x_Name" name="x_Name" value="<?php echo HtmlEncode($activity_add->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_add->Name->getPlaceHolder()) ?>" value="<?php echo $activity_add->Name->EditValue ?>"<?php echo $activity_add->Name->editAttributes() ?>>
</span>
<?php } ?>
<?php echo $activity_add->Name->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($activity_add->Hostel->Visible) { // Hostel ?>
	<div id="r_Hostel" class="form-group row">
		<label id="elh_activity_Hostel" for="x_Hostel" class="<?php echo $activity_add->LeftColumnClass ?>"><?php echo $activity_add->Hostel->caption() ?><?php echo $activity_add->Hostel->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $activity_add->RightColumnClass ?>"><div <?php echo $activity_add->Hostel->cellAttributes() ?>>
<?php if ($activity_add->Hostel->getSessionValue() != "") { ?>
<span id="el_activity_Hostel">
<span<?php echo $activity_add->Hostel->viewAttributes() ?>><input type="text" readonly class="form-control-plaintext" value="<?php echo HtmlEncode(RemoveHtml($activity_add->Hostel->ViewValue)) ?>"></span>
</span>
<input type="hidden" id="x_Hostel" name="x_Hostel" value="<?php echo HtmlEncode($activity_add->Hostel->CurrentValue) ?>">
<?php } else { ?>
<span id="el_activity_Hostel">
<?php $activity_add->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_add->Hostel->displayValueSeparatorAttribute() ?>" id="x_Hostel" name="x_Hostel"<?php echo $activity_add->Hostel->editAttributes() ?>>
			<?php echo $activity_add->Hostel->selectOptionListHtml("x_Hostel") ?>
		</select>
</div>
<?php echo $activity_add->Hostel->Lookup->getParamTag($activity_add, "p_x_Hostel") ?>
</span>
<?php } ?>
<?php echo $activity_add->Hostel->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($activity_add->Floor->Visible) { // Floor ?>
	<div id="r_Floor" class="form-group row">
		<label id="elh_activity_Floor" for="x_Floor" class="<?php echo $activity_add->LeftColumnClass ?>"><?php echo $activity_add->Floor->caption() ?><?php echo $activity_add->Floor->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $activity_add->RightColumnClass ?>"><div <?php echo $activity_add->Floor->cellAttributes() ?>>
<?php if ($activity_add->Floor->getSessionValue() != "") { ?>
<span id="el_activity_Floor">
<span<?php echo $activity_add->Floor->viewAttributes() ?>><input type="text" readonly class="form-control-plaintext" value="<?php echo HtmlEncode(RemoveHtml($activity_add->Floor->ViewValue)) ?>"></span>
</span>
<input type="hidden" id="x_Floor" name="x_Floor" value="<?php echo HtmlEncode($activity_add->Floor->CurrentValue) ?>">
<?php } else { ?>
<span id="el_activity_Floor">
<?php $activity_add->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_add->Floor->displayValueSeparatorAttribute() ?>" id="x_Floor" name="x_Floor"<?php echo $activity_add->Floor->editAttributes() ?>>
			<?php echo $activity_add->Floor->selectOptionListHtml("x_Floor") ?>
		</select>
</div>
<?php echo $activity_add->Floor->Lookup->getParamTag($activity_add, "p_x_Floor") ?>
</span>
<?php } ?>
<?php echo $activity_add->Floor->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($activity_add->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_add->LeftColumnClass ?>"><?php echo $activity_add->Room_No->caption() ?><?php echo $activity_add->Room_No->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $activity_add->RightColumnClass ?>"><div <?php echo $activity_add->Room_No->cellAttributes() ?>>
<?php if ($activity_add->Room_No->getSessionValue() != "") { ?>
<span id="el_activity_Room_No">
<span<?php echo $activity_add->Room_No->viewAttributes() ?>><input type="text" readonly class="form-control-plaintext" value="<?php echo HtmlEncode(RemoveHtml($activity_add->Room_No->ViewValue)) ?>"></span>
</span>
<input type="hidden" id="x_Room_No" name="x_Room_No" value="<?php echo HtmlEncode($activity_add->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_add->Room_No->displayValueSeparatorAttribute() ?>" id="x_Room_No" name="x_Room_No"<?php echo $activity_add->Room_No->editAttributes() ?>>
			<?php echo $activity_add->Room_No->selectOptionListHtml("x_Room_No") ?>
		</select>
</div>
<?php echo $activity_add->Room_No->Lookup->getParamTag($activity_add, "p_x_Room_No") ?>
</span>
<?php } ?>
<?php echo $activity_add->Room_No->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($activity_add->Health_issue->Visible) { // Health_issue ?>
	<div id="r_Health_issue" class="form-group row">
		<label id="elh_activity_Health_issue" class="<?php echo $activity_add->LeftColumnClass ?>"><?php echo $activity_add->Health_issue->caption() ?><?php echo $activity_add->Health_issue->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $activity_add->RightColumnClass ?>"><div <?php echo $activity_add->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_add->Health_issue->ViewValue)) ? $Language->phrase("PleaseSelect") : $activity_add->Health_issue->ViewValue ?></div>
	<div class="input-group-append">
		<button type="button" title="<?php echo HtmlEncode(str_replace("%s", RemoveHtml($activity_add->Health_issue->caption()), $Language->phrase("LookupLink", TRUE))) ?>" class="ew-lookup-btn btn btn-default"<?php echo ($activity_add->Health_issue->ReadOnly || $activity_add->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_add->Health_issue->Lookup->getParamTag($activity_add, "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_add->Health_issue->displayValueSeparatorAttribute() ?>" name="x_Health_issue[]" id="x_Health_issue[]" value="<?php echo $activity_add->Health_issue->CurrentValue ?>"<?php echo $activity_add->Health_issue->editAttributes() ?>>
</span>
<?php echo $activity_add->Health_issue->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($activity_add->Indiscipline_activity->Visible) { // Indiscipline_activity ?>
	<div id="r_Indiscipline_activity" class="form-group row">
		<label id="elh_activity_Indiscipline_activity" class="<?php echo $activity_add->LeftColumnClass ?>"><?php echo $activity_add->Indiscipline_activity->caption() ?><?php echo $activity_add->Indiscipline_activity->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $activity_add->RightColumnClass ?>"><div <?php echo $activity_add->Indiscipline_activity->cellAttributes() ?>>
<?php if ($activity_add->Indiscipline_activity->getSessionValue() != "") { ?>
<span id="el_activity_Indiscipline_activity">
<span<?php echo $activity_add->Indiscipline_activity->viewAttributes() ?>><input type="text" readonly class="form-control-plaintext" value="<?php echo HtmlEncode(RemoveHtml($activity_add->Indiscipline_activity->ViewValue)) ?>"></span>
</span>
<input type="hidden" id="x_Indiscipline_activity" name="x_Indiscipline_activity" value="<?php echo HtmlEncode($activity_add->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_add->Indiscipline_activity->ViewValue)) ? $Language->phrase("PleaseSelect") : $activity_add->Indiscipline_activity->ViewValue ?></div>
	<div class="input-group-append">
		<button type="button" title="<?php echo HtmlEncode(str_replace("%s", RemoveHtml($activity_add->Indiscipline_activity->caption()), $Language->phrase("LookupLink", TRUE))) ?>" class="ew-lookup-btn btn btn-default"<?php echo ($activity_add->Indiscipline_activity->ReadOnly || $activity_add->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_add->Indiscipline_activity->Lookup->getParamTag($activity_add, "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_add->Indiscipline_activity->displayValueSeparatorAttribute() ?>" name="x_Indiscipline_activity[]" id="x_Indiscipline_activity[]" value="<?php echo $activity_add->Indiscipline_activity->CurrentValue ?>"<?php echo $activity_add->Indiscipline_activity->editAttributes() ?>>
</span>
<?php } ?>
<?php echo $activity_add->Indiscipline_activity->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($activity_add->Involvement->Visible) { // Involvement ?>
	<div id="r_Involvement" class="form-group row">
		<label id="elh_activity_Involvement" for="x_Involvement" class="<?php echo $activity_add->LeftColumnClass ?>"><?php echo $activity_add->Involvement->caption() ?><?php echo $activity_add->Involvement->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $activity_add->RightColumnClass ?>"><div <?php echo $activity_add->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_add->Involvement->displayValueSeparatorAttribute() ?>" id="x_Involvement" name="x_Involvement"<?php echo $activity_add->Involvement->editAttributes() ?>>
			<?php echo $activity_add->Involvement->selectOptionListHtml("x_Involvement") ?>
		</select>
</div>
<?php echo $activity_add->Involvement->Lookup->getParamTag($activity_add, "p_x_Involvement") ?>
</span>
<?php echo $activity_add->Involvement->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($activity_add->Remarks->Visible) { // Remarks ?>
	<div id="r_Remarks" class="form-group row">
		<label id="elh_activity_Remarks" for="x_Remarks" class="<?php echo $activity_add->LeftColumnClass ?>"><?php echo $activity_add->Remarks->caption() ?><?php echo $activity_add->Remarks->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $activity_add->RightColumnClass ?>"><div <?php echo $activity_add->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_add->Remarks->getPlaceHolder()) ?>" value="<?php echo $activity_add->Remarks->EditValue ?>"<?php echo $activity_add->Remarks->editAttributes() ?>>
</span>
<?php echo $activity_add->Remarks->CustomMsg ?></div></div>
	</div>
<?php } ?>
<?php if ($activity_add->Others->Visible) { // Others ?>
	<div id="r_Others" class="form-group row">
		<label id="elh_activity_Others" for="x_Others" class="<?php echo $activity_add->LeftColumnClass ?>"><?php echo $activity_add->Others->caption() ?><?php echo $activity_add->Others->Required ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $activity_add->RightColumnClass ?>"><div <?php echo $activity_add->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_add->Others->getPlaceHolder()) ?>" value="<?php echo $activity_add->Others->EditValue ?>"<?php echo $activity_add->Others->editAttributes() ?>>
</span>
<?php echo $activity_add->Others->CustomMsg ?></div></div>
	</div>
<?php } ?>
</div><!-- /page* -->
<?php if (!$activity_add->IsModal) { ?>
<div class="form-group row"><!-- buttons .form-group -->
	<div class="<?php echo $activity_add->OffsetColumnClass ?>"><!-- buttons offset -->
<button class="btn btn-primary ew-btn" name="btn-action" id="btn-action" type="submit"><?php echo $Language->phrase("AddBtn") ?></button>
<button class="btn btn-default ew-btn" name="btn-cancel" id="btn-cancel" type="button" data-href="<?php echo $activity_add->getReturnUrl() ?>"><?php echo $Language->phrase("CancelBtn") ?></button>
	</div><!-- /buttons offset -->
</div><!-- /buttons .form-group -->
<?php } ?>
</form>
<?php
$activity_add->showPageFooter();
if (Config("DEBUG"))
	echo GetDebugMessage();
?>
<script>
loadjs.ready("load", function() {

	// Startup script
	$("#x_RollNo").change(function(){var l={action:"lookup",linkTable:"hostelite",linkField:"RollNo",displayFields:["Name"],lookupValue:encodeURIComponent($(this).val())},e=ew.ajax(l);e&&e.Name&&$("#x_Name").val(e.Name)});
});
</script>
<?php include_once "footer.php"; ?>
<?php
$activity_add->terminate();
?>