<?php
namespace PHPMaker2019\project_germanos;

// 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
$employeesaccess_add = new employeesaccess_add();

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

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

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

// Page Rendering event
$employeesaccess_add->Page_Render();
?>
<?php include_once "header.php" ?>
<script>

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

// Validate form
femployeesaccessadd.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 ($employeesaccess_add->Username->Required) { ?>
			elm = this.getElements("x" + infix + "_Username");
			if (elm && !ew.isHidden(elm) && !ew.hasValue(elm))
				return this.onError(elm, "<?php echo JsEncode(str_replace("%s", $employeesaccess->Username->caption(), $employeesaccess->Username->RequiredErrorMessage)) ?>");
		<?php } ?>
		<?php if ($employeesaccess_add->Password->Required) { ?>
			elm = this.getElements("x" + infix + "_Password");
			if (elm && !ew.isHidden(elm) && !ew.hasValue(elm))
				return this.onError(elm, "<?php echo JsEncode(str_replace("%s", $employeesaccess->Password->caption(), $employeesaccess->Password->RequiredErrorMessage)) ?>");
		<?php } ?>
		<?php if ($employeesaccess_add->EmployeeTypeID->Required) { ?>
			elm = this.getElements("x" + infix + "_EmployeeTypeID");
			if (elm && !ew.isHidden(elm) && !ew.hasValue(elm))
				return this.onError(elm, "<?php echo JsEncode(str_replace("%s", $employeesaccess->EmployeeTypeID->caption(), $employeesaccess->EmployeeTypeID->RequiredErrorMessage)) ?>");
		<?php } ?>
		<?php if ($employeesaccess_add->TitleID->Required) { ?>
			elm = this.getElements("x" + infix + "_TitleID");
			if (elm && !ew.isHidden(elm) && !ew.hasValue(elm))
				return this.onError(elm, "<?php echo JsEncode(str_replace("%s", $employeesaccess->TitleID->caption(), $employeesaccess->TitleID->RequiredErrorMessage)) ?>");
		<?php } ?>
		<?php if ($employeesaccess_add->FirstName->Required) { ?>
			elm = this.getElements("x" + infix + "_FirstName");
			if (elm && !ew.isHidden(elm) && !ew.hasValue(elm))
				return this.onError(elm, "<?php echo JsEncode(str_replace("%s", $employeesaccess->FirstName->caption(), $employeesaccess->FirstName->RequiredErrorMessage)) ?>");
		<?php } ?>
		<?php if ($employeesaccess_add->MiddleName->Required) { ?>
			elm = this.getElements("x" + infix + "_MiddleName");
			if (elm && !ew.isHidden(elm) && !ew.hasValue(elm))
				return this.onError(elm, "<?php echo JsEncode(str_replace("%s", $employeesaccess->MiddleName->caption(), $employeesaccess->MiddleName->RequiredErrorMessage)) ?>");
		<?php } ?>
		<?php if ($employeesaccess_add->LastName->Required) { ?>
			elm = this.getElements("x" + infix + "_LastName");
			if (elm && !ew.isHidden(elm) && !ew.hasValue(elm))
				return this.onError(elm, "<?php echo JsEncode(str_replace("%s", $employeesaccess->LastName->caption(), $employeesaccess->LastName->RequiredErrorMessage)) ?>");
		<?php } ?>
		<?php if ($employeesaccess_add->_Email->Required) { ?>
			elm = this.getElements("x" + infix + "__Email");
			if (elm && !ew.isHidden(elm) && !ew.hasValue(elm))
				return this.onError(elm, "<?php echo JsEncode(str_replace("%s", $employeesaccess->_Email->caption(), $employeesaccess->_Email->RequiredErrorMessage)) ?>");
		<?php } ?>
		<?php if ($employeesaccess_add->ReportsTo->Required) { ?>
			elm = this.getElements("x" + infix + "_ReportsTo");
			if (elm && !ew.isHidden(elm) && !ew.hasValue(elm))
				return this.onError(elm, "<?php echo JsEncode(str_replace("%s", $employeesaccess->ReportsTo->caption(), $employeesaccess->ReportsTo->RequiredErrorMessage)) ?>");
		<?php } ?>
		<?php if ($employeesaccess_add->UserLevel->Required) { ?>
			elm = this.getElements("x" + infix + "_UserLevel");
			if (elm && !ew.isHidden(elm) && !ew.hasValue(elm))
				return this.onError(elm, "<?php echo JsEncode(str_replace("%s", $employeesaccess->UserLevel->caption(), $employeesaccess->UserLevel->RequiredErrorMessage)) ?>");
		<?php } ?>
		<?php if ($employeesaccess_add->Type->Required) { ?>
			elm = this.getElements("x" + infix + "_Type");
			if (elm && !ew.isHidden(elm) && !ew.hasValue(elm))
				return this.onError(elm, "<?php echo JsEncode(str_replace("%s", $employeesaccess->Type->caption(), $employeesaccess->Type->RequiredErrorMessage)) ?>");
		<?php } ?>
		<?php if ($employeesaccess_add->Locked->Required) { ?>
			elm = this.getElements("x" + infix + "_Locked[]");
			if (elm && !ew.isHidden(elm) && !ew.hasValue(elm))
				return this.onError(elm, "<?php echo JsEncode(str_replace("%s", $employeesaccess->Locked->caption(), $employeesaccess->Locked->RequiredErrorMessage)) ?>");
		<?php } ?>
		<?php if ($employeesaccess_add->Profile->Required) { ?>
			elm = this.getElements("x" + infix + "_Profile");
			if (elm && !ew.isHidden(elm) && !ew.hasValue(elm))
				return this.onError(elm, "<?php echo JsEncode(str_replace("%s", $employeesaccess->Profile->caption(), $employeesaccess->Profile->RequiredErrorMessage)) ?>");
		<?php } ?>

			// Fire 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 event
femployeesaccessadd.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
femployeesaccessadd.validateRequired = <?php echo json_encode(CLIENT_VALIDATE) ?>;

// Dynamic selection lists
femployeesaccessadd.lists["x_EmployeeTypeID"] = <?php echo $employeesaccess_add->EmployeeTypeID->Lookup->toClientList() ?>;
femployeesaccessadd.lists["x_EmployeeTypeID"].options = <?php echo JsonEncode($employeesaccess_add->EmployeeTypeID->lookupOptions()) ?>;
femployeesaccessadd.lists["x_TitleID"] = <?php echo $employeesaccess_add->TitleID->Lookup->toClientList() ?>;
femployeesaccessadd.lists["x_TitleID"].options = <?php echo JsonEncode($employeesaccess_add->TitleID->lookupOptions()) ?>;
femployeesaccessadd.lists["x_ReportsTo"] = <?php echo $employeesaccess_add->ReportsTo->Lookup->toClientList() ?>;
femployeesaccessadd.lists["x_ReportsTo"].options = <?php echo JsonEncode($employeesaccess_add->ReportsTo->lookupOptions()) ?>;
femployeesaccessadd.lists["x_UserLevel"] = <?php echo $employeesaccess_add->UserLevel->Lookup->toClientList() ?>;
femployeesaccessadd.lists["x_UserLevel"].options = <?php echo JsonEncode($employeesaccess_add->UserLevel->lookupOptions()) ?>;
femployeesaccessadd.lists["x_Type"] = <?php echo $employeesaccess_add->Type->Lookup->toClientList() ?>;
femployeesaccessadd.lists["x_Type"].options = <?php echo JsonEncode($employeesaccess_add->Type->options(FALSE, TRUE)) ?>;
femployeesaccessadd.lists["x_Locked[]"] = <?php echo $employeesaccess_add->Locked->Lookup->toClientList() ?>;
femployeesaccessadd.lists["x_Locked[]"].options = <?php echo JsonEncode($employeesaccess_add->Locked->options(FALSE, TRUE)) ?>;

// Form object for search
</script>
<script>

// Write your client script here, no need to add script tags.
</script>
<?php $employeesaccess_add->showPageHeader(); ?>
<?php
$employeesaccess_add->showMessage();
?>
<form name="femployeesaccessadd" id="femployeesaccessadd" class="<?php echo $employeesaccess_add->FormClassName ?>" action="<?php echo CurrentPageName() ?>" method="post">
<?php if ($employeesaccess_add->CheckToken) { ?>
<input type="hidden" name="<?php echo TOKEN_NAME ?>" value="<?php echo $employeesaccess_add->Token ?>">
<?php } ?>
<input type="hidden" name="t" value="employeesaccess">
<input type="hidden" name="action" id="action" value="insert">
<input type="hidden" name="modal" value="<?php echo (int)$employeesaccess_add->IsModal ?>">
<?php if (!$employeesaccess_add->IsMobileOrModal) { ?>
<div class="ew-desktop"><!-- desktop -->
<?php } ?>
<?php if ($employeesaccess_add->IsMobileOrModal) { ?>
<div class="ew-add-div"><!-- page* -->
<?php } else { ?>
<table id="tbl_employeesaccessadd" class="table table-striped table-sm ew-desktop-table"><!-- table* -->
<?php } ?>
<?php if ($employeesaccess->Username->Visible) { // Username ?>
<?php if ($employeesaccess_add->IsMobileOrModal) { ?>
	<div id="r_Username" class="form-group row">
		<label id="elh_employeesaccess_Username" for="x_Username" class="<?php echo $employeesaccess_add->LeftColumnClass ?>"><?php echo $employeesaccess->Username->caption() ?><?php echo ($employeesaccess->Username->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $employeesaccess_add->RightColumnClass ?>"><div<?php echo $employeesaccess->Username->cellAttributes() ?>>
<span id="el_employeesaccess_Username">
<input type="text" data-table="employeesaccess" data-field="x_Username" name="x_Username" id="x_Username" size="30" maxlength="20" placeholder="<?php echo HtmlEncode($employeesaccess->Username->getPlaceHolder()) ?>" value="<?php echo $employeesaccess->Username->EditValue ?>"<?php echo $employeesaccess->Username->editAttributes() ?>>
</span>
<?php echo $employeesaccess->Username->CustomMsg ?></div></div>
	</div>
<?php } else { ?>
	<tr id="r_Username">
		<td class="<?php echo $employeesaccess_add->TableLeftColumnClass ?>"><span id="elh_employeesaccess_Username"><?php echo $employeesaccess->Username->caption() ?><?php echo ($employeesaccess->Username->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></span></td>
		<td<?php echo $employeesaccess->Username->cellAttributes() ?>>
<span id="el_employeesaccess_Username">
<input type="text" data-table="employeesaccess" data-field="x_Username" name="x_Username" id="x_Username" size="30" maxlength="20" placeholder="<?php echo HtmlEncode($employeesaccess->Username->getPlaceHolder()) ?>" value="<?php echo $employeesaccess->Username->EditValue ?>"<?php echo $employeesaccess->Username->editAttributes() ?>>
</span>
<?php echo $employeesaccess->Username->CustomMsg ?></td>
	</tr>
<?php } ?>
<?php } ?>
<?php if ($employeesaccess->Password->Visible) { // Password ?>
<?php if ($employeesaccess_add->IsMobileOrModal) { ?>
	<div id="r_Password" class="form-group row">
		<label id="elh_employeesaccess_Password" for="x_Password" class="<?php echo $employeesaccess_add->LeftColumnClass ?>"><?php echo $employeesaccess->Password->caption() ?><?php echo ($employeesaccess->Password->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $employeesaccess_add->RightColumnClass ?>"><div<?php echo $employeesaccess->Password->cellAttributes() ?>>
<span id="el_employeesaccess_Password">
<input type="password" data-field="x_Password" name="x_Password" id="x_Password" size="30" maxlength="50" placeholder="<?php echo HtmlEncode($employeesaccess->Password->getPlaceHolder()) ?>"<?php echo $employeesaccess->Password->editAttributes() ?>>
</span>
<?php echo $employeesaccess->Password->CustomMsg ?></div></div>
	</div>
<?php } else { ?>
	<tr id="r_Password">
		<td class="<?php echo $employeesaccess_add->TableLeftColumnClass ?>"><span id="elh_employeesaccess_Password"><?php echo $employeesaccess->Password->caption() ?><?php echo ($employeesaccess->Password->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></span></td>
		<td<?php echo $employeesaccess->Password->cellAttributes() ?>>
<span id="el_employeesaccess_Password">
<input type="password" data-field="x_Password" name="x_Password" id="x_Password" size="30" maxlength="50" placeholder="<?php echo HtmlEncode($employeesaccess->Password->getPlaceHolder()) ?>"<?php echo $employeesaccess->Password->editAttributes() ?>>
</span>
<?php echo $employeesaccess->Password->CustomMsg ?></td>
	</tr>
<?php } ?>
<?php } ?>
<?php if ($employeesaccess->EmployeeTypeID->Visible) { // EmployeeTypeID ?>
<?php if ($employeesaccess_add->IsMobileOrModal) { ?>
	<div id="r_EmployeeTypeID" class="form-group row">
		<label id="elh_employeesaccess_EmployeeTypeID" for="x_EmployeeTypeID" class="<?php echo $employeesaccess_add->LeftColumnClass ?>"><?php echo $employeesaccess->EmployeeTypeID->caption() ?><?php echo ($employeesaccess->EmployeeTypeID->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $employeesaccess_add->RightColumnClass ?>"><div<?php echo $employeesaccess->EmployeeTypeID->cellAttributes() ?>>
<span id="el_employeesaccess_EmployeeTypeID">
<div class="input-group">
	<select class="custom-select ew-custom-select" data-table="employeesaccess" data-field="x_EmployeeTypeID" data-value-separator="<?php echo $employeesaccess->EmployeeTypeID->displayValueSeparatorAttribute() ?>" id="x_EmployeeTypeID" name="x_EmployeeTypeID"<?php echo $employeesaccess->EmployeeTypeID->editAttributes() ?>>
		<?php echo $employeesaccess->EmployeeTypeID->selectOptionListHtml("x_EmployeeTypeID") ?>
	</select>
</div>
<?php echo $employeesaccess->EmployeeTypeID->Lookup->getParamTag("p_x_EmployeeTypeID") ?>
</span>
<?php echo $employeesaccess->EmployeeTypeID->CustomMsg ?></div></div>
	</div>
<?php } else { ?>
	<tr id="r_EmployeeTypeID">
		<td class="<?php echo $employeesaccess_add->TableLeftColumnClass ?>"><span id="elh_employeesaccess_EmployeeTypeID"><?php echo $employeesaccess->EmployeeTypeID->caption() ?><?php echo ($employeesaccess->EmployeeTypeID->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></span></td>
		<td<?php echo $employeesaccess->EmployeeTypeID->cellAttributes() ?>>
<span id="el_employeesaccess_EmployeeTypeID">
<div class="input-group">
	<select class="custom-select ew-custom-select" data-table="employeesaccess" data-field="x_EmployeeTypeID" data-value-separator="<?php echo $employeesaccess->EmployeeTypeID->displayValueSeparatorAttribute() ?>" id="x_EmployeeTypeID" name="x_EmployeeTypeID"<?php echo $employeesaccess->EmployeeTypeID->editAttributes() ?>>
		<?php echo $employeesaccess->EmployeeTypeID->selectOptionListHtml("x_EmployeeTypeID") ?>
	</select>
</div>
<?php echo $employeesaccess->EmployeeTypeID->Lookup->getParamTag("p_x_EmployeeTypeID") ?>
</span>
<?php echo $employeesaccess->EmployeeTypeID->CustomMsg ?></td>
	</tr>
<?php } ?>
<?php } ?>
<?php if ($employeesaccess->TitleID->Visible) { // TitleID ?>
<?php if ($employeesaccess_add->IsMobileOrModal) { ?>
	<div id="r_TitleID" class="form-group row">
		<label id="elh_employeesaccess_TitleID" for="x_TitleID" class="<?php echo $employeesaccess_add->LeftColumnClass ?>"><?php echo $employeesaccess->TitleID->caption() ?><?php echo ($employeesaccess->TitleID->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $employeesaccess_add->RightColumnClass ?>"><div<?php echo $employeesaccess->TitleID->cellAttributes() ?>>
<span id="el_employeesaccess_TitleID">
<div class="input-group">
	<select class="custom-select ew-custom-select" data-table="employeesaccess" data-field="x_TitleID" data-value-separator="<?php echo $employeesaccess->TitleID->displayValueSeparatorAttribute() ?>" id="x_TitleID" name="x_TitleID"<?php echo $employeesaccess->TitleID->editAttributes() ?>>
		<?php echo $employeesaccess->TitleID->selectOptionListHtml("x_TitleID") ?>
	</select>
<?php if (AllowAdd(CurrentProjectID() . "titles") && !$employeesaccess->TitleID->ReadOnly) { ?>
<div class="input-group-append"><button type="button" class="btn btn-default ew-add-opt-btn" id="aol_x_TitleID" title="<?php echo HtmlTitle($Language->phrase("AddLink")) . "&nbsp;" . $employeesaccess->TitleID->caption() ?>" data-title="<?php echo $employeesaccess->TitleID->caption() ?>" onclick="ew.addOptionDialogShow({lnk:this,el:'x_TitleID',url:'titlesaddopt.php'});"><i class="fa fa-plus ew-icon"></i></button></div>
<?php } ?>
</div>
<?php echo $employeesaccess->TitleID->Lookup->getParamTag("p_x_TitleID") ?>
</span>
<?php echo $employeesaccess->TitleID->CustomMsg ?></div></div>
	</div>
<?php } else { ?>
	<tr id="r_TitleID">
		<td class="<?php echo $employeesaccess_add->TableLeftColumnClass ?>"><span id="elh_employeesaccess_TitleID"><?php echo $employeesaccess->TitleID->caption() ?><?php echo ($employeesaccess->TitleID->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></span></td>
		<td<?php echo $employeesaccess->TitleID->cellAttributes() ?>>
<span id="el_employeesaccess_TitleID">
<div class="input-group">
	<select class="custom-select ew-custom-select" data-table="employeesaccess" data-field="x_TitleID" data-value-separator="<?php echo $employeesaccess->TitleID->displayValueSeparatorAttribute() ?>" id="x_TitleID" name="x_TitleID"<?php echo $employeesaccess->TitleID->editAttributes() ?>>
		<?php echo $employeesaccess->TitleID->selectOptionListHtml("x_TitleID") ?>
	</select>
<?php if (AllowAdd(CurrentProjectID() . "titles") && !$employeesaccess->TitleID->ReadOnly) { ?>
<div class="input-group-append"><button type="button" class="btn btn-default ew-add-opt-btn" id="aol_x_TitleID" title="<?php echo HtmlTitle($Language->phrase("AddLink")) . "&nbsp;" . $employeesaccess->TitleID->caption() ?>" data-title="<?php echo $employeesaccess->TitleID->caption() ?>" onclick="ew.addOptionDialogShow({lnk:this,el:'x_TitleID',url:'titlesaddopt.php'});"><i class="fa fa-plus ew-icon"></i></button></div>
<?php } ?>
</div>
<?php echo $employeesaccess->TitleID->Lookup->getParamTag("p_x_TitleID") ?>
</span>
<?php echo $employeesaccess->TitleID->CustomMsg ?></td>
	</tr>
<?php } ?>
<?php } ?>
<?php if ($employeesaccess->FirstName->Visible) { // FirstName ?>
<?php if ($employeesaccess_add->IsMobileOrModal) { ?>
	<div id="r_FirstName" class="form-group row">
		<label id="elh_employeesaccess_FirstName" for="x_FirstName" class="<?php echo $employeesaccess_add->LeftColumnClass ?>"><?php echo $employeesaccess->FirstName->caption() ?><?php echo ($employeesaccess->FirstName->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $employeesaccess_add->RightColumnClass ?>"><div<?php echo $employeesaccess->FirstName->cellAttributes() ?>>
<span id="el_employeesaccess_FirstName">
<input type="text" data-table="employeesaccess" data-field="x_FirstName" name="x_FirstName" id="x_FirstName" size="30" maxlength="20" placeholder="<?php echo HtmlEncode($employeesaccess->FirstName->getPlaceHolder()) ?>" value="<?php echo $employeesaccess->FirstName->EditValue ?>"<?php echo $employeesaccess->FirstName->editAttributes() ?>>
</span>
<?php echo $employeesaccess->FirstName->CustomMsg ?></div></div>
	</div>
<?php } else { ?>
	<tr id="r_FirstName">
		<td class="<?php echo $employeesaccess_add->TableLeftColumnClass ?>"><span id="elh_employeesaccess_FirstName"><?php echo $employeesaccess->FirstName->caption() ?><?php echo ($employeesaccess->FirstName->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></span></td>
		<td<?php echo $employeesaccess->FirstName->cellAttributes() ?>>
<span id="el_employeesaccess_FirstName">
<input type="text" data-table="employeesaccess" data-field="x_FirstName" name="x_FirstName" id="x_FirstName" size="30" maxlength="20" placeholder="<?php echo HtmlEncode($employeesaccess->FirstName->getPlaceHolder()) ?>" value="<?php echo $employeesaccess->FirstName->EditValue ?>"<?php echo $employeesaccess->FirstName->editAttributes() ?>>
</span>
<?php echo $employeesaccess->FirstName->CustomMsg ?></td>
	</tr>
<?php } ?>
<?php } ?>
<?php if ($employeesaccess->MiddleName->Visible) { // MiddleName ?>
<?php if ($employeesaccess_add->IsMobileOrModal) { ?>
	<div id="r_MiddleName" class="form-group row">
		<label id="elh_employeesaccess_MiddleName" for="x_MiddleName" class="<?php echo $employeesaccess_add->LeftColumnClass ?>"><?php echo $employeesaccess->MiddleName->caption() ?><?php echo ($employeesaccess->MiddleName->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $employeesaccess_add->RightColumnClass ?>"><div<?php echo $employeesaccess->MiddleName->cellAttributes() ?>>
<span id="el_employeesaccess_MiddleName">
<input type="text" data-table="employeesaccess" data-field="x_MiddleName" name="x_MiddleName" id="x_MiddleName" size="30" maxlength="20" placeholder="<?php echo HtmlEncode($employeesaccess->MiddleName->getPlaceHolder()) ?>" value="<?php echo $employeesaccess->MiddleName->EditValue ?>"<?php echo $employeesaccess->MiddleName->editAttributes() ?>>
</span>
<?php echo $employeesaccess->MiddleName->CustomMsg ?></div></div>
	</div>
<?php } else { ?>
	<tr id="r_MiddleName">
		<td class="<?php echo $employeesaccess_add->TableLeftColumnClass ?>"><span id="elh_employeesaccess_MiddleName"><?php echo $employeesaccess->MiddleName->caption() ?><?php echo ($employeesaccess->MiddleName->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></span></td>
		<td<?php echo $employeesaccess->MiddleName->cellAttributes() ?>>
<span id="el_employeesaccess_MiddleName">
<input type="text" data-table="employeesaccess" data-field="x_MiddleName" name="x_MiddleName" id="x_MiddleName" size="30" maxlength="20" placeholder="<?php echo HtmlEncode($employeesaccess->MiddleName->getPlaceHolder()) ?>" value="<?php echo $employeesaccess->MiddleName->EditValue ?>"<?php echo $employeesaccess->MiddleName->editAttributes() ?>>
</span>
<?php echo $employeesaccess->MiddleName->CustomMsg ?></td>
	</tr>
<?php } ?>
<?php } ?>
<?php if ($employeesaccess->LastName->Visible) { // LastName ?>
<?php if ($employeesaccess_add->IsMobileOrModal) { ?>
	<div id="r_LastName" class="form-group row">
		<label id="elh_employeesaccess_LastName" for="x_LastName" class="<?php echo $employeesaccess_add->LeftColumnClass ?>"><?php echo $employeesaccess->LastName->caption() ?><?php echo ($employeesaccess->LastName->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $employeesaccess_add->RightColumnClass ?>"><div<?php echo $employeesaccess->LastName->cellAttributes() ?>>
<span id="el_employeesaccess_LastName">
<input type="text" data-table="employeesaccess" data-field="x_LastName" name="x_LastName" id="x_LastName" size="30" maxlength="20" placeholder="<?php echo HtmlEncode($employeesaccess->LastName->getPlaceHolder()) ?>" value="<?php echo $employeesaccess->LastName->EditValue ?>"<?php echo $employeesaccess->LastName->editAttributes() ?>>
</span>
<?php echo $employeesaccess->LastName->CustomMsg ?></div></div>
	</div>
<?php } else { ?>
	<tr id="r_LastName">
		<td class="<?php echo $employeesaccess_add->TableLeftColumnClass ?>"><span id="elh_employeesaccess_LastName"><?php echo $employeesaccess->LastName->caption() ?><?php echo ($employeesaccess->LastName->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></span></td>
		<td<?php echo $employeesaccess->LastName->cellAttributes() ?>>
<span id="el_employeesaccess_LastName">
<input type="text" data-table="employeesaccess" data-field="x_LastName" name="x_LastName" id="x_LastName" size="30" maxlength="20" placeholder="<?php echo HtmlEncode($employeesaccess->LastName->getPlaceHolder()) ?>" value="<?php echo $employeesaccess->LastName->EditValue ?>"<?php echo $employeesaccess->LastName->editAttributes() ?>>
</span>
<?php echo $employeesaccess->LastName->CustomMsg ?></td>
	</tr>
<?php } ?>
<?php } ?>
<?php if ($employeesaccess->_Email->Visible) { // Email ?>
<?php if ($employeesaccess_add->IsMobileOrModal) { ?>
	<div id="r__Email" class="form-group row">
		<label id="elh_employeesaccess__Email" for="x__Email" class="<?php echo $employeesaccess_add->LeftColumnClass ?>"><?php echo $employeesaccess->_Email->caption() ?><?php echo ($employeesaccess->_Email->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $employeesaccess_add->RightColumnClass ?>"><div<?php echo $employeesaccess->_Email->cellAttributes() ?>>
<span id="el_employeesaccess__Email">
<input type="text" data-table="employeesaccess" data-field="x__Email" name="x__Email" id="x__Email" size="30" maxlength="30" placeholder="<?php echo HtmlEncode($employeesaccess->_Email->getPlaceHolder()) ?>" value="<?php echo $employeesaccess->_Email->EditValue ?>"<?php echo $employeesaccess->_Email->editAttributes() ?>>
</span>
<?php echo $employeesaccess->_Email->CustomMsg ?></div></div>
	</div>
<?php } else { ?>
	<tr id="r__Email">
		<td class="<?php echo $employeesaccess_add->TableLeftColumnClass ?>"><span id="elh_employeesaccess__Email"><?php echo $employeesaccess->_Email->caption() ?><?php echo ($employeesaccess->_Email->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></span></td>
		<td<?php echo $employeesaccess->_Email->cellAttributes() ?>>
<span id="el_employeesaccess__Email">
<input type="text" data-table="employeesaccess" data-field="x__Email" name="x__Email" id="x__Email" size="30" maxlength="30" placeholder="<?php echo HtmlEncode($employeesaccess->_Email->getPlaceHolder()) ?>" value="<?php echo $employeesaccess->_Email->EditValue ?>"<?php echo $employeesaccess->_Email->editAttributes() ?>>
</span>
<?php echo $employeesaccess->_Email->CustomMsg ?></td>
	</tr>
<?php } ?>
<?php } ?>
<?php if ($employeesaccess->ReportsTo->Visible) { // ReportsTo ?>
<?php if ($employeesaccess_add->IsMobileOrModal) { ?>
	<div id="r_ReportsTo" class="form-group row">
		<label id="elh_employeesaccess_ReportsTo" for="x_ReportsTo" class="<?php echo $employeesaccess_add->LeftColumnClass ?>"><?php echo $employeesaccess->ReportsTo->caption() ?><?php echo ($employeesaccess->ReportsTo->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $employeesaccess_add->RightColumnClass ?>"><div<?php echo $employeesaccess->ReportsTo->cellAttributes() ?>>
<span id="el_employeesaccess_ReportsTo">
<div class="input-group">
	<select class="custom-select ew-custom-select" data-table="employeesaccess" data-field="x_ReportsTo" data-value-separator="<?php echo $employeesaccess->ReportsTo->displayValueSeparatorAttribute() ?>" id="x_ReportsTo" name="x_ReportsTo"<?php echo $employeesaccess->ReportsTo->editAttributes() ?>>
		<?php echo $employeesaccess->ReportsTo->selectOptionListHtml("x_ReportsTo") ?>
	</select>
</div>
<?php echo $employeesaccess->ReportsTo->Lookup->getParamTag("p_x_ReportsTo") ?>
</span>
<?php echo $employeesaccess->ReportsTo->CustomMsg ?></div></div>
	</div>
<?php } else { ?>
	<tr id="r_ReportsTo">
		<td class="<?php echo $employeesaccess_add->TableLeftColumnClass ?>"><span id="elh_employeesaccess_ReportsTo"><?php echo $employeesaccess->ReportsTo->caption() ?><?php echo ($employeesaccess->ReportsTo->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></span></td>
		<td<?php echo $employeesaccess->ReportsTo->cellAttributes() ?>>
<span id="el_employeesaccess_ReportsTo">
<div class="input-group">
	<select class="custom-select ew-custom-select" data-table="employeesaccess" data-field="x_ReportsTo" data-value-separator="<?php echo $employeesaccess->ReportsTo->displayValueSeparatorAttribute() ?>" id="x_ReportsTo" name="x_ReportsTo"<?php echo $employeesaccess->ReportsTo->editAttributes() ?>>
		<?php echo $employeesaccess->ReportsTo->selectOptionListHtml("x_ReportsTo") ?>
	</select>
</div>
<?php echo $employeesaccess->ReportsTo->Lookup->getParamTag("p_x_ReportsTo") ?>
</span>
<?php echo $employeesaccess->ReportsTo->CustomMsg ?></td>
	</tr>
<?php } ?>
<?php } ?>
<?php if ($employeesaccess->UserLevel->Visible) { // UserLevel ?>
<?php if ($employeesaccess_add->IsMobileOrModal) { ?>
	<div id="r_UserLevel" class="form-group row">
		<label id="elh_employeesaccess_UserLevel" for="x_UserLevel" class="<?php echo $employeesaccess_add->LeftColumnClass ?>"><?php echo $employeesaccess->UserLevel->caption() ?><?php echo ($employeesaccess->UserLevel->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $employeesaccess_add->RightColumnClass ?>"><div<?php echo $employeesaccess->UserLevel->cellAttributes() ?>>
<span id="el_employeesaccess_UserLevel">
<div class="input-group">
	<select class="custom-select ew-custom-select" data-table="employeesaccess" data-field="x_UserLevel" data-value-separator="<?php echo $employeesaccess->UserLevel->displayValueSeparatorAttribute() ?>" id="x_UserLevel" name="x_UserLevel"<?php echo $employeesaccess->UserLevel->editAttributes() ?>>
		<?php echo $employeesaccess->UserLevel->selectOptionListHtml("x_UserLevel") ?>
	</select>
</div>
<?php echo $employeesaccess->UserLevel->Lookup->getParamTag("p_x_UserLevel") ?>
</span>
<?php echo $employeesaccess->UserLevel->CustomMsg ?></div></div>
	</div>
<?php } else { ?>
	<tr id="r_UserLevel">
		<td class="<?php echo $employeesaccess_add->TableLeftColumnClass ?>"><span id="elh_employeesaccess_UserLevel"><?php echo $employeesaccess->UserLevel->caption() ?><?php echo ($employeesaccess->UserLevel->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></span></td>
		<td<?php echo $employeesaccess->UserLevel->cellAttributes() ?>>
<span id="el_employeesaccess_UserLevel">
<div class="input-group">
	<select class="custom-select ew-custom-select" data-table="employeesaccess" data-field="x_UserLevel" data-value-separator="<?php echo $employeesaccess->UserLevel->displayValueSeparatorAttribute() ?>" id="x_UserLevel" name="x_UserLevel"<?php echo $employeesaccess->UserLevel->editAttributes() ?>>
		<?php echo $employeesaccess->UserLevel->selectOptionListHtml("x_UserLevel") ?>
	</select>
</div>
<?php echo $employeesaccess->UserLevel->Lookup->getParamTag("p_x_UserLevel") ?>
</span>
<?php echo $employeesaccess->UserLevel->CustomMsg ?></td>
	</tr>
<?php } ?>
<?php } ?>
<?php if ($employeesaccess->Type->Visible) { // Type ?>
<?php if ($employeesaccess_add->IsMobileOrModal) { ?>
	<div id="r_Type" class="form-group row">
		<label id="elh_employeesaccess_Type" class="<?php echo $employeesaccess_add->LeftColumnClass ?>"><?php echo $employeesaccess->Type->caption() ?><?php echo ($employeesaccess->Type->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $employeesaccess_add->RightColumnClass ?>"><div<?php echo $employeesaccess->Type->cellAttributes() ?>>
<span id="el_employeesaccess_Type">
<div id="tp_x_Type" class="ew-template"><input type="radio" class="form-check-input" data-table="employeesaccess" data-field="x_Type" data-value-separator="<?php echo $employeesaccess->Type->displayValueSeparatorAttribute() ?>" name="x_Type" id="x_Type" value="{value}"<?php echo $employeesaccess->Type->editAttributes() ?>></div>
<div id="dsl_x_Type" data-repeatcolumn="5" class="ew-item-list d-none"><div>
<?php echo $employeesaccess->Type->radioButtonListHtml(FALSE, "x_Type") ?>
</div></div>
</span>
<?php echo $employeesaccess->Type->CustomMsg ?></div></div>
	</div>
<?php } else { ?>
	<tr id="r_Type">
		<td class="<?php echo $employeesaccess_add->TableLeftColumnClass ?>"><span id="elh_employeesaccess_Type"><?php echo $employeesaccess->Type->caption() ?><?php echo ($employeesaccess->Type->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></span></td>
		<td<?php echo $employeesaccess->Type->cellAttributes() ?>>
<span id="el_employeesaccess_Type">
<div id="tp_x_Type" class="ew-template"><input type="radio" class="form-check-input" data-table="employeesaccess" data-field="x_Type" data-value-separator="<?php echo $employeesaccess->Type->displayValueSeparatorAttribute() ?>" name="x_Type" id="x_Type" value="{value}"<?php echo $employeesaccess->Type->editAttributes() ?>></div>
<div id="dsl_x_Type" data-repeatcolumn="5" class="ew-item-list d-none"><div>
<?php echo $employeesaccess->Type->radioButtonListHtml(FALSE, "x_Type") ?>
</div></div>
</span>
<?php echo $employeesaccess->Type->CustomMsg ?></td>
	</tr>
<?php } ?>
<?php } ?>
<?php if ($employeesaccess->Locked->Visible) { // Locked ?>
<?php if ($employeesaccess_add->IsMobileOrModal) { ?>
	<div id="r_Locked" class="form-group row">
		<label id="elh_employeesaccess_Locked" class="<?php echo $employeesaccess_add->LeftColumnClass ?>"><?php echo $employeesaccess->Locked->caption() ?><?php echo ($employeesaccess->Locked->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $employeesaccess_add->RightColumnClass ?>"><div<?php echo $employeesaccess->Locked->cellAttributes() ?>>
<span id="el_employeesaccess_Locked">
<?php
$selwrk = (ConvertToBool($employeesaccess->Locked->CurrentValue)) ? " checked" : "";
?>
<input type="checkbox" data-table="employeesaccess" data-field="x_Locked" name="x_Locked[]" id="x_Locked[]" value="1"<?php echo $selwrk ?><?php echo $employeesaccess->Locked->editAttributes() ?>>
</span>
<?php echo $employeesaccess->Locked->CustomMsg ?></div></div>
	</div>
<?php } else { ?>
	<tr id="r_Locked">
		<td class="<?php echo $employeesaccess_add->TableLeftColumnClass ?>"><span id="elh_employeesaccess_Locked"><?php echo $employeesaccess->Locked->caption() ?><?php echo ($employeesaccess->Locked->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></span></td>
		<td<?php echo $employeesaccess->Locked->cellAttributes() ?>>
<span id="el_employeesaccess_Locked">
<?php
$selwrk = (ConvertToBool($employeesaccess->Locked->CurrentValue)) ? " checked" : "";
?>
<input type="checkbox" data-table="employeesaccess" data-field="x_Locked" name="x_Locked[]" id="x_Locked[]" value="1"<?php echo $selwrk ?><?php echo $employeesaccess->Locked->editAttributes() ?>>
</span>
<?php echo $employeesaccess->Locked->CustomMsg ?></td>
	</tr>
<?php } ?>
<?php } ?>
<?php if ($employeesaccess->Profile->Visible) { // Profile ?>
<?php if ($employeesaccess_add->IsMobileOrModal) { ?>
	<div id="r_Profile" class="form-group row">
		<label id="elh_employeesaccess_Profile" for="x_Profile" class="<?php echo $employeesaccess_add->LeftColumnClass ?>"><?php echo $employeesaccess->Profile->caption() ?><?php echo ($employeesaccess->Profile->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $employeesaccess_add->RightColumnClass ?>"><div<?php echo $employeesaccess->Profile->cellAttributes() ?>>
<span id="el_employeesaccess_Profile">
<textarea data-table="employeesaccess" data-field="x_Profile" name="x_Profile" id="x_Profile" cols="35" rows="4" placeholder="<?php echo HtmlEncode($employeesaccess->Profile->getPlaceHolder()) ?>"<?php echo $employeesaccess->Profile->editAttributes() ?>><?php echo $employeesaccess->Profile->EditValue ?></textarea>
</span>
<?php echo $employeesaccess->Profile->CustomMsg ?></div></div>
	</div>
<?php } else { ?>
	<tr id="r_Profile">
		<td class="<?php echo $employeesaccess_add->TableLeftColumnClass ?>"><span id="elh_employeesaccess_Profile"><?php echo $employeesaccess->Profile->caption() ?><?php echo ($employeesaccess->Profile->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></span></td>
		<td<?php echo $employeesaccess->Profile->cellAttributes() ?>>
<span id="el_employeesaccess_Profile">
<textarea data-table="employeesaccess" data-field="x_Profile" name="x_Profile" id="x_Profile" cols="35" rows="4" placeholder="<?php echo HtmlEncode($employeesaccess->Profile->getPlaceHolder()) ?>"<?php echo $employeesaccess->Profile->editAttributes() ?>><?php echo $employeesaccess->Profile->EditValue ?></textarea>
</span>
<?php echo $employeesaccess->Profile->CustomMsg ?></td>
	</tr>
<?php } ?>
<?php } ?>
<?php if ($employeesaccess_add->IsMobileOrModal) { ?>
</div><!-- /page* -->
<?php } else { ?>
</table><!-- /table* -->
<?php } ?>
<?php if (!$employeesaccess_add->IsModal) { ?>
<div class="form-group row"><!-- buttons .form-group -->
	<div class="<?php echo $employeesaccess_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 $employeesaccess_add->getReturnUrl() ?>"><?php echo $Language->phrase("CancelBtn") ?></button>
	</div><!-- /buttons offset -->
</div><!-- /buttons .form-group -->
<?php } ?>
<?php if (!$employeesaccess_add->IsMobileOrModal) { ?>
</div><!-- /desktop -->
<?php } ?>
</form>
<?php
$employeesaccess_add->showPageFooter();
if (DEBUG_ENABLED)
	echo GetDebugMessage();
?>
<script>

// Write your table-specific startup script here
// document.write("page loaded");

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