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

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

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

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

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

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

// Validate form
fcourtaddressadd.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 ($courtaddress_add->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", $courtaddress->CourtID->caption(), $courtaddress->CourtID->RequiredErrorMessage)) ?>");
		<?php } ?>
		<?php if ($courtaddress_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", $courtaddress->AddressTypeID->caption(), $courtaddress->AddressTypeID->RequiredErrorMessage)) ?>");
		<?php } ?>
		<?php if ($courtaddress_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", $courtaddress->Address->caption(), $courtaddress->Address->RequiredErrorMessage)) ?>");
		<?php } ?>
		<?php if ($courtaddress_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", $courtaddress->City->caption(), $courtaddress->City->RequiredErrorMessage)) ?>");
		<?php } ?>
		<?php if ($courtaddress_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", $courtaddress->Region->caption(), $courtaddress->Region->RequiredErrorMessage)) ?>");
		<?php } ?>
		<?php if ($courtaddress_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", $courtaddress->PostalCode->caption(), $courtaddress->PostalCode->RequiredErrorMessage)) ?>");
		<?php } ?>
		<?php if ($courtaddress_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", $courtaddress->Country->caption(), $courtaddress->Country->RequiredErrorMessage)) ?>");
		<?php } ?>
		<?php if ($courtaddress_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", $courtaddress->Notes->caption(), $courtaddress->Notes->RequiredErrorMessage)) ?>");
		<?php } ?>
		<?php if ($courtaddress_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", $courtaddress->Primary->caption(), $courtaddress->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
fcourtaddressadd.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
fcourtaddressadd.validateRequired = <?php echo json_encode(CLIENT_VALIDATE) ?>;

// Dynamic selection lists
fcourtaddressadd.lists["x_CourtID"] = <?php echo $courtaddress_add->CourtID->Lookup->toClientList() ?>;
fcourtaddressadd.lists["x_CourtID"].options = <?php echo JsonEncode($courtaddress_add->CourtID->lookupOptions()) ?>;
fcourtaddressadd.lists["x_AddressTypeID"] = <?php echo $courtaddress_add->AddressTypeID->Lookup->toClientList() ?>;
fcourtaddressadd.lists["x_AddressTypeID"].options = <?php echo JsonEncode($courtaddress_add->AddressTypeID->lookupOptions()) ?>;
fcourtaddressadd.lists["x_Primary[]"] = <?php echo $courtaddress_add->Primary->Lookup->toClientList() ?>;
fcourtaddressadd.lists["x_Primary[]"].options = <?php echo JsonEncode($courtaddress_add->Primary->options(FALSE, TRUE)) ?>;

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

// Write your client script here, no need to add script tags.
</script>
<?php $courtaddress_add->showPageHeader(); ?>
<?php
$courtaddress_add->showMessage();
?>
<form name="fcourtaddressadd" id="fcourtaddressadd" class="<?php echo $courtaddress_add->FormClassName ?>" action="<?php echo CurrentPageName() ?>" method="post">
<?php if ($courtaddress_add->CheckToken) { ?>
<input type="hidden" name="<?php echo TOKEN_NAME ?>" value="<?php echo $courtaddress_add->Token ?>">
<?php } ?>
<input type="hidden" name="t" value="courtaddress">
<input type="hidden" name="action" id="action" value="insert">
<input type="hidden" name="modal" value="<?php echo (int)$courtaddress_add->IsModal ?>">
<?php if ($courtaddress->getCurrentMasterTable() == "courts") { ?>
<input type="hidden" name="<?php echo TABLE_SHOW_MASTER ?>" value="courts">
<input type="hidden" name="fk_CourtID" value="<?php echo $courtaddress->CourtID->getSessionValue() ?>">
<?php } ?>
<?php if (!$courtaddress_add->IsMobileOrModal) { ?>
<div class="ew-desktop"><!-- desktop -->
<?php } ?>
<?php if ($courtaddress_add->IsMobileOrModal) { ?>
<div class="ew-add-div"><!-- page* -->
<?php } else { ?>
<table id="tbl_courtaddressadd" class="table table-striped table-sm ew-desktop-table"><!-- table* -->
<?php } ?>
<?php if ($courtaddress->CourtID->Visible) { // CourtID ?>
<?php if ($courtaddress_add->IsMobileOrModal) { ?>
	<div id="r_CourtID" class="form-group row">
		<label id="elh_courtaddress_CourtID" for="x_CourtID" class="<?php echo $courtaddress_add->LeftColumnClass ?>"><?php echo $courtaddress->CourtID->caption() ?><?php echo ($courtaddress->CourtID->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $courtaddress_add->RightColumnClass ?>"><div<?php echo $courtaddress->CourtID->cellAttributes() ?>>
<?php if ($courtaddress->CourtID->getSessionValue() <> "") { ?>
<span id="el_courtaddress_CourtID">
<span<?php echo $courtaddress->CourtID->viewAttributes() ?>>
<input type="text" readonly class="form-control-plaintext" value="<?php echo RemoveHtml($courtaddress->CourtID->ViewValue) ?>"></span>
</span>
<input type="hidden" id="x_CourtID" name="x_CourtID" value="<?php echo HtmlEncode($courtaddress->CourtID->CurrentValue) ?>">
<?php } else { ?>
<span id="el_courtaddress_CourtID">
<div class="input-group">
	<select class="custom-select ew-custom-select" data-table="courtaddress" data-field="x_CourtID" data-value-separator="<?php echo $courtaddress->CourtID->displayValueSeparatorAttribute() ?>" id="x_CourtID" name="x_CourtID"<?php echo $courtaddress->CourtID->editAttributes() ?>>
		<?php echo $courtaddress->CourtID->selectOptionListHtml("x_CourtID") ?>
	</select>
</div>
<?php echo $courtaddress->CourtID->Lookup->getParamTag("p_x_CourtID") ?>
</span>
<?php } ?>
<?php echo $courtaddress->CourtID->CustomMsg ?></div></div>
	</div>
<?php } else { ?>
	<tr id="r_CourtID">
		<td class="<?php echo $courtaddress_add->TableLeftColumnClass ?>"><span id="elh_courtaddress_CourtID"><?php echo $courtaddress->CourtID->caption() ?><?php echo ($courtaddress->CourtID->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></span></td>
		<td<?php echo $courtaddress->CourtID->cellAttributes() ?>>
<?php if ($courtaddress->CourtID->getSessionValue() <> "") { ?>
<span id="el_courtaddress_CourtID">
<span<?php echo $courtaddress->CourtID->viewAttributes() ?>>
<input type="text" readonly class="form-control-plaintext" value="<?php echo RemoveHtml($courtaddress->CourtID->ViewValue) ?>"></span>
</span>
<input type="hidden" id="x_CourtID" name="x_CourtID" value="<?php echo HtmlEncode($courtaddress->CourtID->CurrentValue) ?>">
<?php } else { ?>
<span id="el_courtaddress_CourtID">
<div class="input-group">
	<select class="custom-select ew-custom-select" data-table="courtaddress" data-field="x_CourtID" data-value-separator="<?php echo $courtaddress->CourtID->displayValueSeparatorAttribute() ?>" id="x_CourtID" name="x_CourtID"<?php echo $courtaddress->CourtID->editAttributes() ?>>
		<?php echo $courtaddress->CourtID->selectOptionListHtml("x_CourtID") ?>
	</select>
</div>
<?php echo $courtaddress->CourtID->Lookup->getParamTag("p_x_CourtID") ?>
</span>
<?php } ?>
<?php echo $courtaddress->CourtID->CustomMsg ?></td>
	</tr>
<?php } ?>
<?php } ?>
<?php if ($courtaddress->AddressTypeID->Visible) { // AddressTypeID ?>
<?php if ($courtaddress_add->IsMobileOrModal) { ?>
	<div id="r_AddressTypeID" class="form-group row">
		<label id="elh_courtaddress_AddressTypeID" for="x_AddressTypeID" class="<?php echo $courtaddress_add->LeftColumnClass ?>"><?php echo $courtaddress->AddressTypeID->caption() ?><?php echo ($courtaddress->AddressTypeID->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $courtaddress_add->RightColumnClass ?>"><div<?php echo $courtaddress->AddressTypeID->cellAttributes() ?>>
<span id="el_courtaddress_AddressTypeID">
<div class="input-group">
	<select class="custom-select ew-custom-select" data-table="courtaddress" data-field="x_AddressTypeID" data-value-separator="<?php echo $courtaddress->AddressTypeID->displayValueSeparatorAttribute() ?>" id="x_AddressTypeID" name="x_AddressTypeID"<?php echo $courtaddress->AddressTypeID->editAttributes() ?>>
		<?php echo $courtaddress->AddressTypeID->selectOptionListHtml("x_AddressTypeID") ?>
	</select>
</div>
<?php echo $courtaddress->AddressTypeID->Lookup->getParamTag("p_x_AddressTypeID") ?>
</span>
<?php echo $courtaddress->AddressTypeID->CustomMsg ?></div></div>
	</div>
<?php } else { ?>
	<tr id="r_AddressTypeID">
		<td class="<?php echo $courtaddress_add->TableLeftColumnClass ?>"><span id="elh_courtaddress_AddressTypeID"><?php echo $courtaddress->AddressTypeID->caption() ?><?php echo ($courtaddress->AddressTypeID->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></span></td>
		<td<?php echo $courtaddress->AddressTypeID->cellAttributes() ?>>
<span id="el_courtaddress_AddressTypeID">
<div class="input-group">
	<select class="custom-select ew-custom-select" data-table="courtaddress" data-field="x_AddressTypeID" data-value-separator="<?php echo $courtaddress->AddressTypeID->displayValueSeparatorAttribute() ?>" id="x_AddressTypeID" name="x_AddressTypeID"<?php echo $courtaddress->AddressTypeID->editAttributes() ?>>
		<?php echo $courtaddress->AddressTypeID->selectOptionListHtml("x_AddressTypeID") ?>
	</select>
</div>
<?php echo $courtaddress->AddressTypeID->Lookup->getParamTag("p_x_AddressTypeID") ?>
</span>
<?php echo $courtaddress->AddressTypeID->CustomMsg ?></td>
	</tr>
<?php } ?>
<?php } ?>
<?php if ($courtaddress->Address->Visible) { // Address ?>
<?php if ($courtaddress_add->IsMobileOrModal) { ?>
	<div id="r_Address" class="form-group row">
		<label id="elh_courtaddress_Address" for="x_Address" class="<?php echo $courtaddress_add->LeftColumnClass ?>"><?php echo $courtaddress->Address->caption() ?><?php echo ($courtaddress->Address->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $courtaddress_add->RightColumnClass ?>"><div<?php echo $courtaddress->Address->cellAttributes() ?>>
<span id="el_courtaddress_Address">
<input type="text" data-table="courtaddress" data-field="x_Address" name="x_Address" id="x_Address" size="30" maxlength="150" placeholder="<?php echo HtmlEncode($courtaddress->Address->getPlaceHolder()) ?>" value="<?php echo $courtaddress->Address->EditValue ?>"<?php echo $courtaddress->Address->editAttributes() ?>>
</span>
<?php echo $courtaddress->Address->CustomMsg ?></div></div>
	</div>
<?php } else { ?>
	<tr id="r_Address">
		<td class="<?php echo $courtaddress_add->TableLeftColumnClass ?>"><span id="elh_courtaddress_Address"><?php echo $courtaddress->Address->caption() ?><?php echo ($courtaddress->Address->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></span></td>
		<td<?php echo $courtaddress->Address->cellAttributes() ?>>
<span id="el_courtaddress_Address">
<input type="text" data-table="courtaddress" data-field="x_Address" name="x_Address" id="x_Address" size="30" maxlength="150" placeholder="<?php echo HtmlEncode($courtaddress->Address->getPlaceHolder()) ?>" value="<?php echo $courtaddress->Address->EditValue ?>"<?php echo $courtaddress->Address->editAttributes() ?>>
</span>
<?php echo $courtaddress->Address->CustomMsg ?></td>
	</tr>
<?php } ?>
<?php } ?>
<?php if ($courtaddress->City->Visible) { // City ?>
<?php if ($courtaddress_add->IsMobileOrModal) { ?>
	<div id="r_City" class="form-group row">
		<label id="elh_courtaddress_City" for="x_City" class="<?php echo $courtaddress_add->LeftColumnClass ?>"><?php echo $courtaddress->City->caption() ?><?php echo ($courtaddress->City->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $courtaddress_add->RightColumnClass ?>"><div<?php echo $courtaddress->City->cellAttributes() ?>>
<span id="el_courtaddress_City">
<input type="text" data-table="courtaddress" data-field="x_City" name="x_City" id="x_City" size="30" maxlength="30" placeholder="<?php echo HtmlEncode($courtaddress->City->getPlaceHolder()) ?>" value="<?php echo $courtaddress->City->EditValue ?>"<?php echo $courtaddress->City->editAttributes() ?>>
</span>
<?php echo $courtaddress->City->CustomMsg ?></div></div>
	</div>
<?php } else { ?>
	<tr id="r_City">
		<td class="<?php echo $courtaddress_add->TableLeftColumnClass ?>"><span id="elh_courtaddress_City"><?php echo $courtaddress->City->caption() ?><?php echo ($courtaddress->City->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></span></td>
		<td<?php echo $courtaddress->City->cellAttributes() ?>>
<span id="el_courtaddress_City">
<input type="text" data-table="courtaddress" data-field="x_City" name="x_City" id="x_City" size="30" maxlength="30" placeholder="<?php echo HtmlEncode($courtaddress->City->getPlaceHolder()) ?>" value="<?php echo $courtaddress->City->EditValue ?>"<?php echo $courtaddress->City->editAttributes() ?>>
</span>
<?php echo $courtaddress->City->CustomMsg ?></td>
	</tr>
<?php } ?>
<?php } ?>
<?php if ($courtaddress->Region->Visible) { // Region ?>
<?php if ($courtaddress_add->IsMobileOrModal) { ?>
	<div id="r_Region" class="form-group row">
		<label id="elh_courtaddress_Region" for="x_Region" class="<?php echo $courtaddress_add->LeftColumnClass ?>"><?php echo $courtaddress->Region->caption() ?><?php echo ($courtaddress->Region->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $courtaddress_add->RightColumnClass ?>"><div<?php echo $courtaddress->Region->cellAttributes() ?>>
<span id="el_courtaddress_Region">
<input type="text" data-table="courtaddress" data-field="x_Region" name="x_Region" id="x_Region" size="30" maxlength="30" placeholder="<?php echo HtmlEncode($courtaddress->Region->getPlaceHolder()) ?>" value="<?php echo $courtaddress->Region->EditValue ?>"<?php echo $courtaddress->Region->editAttributes() ?>>
</span>
<?php echo $courtaddress->Region->CustomMsg ?></div></div>
	</div>
<?php } else { ?>
	<tr id="r_Region">
		<td class="<?php echo $courtaddress_add->TableLeftColumnClass ?>"><span id="elh_courtaddress_Region"><?php echo $courtaddress->Region->caption() ?><?php echo ($courtaddress->Region->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></span></td>
		<td<?php echo $courtaddress->Region->cellAttributes() ?>>
<span id="el_courtaddress_Region">
<input type="text" data-table="courtaddress" data-field="x_Region" name="x_Region" id="x_Region" size="30" maxlength="30" placeholder="<?php echo HtmlEncode($courtaddress->Region->getPlaceHolder()) ?>" value="<?php echo $courtaddress->Region->EditValue ?>"<?php echo $courtaddress->Region->editAttributes() ?>>
</span>
<?php echo $courtaddress->Region->CustomMsg ?></td>
	</tr>
<?php } ?>
<?php } ?>
<?php if ($courtaddress->PostalCode->Visible) { // PostalCode ?>
<?php if ($courtaddress_add->IsMobileOrModal) { ?>
	<div id="r_PostalCode" class="form-group row">
		<label id="elh_courtaddress_PostalCode" for="x_PostalCode" class="<?php echo $courtaddress_add->LeftColumnClass ?>"><?php echo $courtaddress->PostalCode->caption() ?><?php echo ($courtaddress->PostalCode->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $courtaddress_add->RightColumnClass ?>"><div<?php echo $courtaddress->PostalCode->cellAttributes() ?>>
<span id="el_courtaddress_PostalCode">
<input type="text" data-table="courtaddress" data-field="x_PostalCode" name="x_PostalCode" id="x_PostalCode" size="30" maxlength="10" placeholder="<?php echo HtmlEncode($courtaddress->PostalCode->getPlaceHolder()) ?>" value="<?php echo $courtaddress->PostalCode->EditValue ?>"<?php echo $courtaddress->PostalCode->editAttributes() ?>>
</span>
<?php echo $courtaddress->PostalCode->CustomMsg ?></div></div>
	</div>
<?php } else { ?>
	<tr id="r_PostalCode">
		<td class="<?php echo $courtaddress_add->TableLeftColumnClass ?>"><span id="elh_courtaddress_PostalCode"><?php echo $courtaddress->PostalCode->caption() ?><?php echo ($courtaddress->PostalCode->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></span></td>
		<td<?php echo $courtaddress->PostalCode->cellAttributes() ?>>
<span id="el_courtaddress_PostalCode">
<input type="text" data-table="courtaddress" data-field="x_PostalCode" name="x_PostalCode" id="x_PostalCode" size="30" maxlength="10" placeholder="<?php echo HtmlEncode($courtaddress->PostalCode->getPlaceHolder()) ?>" value="<?php echo $courtaddress->PostalCode->EditValue ?>"<?php echo $courtaddress->PostalCode->editAttributes() ?>>
</span>
<?php echo $courtaddress->PostalCode->CustomMsg ?></td>
	</tr>
<?php } ?>
<?php } ?>
<?php if ($courtaddress->Country->Visible) { // Country ?>
<?php if ($courtaddress_add->IsMobileOrModal) { ?>
	<div id="r_Country" class="form-group row">
		<label id="elh_courtaddress_Country" for="x_Country" class="<?php echo $courtaddress_add->LeftColumnClass ?>"><?php echo $courtaddress->Country->caption() ?><?php echo ($courtaddress->Country->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $courtaddress_add->RightColumnClass ?>"><div<?php echo $courtaddress->Country->cellAttributes() ?>>
<span id="el_courtaddress_Country">
<input type="text" data-table="courtaddress" data-field="x_Country" name="x_Country" id="x_Country" size="30" maxlength="20" placeholder="<?php echo HtmlEncode($courtaddress->Country->getPlaceHolder()) ?>" value="<?php echo $courtaddress->Country->EditValue ?>"<?php echo $courtaddress->Country->editAttributes() ?>>
</span>
<?php echo $courtaddress->Country->CustomMsg ?></div></div>
	</div>
<?php } else { ?>
	<tr id="r_Country">
		<td class="<?php echo $courtaddress_add->TableLeftColumnClass ?>"><span id="elh_courtaddress_Country"><?php echo $courtaddress->Country->caption() ?><?php echo ($courtaddress->Country->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></span></td>
		<td<?php echo $courtaddress->Country->cellAttributes() ?>>
<span id="el_courtaddress_Country">
<input type="text" data-table="courtaddress" data-field="x_Country" name="x_Country" id="x_Country" size="30" maxlength="20" placeholder="<?php echo HtmlEncode($courtaddress->Country->getPlaceHolder()) ?>" value="<?php echo $courtaddress->Country->EditValue ?>"<?php echo $courtaddress->Country->editAttributes() ?>>
</span>
<?php echo $courtaddress->Country->CustomMsg ?></td>
	</tr>
<?php } ?>
<?php } ?>
<?php if ($courtaddress->Notes->Visible) { // Notes ?>
<?php if ($courtaddress_add->IsMobileOrModal) { ?>
	<div id="r_Notes" class="form-group row">
		<label id="elh_courtaddress_Notes" for="x_Notes" class="<?php echo $courtaddress_add->LeftColumnClass ?>"><?php echo $courtaddress->Notes->caption() ?><?php echo ($courtaddress->Notes->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $courtaddress_add->RightColumnClass ?>"><div<?php echo $courtaddress->Notes->cellAttributes() ?>>
<span id="el_courtaddress_Notes">
<input type="text" data-table="courtaddress" data-field="x_Notes" name="x_Notes" id="x_Notes" size="30" maxlength="100" placeholder="<?php echo HtmlEncode($courtaddress->Notes->getPlaceHolder()) ?>" value="<?php echo $courtaddress->Notes->EditValue ?>"<?php echo $courtaddress->Notes->editAttributes() ?>>
</span>
<?php echo $courtaddress->Notes->CustomMsg ?></div></div>
	</div>
<?php } else { ?>
	<tr id="r_Notes">
		<td class="<?php echo $courtaddress_add->TableLeftColumnClass ?>"><span id="elh_courtaddress_Notes"><?php echo $courtaddress->Notes->caption() ?><?php echo ($courtaddress->Notes->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></span></td>
		<td<?php echo $courtaddress->Notes->cellAttributes() ?>>
<span id="el_courtaddress_Notes">
<input type="text" data-table="courtaddress" data-field="x_Notes" name="x_Notes" id="x_Notes" size="30" maxlength="100" placeholder="<?php echo HtmlEncode($courtaddress->Notes->getPlaceHolder()) ?>" value="<?php echo $courtaddress->Notes->EditValue ?>"<?php echo $courtaddress->Notes->editAttributes() ?>>
</span>
<?php echo $courtaddress->Notes->CustomMsg ?></td>
	</tr>
<?php } ?>
<?php } ?>
<?php if ($courtaddress->Primary->Visible) { // Primary ?>
<?php if ($courtaddress_add->IsMobileOrModal) { ?>
	<div id="r_Primary" class="form-group row">
		<label id="elh_courtaddress_Primary" class="<?php echo $courtaddress_add->LeftColumnClass ?>"><?php echo $courtaddress->Primary->caption() ?><?php echo ($courtaddress->Primary->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $courtaddress_add->RightColumnClass ?>"><div<?php echo $courtaddress->Primary->cellAttributes() ?>>
<span id="el_courtaddress_Primary">
<?php
$selwrk = (ConvertToBool($courtaddress->Primary->CurrentValue)) ? " checked" : "";
?>
<input type="checkbox" data-table="courtaddress" data-field="x_Primary" name="x_Primary[]" id="x_Primary[]" value="1"<?php echo $selwrk ?><?php echo $courtaddress->Primary->editAttributes() ?>>
</span>
<?php echo $courtaddress->Primary->CustomMsg ?></div></div>
	</div>
<?php } else { ?>
	<tr id="r_Primary">
		<td class="<?php echo $courtaddress_add->TableLeftColumnClass ?>"><span id="elh_courtaddress_Primary"><?php echo $courtaddress->Primary->caption() ?><?php echo ($courtaddress->Primary->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></span></td>
		<td<?php echo $courtaddress->Primary->cellAttributes() ?>>
<span id="el_courtaddress_Primary">
<?php
$selwrk = (ConvertToBool($courtaddress->Primary->CurrentValue)) ? " checked" : "";
?>
<input type="checkbox" data-table="courtaddress" data-field="x_Primary" name="x_Primary[]" id="x_Primary[]" value="1"<?php echo $selwrk ?><?php echo $courtaddress->Primary->editAttributes() ?>>
</span>
<?php echo $courtaddress->Primary->CustomMsg ?></td>
	</tr>
<?php } ?>
<?php } ?>
<?php if ($courtaddress_add->IsMobileOrModal) { ?>
</div><!-- /page* -->
<?php } else { ?>
</table><!-- /table* -->
<?php } ?>
<?php if (!$courtaddress_add->IsModal) { ?>
<div class="form-group row"><!-- buttons .form-group -->
	<div class="<?php echo $courtaddress_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 $courtaddress_add->getReturnUrl() ?>"><?php echo $Language->phrase("CancelBtn") ?></button>
	</div><!-- /buttons offset -->
</div><!-- /buttons .form-group -->
<?php } ?>
<?php if (!$courtaddress_add->IsMobileOrModal) { ?>
</div><!-- /desktop -->
<?php } ?>
</form>
<?php
$courtaddress_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
$courtaddress_add->terminate();
?>
