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

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

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

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

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

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

// Validate form
fjudgeaddressadd.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 ($judgeaddress_add->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", $judgeaddress->JudgeID->caption(), $judgeaddress->JudgeID->RequiredErrorMessage)) ?>");
		<?php } ?>
		<?php if ($judgeaddress_add->AddressTypeID->Required) { ?>
			elm = this.getElements("x" + infix + "_AddressTypeID");
			if (elm && !ew.isHidden(elm) && !ew.hasValue(elm))
				return this.onError(elm, "<?php echo JsEncode(str_replace("%s", $judgeaddress->AddressTypeID->caption(), $judgeaddress->AddressTypeID->RequiredErrorMessage)) ?>");
		<?php } ?>
		<?php if ($judgeaddress_add->Address->Required) { ?>
			elm = this.getElements("x" + infix + "_Address");
			if (elm && !ew.isHidden(elm) && !ew.hasValue(elm))
				return this.onError(elm, "<?php echo JsEncode(str_replace("%s", $judgeaddress->Address->caption(), $judgeaddress->Address->RequiredErrorMessage)) ?>");
		<?php } ?>
		<?php if ($judgeaddress_add->City->Required) { ?>
			elm = this.getElements("x" + infix + "_City");
			if (elm && !ew.isHidden(elm) && !ew.hasValue(elm))
				return this.onError(elm, "<?php echo JsEncode(str_replace("%s", $judgeaddress->City->caption(), $judgeaddress->City->RequiredErrorMessage)) ?>");
		<?php } ?>
		<?php if ($judgeaddress_add->Region->Required) { ?>
			elm = this.getElements("x" + infix + "_Region");
			if (elm && !ew.isHidden(elm) && !ew.hasValue(elm))
				return this.onError(elm, "<?php echo JsEncode(str_replace("%s", $judgeaddress->Region->caption(), $judgeaddress->Region->RequiredErrorMessage)) ?>");
		<?php } ?>
		<?php if ($judgeaddress_add->PostalCode->Required) { ?>
			elm = this.getElements("x" + infix + "_PostalCode");
			if (elm && !ew.isHidden(elm) && !ew.hasValue(elm))
				return this.onError(elm, "<?php echo JsEncode(str_replace("%s", $judgeaddress->PostalCode->caption(), $judgeaddress->PostalCode->RequiredErrorMessage)) ?>");
		<?php } ?>
		<?php if ($judgeaddress_add->Country->Required) { ?>
			elm = this.getElements("x" + infix + "_Country");
			if (elm && !ew.isHidden(elm) && !ew.hasValue(elm))
				return this.onError(elm, "<?php echo JsEncode(str_replace("%s", $judgeaddress->Country->caption(), $judgeaddress->Country->RequiredErrorMessage)) ?>");
		<?php } ?>
		<?php if ($judgeaddress_add->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", $judgeaddress->Notes->caption(), $judgeaddress->Notes->RequiredErrorMessage)) ?>");
		<?php } ?>
		<?php if ($judgeaddress_add->Primary->Required) { ?>
			elm = this.getElements("x" + infix + "_Primary[]");
			if (elm && !ew.isHidden(elm) && !ew.hasValue(elm))
				return this.onError(elm, "<?php echo JsEncode(str_replace("%s", $judgeaddress->Primary->caption(), $judgeaddress->Primary->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
fjudgeaddressadd.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
fjudgeaddressadd.validateRequired = <?php echo json_encode(CLIENT_VALIDATE) ?>;

// Dynamic selection lists
fjudgeaddressadd.lists["x_JudgeID"] = <?php echo $judgeaddress_add->JudgeID->Lookup->toClientList() ?>;
fjudgeaddressadd.lists["x_JudgeID"].options = <?php echo JsonEncode($judgeaddress_add->JudgeID->lookupOptions()) ?>;
fjudgeaddressadd.lists["x_AddressTypeID"] = <?php echo $judgeaddress_add->AddressTypeID->Lookup->toClientList() ?>;
fjudgeaddressadd.lists["x_AddressTypeID"].options = <?php echo JsonEncode($judgeaddress_add->AddressTypeID->lookupOptions()) ?>;
fjudgeaddressadd.lists["x_Primary[]"] = <?php echo $judgeaddress_add->Primary->Lookup->toClientList() ?>;
fjudgeaddressadd.lists["x_Primary[]"].options = <?php echo JsonEncode($judgeaddress_add->Primary->options(FALSE, TRUE)) ?>;

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

// Write your client script here, no need to add script tags.
</script>
<?php $judgeaddress_add->showPageHeader(); ?>
<?php
$judgeaddress_add->showMessage();
?>
<form name="fjudgeaddressadd" id="fjudgeaddressadd" class="<?php echo $judgeaddress_add->FormClassName ?>" action="<?php echo CurrentPageName() ?>" method="post">
<?php if ($judgeaddress_add->CheckToken) { ?>
<input type="hidden" name="<?php echo TOKEN_NAME ?>" value="<?php echo $judgeaddress_add->Token ?>">
<?php } ?>
<input type="hidden" name="t" value="judgeaddress">
<input type="hidden" name="action" id="action" value="insert">
<input type="hidden" name="modal" value="<?php echo (int)$judgeaddress_add->IsModal ?>">
<?php if ($judgeaddress->getCurrentMasterTable() == "judges") { ?>
<input type="hidden" name="<?php echo TABLE_SHOW_MASTER ?>" value="judges">
<input type="hidden" name="fk_JudgeID" value="<?php echo $judgeaddress->JudgeID->getSessionValue() ?>">
<?php } ?>
<?php if (!$judgeaddress_add->IsMobileOrModal) { ?>
<div class="ew-desktop"><!-- desktop -->
<?php } ?>
<?php if ($judgeaddress_add->IsMobileOrModal) { ?>
<div class="ew-add-div"><!-- page* -->
<?php } else { ?>
<table id="tbl_judgeaddressadd" class="table table-striped table-sm ew-desktop-table"><!-- table* -->
<?php } ?>
<?php if ($judgeaddress->JudgeID->Visible) { // JudgeID ?>
<?php if ($judgeaddress_add->IsMobileOrModal) { ?>
	<div id="r_JudgeID" class="form-group row">
		<label id="elh_judgeaddress_JudgeID" for="x_JudgeID" class="<?php echo $judgeaddress_add->LeftColumnClass ?>"><?php echo $judgeaddress->JudgeID->caption() ?><?php echo ($judgeaddress->JudgeID->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $judgeaddress_add->RightColumnClass ?>"><div<?php echo $judgeaddress->JudgeID->cellAttributes() ?>>
<?php if ($judgeaddress->JudgeID->getSessionValue() <> "") { ?>
<span id="el_judgeaddress_JudgeID">
<span<?php echo $judgeaddress->JudgeID->viewAttributes() ?>>
<input type="text" readonly class="form-control-plaintext" value="<?php echo RemoveHtml($judgeaddress->JudgeID->ViewValue) ?>"></span>
</span>
<input type="hidden" id="x_JudgeID" name="x_JudgeID" value="<?php echo HtmlEncode($judgeaddress->JudgeID->CurrentValue) ?>">
<?php } else { ?>
<span id="el_judgeaddress_JudgeID">
<div class="input-group">
	<select class="custom-select ew-custom-select" data-table="judgeaddress" data-field="x_JudgeID" data-value-separator="<?php echo $judgeaddress->JudgeID->displayValueSeparatorAttribute() ?>" id="x_JudgeID" name="x_JudgeID"<?php echo $judgeaddress->JudgeID->editAttributes() ?>>
		<?php echo $judgeaddress->JudgeID->selectOptionListHtml("x_JudgeID") ?>
	</select>
</div>
<?php echo $judgeaddress->JudgeID->Lookup->getParamTag("p_x_JudgeID") ?>
</span>
<?php } ?>
<?php echo $judgeaddress->JudgeID->CustomMsg ?></div></div>
	</div>
<?php } else { ?>
	<tr id="r_JudgeID">
		<td class="<?php echo $judgeaddress_add->TableLeftColumnClass ?>"><span id="elh_judgeaddress_JudgeID"><?php echo $judgeaddress->JudgeID->caption() ?><?php echo ($judgeaddress->JudgeID->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></span></td>
		<td<?php echo $judgeaddress->JudgeID->cellAttributes() ?>>
<?php if ($judgeaddress->JudgeID->getSessionValue() <> "") { ?>
<span id="el_judgeaddress_JudgeID">
<span<?php echo $judgeaddress->JudgeID->viewAttributes() ?>>
<input type="text" readonly class="form-control-plaintext" value="<?php echo RemoveHtml($judgeaddress->JudgeID->ViewValue) ?>"></span>
</span>
<input type="hidden" id="x_JudgeID" name="x_JudgeID" value="<?php echo HtmlEncode($judgeaddress->JudgeID->CurrentValue) ?>">
<?php } else { ?>
<span id="el_judgeaddress_JudgeID">
<div class="input-group">
	<select class="custom-select ew-custom-select" data-table="judgeaddress" data-field="x_JudgeID" data-value-separator="<?php echo $judgeaddress->JudgeID->displayValueSeparatorAttribute() ?>" id="x_JudgeID" name="x_JudgeID"<?php echo $judgeaddress->JudgeID->editAttributes() ?>>
		<?php echo $judgeaddress->JudgeID->selectOptionListHtml("x_JudgeID") ?>
	</select>
</div>
<?php echo $judgeaddress->JudgeID->Lookup->getParamTag("p_x_JudgeID") ?>
</span>
<?php } ?>
<?php echo $judgeaddress->JudgeID->CustomMsg ?></td>
	</tr>
<?php } ?>
<?php } ?>
<?php if ($judgeaddress->AddressTypeID->Visible) { // AddressTypeID ?>
<?php if ($judgeaddress_add->IsMobileOrModal) { ?>
	<div id="r_AddressTypeID" class="form-group row">
		<label id="elh_judgeaddress_AddressTypeID" for="x_AddressTypeID" class="<?php echo $judgeaddress_add->LeftColumnClass ?>"><?php echo $judgeaddress->AddressTypeID->caption() ?><?php echo ($judgeaddress->AddressTypeID->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $judgeaddress_add->RightColumnClass ?>"><div<?php echo $judgeaddress->AddressTypeID->cellAttributes() ?>>
<span id="el_judgeaddress_AddressTypeID">
<div class="input-group">
	<select class="custom-select ew-custom-select" data-table="judgeaddress" data-field="x_AddressTypeID" data-value-separator="<?php echo $judgeaddress->AddressTypeID->displayValueSeparatorAttribute() ?>" id="x_AddressTypeID" name="x_AddressTypeID"<?php echo $judgeaddress->AddressTypeID->editAttributes() ?>>
		<?php echo $judgeaddress->AddressTypeID->selectOptionListHtml("x_AddressTypeID") ?>
	</select>
</div>
<?php echo $judgeaddress->AddressTypeID->Lookup->getParamTag("p_x_AddressTypeID") ?>
</span>
<?php echo $judgeaddress->AddressTypeID->CustomMsg ?></div></div>
	</div>
<?php } else { ?>
	<tr id="r_AddressTypeID">
		<td class="<?php echo $judgeaddress_add->TableLeftColumnClass ?>"><span id="elh_judgeaddress_AddressTypeID"><?php echo $judgeaddress->AddressTypeID->caption() ?><?php echo ($judgeaddress->AddressTypeID->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></span></td>
		<td<?php echo $judgeaddress->AddressTypeID->cellAttributes() ?>>
<span id="el_judgeaddress_AddressTypeID">
<div class="input-group">
	<select class="custom-select ew-custom-select" data-table="judgeaddress" data-field="x_AddressTypeID" data-value-separator="<?php echo $judgeaddress->AddressTypeID->displayValueSeparatorAttribute() ?>" id="x_AddressTypeID" name="x_AddressTypeID"<?php echo $judgeaddress->AddressTypeID->editAttributes() ?>>
		<?php echo $judgeaddress->AddressTypeID->selectOptionListHtml("x_AddressTypeID") ?>
	</select>
</div>
<?php echo $judgeaddress->AddressTypeID->Lookup->getParamTag("p_x_AddressTypeID") ?>
</span>
<?php echo $judgeaddress->AddressTypeID->CustomMsg ?></td>
	</tr>
<?php } ?>
<?php } ?>
<?php if ($judgeaddress->Address->Visible) { // Address ?>
<?php if ($judgeaddress_add->IsMobileOrModal) { ?>
	<div id="r_Address" class="form-group row">
		<label id="elh_judgeaddress_Address" for="x_Address" class="<?php echo $judgeaddress_add->LeftColumnClass ?>"><?php echo $judgeaddress->Address->caption() ?><?php echo ($judgeaddress->Address->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $judgeaddress_add->RightColumnClass ?>"><div<?php echo $judgeaddress->Address->cellAttributes() ?>>
<span id="el_judgeaddress_Address">
<input type="text" data-table="judgeaddress" data-field="x_Address" name="x_Address" id="x_Address" size="30" maxlength="150" placeholder="<?php echo HtmlEncode($judgeaddress->Address->getPlaceHolder()) ?>" value="<?php echo $judgeaddress->Address->EditValue ?>"<?php echo $judgeaddress->Address->editAttributes() ?>>
</span>
<?php echo $judgeaddress->Address->CustomMsg ?></div></div>
	</div>
<?php } else { ?>
	<tr id="r_Address">
		<td class="<?php echo $judgeaddress_add->TableLeftColumnClass ?>"><span id="elh_judgeaddress_Address"><?php echo $judgeaddress->Address->caption() ?><?php echo ($judgeaddress->Address->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></span></td>
		<td<?php echo $judgeaddress->Address->cellAttributes() ?>>
<span id="el_judgeaddress_Address">
<input type="text" data-table="judgeaddress" data-field="x_Address" name="x_Address" id="x_Address" size="30" maxlength="150" placeholder="<?php echo HtmlEncode($judgeaddress->Address->getPlaceHolder()) ?>" value="<?php echo $judgeaddress->Address->EditValue ?>"<?php echo $judgeaddress->Address->editAttributes() ?>>
</span>
<?php echo $judgeaddress->Address->CustomMsg ?></td>
	</tr>
<?php } ?>
<?php } ?>
<?php if ($judgeaddress->City->Visible) { // City ?>
<?php if ($judgeaddress_add->IsMobileOrModal) { ?>
	<div id="r_City" class="form-group row">
		<label id="elh_judgeaddress_City" for="x_City" class="<?php echo $judgeaddress_add->LeftColumnClass ?>"><?php echo $judgeaddress->City->caption() ?><?php echo ($judgeaddress->City->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $judgeaddress_add->RightColumnClass ?>"><div<?php echo $judgeaddress->City->cellAttributes() ?>>
<span id="el_judgeaddress_City">
<input type="text" data-table="judgeaddress" data-field="x_City" name="x_City" id="x_City" size="30" maxlength="30" placeholder="<?php echo HtmlEncode($judgeaddress->City->getPlaceHolder()) ?>" value="<?php echo $judgeaddress->City->EditValue ?>"<?php echo $judgeaddress->City->editAttributes() ?>>
</span>
<?php echo $judgeaddress->City->CustomMsg ?></div></div>
	</div>
<?php } else { ?>
	<tr id="r_City">
		<td class="<?php echo $judgeaddress_add->TableLeftColumnClass ?>"><span id="elh_judgeaddress_City"><?php echo $judgeaddress->City->caption() ?><?php echo ($judgeaddress->City->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></span></td>
		<td<?php echo $judgeaddress->City->cellAttributes() ?>>
<span id="el_judgeaddress_City">
<input type="text" data-table="judgeaddress" data-field="x_City" name="x_City" id="x_City" size="30" maxlength="30" placeholder="<?php echo HtmlEncode($judgeaddress->City->getPlaceHolder()) ?>" value="<?php echo $judgeaddress->City->EditValue ?>"<?php echo $judgeaddress->City->editAttributes() ?>>
</span>
<?php echo $judgeaddress->City->CustomMsg ?></td>
	</tr>
<?php } ?>
<?php } ?>
<?php if ($judgeaddress->Region->Visible) { // Region ?>
<?php if ($judgeaddress_add->IsMobileOrModal) { ?>
	<div id="r_Region" class="form-group row">
		<label id="elh_judgeaddress_Region" for="x_Region" class="<?php echo $judgeaddress_add->LeftColumnClass ?>"><?php echo $judgeaddress->Region->caption() ?><?php echo ($judgeaddress->Region->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $judgeaddress_add->RightColumnClass ?>"><div<?php echo $judgeaddress->Region->cellAttributes() ?>>
<span id="el_judgeaddress_Region">
<input type="text" data-table="judgeaddress" data-field="x_Region" name="x_Region" id="x_Region" size="30" maxlength="30" placeholder="<?php echo HtmlEncode($judgeaddress->Region->getPlaceHolder()) ?>" value="<?php echo $judgeaddress->Region->EditValue ?>"<?php echo $judgeaddress->Region->editAttributes() ?>>
</span>
<?php echo $judgeaddress->Region->CustomMsg ?></div></div>
	</div>
<?php } else { ?>
	<tr id="r_Region">
		<td class="<?php echo $judgeaddress_add->TableLeftColumnClass ?>"><span id="elh_judgeaddress_Region"><?php echo $judgeaddress->Region->caption() ?><?php echo ($judgeaddress->Region->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></span></td>
		<td<?php echo $judgeaddress->Region->cellAttributes() ?>>
<span id="el_judgeaddress_Region">
<input type="text" data-table="judgeaddress" data-field="x_Region" name="x_Region" id="x_Region" size="30" maxlength="30" placeholder="<?php echo HtmlEncode($judgeaddress->Region->getPlaceHolder()) ?>" value="<?php echo $judgeaddress->Region->EditValue ?>"<?php echo $judgeaddress->Region->editAttributes() ?>>
</span>
<?php echo $judgeaddress->Region->CustomMsg ?></td>
	</tr>
<?php } ?>
<?php } ?>
<?php if ($judgeaddress->PostalCode->Visible) { // PostalCode ?>
<?php if ($judgeaddress_add->IsMobileOrModal) { ?>
	<div id="r_PostalCode" class="form-group row">
		<label id="elh_judgeaddress_PostalCode" for="x_PostalCode" class="<?php echo $judgeaddress_add->LeftColumnClass ?>"><?php echo $judgeaddress->PostalCode->caption() ?><?php echo ($judgeaddress->PostalCode->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $judgeaddress_add->RightColumnClass ?>"><div<?php echo $judgeaddress->PostalCode->cellAttributes() ?>>
<span id="el_judgeaddress_PostalCode">
<input type="text" data-table="judgeaddress" data-field="x_PostalCode" name="x_PostalCode" id="x_PostalCode" size="30" maxlength="10" placeholder="<?php echo HtmlEncode($judgeaddress->PostalCode->getPlaceHolder()) ?>" value="<?php echo $judgeaddress->PostalCode->EditValue ?>"<?php echo $judgeaddress->PostalCode->editAttributes() ?>>
</span>
<?php echo $judgeaddress->PostalCode->CustomMsg ?></div></div>
	</div>
<?php } else { ?>
	<tr id="r_PostalCode">
		<td class="<?php echo $judgeaddress_add->TableLeftColumnClass ?>"><span id="elh_judgeaddress_PostalCode"><?php echo $judgeaddress->PostalCode->caption() ?><?php echo ($judgeaddress->PostalCode->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></span></td>
		<td<?php echo $judgeaddress->PostalCode->cellAttributes() ?>>
<span id="el_judgeaddress_PostalCode">
<input type="text" data-table="judgeaddress" data-field="x_PostalCode" name="x_PostalCode" id="x_PostalCode" size="30" maxlength="10" placeholder="<?php echo HtmlEncode($judgeaddress->PostalCode->getPlaceHolder()) ?>" value="<?php echo $judgeaddress->PostalCode->EditValue ?>"<?php echo $judgeaddress->PostalCode->editAttributes() ?>>
</span>
<?php echo $judgeaddress->PostalCode->CustomMsg ?></td>
	</tr>
<?php } ?>
<?php } ?>
<?php if ($judgeaddress->Country->Visible) { // Country ?>
<?php if ($judgeaddress_add->IsMobileOrModal) { ?>
	<div id="r_Country" class="form-group row">
		<label id="elh_judgeaddress_Country" for="x_Country" class="<?php echo $judgeaddress_add->LeftColumnClass ?>"><?php echo $judgeaddress->Country->caption() ?><?php echo ($judgeaddress->Country->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $judgeaddress_add->RightColumnClass ?>"><div<?php echo $judgeaddress->Country->cellAttributes() ?>>
<span id="el_judgeaddress_Country">
<input type="text" data-table="judgeaddress" data-field="x_Country" name="x_Country" id="x_Country" size="30" maxlength="20" placeholder="<?php echo HtmlEncode($judgeaddress->Country->getPlaceHolder()) ?>" value="<?php echo $judgeaddress->Country->EditValue ?>"<?php echo $judgeaddress->Country->editAttributes() ?>>
</span>
<?php echo $judgeaddress->Country->CustomMsg ?></div></div>
	</div>
<?php } else { ?>
	<tr id="r_Country">
		<td class="<?php echo $judgeaddress_add->TableLeftColumnClass ?>"><span id="elh_judgeaddress_Country"><?php echo $judgeaddress->Country->caption() ?><?php echo ($judgeaddress->Country->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></span></td>
		<td<?php echo $judgeaddress->Country->cellAttributes() ?>>
<span id="el_judgeaddress_Country">
<input type="text" data-table="judgeaddress" data-field="x_Country" name="x_Country" id="x_Country" size="30" maxlength="20" placeholder="<?php echo HtmlEncode($judgeaddress->Country->getPlaceHolder()) ?>" value="<?php echo $judgeaddress->Country->EditValue ?>"<?php echo $judgeaddress->Country->editAttributes() ?>>
</span>
<?php echo $judgeaddress->Country->CustomMsg ?></td>
	</tr>
<?php } ?>
<?php } ?>
<?php if ($judgeaddress->Notes->Visible) { // Notes ?>
<?php if ($judgeaddress_add->IsMobileOrModal) { ?>
	<div id="r_Notes" class="form-group row">
		<label id="elh_judgeaddress_Notes" for="x_Notes" class="<?php echo $judgeaddress_add->LeftColumnClass ?>"><?php echo $judgeaddress->Notes->caption() ?><?php echo ($judgeaddress->Notes->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $judgeaddress_add->RightColumnClass ?>"><div<?php echo $judgeaddress->Notes->cellAttributes() ?>>
<span id="el_judgeaddress_Notes">
<input type="text" data-table="judgeaddress" data-field="x_Notes" name="x_Notes" id="x_Notes" size="30" maxlength="100" placeholder="<?php echo HtmlEncode($judgeaddress->Notes->getPlaceHolder()) ?>" value="<?php echo $judgeaddress->Notes->EditValue ?>"<?php echo $judgeaddress->Notes->editAttributes() ?>>
</span>
<?php echo $judgeaddress->Notes->CustomMsg ?></div></div>
	</div>
<?php } else { ?>
	<tr id="r_Notes">
		<td class="<?php echo $judgeaddress_add->TableLeftColumnClass ?>"><span id="elh_judgeaddress_Notes"><?php echo $judgeaddress->Notes->caption() ?><?php echo ($judgeaddress->Notes->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></span></td>
		<td<?php echo $judgeaddress->Notes->cellAttributes() ?>>
<span id="el_judgeaddress_Notes">
<input type="text" data-table="judgeaddress" data-field="x_Notes" name="x_Notes" id="x_Notes" size="30" maxlength="100" placeholder="<?php echo HtmlEncode($judgeaddress->Notes->getPlaceHolder()) ?>" value="<?php echo $judgeaddress->Notes->EditValue ?>"<?php echo $judgeaddress->Notes->editAttributes() ?>>
</span>
<?php echo $judgeaddress->Notes->CustomMsg ?></td>
	</tr>
<?php } ?>
<?php } ?>
<?php if ($judgeaddress->Primary->Visible) { // Primary ?>
<?php if ($judgeaddress_add->IsMobileOrModal) { ?>
	<div id="r_Primary" class="form-group row">
		<label id="elh_judgeaddress_Primary" class="<?php echo $judgeaddress_add->LeftColumnClass ?>"><?php echo $judgeaddress->Primary->caption() ?><?php echo ($judgeaddress->Primary->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $judgeaddress_add->RightColumnClass ?>"><div<?php echo $judgeaddress->Primary->cellAttributes() ?>>
<span id="el_judgeaddress_Primary">
<?php
$selwrk = (ConvertToBool($judgeaddress->Primary->CurrentValue)) ? " checked" : "";
?>
<input type="checkbox" data-table="judgeaddress" data-field="x_Primary" name="x_Primary[]" id="x_Primary[]" value="1"<?php echo $selwrk ?><?php echo $judgeaddress->Primary->editAttributes() ?>>
</span>
<?php echo $judgeaddress->Primary->CustomMsg ?></div></div>
	</div>
<?php } else { ?>
	<tr id="r_Primary">
		<td class="<?php echo $judgeaddress_add->TableLeftColumnClass ?>"><span id="elh_judgeaddress_Primary"><?php echo $judgeaddress->Primary->caption() ?><?php echo ($judgeaddress->Primary->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></span></td>
		<td<?php echo $judgeaddress->Primary->cellAttributes() ?>>
<span id="el_judgeaddress_Primary">
<?php
$selwrk = (ConvertToBool($judgeaddress->Primary->CurrentValue)) ? " checked" : "";
?>
<input type="checkbox" data-table="judgeaddress" data-field="x_Primary" name="x_Primary[]" id="x_Primary[]" value="1"<?php echo $selwrk ?><?php echo $judgeaddress->Primary->editAttributes() ?>>
</span>
<?php echo $judgeaddress->Primary->CustomMsg ?></td>
	</tr>
<?php } ?>
<?php } ?>
<?php if ($judgeaddress_add->IsMobileOrModal) { ?>
</div><!-- /page* -->
<?php } else { ?>
</table><!-- /table* -->
<?php } ?>
<?php if (!$judgeaddress_add->IsModal) { ?>
<div class="form-group row"><!-- buttons .form-group -->
	<div class="<?php echo $judgeaddress_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 $judgeaddress_add->getReturnUrl() ?>"><?php echo $Language->phrase("CancelBtn") ?></button>
	</div><!-- /buttons offset -->
</div><!-- /buttons .form-group -->
<?php } ?>
<?php if (!$judgeaddress_add->IsMobileOrModal) { ?>
</div><!-- /desktop -->
<?php } ?>
</form>
<?php
$judgeaddress_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
$judgeaddress_add->terminate();
?>
