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

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

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

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

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

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

// Validate form
flitigantaddressadd.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 ($litigantaddress_add->LitigantID->Required) { ?>
			elm = this.getElements("x" + infix + "_LitigantID");
			if (elm && !ew.isHidden(elm) && !ew.hasValue(elm))
				return this.onError(elm, "<?php echo JsEncode(str_replace("%s", $litigantaddress->LitigantID->caption(), $litigantaddress->LitigantID->RequiredErrorMessage)) ?>");
		<?php } ?>
		<?php if ($litigantaddress_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", $litigantaddress->AddressTypeID->caption(), $litigantaddress->AddressTypeID->RequiredErrorMessage)) ?>");
		<?php } ?>
		<?php if ($litigantaddress_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", $litigantaddress->Address->caption(), $litigantaddress->Address->RequiredErrorMessage)) ?>");
		<?php } ?>
		<?php if ($litigantaddress_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", $litigantaddress->City->caption(), $litigantaddress->City->RequiredErrorMessage)) ?>");
		<?php } ?>
		<?php if ($litigantaddress_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", $litigantaddress->Region->caption(), $litigantaddress->Region->RequiredErrorMessage)) ?>");
		<?php } ?>
		<?php if ($litigantaddress_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", $litigantaddress->PostalCode->caption(), $litigantaddress->PostalCode->RequiredErrorMessage)) ?>");
		<?php } ?>
		<?php if ($litigantaddress_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", $litigantaddress->Country->caption(), $litigantaddress->Country->RequiredErrorMessage)) ?>");
		<?php } ?>
		<?php if ($litigantaddress_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", $litigantaddress->Notes->caption(), $litigantaddress->Notes->RequiredErrorMessage)) ?>");
		<?php } ?>
		<?php if ($litigantaddress_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", $litigantaddress->Primary->caption(), $litigantaddress->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
flitigantaddressadd.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
flitigantaddressadd.validateRequired = <?php echo json_encode(CLIENT_VALIDATE) ?>;

// Dynamic selection lists
flitigantaddressadd.lists["x_LitigantID"] = <?php echo $litigantaddress_add->LitigantID->Lookup->toClientList() ?>;
flitigantaddressadd.lists["x_LitigantID"].options = <?php echo JsonEncode($litigantaddress_add->LitigantID->lookupOptions()) ?>;
flitigantaddressadd.lists["x_AddressTypeID"] = <?php echo $litigantaddress_add->AddressTypeID->Lookup->toClientList() ?>;
flitigantaddressadd.lists["x_AddressTypeID"].options = <?php echo JsonEncode($litigantaddress_add->AddressTypeID->lookupOptions()) ?>;
flitigantaddressadd.lists["x_Primary[]"] = <?php echo $litigantaddress_add->Primary->Lookup->toClientList() ?>;
flitigantaddressadd.lists["x_Primary[]"].options = <?php echo JsonEncode($litigantaddress_add->Primary->options(FALSE, TRUE)) ?>;

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

// Write your client script here, no need to add script tags.
</script>
<?php $litigantaddress_add->showPageHeader(); ?>
<?php
$litigantaddress_add->showMessage();
?>
<form name="flitigantaddressadd" id="flitigantaddressadd" class="<?php echo $litigantaddress_add->FormClassName ?>" action="<?php echo CurrentPageName() ?>" method="post">
<?php if ($litigantaddress_add->CheckToken) { ?>
<input type="hidden" name="<?php echo TOKEN_NAME ?>" value="<?php echo $litigantaddress_add->Token ?>">
<?php } ?>
<input type="hidden" name="t" value="litigantaddress">
<input type="hidden" name="action" id="action" value="insert">
<input type="hidden" name="modal" value="<?php echo (int)$litigantaddress_add->IsModal ?>">
<?php if ($litigantaddress->getCurrentMasterTable() == "litigants") { ?>
<input type="hidden" name="<?php echo TABLE_SHOW_MASTER ?>" value="litigants">
<input type="hidden" name="fk_LitigantID" value="<?php echo $litigantaddress->LitigantID->getSessionValue() ?>">
<?php } ?>
<?php if (!$litigantaddress_add->IsMobileOrModal) { ?>
<div class="ew-desktop"><!-- desktop -->
<?php } ?>
<?php if ($litigantaddress_add->IsMobileOrModal) { ?>
<div class="ew-add-div"><!-- page* -->
<?php } else { ?>
<table id="tbl_litigantaddressadd" class="table table-striped table-sm ew-desktop-table"><!-- table* -->
<?php } ?>
<?php if ($litigantaddress->LitigantID->Visible) { // LitigantID ?>
<?php if ($litigantaddress_add->IsMobileOrModal) { ?>
	<div id="r_LitigantID" class="form-group row">
		<label id="elh_litigantaddress_LitigantID" for="x_LitigantID" class="<?php echo $litigantaddress_add->LeftColumnClass ?>"><?php echo $litigantaddress->LitigantID->caption() ?><?php echo ($litigantaddress->LitigantID->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $litigantaddress_add->RightColumnClass ?>"><div<?php echo $litigantaddress->LitigantID->cellAttributes() ?>>
<?php if ($litigantaddress->LitigantID->getSessionValue() <> "") { ?>
<span id="el_litigantaddress_LitigantID">
<span<?php echo $litigantaddress->LitigantID->viewAttributes() ?>>
<input type="text" readonly class="form-control-plaintext" value="<?php echo RemoveHtml($litigantaddress->LitigantID->ViewValue) ?>"></span>
</span>
<input type="hidden" id="x_LitigantID" name="x_LitigantID" value="<?php echo HtmlEncode($litigantaddress->LitigantID->CurrentValue) ?>">
<?php } else { ?>
<span id="el_litigantaddress_LitigantID">
<div class="input-group">
	<select class="custom-select ew-custom-select" data-table="litigantaddress" data-field="x_LitigantID" data-value-separator="<?php echo $litigantaddress->LitigantID->displayValueSeparatorAttribute() ?>" id="x_LitigantID" name="x_LitigantID"<?php echo $litigantaddress->LitigantID->editAttributes() ?>>
		<?php echo $litigantaddress->LitigantID->selectOptionListHtml("x_LitigantID") ?>
	</select>
</div>
<?php echo $litigantaddress->LitigantID->Lookup->getParamTag("p_x_LitigantID") ?>
</span>
<?php } ?>
<?php echo $litigantaddress->LitigantID->CustomMsg ?></div></div>
	</div>
<?php } else { ?>
	<tr id="r_LitigantID">
		<td class="<?php echo $litigantaddress_add->TableLeftColumnClass ?>"><span id="elh_litigantaddress_LitigantID"><?php echo $litigantaddress->LitigantID->caption() ?><?php echo ($litigantaddress->LitigantID->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></span></td>
		<td<?php echo $litigantaddress->LitigantID->cellAttributes() ?>>
<?php if ($litigantaddress->LitigantID->getSessionValue() <> "") { ?>
<span id="el_litigantaddress_LitigantID">
<span<?php echo $litigantaddress->LitigantID->viewAttributes() ?>>
<input type="text" readonly class="form-control-plaintext" value="<?php echo RemoveHtml($litigantaddress->LitigantID->ViewValue) ?>"></span>
</span>
<input type="hidden" id="x_LitigantID" name="x_LitigantID" value="<?php echo HtmlEncode($litigantaddress->LitigantID->CurrentValue) ?>">
<?php } else { ?>
<span id="el_litigantaddress_LitigantID">
<div class="input-group">
	<select class="custom-select ew-custom-select" data-table="litigantaddress" data-field="x_LitigantID" data-value-separator="<?php echo $litigantaddress->LitigantID->displayValueSeparatorAttribute() ?>" id="x_LitigantID" name="x_LitigantID"<?php echo $litigantaddress->LitigantID->editAttributes() ?>>
		<?php echo $litigantaddress->LitigantID->selectOptionListHtml("x_LitigantID") ?>
	</select>
</div>
<?php echo $litigantaddress->LitigantID->Lookup->getParamTag("p_x_LitigantID") ?>
</span>
<?php } ?>
<?php echo $litigantaddress->LitigantID->CustomMsg ?></td>
	</tr>
<?php } ?>
<?php } ?>
<?php if ($litigantaddress->AddressTypeID->Visible) { // AddressTypeID ?>
<?php if ($litigantaddress_add->IsMobileOrModal) { ?>
	<div id="r_AddressTypeID" class="form-group row">
		<label id="elh_litigantaddress_AddressTypeID" for="x_AddressTypeID" class="<?php echo $litigantaddress_add->LeftColumnClass ?>"><?php echo $litigantaddress->AddressTypeID->caption() ?><?php echo ($litigantaddress->AddressTypeID->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $litigantaddress_add->RightColumnClass ?>"><div<?php echo $litigantaddress->AddressTypeID->cellAttributes() ?>>
<span id="el_litigantaddress_AddressTypeID">
<div class="input-group">
	<select class="custom-select ew-custom-select" data-table="litigantaddress" data-field="x_AddressTypeID" data-value-separator="<?php echo $litigantaddress->AddressTypeID->displayValueSeparatorAttribute() ?>" id="x_AddressTypeID" name="x_AddressTypeID"<?php echo $litigantaddress->AddressTypeID->editAttributes() ?>>
		<?php echo $litigantaddress->AddressTypeID->selectOptionListHtml("x_AddressTypeID") ?>
	</select>
</div>
<?php echo $litigantaddress->AddressTypeID->Lookup->getParamTag("p_x_AddressTypeID") ?>
</span>
<?php echo $litigantaddress->AddressTypeID->CustomMsg ?></div></div>
	</div>
<?php } else { ?>
	<tr id="r_AddressTypeID">
		<td class="<?php echo $litigantaddress_add->TableLeftColumnClass ?>"><span id="elh_litigantaddress_AddressTypeID"><?php echo $litigantaddress->AddressTypeID->caption() ?><?php echo ($litigantaddress->AddressTypeID->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></span></td>
		<td<?php echo $litigantaddress->AddressTypeID->cellAttributes() ?>>
<span id="el_litigantaddress_AddressTypeID">
<div class="input-group">
	<select class="custom-select ew-custom-select" data-table="litigantaddress" data-field="x_AddressTypeID" data-value-separator="<?php echo $litigantaddress->AddressTypeID->displayValueSeparatorAttribute() ?>" id="x_AddressTypeID" name="x_AddressTypeID"<?php echo $litigantaddress->AddressTypeID->editAttributes() ?>>
		<?php echo $litigantaddress->AddressTypeID->selectOptionListHtml("x_AddressTypeID") ?>
	</select>
</div>
<?php echo $litigantaddress->AddressTypeID->Lookup->getParamTag("p_x_AddressTypeID") ?>
</span>
<?php echo $litigantaddress->AddressTypeID->CustomMsg ?></td>
	</tr>
<?php } ?>
<?php } ?>
<?php if ($litigantaddress->Address->Visible) { // Address ?>
<?php if ($litigantaddress_add->IsMobileOrModal) { ?>
	<div id="r_Address" class="form-group row">
		<label id="elh_litigantaddress_Address" for="x_Address" class="<?php echo $litigantaddress_add->LeftColumnClass ?>"><?php echo $litigantaddress->Address->caption() ?><?php echo ($litigantaddress->Address->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $litigantaddress_add->RightColumnClass ?>"><div<?php echo $litigantaddress->Address->cellAttributes() ?>>
<span id="el_litigantaddress_Address">
<input type="text" data-table="litigantaddress" data-field="x_Address" name="x_Address" id="x_Address" size="30" maxlength="150" placeholder="<?php echo HtmlEncode($litigantaddress->Address->getPlaceHolder()) ?>" value="<?php echo $litigantaddress->Address->EditValue ?>"<?php echo $litigantaddress->Address->editAttributes() ?>>
</span>
<?php echo $litigantaddress->Address->CustomMsg ?></div></div>
	</div>
<?php } else { ?>
	<tr id="r_Address">
		<td class="<?php echo $litigantaddress_add->TableLeftColumnClass ?>"><span id="elh_litigantaddress_Address"><?php echo $litigantaddress->Address->caption() ?><?php echo ($litigantaddress->Address->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></span></td>
		<td<?php echo $litigantaddress->Address->cellAttributes() ?>>
<span id="el_litigantaddress_Address">
<input type="text" data-table="litigantaddress" data-field="x_Address" name="x_Address" id="x_Address" size="30" maxlength="150" placeholder="<?php echo HtmlEncode($litigantaddress->Address->getPlaceHolder()) ?>" value="<?php echo $litigantaddress->Address->EditValue ?>"<?php echo $litigantaddress->Address->editAttributes() ?>>
</span>
<?php echo $litigantaddress->Address->CustomMsg ?></td>
	</tr>
<?php } ?>
<?php } ?>
<?php if ($litigantaddress->City->Visible) { // City ?>
<?php if ($litigantaddress_add->IsMobileOrModal) { ?>
	<div id="r_City" class="form-group row">
		<label id="elh_litigantaddress_City" for="x_City" class="<?php echo $litigantaddress_add->LeftColumnClass ?>"><?php echo $litigantaddress->City->caption() ?><?php echo ($litigantaddress->City->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $litigantaddress_add->RightColumnClass ?>"><div<?php echo $litigantaddress->City->cellAttributes() ?>>
<span id="el_litigantaddress_City">
<input type="text" data-table="litigantaddress" data-field="x_City" name="x_City" id="x_City" size="30" maxlength="30" placeholder="<?php echo HtmlEncode($litigantaddress->City->getPlaceHolder()) ?>" value="<?php echo $litigantaddress->City->EditValue ?>"<?php echo $litigantaddress->City->editAttributes() ?>>
</span>
<?php echo $litigantaddress->City->CustomMsg ?></div></div>
	</div>
<?php } else { ?>
	<tr id="r_City">
		<td class="<?php echo $litigantaddress_add->TableLeftColumnClass ?>"><span id="elh_litigantaddress_City"><?php echo $litigantaddress->City->caption() ?><?php echo ($litigantaddress->City->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></span></td>
		<td<?php echo $litigantaddress->City->cellAttributes() ?>>
<span id="el_litigantaddress_City">
<input type="text" data-table="litigantaddress" data-field="x_City" name="x_City" id="x_City" size="30" maxlength="30" placeholder="<?php echo HtmlEncode($litigantaddress->City->getPlaceHolder()) ?>" value="<?php echo $litigantaddress->City->EditValue ?>"<?php echo $litigantaddress->City->editAttributes() ?>>
</span>
<?php echo $litigantaddress->City->CustomMsg ?></td>
	</tr>
<?php } ?>
<?php } ?>
<?php if ($litigantaddress->Region->Visible) { // Region ?>
<?php if ($litigantaddress_add->IsMobileOrModal) { ?>
	<div id="r_Region" class="form-group row">
		<label id="elh_litigantaddress_Region" for="x_Region" class="<?php echo $litigantaddress_add->LeftColumnClass ?>"><?php echo $litigantaddress->Region->caption() ?><?php echo ($litigantaddress->Region->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $litigantaddress_add->RightColumnClass ?>"><div<?php echo $litigantaddress->Region->cellAttributes() ?>>
<span id="el_litigantaddress_Region">
<input type="text" data-table="litigantaddress" data-field="x_Region" name="x_Region" id="x_Region" size="30" maxlength="30" placeholder="<?php echo HtmlEncode($litigantaddress->Region->getPlaceHolder()) ?>" value="<?php echo $litigantaddress->Region->EditValue ?>"<?php echo $litigantaddress->Region->editAttributes() ?>>
</span>
<?php echo $litigantaddress->Region->CustomMsg ?></div></div>
	</div>
<?php } else { ?>
	<tr id="r_Region">
		<td class="<?php echo $litigantaddress_add->TableLeftColumnClass ?>"><span id="elh_litigantaddress_Region"><?php echo $litigantaddress->Region->caption() ?><?php echo ($litigantaddress->Region->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></span></td>
		<td<?php echo $litigantaddress->Region->cellAttributes() ?>>
<span id="el_litigantaddress_Region">
<input type="text" data-table="litigantaddress" data-field="x_Region" name="x_Region" id="x_Region" size="30" maxlength="30" placeholder="<?php echo HtmlEncode($litigantaddress->Region->getPlaceHolder()) ?>" value="<?php echo $litigantaddress->Region->EditValue ?>"<?php echo $litigantaddress->Region->editAttributes() ?>>
</span>
<?php echo $litigantaddress->Region->CustomMsg ?></td>
	</tr>
<?php } ?>
<?php } ?>
<?php if ($litigantaddress->PostalCode->Visible) { // PostalCode ?>
<?php if ($litigantaddress_add->IsMobileOrModal) { ?>
	<div id="r_PostalCode" class="form-group row">
		<label id="elh_litigantaddress_PostalCode" for="x_PostalCode" class="<?php echo $litigantaddress_add->LeftColumnClass ?>"><?php echo $litigantaddress->PostalCode->caption() ?><?php echo ($litigantaddress->PostalCode->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $litigantaddress_add->RightColumnClass ?>"><div<?php echo $litigantaddress->PostalCode->cellAttributes() ?>>
<span id="el_litigantaddress_PostalCode">
<input type="text" data-table="litigantaddress" data-field="x_PostalCode" name="x_PostalCode" id="x_PostalCode" size="30" maxlength="10" placeholder="<?php echo HtmlEncode($litigantaddress->PostalCode->getPlaceHolder()) ?>" value="<?php echo $litigantaddress->PostalCode->EditValue ?>"<?php echo $litigantaddress->PostalCode->editAttributes() ?>>
</span>
<?php echo $litigantaddress->PostalCode->CustomMsg ?></div></div>
	</div>
<?php } else { ?>
	<tr id="r_PostalCode">
		<td class="<?php echo $litigantaddress_add->TableLeftColumnClass ?>"><span id="elh_litigantaddress_PostalCode"><?php echo $litigantaddress->PostalCode->caption() ?><?php echo ($litigantaddress->PostalCode->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></span></td>
		<td<?php echo $litigantaddress->PostalCode->cellAttributes() ?>>
<span id="el_litigantaddress_PostalCode">
<input type="text" data-table="litigantaddress" data-field="x_PostalCode" name="x_PostalCode" id="x_PostalCode" size="30" maxlength="10" placeholder="<?php echo HtmlEncode($litigantaddress->PostalCode->getPlaceHolder()) ?>" value="<?php echo $litigantaddress->PostalCode->EditValue ?>"<?php echo $litigantaddress->PostalCode->editAttributes() ?>>
</span>
<?php echo $litigantaddress->PostalCode->CustomMsg ?></td>
	</tr>
<?php } ?>
<?php } ?>
<?php if ($litigantaddress->Country->Visible) { // Country ?>
<?php if ($litigantaddress_add->IsMobileOrModal) { ?>
	<div id="r_Country" class="form-group row">
		<label id="elh_litigantaddress_Country" for="x_Country" class="<?php echo $litigantaddress_add->LeftColumnClass ?>"><?php echo $litigantaddress->Country->caption() ?><?php echo ($litigantaddress->Country->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $litigantaddress_add->RightColumnClass ?>"><div<?php echo $litigantaddress->Country->cellAttributes() ?>>
<span id="el_litigantaddress_Country">
<input type="text" data-table="litigantaddress" data-field="x_Country" name="x_Country" id="x_Country" size="30" maxlength="20" placeholder="<?php echo HtmlEncode($litigantaddress->Country->getPlaceHolder()) ?>" value="<?php echo $litigantaddress->Country->EditValue ?>"<?php echo $litigantaddress->Country->editAttributes() ?>>
</span>
<?php echo $litigantaddress->Country->CustomMsg ?></div></div>
	</div>
<?php } else { ?>
	<tr id="r_Country">
		<td class="<?php echo $litigantaddress_add->TableLeftColumnClass ?>"><span id="elh_litigantaddress_Country"><?php echo $litigantaddress->Country->caption() ?><?php echo ($litigantaddress->Country->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></span></td>
		<td<?php echo $litigantaddress->Country->cellAttributes() ?>>
<span id="el_litigantaddress_Country">
<input type="text" data-table="litigantaddress" data-field="x_Country" name="x_Country" id="x_Country" size="30" maxlength="20" placeholder="<?php echo HtmlEncode($litigantaddress->Country->getPlaceHolder()) ?>" value="<?php echo $litigantaddress->Country->EditValue ?>"<?php echo $litigantaddress->Country->editAttributes() ?>>
</span>
<?php echo $litigantaddress->Country->CustomMsg ?></td>
	</tr>
<?php } ?>
<?php } ?>
<?php if ($litigantaddress->Notes->Visible) { // Notes ?>
<?php if ($litigantaddress_add->IsMobileOrModal) { ?>
	<div id="r_Notes" class="form-group row">
		<label id="elh_litigantaddress_Notes" for="x_Notes" class="<?php echo $litigantaddress_add->LeftColumnClass ?>"><?php echo $litigantaddress->Notes->caption() ?><?php echo ($litigantaddress->Notes->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $litigantaddress_add->RightColumnClass ?>"><div<?php echo $litigantaddress->Notes->cellAttributes() ?>>
<span id="el_litigantaddress_Notes">
<input type="text" data-table="litigantaddress" data-field="x_Notes" name="x_Notes" id="x_Notes" size="30" maxlength="100" placeholder="<?php echo HtmlEncode($litigantaddress->Notes->getPlaceHolder()) ?>" value="<?php echo $litigantaddress->Notes->EditValue ?>"<?php echo $litigantaddress->Notes->editAttributes() ?>>
</span>
<?php echo $litigantaddress->Notes->CustomMsg ?></div></div>
	</div>
<?php } else { ?>
	<tr id="r_Notes">
		<td class="<?php echo $litigantaddress_add->TableLeftColumnClass ?>"><span id="elh_litigantaddress_Notes"><?php echo $litigantaddress->Notes->caption() ?><?php echo ($litigantaddress->Notes->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></span></td>
		<td<?php echo $litigantaddress->Notes->cellAttributes() ?>>
<span id="el_litigantaddress_Notes">
<input type="text" data-table="litigantaddress" data-field="x_Notes" name="x_Notes" id="x_Notes" size="30" maxlength="100" placeholder="<?php echo HtmlEncode($litigantaddress->Notes->getPlaceHolder()) ?>" value="<?php echo $litigantaddress->Notes->EditValue ?>"<?php echo $litigantaddress->Notes->editAttributes() ?>>
</span>
<?php echo $litigantaddress->Notes->CustomMsg ?></td>
	</tr>
<?php } ?>
<?php } ?>
<?php if ($litigantaddress->Primary->Visible) { // Primary ?>
<?php if ($litigantaddress_add->IsMobileOrModal) { ?>
	<div id="r_Primary" class="form-group row">
		<label id="elh_litigantaddress_Primary" class="<?php echo $litigantaddress_add->LeftColumnClass ?>"><?php echo $litigantaddress->Primary->caption() ?><?php echo ($litigantaddress->Primary->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $litigantaddress_add->RightColumnClass ?>"><div<?php echo $litigantaddress->Primary->cellAttributes() ?>>
<span id="el_litigantaddress_Primary">
<?php
$selwrk = (ConvertToBool($litigantaddress->Primary->CurrentValue)) ? " checked" : "";
?>
<input type="checkbox" data-table="litigantaddress" data-field="x_Primary" name="x_Primary[]" id="x_Primary[]" value="1"<?php echo $selwrk ?><?php echo $litigantaddress->Primary->editAttributes() ?>>
</span>
<?php echo $litigantaddress->Primary->CustomMsg ?></div></div>
	</div>
<?php } else { ?>
	<tr id="r_Primary">
		<td class="<?php echo $litigantaddress_add->TableLeftColumnClass ?>"><span id="elh_litigantaddress_Primary"><?php echo $litigantaddress->Primary->caption() ?><?php echo ($litigantaddress->Primary->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></span></td>
		<td<?php echo $litigantaddress->Primary->cellAttributes() ?>>
<span id="el_litigantaddress_Primary">
<?php
$selwrk = (ConvertToBool($litigantaddress->Primary->CurrentValue)) ? " checked" : "";
?>
<input type="checkbox" data-table="litigantaddress" data-field="x_Primary" name="x_Primary[]" id="x_Primary[]" value="1"<?php echo $selwrk ?><?php echo $litigantaddress->Primary->editAttributes() ?>>
</span>
<?php echo $litigantaddress->Primary->CustomMsg ?></td>
	</tr>
<?php } ?>
<?php } ?>
<?php if ($litigantaddress_add->IsMobileOrModal) { ?>
</div><!-- /page* -->
<?php } else { ?>
</table><!-- /table* -->
<?php } ?>
<?php if (!$litigantaddress_add->IsModal) { ?>
<div class="form-group row"><!-- buttons .form-group -->
	<div class="<?php echo $litigantaddress_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 $litigantaddress_add->getReturnUrl() ?>"><?php echo $Language->phrase("CancelBtn") ?></button>
	</div><!-- /buttons offset -->
</div><!-- /buttons .form-group -->
<?php } ?>
<?php if (!$litigantaddress_add->IsMobileOrModal) { ?>
</div><!-- /desktop -->
<?php } ?>
</form>
<?php
$litigantaddress_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
$litigantaddress_add->terminate();
?>
