<?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
$judges_edit = new judges_edit();

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

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

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

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

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

// Validate form
fjudgesedit.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 ($judges_edit->JudgeID->Required) { ?>
			elm = this.getElements("x" + infix + "_JudgeID");
			if (elm && !ew.isHidden(elm) && !ew.hasValue(elm))
				return this.onError(elm, "<?php echo JsEncode(str_replace("%s", $judges->JudgeID->caption(), $judges->JudgeID->RequiredErrorMessage)) ?>");
		<?php } ?>
		<?php if ($judges_edit->CourtID->Required) { ?>
			elm = this.getElements("x" + infix + "_CourtID");
			if (elm && !ew.isHidden(elm) && !ew.hasValue(elm))
				return this.onError(elm, "<?php echo JsEncode(str_replace("%s", $judges->CourtID->caption(), $judges->CourtID->RequiredErrorMessage)) ?>");
		<?php } ?>
		<?php if ($judges_edit->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", $judges->TitleID->caption(), $judges->TitleID->RequiredErrorMessage)) ?>");
		<?php } ?>
		<?php if ($judges_edit->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", $judges->FirstName->caption(), $judges->FirstName->RequiredErrorMessage)) ?>");
		<?php } ?>
		<?php if ($judges_edit->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", $judges->MiddleName->caption(), $judges->MiddleName->RequiredErrorMessage)) ?>");
		<?php } ?>
		<?php if ($judges_edit->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", $judges->LastName->caption(), $judges->LastName->RequiredErrorMessage)) ?>");
		<?php } ?>
		<?php if ($judges_edit->Gender->Required) { ?>
			elm = this.getElements("x" + infix + "_Gender");
			if (elm && !ew.isHidden(elm) && !ew.hasValue(elm))
				return this.onError(elm, "<?php echo JsEncode(str_replace("%s", $judges->Gender->caption(), $judges->Gender->RequiredErrorMessage)) ?>");
		<?php } ?>
		<?php if ($judges_edit->Notes->Required) { ?>
			elm = this.getElements("x" + infix + "_Notes");
			if (elm && !ew.isHidden(elm) && !ew.hasValue(elm))
				return this.onError(elm, "<?php echo JsEncode(str_replace("%s", $judges->Notes->caption(), $judges->Notes->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
fjudgesedit.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
fjudgesedit.validateRequired = <?php echo json_encode(CLIENT_VALIDATE) ?>;

// Dynamic selection lists
fjudgesedit.lists["x_CourtID"] = <?php echo $judges_edit->CourtID->Lookup->toClientList() ?>;
fjudgesedit.lists["x_CourtID"].options = <?php echo JsonEncode($judges_edit->CourtID->lookupOptions()) ?>;
fjudgesedit.autoSuggests["x_CourtID"] = <?php echo json_encode(["data" => "ajax=autosuggest"]) ?>;
fjudgesedit.lists["x_TitleID"] = <?php echo $judges_edit->TitleID->Lookup->toClientList() ?>;
fjudgesedit.lists["x_TitleID"].options = <?php echo JsonEncode($judges_edit->TitleID->lookupOptions()) ?>;
fjudgesedit.lists["x_Gender"] = <?php echo $judges_edit->Gender->Lookup->toClientList() ?>;
fjudgesedit.lists["x_Gender"].options = <?php echo JsonEncode($judges_edit->Gender->options(FALSE, TRUE)) ?>;

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

// Write your client script here, no need to add script tags.
</script>
<?php $judges_edit->showPageHeader(); ?>
<?php
$judges_edit->showMessage();
?>
<?php if (!$judges_edit->IsModal) { ?>
<form name="ew-pager-form" class="form-inline ew-form ew-pager-form" action="<?php echo CurrentPageName() ?>">
<?php if (!isset($judges_edit->Pager)) $judges_edit->Pager = new PrevNextPager($judges_edit->StartRec, $judges_edit->DisplayRecs, $judges_edit->TotalRecs, $judges_edit->AutoHidePager) ?>
<?php if ($judges_edit->Pager->RecordCount > 0 && $judges_edit->Pager->Visible) { ?>
<div class="ew-pager">
<span><?php echo $Language->Phrase("Page") ?>&nbsp;</span>
<div class="ew-prev-next"><div class="input-group input-group-sm">
<div class="input-group-prepend">
<!-- first page button -->
	<?php if ($judges_edit->Pager->FirstButton->Enabled) { ?>
	<a class="btn btn-default" title="<?php echo $Language->phrase("PagerFirst") ?>" href="<?php echo $judges_edit->pageUrl() ?>start=<?php echo $judges_edit->Pager->FirstButton->Start ?>"><i class="icon-first ew-icon"></i></a>
	<?php } else { ?>
	<a class="btn btn-default disabled" title="<?php echo $Language->phrase("PagerFirst") ?>"><i class="icon-first ew-icon"></i></a>
	<?php } ?>
<!-- previous page button -->
	<?php if ($judges_edit->Pager->PrevButton->Enabled) { ?>
	<a class="btn btn-default" title="<?php echo $Language->phrase("PagerPrevious") ?>" href="<?php echo $judges_edit->pageUrl() ?>start=<?php echo $judges_edit->Pager->PrevButton->Start ?>"><i class="icon-prev ew-icon"></i></a>
	<?php } else { ?>
	<a class="btn btn-default disabled" title="<?php echo $Language->phrase("PagerPrevious") ?>"><i class="icon-prev ew-icon"></i></a>
	<?php } ?>
</div>
<!-- current page number -->
	<input class="form-control" type="text" name="<?php echo TABLE_PAGE_NO ?>" value="<?php echo $judges_edit->Pager->CurrentPage ?>">
<div class="input-group-append">
<!-- next page button -->
	<?php if ($judges_edit->Pager->NextButton->Enabled) { ?>
	<a class="btn btn-default" title="<?php echo $Language->phrase("PagerNext") ?>" href="<?php echo $judges_edit->pageUrl() ?>start=<?php echo $judges_edit->Pager->NextButton->Start ?>"><i class="icon-next ew-icon"></i></a>
	<?php } else { ?>
	<a class="btn btn-default disabled" title="<?php echo $Language->phrase("PagerNext") ?>"><i class="icon-next ew-icon"></i></a>
	<?php } ?>
<!-- last page button -->
	<?php if ($judges_edit->Pager->LastButton->Enabled) { ?>
	<a class="btn btn-default" title="<?php echo $Language->phrase("PagerLast") ?>" href="<?php echo $judges_edit->pageUrl() ?>start=<?php echo $judges_edit->Pager->LastButton->Start ?>"><i class="icon-last ew-icon"></i></a>
	<?php } else { ?>
	<a class="btn btn-default disabled" title="<?php echo $Language->phrase("PagerLast") ?>"><i class="icon-last ew-icon"></i></a>
	<?php } ?>
</div>
</div>
</div>
<span>&nbsp;<?php echo $Language->Phrase("of") ?>&nbsp;<?php echo $judges_edit->Pager->PageCount ?></span>
<div class="clearfix"></div>
</div>
<?php } ?>
<div class="clearfix"></div>
</form>
<?php } ?>
<form name="fjudgesedit" id="fjudgesedit" class="<?php echo $judges_edit->FormClassName ?>" action="<?php echo CurrentPageName() ?>" method="post">
<?php if ($judges_edit->CheckToken) { ?>
<input type="hidden" name="<?php echo TOKEN_NAME ?>" value="<?php echo $judges_edit->Token ?>">
<?php } ?>
<input type="hidden" name="t" value="judges">
<input type="hidden" name="action" id="action" value="update">
<input type="hidden" name="modal" value="<?php echo (int)$judges_edit->IsModal ?>">
<?php if (!$judges_edit->IsMobileOrModal) { ?>
<div class="ew-desktop"><!-- desktop -->
<?php } ?>
<?php if ($judges_edit->IsMobileOrModal) { ?>
<div class="ew-edit-div"><!-- page* -->
<?php } else { ?>
<table id="tbl_judgesedit" class="table table-striped table-sm ew-desktop-table"><!-- table* -->
<?php } ?>
<?php if ($judges->CourtID->Visible) { // CourtID ?>
<?php if ($judges_edit->IsMobileOrModal) { ?>
	<div id="r_CourtID" class="form-group row">
		<label id="elh_judges_CourtID" class="<?php echo $judges_edit->LeftColumnClass ?>"><?php echo $judges->CourtID->caption() ?><?php echo ($judges->CourtID->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $judges_edit->RightColumnClass ?>"><div<?php echo $judges->CourtID->cellAttributes() ?>>
<span id="el_judges_CourtID">
<?php
$wrkonchange = "" . trim(@$judges->CourtID->EditAttrs["onchange"]);
if (trim($wrkonchange) <> "") $wrkonchange = " onchange=\"" . JsEncode($wrkonchange) . "\"";
$judges->CourtID->EditAttrs["onchange"] = "";
?>
<span id="as_x_CourtID" class="text-nowrap" style="z-index: 8970">
	<div class="input-group">
		<input type="text" class="form-control" name="sv_x_CourtID" id="sv_x_CourtID" value="<?php echo RemoveHtml($judges->CourtID->EditValue) ?>" size="30" placeholder="<?php echo HtmlEncode($judges->CourtID->getPlaceHolder()) ?>" data-placeholder="<?php echo HtmlEncode($judges->CourtID->getPlaceHolder()) ?>"<?php echo $judges->CourtID->editAttributes() ?>>
<?php if (AllowAdd(CurrentProjectID() . "courts") && !$judges->CourtID->ReadOnly) { ?>
<div class="input-group-append"><button type="button" class="btn btn-default ew-add-opt-btn" id="aol_x_CourtID" title="<?php echo HtmlTitle($Language->phrase("AddLink")) . "&nbsp;" . $judges->CourtID->caption() ?>" data-title="<?php echo $judges->CourtID->caption() ?>" onclick="ew.addOptionDialogShow({lnk:this,el:'x_CourtID',url:'courtsaddopt.php'});"><i class="fa fa-plus ew-icon"></i></button></div>
<?php } ?>
	</div>
</span>
<input type="hidden" data-table="judges" data-field="x_CourtID" data-value-separator="<?php echo $judges->CourtID->displayValueSeparatorAttribute() ?>" name="x_CourtID" id="x_CourtID" value="<?php echo HtmlEncode($judges->CourtID->CurrentValue) ?>"<?php echo $wrkonchange ?>>
<script>
fjudgesedit.createAutoSuggest({"id":"x_CourtID","forceSelect":true});
</script>
<?php echo $judges->CourtID->Lookup->getParamTag("p_x_CourtID") ?>
</span>
<?php echo $judges->CourtID->CustomMsg ?></div></div>
	</div>
<?php } else { ?>
	<tr id="r_CourtID">
		<td class="<?php echo $judges_edit->TableLeftColumnClass ?>"><span id="elh_judges_CourtID"><?php echo $judges->CourtID->caption() ?><?php echo ($judges->CourtID->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></span></td>
		<td<?php echo $judges->CourtID->cellAttributes() ?>>
<span id="el_judges_CourtID">
<?php
$wrkonchange = "" . trim(@$judges->CourtID->EditAttrs["onchange"]);
if (trim($wrkonchange) <> "") $wrkonchange = " onchange=\"" . JsEncode($wrkonchange) . "\"";
$judges->CourtID->EditAttrs["onchange"] = "";
?>
<span id="as_x_CourtID" class="text-nowrap" style="z-index: 8970">
	<div class="input-group">
		<input type="text" class="form-control" name="sv_x_CourtID" id="sv_x_CourtID" value="<?php echo RemoveHtml($judges->CourtID->EditValue) ?>" size="30" placeholder="<?php echo HtmlEncode($judges->CourtID->getPlaceHolder()) ?>" data-placeholder="<?php echo HtmlEncode($judges->CourtID->getPlaceHolder()) ?>"<?php echo $judges->CourtID->editAttributes() ?>>
<?php if (AllowAdd(CurrentProjectID() . "courts") && !$judges->CourtID->ReadOnly) { ?>
<div class="input-group-append"><button type="button" class="btn btn-default ew-add-opt-btn" id="aol_x_CourtID" title="<?php echo HtmlTitle($Language->phrase("AddLink")) . "&nbsp;" . $judges->CourtID->caption() ?>" data-title="<?php echo $judges->CourtID->caption() ?>" onclick="ew.addOptionDialogShow({lnk:this,el:'x_CourtID',url:'courtsaddopt.php'});"><i class="fa fa-plus ew-icon"></i></button></div>
<?php } ?>
	</div>
</span>
<input type="hidden" data-table="judges" data-field="x_CourtID" data-value-separator="<?php echo $judges->CourtID->displayValueSeparatorAttribute() ?>" name="x_CourtID" id="x_CourtID" value="<?php echo HtmlEncode($judges->CourtID->CurrentValue) ?>"<?php echo $wrkonchange ?>>
<script>
fjudgesedit.createAutoSuggest({"id":"x_CourtID","forceSelect":true});
</script>
<?php echo $judges->CourtID->Lookup->getParamTag("p_x_CourtID") ?>
</span>
<?php echo $judges->CourtID->CustomMsg ?></td>
	</tr>
<?php } ?>
<?php } ?>
<?php if ($judges->TitleID->Visible) { // TitleID ?>
<?php if ($judges_edit->IsMobileOrModal) { ?>
	<div id="r_TitleID" class="form-group row">
		<label id="elh_judges_TitleID" for="x_TitleID" class="<?php echo $judges_edit->LeftColumnClass ?>"><?php echo $judges->TitleID->caption() ?><?php echo ($judges->TitleID->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $judges_edit->RightColumnClass ?>"><div<?php echo $judges->TitleID->cellAttributes() ?>>
<span id="el_judges_TitleID">
<div class="input-group">
	<select class="custom-select ew-custom-select" data-table="judges" data-field="x_TitleID" data-value-separator="<?php echo $judges->TitleID->displayValueSeparatorAttribute() ?>" id="x_TitleID" name="x_TitleID"<?php echo $judges->TitleID->editAttributes() ?>>
		<?php echo $judges->TitleID->selectOptionListHtml("x_TitleID") ?>
	</select>
<?php if (AllowAdd(CurrentProjectID() . "titles") && !$judges->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;" . $judges->TitleID->caption() ?>" data-title="<?php echo $judges->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 $judges->TitleID->Lookup->getParamTag("p_x_TitleID") ?>
</span>
<?php echo $judges->TitleID->CustomMsg ?></div></div>
	</div>
<?php } else { ?>
	<tr id="r_TitleID">
		<td class="<?php echo $judges_edit->TableLeftColumnClass ?>"><span id="elh_judges_TitleID"><?php echo $judges->TitleID->caption() ?><?php echo ($judges->TitleID->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></span></td>
		<td<?php echo $judges->TitleID->cellAttributes() ?>>
<span id="el_judges_TitleID">
<div class="input-group">
	<select class="custom-select ew-custom-select" data-table="judges" data-field="x_TitleID" data-value-separator="<?php echo $judges->TitleID->displayValueSeparatorAttribute() ?>" id="x_TitleID" name="x_TitleID"<?php echo $judges->TitleID->editAttributes() ?>>
		<?php echo $judges->TitleID->selectOptionListHtml("x_TitleID") ?>
	</select>
<?php if (AllowAdd(CurrentProjectID() . "titles") && !$judges->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;" . $judges->TitleID->caption() ?>" data-title="<?php echo $judges->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 $judges->TitleID->Lookup->getParamTag("p_x_TitleID") ?>
</span>
<?php echo $judges->TitleID->CustomMsg ?></td>
	</tr>
<?php } ?>
<?php } ?>
<?php if ($judges->FirstName->Visible) { // FirstName ?>
<?php if ($judges_edit->IsMobileOrModal) { ?>
	<div id="r_FirstName" class="form-group row">
		<label id="elh_judges_FirstName" for="x_FirstName" class="<?php echo $judges_edit->LeftColumnClass ?>"><?php echo $judges->FirstName->caption() ?><?php echo ($judges->FirstName->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $judges_edit->RightColumnClass ?>"><div<?php echo $judges->FirstName->cellAttributes() ?>>
<span id="el_judges_FirstName">
<input type="text" data-table="judges" data-field="x_FirstName" name="x_FirstName" id="x_FirstName" size="30" maxlength="50" placeholder="<?php echo HtmlEncode($judges->FirstName->getPlaceHolder()) ?>" value="<?php echo $judges->FirstName->EditValue ?>"<?php echo $judges->FirstName->editAttributes() ?>>
</span>
<?php echo $judges->FirstName->CustomMsg ?></div></div>
	</div>
<?php } else { ?>
	<tr id="r_FirstName">
		<td class="<?php echo $judges_edit->TableLeftColumnClass ?>"><span id="elh_judges_FirstName"><?php echo $judges->FirstName->caption() ?><?php echo ($judges->FirstName->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></span></td>
		<td<?php echo $judges->FirstName->cellAttributes() ?>>
<span id="el_judges_FirstName">
<input type="text" data-table="judges" data-field="x_FirstName" name="x_FirstName" id="x_FirstName" size="30" maxlength="50" placeholder="<?php echo HtmlEncode($judges->FirstName->getPlaceHolder()) ?>" value="<?php echo $judges->FirstName->EditValue ?>"<?php echo $judges->FirstName->editAttributes() ?>>
</span>
<?php echo $judges->FirstName->CustomMsg ?></td>
	</tr>
<?php } ?>
<?php } ?>
<?php if ($judges->MiddleName->Visible) { // MiddleName ?>
<?php if ($judges_edit->IsMobileOrModal) { ?>
	<div id="r_MiddleName" class="form-group row">
		<label id="elh_judges_MiddleName" for="x_MiddleName" class="<?php echo $judges_edit->LeftColumnClass ?>"><?php echo $judges->MiddleName->caption() ?><?php echo ($judges->MiddleName->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $judges_edit->RightColumnClass ?>"><div<?php echo $judges->MiddleName->cellAttributes() ?>>
<span id="el_judges_MiddleName">
<input type="text" data-table="judges" data-field="x_MiddleName" name="x_MiddleName" id="x_MiddleName" size="30" maxlength="30" placeholder="<?php echo HtmlEncode($judges->MiddleName->getPlaceHolder()) ?>" value="<?php echo $judges->MiddleName->EditValue ?>"<?php echo $judges->MiddleName->editAttributes() ?>>
</span>
<?php echo $judges->MiddleName->CustomMsg ?></div></div>
	</div>
<?php } else { ?>
	<tr id="r_MiddleName">
		<td class="<?php echo $judges_edit->TableLeftColumnClass ?>"><span id="elh_judges_MiddleName"><?php echo $judges->MiddleName->caption() ?><?php echo ($judges->MiddleName->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></span></td>
		<td<?php echo $judges->MiddleName->cellAttributes() ?>>
<span id="el_judges_MiddleName">
<input type="text" data-table="judges" data-field="x_MiddleName" name="x_MiddleName" id="x_MiddleName" size="30" maxlength="30" placeholder="<?php echo HtmlEncode($judges->MiddleName->getPlaceHolder()) ?>" value="<?php echo $judges->MiddleName->EditValue ?>"<?php echo $judges->MiddleName->editAttributes() ?>>
</span>
<?php echo $judges->MiddleName->CustomMsg ?></td>
	</tr>
<?php } ?>
<?php } ?>
<?php if ($judges->LastName->Visible) { // LastName ?>
<?php if ($judges_edit->IsMobileOrModal) { ?>
	<div id="r_LastName" class="form-group row">
		<label id="elh_judges_LastName" for="x_LastName" class="<?php echo $judges_edit->LeftColumnClass ?>"><?php echo $judges->LastName->caption() ?><?php echo ($judges->LastName->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $judges_edit->RightColumnClass ?>"><div<?php echo $judges->LastName->cellAttributes() ?>>
<span id="el_judges_LastName">
<input type="text" data-table="judges" data-field="x_LastName" name="x_LastName" id="x_LastName" size="30" maxlength="50" placeholder="<?php echo HtmlEncode($judges->LastName->getPlaceHolder()) ?>" value="<?php echo $judges->LastName->EditValue ?>"<?php echo $judges->LastName->editAttributes() ?>>
</span>
<?php echo $judges->LastName->CustomMsg ?></div></div>
	</div>
<?php } else { ?>
	<tr id="r_LastName">
		<td class="<?php echo $judges_edit->TableLeftColumnClass ?>"><span id="elh_judges_LastName"><?php echo $judges->LastName->caption() ?><?php echo ($judges->LastName->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></span></td>
		<td<?php echo $judges->LastName->cellAttributes() ?>>
<span id="el_judges_LastName">
<input type="text" data-table="judges" data-field="x_LastName" name="x_LastName" id="x_LastName" size="30" maxlength="50" placeholder="<?php echo HtmlEncode($judges->LastName->getPlaceHolder()) ?>" value="<?php echo $judges->LastName->EditValue ?>"<?php echo $judges->LastName->editAttributes() ?>>
</span>
<?php echo $judges->LastName->CustomMsg ?></td>
	</tr>
<?php } ?>
<?php } ?>
<?php if ($judges->Gender->Visible) { // Gender ?>
<?php if ($judges_edit->IsMobileOrModal) { ?>
	<div id="r_Gender" class="form-group row">
		<label id="elh_judges_Gender" class="<?php echo $judges_edit->LeftColumnClass ?>"><?php echo $judges->Gender->caption() ?><?php echo ($judges->Gender->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $judges_edit->RightColumnClass ?>"><div<?php echo $judges->Gender->cellAttributes() ?>>
<span id="el_judges_Gender">
<div id="tp_x_Gender" class="ew-template"><input type="radio" class="form-check-input" data-table="judges" data-field="x_Gender" data-value-separator="<?php echo $judges->Gender->displayValueSeparatorAttribute() ?>" name="x_Gender" id="x_Gender" value="{value}"<?php echo $judges->Gender->editAttributes() ?>></div>
<div id="dsl_x_Gender" data-repeatcolumn="5" class="ew-item-list d-none"><div>
<?php echo $judges->Gender->radioButtonListHtml(FALSE, "x_Gender") ?>
</div></div>
</span>
<?php echo $judges->Gender->CustomMsg ?></div></div>
	</div>
<?php } else { ?>
	<tr id="r_Gender">
		<td class="<?php echo $judges_edit->TableLeftColumnClass ?>"><span id="elh_judges_Gender"><?php echo $judges->Gender->caption() ?><?php echo ($judges->Gender->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></span></td>
		<td<?php echo $judges->Gender->cellAttributes() ?>>
<span id="el_judges_Gender">
<div id="tp_x_Gender" class="ew-template"><input type="radio" class="form-check-input" data-table="judges" data-field="x_Gender" data-value-separator="<?php echo $judges->Gender->displayValueSeparatorAttribute() ?>" name="x_Gender" id="x_Gender" value="{value}"<?php echo $judges->Gender->editAttributes() ?>></div>
<div id="dsl_x_Gender" data-repeatcolumn="5" class="ew-item-list d-none"><div>
<?php echo $judges->Gender->radioButtonListHtml(FALSE, "x_Gender") ?>
</div></div>
</span>
<?php echo $judges->Gender->CustomMsg ?></td>
	</tr>
<?php } ?>
<?php } ?>
<?php if ($judges->Notes->Visible) { // Notes ?>
<?php if ($judges_edit->IsMobileOrModal) { ?>
	<div id="r_Notes" class="form-group row">
		<label id="elh_judges_Notes" for="x_Notes" class="<?php echo $judges_edit->LeftColumnClass ?>"><?php echo $judges->Notes->caption() ?><?php echo ($judges->Notes->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $judges_edit->RightColumnClass ?>"><div<?php echo $judges->Notes->cellAttributes() ?>>
<span id="el_judges_Notes">
<textarea data-table="judges" data-field="x_Notes" name="x_Notes" id="x_Notes" cols="35" rows="4" placeholder="<?php echo HtmlEncode($judges->Notes->getPlaceHolder()) ?>"<?php echo $judges->Notes->editAttributes() ?>><?php echo $judges->Notes->EditValue ?></textarea>
</span>
<?php echo $judges->Notes->CustomMsg ?></div></div>
	</div>
<?php } else { ?>
	<tr id="r_Notes">
		<td class="<?php echo $judges_edit->TableLeftColumnClass ?>"><span id="elh_judges_Notes"><?php echo $judges->Notes->caption() ?><?php echo ($judges->Notes->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></span></td>
		<td<?php echo $judges->Notes->cellAttributes() ?>>
<span id="el_judges_Notes">
<textarea data-table="judges" data-field="x_Notes" name="x_Notes" id="x_Notes" cols="35" rows="4" placeholder="<?php echo HtmlEncode($judges->Notes->getPlaceHolder()) ?>"<?php echo $judges->Notes->editAttributes() ?>><?php echo $judges->Notes->EditValue ?></textarea>
</span>
<?php echo $judges->Notes->CustomMsg ?></td>
	</tr>
<?php } ?>
<?php } ?>
<?php if ($judges_edit->IsMobileOrModal) { ?>
</div><!-- /page* -->
<?php } else { ?>
</table><!-- /table* -->
<?php } ?>
<span id="el_judges_JudgeID">
<input type="hidden" data-table="judges" data-field="x_JudgeID" name="x_JudgeID" id="x_JudgeID" value="<?php echo HtmlEncode($judges->JudgeID->CurrentValue) ?>">
</span>
<?php if ($judges->getCurrentDetailTable() <> "") { ?>
<?php
	$judges_edit->DetailPages->ValidKeys = explode(",", $judges->getCurrentDetailTable());
	$firstActiveDetailTable = $judges_edit->DetailPages->activePageIndex();
?>
<div class="ew-detail-pages"><!-- detail-pages -->
<div class="ew-nav-tabs" id="judges_edit_details"><!-- tabs -->
	<ul class="<?php echo $judges_edit->DetailPages->navStyle() ?>"><!-- .nav -->
<?php
	if (in_array("judgecontact", explode(",", $judges->getCurrentDetailTable())) && $judgecontact->DetailEdit) {
		if ($firstActiveDetailTable == "" || $firstActiveDetailTable == "judgecontact") {
			$firstActiveDetailTable = "judgecontact";
		}
?>
		<li class="nav-item"><a class="nav-link<?php echo $judges_edit->DetailPages->pageStyle("judgecontact") ?>" href="#tab_judgecontact" data-toggle="tab"><?php echo $Language->TablePhrase("judgecontact", "TblCaption") ?></a></li>
<?php
	}
?>
<?php
	if (in_array("judgeaddress", explode(",", $judges->getCurrentDetailTable())) && $judgeaddress->DetailEdit) {
		if ($firstActiveDetailTable == "" || $firstActiveDetailTable == "judgeaddress") {
			$firstActiveDetailTable = "judgeaddress";
		}
?>
		<li class="nav-item"><a class="nav-link<?php echo $judges_edit->DetailPages->pageStyle("judgeaddress") ?>" href="#tab_judgeaddress" data-toggle="tab"><?php echo $Language->TablePhrase("judgeaddress", "TblCaption") ?></a></li>
<?php
	}
?>
	</ul><!-- /.nav -->
	<div class="tab-content"><!-- .tab-content -->
<?php
	if (in_array("judgecontact", explode(",", $judges->getCurrentDetailTable())) && $judgecontact->DetailEdit) {
		if ($firstActiveDetailTable == "" || $firstActiveDetailTable == "judgecontact")
			$firstActiveDetailTable = "judgecontact";
?>
		<div class="tab-pane<?php echo $judges_edit->DetailPages->pageStyle("judgecontact") ?>" id="tab_judgecontact"><!-- page* -->
<?php include_once "judgecontactgrid.php" ?>
		</div><!-- /page* -->
<?php } ?>
<?php
	if (in_array("judgeaddress", explode(",", $judges->getCurrentDetailTable())) && $judgeaddress->DetailEdit) {
		if ($firstActiveDetailTable == "" || $firstActiveDetailTable == "judgeaddress")
			$firstActiveDetailTable = "judgeaddress";
?>
		<div class="tab-pane<?php echo $judges_edit->DetailPages->pageStyle("judgeaddress") ?>" id="tab_judgeaddress"><!-- page* -->
<?php include_once "judgeaddressgrid.php" ?>
		</div><!-- /page* -->
<?php } ?>
	</div><!-- /.tab-content -->
</div><!-- /tabs -->
</div><!-- /detail-pages -->
<?php } ?>
<?php if (!$judges_edit->IsModal) { ?>
<div class="form-group row"><!-- buttons .form-group -->
	<div class="<?php echo $judges_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 $judges_edit->getReturnUrl() ?>"><?php echo $Language->phrase("CancelBtn") ?></button>
	</div><!-- /buttons offset -->
</div><!-- /buttons .form-group -->
<?php } ?>
<?php if (!$judges_edit->IsMobileOrModal) { ?>
</div><!-- /desktop -->
<?php } ?>
<?php if (!$judges_edit->IsModal) { ?>
<?php if (!isset($judges_edit->Pager)) $judges_edit->Pager = new PrevNextPager($judges_edit->StartRec, $judges_edit->DisplayRecs, $judges_edit->TotalRecs, $judges_edit->AutoHidePager) ?>
<?php if ($judges_edit->Pager->RecordCount > 0 && $judges_edit->Pager->Visible) { ?>
<div class="ew-pager">
<span><?php echo $Language->Phrase("Page") ?>&nbsp;</span>
<div class="ew-prev-next"><div class="input-group input-group-sm">
<div class="input-group-prepend">
<!-- first page button -->
	<?php if ($judges_edit->Pager->FirstButton->Enabled) { ?>
	<a class="btn btn-default" title="<?php echo $Language->phrase("PagerFirst") ?>" href="<?php echo $judges_edit->pageUrl() ?>start=<?php echo $judges_edit->Pager->FirstButton->Start ?>"><i class="icon-first ew-icon"></i></a>
	<?php } else { ?>
	<a class="btn btn-default disabled" title="<?php echo $Language->phrase("PagerFirst") ?>"><i class="icon-first ew-icon"></i></a>
	<?php } ?>
<!-- previous page button -->
	<?php if ($judges_edit->Pager->PrevButton->Enabled) { ?>
	<a class="btn btn-default" title="<?php echo $Language->phrase("PagerPrevious") ?>" href="<?php echo $judges_edit->pageUrl() ?>start=<?php echo $judges_edit->Pager->PrevButton->Start ?>"><i class="icon-prev ew-icon"></i></a>
	<?php } else { ?>
	<a class="btn btn-default disabled" title="<?php echo $Language->phrase("PagerPrevious") ?>"><i class="icon-prev ew-icon"></i></a>
	<?php } ?>
</div>
<!-- current page number -->
	<input class="form-control" type="text" name="<?php echo TABLE_PAGE_NO ?>" value="<?php echo $judges_edit->Pager->CurrentPage ?>">
<div class="input-group-append">
<!-- next page button -->
	<?php if ($judges_edit->Pager->NextButton->Enabled) { ?>
	<a class="btn btn-default" title="<?php echo $Language->phrase("PagerNext") ?>" href="<?php echo $judges_edit->pageUrl() ?>start=<?php echo $judges_edit->Pager->NextButton->Start ?>"><i class="icon-next ew-icon"></i></a>
	<?php } else { ?>
	<a class="btn btn-default disabled" title="<?php echo $Language->phrase("PagerNext") ?>"><i class="icon-next ew-icon"></i></a>
	<?php } ?>
<!-- last page button -->
	<?php if ($judges_edit->Pager->LastButton->Enabled) { ?>
	<a class="btn btn-default" title="<?php echo $Language->phrase("PagerLast") ?>" href="<?php echo $judges_edit->pageUrl() ?>start=<?php echo $judges_edit->Pager->LastButton->Start ?>"><i class="icon-last ew-icon"></i></a>
	<?php } else { ?>
	<a class="btn btn-default disabled" title="<?php echo $Language->phrase("PagerLast") ?>"><i class="icon-last ew-icon"></i></a>
	<?php } ?>
</div>
</div>
</div>
<span>&nbsp;<?php echo $Language->Phrase("of") ?>&nbsp;<?php echo $judges_edit->Pager->PageCount ?></span>
<div class="clearfix"></div>
</div>
<?php } ?>
<div class="clearfix"></div>
<?php } ?>
</form>
<?php
$judges_edit->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
$judges_edit->terminate();
?>
