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

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

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

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

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

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

// Validate form
fattachmentsedit.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 ($attachments_edit->AttachmentID->Required) { ?>
			elm = this.getElements("x" + infix + "_AttachmentID");
			if (elm && !ew.isHidden(elm) && !ew.hasValue(elm))
				return this.onError(elm, "<?php echo JsEncode(str_replace("%s", $attachments->AttachmentID->caption(), $attachments->AttachmentID->RequiredErrorMessage)) ?>");
		<?php } ?>
		<?php if ($attachments_edit->AttachmentSource_ID->Required) { ?>
			elm = this.getElements("x" + infix + "_AttachmentSource_ID");
			if (elm && !ew.isHidden(elm) && !ew.hasValue(elm))
				return this.onError(elm, "<?php echo JsEncode(str_replace("%s", $attachments->AttachmentSource_ID->caption(), $attachments->AttachmentSource_ID->RequiredErrorMessage)) ?>");
		<?php } ?>
			elm = this.getElements("x" + infix + "_AttachmentSource_ID");
			if (elm && !ew.checkInteger(elm.value))
				return this.onError(elm, "<?php echo JsEncode($attachments->AttachmentSource_ID->errorMessage()) ?>");
		<?php if ($attachments_edit->CaseID->Required) { ?>
			elm = this.getElements("x" + infix + "_CaseID");
			if (elm && !ew.isHidden(elm) && !ew.hasValue(elm))
				return this.onError(elm, "<?php echo JsEncode(str_replace("%s", $attachments->CaseID->caption(), $attachments->CaseID->RequiredErrorMessage)) ?>");
		<?php } ?>
			elm = this.getElements("x" + infix + "_CaseID");
			if (elm && !ew.checkInteger(elm.value))
				return this.onError(elm, "<?php echo JsEncode($attachments->CaseID->errorMessage()) ?>");
		<?php if ($attachments_edit->EmployeeID->Required) { ?>
			elm = this.getElements("x" + infix + "_EmployeeID");
			if (elm && !ew.isHidden(elm) && !ew.hasValue(elm))
				return this.onError(elm, "<?php echo JsEncode(str_replace("%s", $attachments->EmployeeID->caption(), $attachments->EmployeeID->RequiredErrorMessage)) ?>");
		<?php } ?>
			elm = this.getElements("x" + infix + "_EmployeeID");
			if (elm && !ew.checkInteger(elm.value))
				return this.onError(elm, "<?php echo JsEncode($attachments->EmployeeID->errorMessage()) ?>");
		<?php if ($attachments_edit->AttachID->Required) { ?>
			elm = this.getElements("x" + infix + "_AttachID");
			if (elm && !ew.isHidden(elm) && !ew.hasValue(elm))
				return this.onError(elm, "<?php echo JsEncode(str_replace("%s", $attachments->AttachID->caption(), $attachments->AttachID->RequiredErrorMessage)) ?>");
		<?php } ?>
			elm = this.getElements("x" + infix + "_AttachID");
			if (elm && !ew.checkInteger(elm.value))
				return this.onError(elm, "<?php echo JsEncode($attachments->AttachID->errorMessage()) ?>");
		<?php if ($attachments_edit->AttachFilename->Required) { ?>
			felm = this.getElements("x" + infix + "_AttachFilename");
			elm = this.getElements("fn_x" + infix + "_AttachFilename");
			if (felm && elm && !ew.hasValue(elm))
				return this.onError(felm, "<?php echo JsEncode(str_replace("%s", $attachments->AttachFilename->caption(), $attachments->AttachFilename->RequiredErrorMessage)) ?>");
		<?php } ?>
		<?php if ($attachments_edit->AttachFilenameInitial->Required) { ?>
			elm = this.getElements("x" + infix + "_AttachFilenameInitial");
			if (elm && !ew.isHidden(elm) && !ew.hasValue(elm))
				return this.onError(elm, "<?php echo JsEncode(str_replace("%s", $attachments->AttachFilenameInitial->caption(), $attachments->AttachFilenameInitial->RequiredErrorMessage)) ?>");
		<?php } ?>
		<?php if ($attachments_edit->AttachExtension->Required) { ?>
			elm = this.getElements("x" + infix + "_AttachExtension");
			if (elm && !ew.isHidden(elm) && !ew.hasValue(elm))
				return this.onError(elm, "<?php echo JsEncode(str_replace("%s", $attachments->AttachExtension->caption(), $attachments->AttachExtension->RequiredErrorMessage)) ?>");
		<?php } ?>
		<?php if ($attachments_edit->AttachDescription->Required) { ?>
			elm = this.getElements("x" + infix + "_AttachDescription");
			if (elm && !ew.isHidden(elm) && !ew.hasValue(elm))
				return this.onError(elm, "<?php echo JsEncode(str_replace("%s", $attachments->AttachDescription->caption(), $attachments->AttachDescription->RequiredErrorMessage)) ?>");
		<?php } ?>
		<?php if ($attachments_edit->AttachNotes->Required) { ?>
			elm = this.getElements("x" + infix + "_AttachNotes");
			if (elm && !ew.isHidden(elm) && !ew.hasValue(elm))
				return this.onError(elm, "<?php echo JsEncode(str_replace("%s", $attachments->AttachNotes->caption(), $attachments->AttachNotes->RequiredErrorMessage)) ?>");
		<?php } ?>
		<?php if ($attachments_edit->AttachFilepath->Required) { ?>
			elm = this.getElements("x" + infix + "_AttachFilepath");
			if (elm && !ew.isHidden(elm) && !ew.hasValue(elm))
				return this.onError(elm, "<?php echo JsEncode(str_replace("%s", $attachments->AttachFilepath->caption(), $attachments->AttachFilepath->RequiredErrorMessage)) ?>");
		<?php } ?>
		<?php if ($attachments_edit->AttachPath->Required) { ?>
			elm = this.getElements("x" + infix + "_AttachPath");
			if (elm && !ew.isHidden(elm) && !ew.hasValue(elm))
				return this.onError(elm, "<?php echo JsEncode(str_replace("%s", $attachments->AttachPath->caption(), $attachments->AttachPath->RequiredErrorMessage)) ?>");
		<?php } ?>
		<?php if ($attachments_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", $attachments->Notes->caption(), $attachments->Notes->RequiredErrorMessage)) ?>");
		<?php } ?>
		<?php if ($attachments_edit->_Case->Required) { ?>
			elm = this.getElements("x" + infix + "__Case");
			if (elm && !ew.isHidden(elm) && !ew.hasValue(elm))
				return this.onError(elm, "<?php echo JsEncode(str_replace("%s", $attachments->_Case->caption(), $attachments->_Case->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
fattachmentsedit.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
fattachmentsedit.validateRequired = <?php echo json_encode(CLIENT_VALIDATE) ?>;

// Dynamic selection lists
fattachmentsedit.lists["x_AttachmentSource_ID"] = <?php echo $attachments_edit->AttachmentSource_ID->Lookup->toClientList() ?>;
fattachmentsedit.lists["x_AttachmentSource_ID"].options = <?php echo JsonEncode($attachments_edit->AttachmentSource_ID->lookupOptions()) ?>;
fattachmentsedit.autoSuggests["x_AttachmentSource_ID"] = <?php echo json_encode(["data" => "ajax=autosuggest"]) ?>;

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

// Write your client script here, no need to add script tags.
</script>
<?php $attachments_edit->showPageHeader(); ?>
<?php
$attachments_edit->showMessage();
?>
<?php if (!$attachments_edit->IsModal) { ?>
<form name="ew-pager-form" class="form-inline ew-form ew-pager-form" action="<?php echo CurrentPageName() ?>">
<?php if (!isset($attachments_edit->Pager)) $attachments_edit->Pager = new PrevNextPager($attachments_edit->StartRec, $attachments_edit->DisplayRecs, $attachments_edit->TotalRecs, $attachments_edit->AutoHidePager) ?>
<?php if ($attachments_edit->Pager->RecordCount > 0 && $attachments_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 ($attachments_edit->Pager->FirstButton->Enabled) { ?>
	<a class="btn btn-default" title="<?php echo $Language->phrase("PagerFirst") ?>" href="<?php echo $attachments_edit->pageUrl() ?>start=<?php echo $attachments_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 ($attachments_edit->Pager->PrevButton->Enabled) { ?>
	<a class="btn btn-default" title="<?php echo $Language->phrase("PagerPrevious") ?>" href="<?php echo $attachments_edit->pageUrl() ?>start=<?php echo $attachments_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 $attachments_edit->Pager->CurrentPage ?>">
<div class="input-group-append">
<!-- next page button -->
	<?php if ($attachments_edit->Pager->NextButton->Enabled) { ?>
	<a class="btn btn-default" title="<?php echo $Language->phrase("PagerNext") ?>" href="<?php echo $attachments_edit->pageUrl() ?>start=<?php echo $attachments_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 ($attachments_edit->Pager->LastButton->Enabled) { ?>
	<a class="btn btn-default" title="<?php echo $Language->phrase("PagerLast") ?>" href="<?php echo $attachments_edit->pageUrl() ?>start=<?php echo $attachments_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 $attachments_edit->Pager->PageCount ?></span>
<div class="clearfix"></div>
</div>
<?php } ?>
<div class="clearfix"></div>
</form>
<?php } ?>
<form name="fattachmentsedit" id="fattachmentsedit" class="<?php echo $attachments_edit->FormClassName ?>" action="<?php echo CurrentPageName() ?>" method="post">
<?php if ($attachments_edit->CheckToken) { ?>
<input type="hidden" name="<?php echo TOKEN_NAME ?>" value="<?php echo $attachments_edit->Token ?>">
<?php } ?>
<input type="hidden" name="t" value="attachments">
<input type="hidden" name="action" id="action" value="update">
<input type="hidden" name="modal" value="<?php echo (int)$attachments_edit->IsModal ?>">
<?php if ($attachments->getCurrentMasterTable() == "cases") { ?>
<input type="hidden" name="<?php echo TABLE_SHOW_MASTER ?>" value="cases">
<input type="hidden" name="fk_CaseID" value="<?php echo $attachments->CaseID->getSessionValue() ?>">
<?php } ?>
<?php if (!$attachments_edit->IsMobileOrModal) { ?>
<div class="ew-desktop"><!-- desktop -->
<?php } ?>
<?php if ($attachments_edit->IsMobileOrModal) { ?>
<div class="ew-edit-div"><!-- page* -->
<?php } else { ?>
<table id="tbl_attachmentsedit" class="table table-striped table-sm ew-desktop-table"><!-- table* -->
<?php } ?>
<?php if ($attachments->AttachmentID->Visible) { // AttachmentID ?>
<?php if ($attachments_edit->IsMobileOrModal) { ?>
	<div id="r_AttachmentID" class="form-group row">
		<label id="elh_attachments_AttachmentID" class="<?php echo $attachments_edit->LeftColumnClass ?>"><?php echo $attachments->AttachmentID->caption() ?><?php echo ($attachments->AttachmentID->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $attachments_edit->RightColumnClass ?>"><div<?php echo $attachments->AttachmentID->cellAttributes() ?>>
<span id="el_attachments_AttachmentID">
<span<?php echo $attachments->AttachmentID->viewAttributes() ?>>
<input type="text" readonly class="form-control-plaintext" value="<?php echo RemoveHtml($attachments->AttachmentID->EditValue) ?>"></span>
</span>
<input type="hidden" data-table="attachments" data-field="x_AttachmentID" name="x_AttachmentID" id="x_AttachmentID" value="<?php echo HtmlEncode($attachments->AttachmentID->CurrentValue) ?>">
<?php echo $attachments->AttachmentID->CustomMsg ?></div></div>
	</div>
<?php } else { ?>
	<tr id="r_AttachmentID">
		<td class="<?php echo $attachments_edit->TableLeftColumnClass ?>"><span id="elh_attachments_AttachmentID"><?php echo $attachments->AttachmentID->caption() ?><?php echo ($attachments->AttachmentID->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></span></td>
		<td<?php echo $attachments->AttachmentID->cellAttributes() ?>>
<span id="el_attachments_AttachmentID">
<span<?php echo $attachments->AttachmentID->viewAttributes() ?>>
<input type="text" readonly class="form-control-plaintext" value="<?php echo RemoveHtml($attachments->AttachmentID->EditValue) ?>"></span>
</span>
<input type="hidden" data-table="attachments" data-field="x_AttachmentID" name="x_AttachmentID" id="x_AttachmentID" value="<?php echo HtmlEncode($attachments->AttachmentID->CurrentValue) ?>">
<?php echo $attachments->AttachmentID->CustomMsg ?></td>
	</tr>
<?php } ?>
<?php } ?>
<?php if ($attachments->AttachmentSource_ID->Visible) { // AttachmentSource_ID ?>
<?php if ($attachments_edit->IsMobileOrModal) { ?>
	<div id="r_AttachmentSource_ID" class="form-group row">
		<label id="elh_attachments_AttachmentSource_ID" class="<?php echo $attachments_edit->LeftColumnClass ?>"><?php echo $attachments->AttachmentSource_ID->caption() ?><?php echo ($attachments->AttachmentSource_ID->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $attachments_edit->RightColumnClass ?>"><div<?php echo $attachments->AttachmentSource_ID->cellAttributes() ?>>
<span id="el_attachments_AttachmentSource_ID">
<?php
$wrkonchange = "" . trim(@$attachments->AttachmentSource_ID->EditAttrs["onchange"]);
if (trim($wrkonchange) <> "") $wrkonchange = " onchange=\"" . JsEncode($wrkonchange) . "\"";
$attachments->AttachmentSource_ID->EditAttrs["onchange"] = "";
?>
<span id="as_x_AttachmentSource_ID" class="text-nowrap" style="z-index: 8980">
	<input type="text" class="form-control" name="sv_x_AttachmentSource_ID" id="sv_x_AttachmentSource_ID" value="<?php echo RemoveHtml($attachments->AttachmentSource_ID->EditValue) ?>" size="30" placeholder="<?php echo HtmlEncode($attachments->AttachmentSource_ID->getPlaceHolder()) ?>" data-placeholder="<?php echo HtmlEncode($attachments->AttachmentSource_ID->getPlaceHolder()) ?>"<?php echo $attachments->AttachmentSource_ID->editAttributes() ?>>
</span>
<input type="hidden" data-table="attachments" data-field="x_AttachmentSource_ID" data-value-separator="<?php echo $attachments->AttachmentSource_ID->displayValueSeparatorAttribute() ?>" name="x_AttachmentSource_ID" id="x_AttachmentSource_ID" value="<?php echo HtmlEncode($attachments->AttachmentSource_ID->CurrentValue) ?>"<?php echo $wrkonchange ?>>
<script>
fattachmentsedit.createAutoSuggest({"id":"x_AttachmentSource_ID","forceSelect":false});
</script>
<?php echo $attachments->AttachmentSource_ID->Lookup->getParamTag("p_x_AttachmentSource_ID") ?>
</span>
<?php echo $attachments->AttachmentSource_ID->CustomMsg ?></div></div>
	</div>
<?php } else { ?>
	<tr id="r_AttachmentSource_ID">
		<td class="<?php echo $attachments_edit->TableLeftColumnClass ?>"><span id="elh_attachments_AttachmentSource_ID"><?php echo $attachments->AttachmentSource_ID->caption() ?><?php echo ($attachments->AttachmentSource_ID->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></span></td>
		<td<?php echo $attachments->AttachmentSource_ID->cellAttributes() ?>>
<span id="el_attachments_AttachmentSource_ID">
<?php
$wrkonchange = "" . trim(@$attachments->AttachmentSource_ID->EditAttrs["onchange"]);
if (trim($wrkonchange) <> "") $wrkonchange = " onchange=\"" . JsEncode($wrkonchange) . "\"";
$attachments->AttachmentSource_ID->EditAttrs["onchange"] = "";
?>
<span id="as_x_AttachmentSource_ID" class="text-nowrap" style="z-index: 8980">
	<input type="text" class="form-control" name="sv_x_AttachmentSource_ID" id="sv_x_AttachmentSource_ID" value="<?php echo RemoveHtml($attachments->AttachmentSource_ID->EditValue) ?>" size="30" placeholder="<?php echo HtmlEncode($attachments->AttachmentSource_ID->getPlaceHolder()) ?>" data-placeholder="<?php echo HtmlEncode($attachments->AttachmentSource_ID->getPlaceHolder()) ?>"<?php echo $attachments->AttachmentSource_ID->editAttributes() ?>>
</span>
<input type="hidden" data-table="attachments" data-field="x_AttachmentSource_ID" data-value-separator="<?php echo $attachments->AttachmentSource_ID->displayValueSeparatorAttribute() ?>" name="x_AttachmentSource_ID" id="x_AttachmentSource_ID" value="<?php echo HtmlEncode($attachments->AttachmentSource_ID->CurrentValue) ?>"<?php echo $wrkonchange ?>>
<script>
fattachmentsedit.createAutoSuggest({"id":"x_AttachmentSource_ID","forceSelect":false});
</script>
<?php echo $attachments->AttachmentSource_ID->Lookup->getParamTag("p_x_AttachmentSource_ID") ?>
</span>
<?php echo $attachments->AttachmentSource_ID->CustomMsg ?></td>
	</tr>
<?php } ?>
<?php } ?>
<?php if ($attachments->CaseID->Visible) { // CaseID ?>
<?php if ($attachments_edit->IsMobileOrModal) { ?>
	<div id="r_CaseID" class="form-group row">
		<label id="elh_attachments_CaseID" for="x_CaseID" class="<?php echo $attachments_edit->LeftColumnClass ?>"><?php echo $attachments->CaseID->caption() ?><?php echo ($attachments->CaseID->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $attachments_edit->RightColumnClass ?>"><div<?php echo $attachments->CaseID->cellAttributes() ?>>
<?php if ($attachments->CaseID->getSessionValue() <> "") { ?>
<span id="el_attachments_CaseID">
<span<?php echo $attachments->CaseID->viewAttributes() ?>>
<input type="text" readonly class="form-control-plaintext" value="<?php echo RemoveHtml($attachments->CaseID->ViewValue) ?>"></span>
</span>
<input type="hidden" id="x_CaseID" name="x_CaseID" value="<?php echo HtmlEncode($attachments->CaseID->CurrentValue) ?>">
<?php } else { ?>
<span id="el_attachments_CaseID">
<input type="text" data-table="attachments" data-field="x_CaseID" name="x_CaseID" id="x_CaseID" size="30" placeholder="<?php echo HtmlEncode($attachments->CaseID->getPlaceHolder()) ?>" value="<?php echo $attachments->CaseID->EditValue ?>"<?php echo $attachments->CaseID->editAttributes() ?>>
</span>
<?php } ?>
<?php echo $attachments->CaseID->CustomMsg ?></div></div>
	</div>
<?php } else { ?>
	<tr id="r_CaseID">
		<td class="<?php echo $attachments_edit->TableLeftColumnClass ?>"><span id="elh_attachments_CaseID"><?php echo $attachments->CaseID->caption() ?><?php echo ($attachments->CaseID->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></span></td>
		<td<?php echo $attachments->CaseID->cellAttributes() ?>>
<?php if ($attachments->CaseID->getSessionValue() <> "") { ?>
<span id="el_attachments_CaseID">
<span<?php echo $attachments->CaseID->viewAttributes() ?>>
<input type="text" readonly class="form-control-plaintext" value="<?php echo RemoveHtml($attachments->CaseID->ViewValue) ?>"></span>
</span>
<input type="hidden" id="x_CaseID" name="x_CaseID" value="<?php echo HtmlEncode($attachments->CaseID->CurrentValue) ?>">
<?php } else { ?>
<span id="el_attachments_CaseID">
<input type="text" data-table="attachments" data-field="x_CaseID" name="x_CaseID" id="x_CaseID" size="30" placeholder="<?php echo HtmlEncode($attachments->CaseID->getPlaceHolder()) ?>" value="<?php echo $attachments->CaseID->EditValue ?>"<?php echo $attachments->CaseID->editAttributes() ?>>
</span>
<?php } ?>
<?php echo $attachments->CaseID->CustomMsg ?></td>
	</tr>
<?php } ?>
<?php } ?>
<?php if ($attachments->EmployeeID->Visible) { // EmployeeID ?>
<?php if ($attachments_edit->IsMobileOrModal) { ?>
	<div id="r_EmployeeID" class="form-group row">
		<label id="elh_attachments_EmployeeID" for="x_EmployeeID" class="<?php echo $attachments_edit->LeftColumnClass ?>"><?php echo $attachments->EmployeeID->caption() ?><?php echo ($attachments->EmployeeID->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $attachments_edit->RightColumnClass ?>"><div<?php echo $attachments->EmployeeID->cellAttributes() ?>>
<span id="el_attachments_EmployeeID">
<input type="text" data-table="attachments" data-field="x_EmployeeID" name="x_EmployeeID" id="x_EmployeeID" size="30" placeholder="<?php echo HtmlEncode($attachments->EmployeeID->getPlaceHolder()) ?>" value="<?php echo $attachments->EmployeeID->EditValue ?>"<?php echo $attachments->EmployeeID->editAttributes() ?>>
</span>
<?php echo $attachments->EmployeeID->CustomMsg ?></div></div>
	</div>
<?php } else { ?>
	<tr id="r_EmployeeID">
		<td class="<?php echo $attachments_edit->TableLeftColumnClass ?>"><span id="elh_attachments_EmployeeID"><?php echo $attachments->EmployeeID->caption() ?><?php echo ($attachments->EmployeeID->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></span></td>
		<td<?php echo $attachments->EmployeeID->cellAttributes() ?>>
<span id="el_attachments_EmployeeID">
<input type="text" data-table="attachments" data-field="x_EmployeeID" name="x_EmployeeID" id="x_EmployeeID" size="30" placeholder="<?php echo HtmlEncode($attachments->EmployeeID->getPlaceHolder()) ?>" value="<?php echo $attachments->EmployeeID->EditValue ?>"<?php echo $attachments->EmployeeID->editAttributes() ?>>
</span>
<?php echo $attachments->EmployeeID->CustomMsg ?></td>
	</tr>
<?php } ?>
<?php } ?>
<?php if ($attachments->AttachID->Visible) { // AttachID ?>
<?php if ($attachments_edit->IsMobileOrModal) { ?>
	<div id="r_AttachID" class="form-group row">
		<label id="elh_attachments_AttachID" for="x_AttachID" class="<?php echo $attachments_edit->LeftColumnClass ?>"><?php echo $attachments->AttachID->caption() ?><?php echo ($attachments->AttachID->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $attachments_edit->RightColumnClass ?>"><div<?php echo $attachments->AttachID->cellAttributes() ?>>
<span id="el_attachments_AttachID">
<input type="text" data-table="attachments" data-field="x_AttachID" name="x_AttachID" id="x_AttachID" size="30" placeholder="<?php echo HtmlEncode($attachments->AttachID->getPlaceHolder()) ?>" value="<?php echo $attachments->AttachID->EditValue ?>"<?php echo $attachments->AttachID->editAttributes() ?>>
</span>
<?php echo $attachments->AttachID->CustomMsg ?></div></div>
	</div>
<?php } else { ?>
	<tr id="r_AttachID">
		<td class="<?php echo $attachments_edit->TableLeftColumnClass ?>"><span id="elh_attachments_AttachID"><?php echo $attachments->AttachID->caption() ?><?php echo ($attachments->AttachID->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></span></td>
		<td<?php echo $attachments->AttachID->cellAttributes() ?>>
<span id="el_attachments_AttachID">
<input type="text" data-table="attachments" data-field="x_AttachID" name="x_AttachID" id="x_AttachID" size="30" placeholder="<?php echo HtmlEncode($attachments->AttachID->getPlaceHolder()) ?>" value="<?php echo $attachments->AttachID->EditValue ?>"<?php echo $attachments->AttachID->editAttributes() ?>>
</span>
<?php echo $attachments->AttachID->CustomMsg ?></td>
	</tr>
<?php } ?>
<?php } ?>
<?php if ($attachments->AttachFilename->Visible) { // AttachFilename ?>
<?php if ($attachments_edit->IsMobileOrModal) { ?>
	<div id="r_AttachFilename" class="form-group row">
		<label id="elh_attachments_AttachFilename" class="<?php echo $attachments_edit->LeftColumnClass ?>"><?php echo $attachments->AttachFilename->caption() ?><?php echo ($attachments->AttachFilename->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $attachments_edit->RightColumnClass ?>"><div<?php echo $attachments->AttachFilename->cellAttributes() ?>>
<span id="el_attachments_AttachFilename">
<div id="fd_x_AttachFilename">
<span title="<?php echo $attachments->AttachFilename->title() ? $attachments->AttachFilename->title() : $Language->phrase("ChooseFiles") ?>" class="btn btn-default btn-sm fileinput-button ew-tooltip<?php if ($attachments->AttachFilename->ReadOnly || $attachments->AttachFilename->Disabled) echo " d-none"; ?>">
	<span><?php echo $Language->phrase("ChooseFileBtn") ?></span>
	<input type="file" title=" " data-table="attachments" data-field="x_AttachFilename" name="x_AttachFilename" id="x_AttachFilename" multiple="multiple"<?php echo $attachments->AttachFilename->editAttributes() ?>>
</span>
<input type="hidden" name="fn_x_AttachFilename" id= "fn_x_AttachFilename" value="<?php echo $attachments->AttachFilename->Upload->FileName ?>">
<?php if (Post("fa_x_AttachFilename") == "0") { ?>
<input type="hidden" name="fa_x_AttachFilename" id= "fa_x_AttachFilename" value="0">
<?php } else { ?>
<input type="hidden" name="fa_x_AttachFilename" id= "fa_x_AttachFilename" value="1">
<?php } ?>
<input type="hidden" name="fs_x_AttachFilename" id= "fs_x_AttachFilename" value="100">
<input type="hidden" name="fx_x_AttachFilename" id= "fx_x_AttachFilename" value="<?php echo $attachments->AttachFilename->UploadAllowedFileExt ?>">
<input type="hidden" name="fm_x_AttachFilename" id= "fm_x_AttachFilename" value="<?php echo $attachments->AttachFilename->UploadMaxFileSize ?>">
<input type="hidden" name="fc_x_AttachFilename" id= "fc_x_AttachFilename" value="<?php echo $attachments->AttachFilename->UploadMaxFileCount ?>">
</div>
<table id="ft_x_AttachFilename" class="table table-sm float-left ew-upload-table"><tbody class="files"></tbody></table>
</span>
<?php echo $attachments->AttachFilename->CustomMsg ?></div></div>
	</div>
<?php } else { ?>
	<tr id="r_AttachFilename">
		<td class="<?php echo $attachments_edit->TableLeftColumnClass ?>"><span id="elh_attachments_AttachFilename"><?php echo $attachments->AttachFilename->caption() ?><?php echo ($attachments->AttachFilename->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></span></td>
		<td<?php echo $attachments->AttachFilename->cellAttributes() ?>>
<span id="el_attachments_AttachFilename">
<div id="fd_x_AttachFilename">
<span title="<?php echo $attachments->AttachFilename->title() ? $attachments->AttachFilename->title() : $Language->phrase("ChooseFiles") ?>" class="btn btn-default btn-sm fileinput-button ew-tooltip<?php if ($attachments->AttachFilename->ReadOnly || $attachments->AttachFilename->Disabled) echo " d-none"; ?>">
	<span><?php echo $Language->phrase("ChooseFileBtn") ?></span>
	<input type="file" title=" " data-table="attachments" data-field="x_AttachFilename" name="x_AttachFilename" id="x_AttachFilename" multiple="multiple"<?php echo $attachments->AttachFilename->editAttributes() ?>>
</span>
<input type="hidden" name="fn_x_AttachFilename" id= "fn_x_AttachFilename" value="<?php echo $attachments->AttachFilename->Upload->FileName ?>">
<?php if (Post("fa_x_AttachFilename") == "0") { ?>
<input type="hidden" name="fa_x_AttachFilename" id= "fa_x_AttachFilename" value="0">
<?php } else { ?>
<input type="hidden" name="fa_x_AttachFilename" id= "fa_x_AttachFilename" value="1">
<?php } ?>
<input type="hidden" name="fs_x_AttachFilename" id= "fs_x_AttachFilename" value="100">
<input type="hidden" name="fx_x_AttachFilename" id= "fx_x_AttachFilename" value="<?php echo $attachments->AttachFilename->UploadAllowedFileExt ?>">
<input type="hidden" name="fm_x_AttachFilename" id= "fm_x_AttachFilename" value="<?php echo $attachments->AttachFilename->UploadMaxFileSize ?>">
<input type="hidden" name="fc_x_AttachFilename" id= "fc_x_AttachFilename" value="<?php echo $attachments->AttachFilename->UploadMaxFileCount ?>">
</div>
<table id="ft_x_AttachFilename" class="table table-sm float-left ew-upload-table"><tbody class="files"></tbody></table>
</span>
<?php echo $attachments->AttachFilename->CustomMsg ?></td>
	</tr>
<?php } ?>
<?php } ?>
<?php if ($attachments->AttachFilenameInitial->Visible) { // AttachFilenameInitial ?>
<?php if ($attachments_edit->IsMobileOrModal) { ?>
	<div id="r_AttachFilenameInitial" class="form-group row">
		<label id="elh_attachments_AttachFilenameInitial" for="x_AttachFilenameInitial" class="<?php echo $attachments_edit->LeftColumnClass ?>"><?php echo $attachments->AttachFilenameInitial->caption() ?><?php echo ($attachments->AttachFilenameInitial->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $attachments_edit->RightColumnClass ?>"><div<?php echo $attachments->AttachFilenameInitial->cellAttributes() ?>>
<span id="el_attachments_AttachFilenameInitial">
<input type="text" data-table="attachments" data-field="x_AttachFilenameInitial" name="x_AttachFilenameInitial" id="x_AttachFilenameInitial" size="30" maxlength="100" placeholder="<?php echo HtmlEncode($attachments->AttachFilenameInitial->getPlaceHolder()) ?>" value="<?php echo $attachments->AttachFilenameInitial->EditValue ?>"<?php echo $attachments->AttachFilenameInitial->editAttributes() ?>>
</span>
<?php echo $attachments->AttachFilenameInitial->CustomMsg ?></div></div>
	</div>
<?php } else { ?>
	<tr id="r_AttachFilenameInitial">
		<td class="<?php echo $attachments_edit->TableLeftColumnClass ?>"><span id="elh_attachments_AttachFilenameInitial"><?php echo $attachments->AttachFilenameInitial->caption() ?><?php echo ($attachments->AttachFilenameInitial->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></span></td>
		<td<?php echo $attachments->AttachFilenameInitial->cellAttributes() ?>>
<span id="el_attachments_AttachFilenameInitial">
<input type="text" data-table="attachments" data-field="x_AttachFilenameInitial" name="x_AttachFilenameInitial" id="x_AttachFilenameInitial" size="30" maxlength="100" placeholder="<?php echo HtmlEncode($attachments->AttachFilenameInitial->getPlaceHolder()) ?>" value="<?php echo $attachments->AttachFilenameInitial->EditValue ?>"<?php echo $attachments->AttachFilenameInitial->editAttributes() ?>>
</span>
<?php echo $attachments->AttachFilenameInitial->CustomMsg ?></td>
	</tr>
<?php } ?>
<?php } ?>
<?php if ($attachments->AttachExtension->Visible) { // AttachExtension ?>
<?php if ($attachments_edit->IsMobileOrModal) { ?>
	<div id="r_AttachExtension" class="form-group row">
		<label id="elh_attachments_AttachExtension" for="x_AttachExtension" class="<?php echo $attachments_edit->LeftColumnClass ?>"><?php echo $attachments->AttachExtension->caption() ?><?php echo ($attachments->AttachExtension->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $attachments_edit->RightColumnClass ?>"><div<?php echo $attachments->AttachExtension->cellAttributes() ?>>
<span id="el_attachments_AttachExtension">
<input type="text" data-table="attachments" data-field="x_AttachExtension" name="x_AttachExtension" id="x_AttachExtension" size="30" maxlength="20" placeholder="<?php echo HtmlEncode($attachments->AttachExtension->getPlaceHolder()) ?>" value="<?php echo $attachments->AttachExtension->EditValue ?>"<?php echo $attachments->AttachExtension->editAttributes() ?>>
</span>
<?php echo $attachments->AttachExtension->CustomMsg ?></div></div>
	</div>
<?php } else { ?>
	<tr id="r_AttachExtension">
		<td class="<?php echo $attachments_edit->TableLeftColumnClass ?>"><span id="elh_attachments_AttachExtension"><?php echo $attachments->AttachExtension->caption() ?><?php echo ($attachments->AttachExtension->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></span></td>
		<td<?php echo $attachments->AttachExtension->cellAttributes() ?>>
<span id="el_attachments_AttachExtension">
<input type="text" data-table="attachments" data-field="x_AttachExtension" name="x_AttachExtension" id="x_AttachExtension" size="30" maxlength="20" placeholder="<?php echo HtmlEncode($attachments->AttachExtension->getPlaceHolder()) ?>" value="<?php echo $attachments->AttachExtension->EditValue ?>"<?php echo $attachments->AttachExtension->editAttributes() ?>>
</span>
<?php echo $attachments->AttachExtension->CustomMsg ?></td>
	</tr>
<?php } ?>
<?php } ?>
<?php if ($attachments->AttachDescription->Visible) { // AttachDescription ?>
<?php if ($attachments_edit->IsMobileOrModal) { ?>
	<div id="r_AttachDescription" class="form-group row">
		<label id="elh_attachments_AttachDescription" for="x_AttachDescription" class="<?php echo $attachments_edit->LeftColumnClass ?>"><?php echo $attachments->AttachDescription->caption() ?><?php echo ($attachments->AttachDescription->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $attachments_edit->RightColumnClass ?>"><div<?php echo $attachments->AttachDescription->cellAttributes() ?>>
<span id="el_attachments_AttachDescription">
<input type="text" data-table="attachments" data-field="x_AttachDescription" name="x_AttachDescription" id="x_AttachDescription" size="30" maxlength="100" placeholder="<?php echo HtmlEncode($attachments->AttachDescription->getPlaceHolder()) ?>" value="<?php echo $attachments->AttachDescription->EditValue ?>"<?php echo $attachments->AttachDescription->editAttributes() ?>>
</span>
<?php echo $attachments->AttachDescription->CustomMsg ?></div></div>
	</div>
<?php } else { ?>
	<tr id="r_AttachDescription">
		<td class="<?php echo $attachments_edit->TableLeftColumnClass ?>"><span id="elh_attachments_AttachDescription"><?php echo $attachments->AttachDescription->caption() ?><?php echo ($attachments->AttachDescription->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></span></td>
		<td<?php echo $attachments->AttachDescription->cellAttributes() ?>>
<span id="el_attachments_AttachDescription">
<input type="text" data-table="attachments" data-field="x_AttachDescription" name="x_AttachDescription" id="x_AttachDescription" size="30" maxlength="100" placeholder="<?php echo HtmlEncode($attachments->AttachDescription->getPlaceHolder()) ?>" value="<?php echo $attachments->AttachDescription->EditValue ?>"<?php echo $attachments->AttachDescription->editAttributes() ?>>
</span>
<?php echo $attachments->AttachDescription->CustomMsg ?></td>
	</tr>
<?php } ?>
<?php } ?>
<?php if ($attachments->AttachNotes->Visible) { // AttachNotes ?>
<?php if ($attachments_edit->IsMobileOrModal) { ?>
	<div id="r_AttachNotes" class="form-group row">
		<label id="elh_attachments_AttachNotes" for="x_AttachNotes" class="<?php echo $attachments_edit->LeftColumnClass ?>"><?php echo $attachments->AttachNotes->caption() ?><?php echo ($attachments->AttachNotes->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $attachments_edit->RightColumnClass ?>"><div<?php echo $attachments->AttachNotes->cellAttributes() ?>>
<span id="el_attachments_AttachNotes">
<textarea data-table="attachments" data-field="x_AttachNotes" name="x_AttachNotes" id="x_AttachNotes" cols="35" rows="4" placeholder="<?php echo HtmlEncode($attachments->AttachNotes->getPlaceHolder()) ?>"<?php echo $attachments->AttachNotes->editAttributes() ?>><?php echo $attachments->AttachNotes->EditValue ?></textarea>
</span>
<?php echo $attachments->AttachNotes->CustomMsg ?></div></div>
	</div>
<?php } else { ?>
	<tr id="r_AttachNotes">
		<td class="<?php echo $attachments_edit->TableLeftColumnClass ?>"><span id="elh_attachments_AttachNotes"><?php echo $attachments->AttachNotes->caption() ?><?php echo ($attachments->AttachNotes->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></span></td>
		<td<?php echo $attachments->AttachNotes->cellAttributes() ?>>
<span id="el_attachments_AttachNotes">
<textarea data-table="attachments" data-field="x_AttachNotes" name="x_AttachNotes" id="x_AttachNotes" cols="35" rows="4" placeholder="<?php echo HtmlEncode($attachments->AttachNotes->getPlaceHolder()) ?>"<?php echo $attachments->AttachNotes->editAttributes() ?>><?php echo $attachments->AttachNotes->EditValue ?></textarea>
</span>
<?php echo $attachments->AttachNotes->CustomMsg ?></td>
	</tr>
<?php } ?>
<?php } ?>
<?php if ($attachments->AttachFilepath->Visible) { // AttachFilepath ?>
<?php if ($attachments_edit->IsMobileOrModal) { ?>
	<div id="r_AttachFilepath" class="form-group row">
		<label id="elh_attachments_AttachFilepath" for="x_AttachFilepath" class="<?php echo $attachments_edit->LeftColumnClass ?>"><?php echo $attachments->AttachFilepath->caption() ?><?php echo ($attachments->AttachFilepath->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $attachments_edit->RightColumnClass ?>"><div<?php echo $attachments->AttachFilepath->cellAttributes() ?>>
<span id="el_attachments_AttachFilepath">
<input type="text" data-table="attachments" data-field="x_AttachFilepath" name="x_AttachFilepath" id="x_AttachFilepath" size="30" maxlength="200" placeholder="<?php echo HtmlEncode($attachments->AttachFilepath->getPlaceHolder()) ?>" value="<?php echo $attachments->AttachFilepath->EditValue ?>"<?php echo $attachments->AttachFilepath->editAttributes() ?>>
</span>
<?php echo $attachments->AttachFilepath->CustomMsg ?></div></div>
	</div>
<?php } else { ?>
	<tr id="r_AttachFilepath">
		<td class="<?php echo $attachments_edit->TableLeftColumnClass ?>"><span id="elh_attachments_AttachFilepath"><?php echo $attachments->AttachFilepath->caption() ?><?php echo ($attachments->AttachFilepath->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></span></td>
		<td<?php echo $attachments->AttachFilepath->cellAttributes() ?>>
<span id="el_attachments_AttachFilepath">
<input type="text" data-table="attachments" data-field="x_AttachFilepath" name="x_AttachFilepath" id="x_AttachFilepath" size="30" maxlength="200" placeholder="<?php echo HtmlEncode($attachments->AttachFilepath->getPlaceHolder()) ?>" value="<?php echo $attachments->AttachFilepath->EditValue ?>"<?php echo $attachments->AttachFilepath->editAttributes() ?>>
</span>
<?php echo $attachments->AttachFilepath->CustomMsg ?></td>
	</tr>
<?php } ?>
<?php } ?>
<?php if ($attachments->AttachPath->Visible) { // AttachPath ?>
<?php if ($attachments_edit->IsMobileOrModal) { ?>
	<div id="r_AttachPath" class="form-group row">
		<label id="elh_attachments_AttachPath" for="x_AttachPath" class="<?php echo $attachments_edit->LeftColumnClass ?>"><?php echo $attachments->AttachPath->caption() ?><?php echo ($attachments->AttachPath->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $attachments_edit->RightColumnClass ?>"><div<?php echo $attachments->AttachPath->cellAttributes() ?>>
<span id="el_attachments_AttachPath">
<input type="text" data-table="attachments" data-field="x_AttachPath" name="x_AttachPath" id="x_AttachPath" size="30" maxlength="200" placeholder="<?php echo HtmlEncode($attachments->AttachPath->getPlaceHolder()) ?>" value="<?php echo $attachments->AttachPath->EditValue ?>"<?php echo $attachments->AttachPath->editAttributes() ?>>
</span>
<?php echo $attachments->AttachPath->CustomMsg ?></div></div>
	</div>
<?php } else { ?>
	<tr id="r_AttachPath">
		<td class="<?php echo $attachments_edit->TableLeftColumnClass ?>"><span id="elh_attachments_AttachPath"><?php echo $attachments->AttachPath->caption() ?><?php echo ($attachments->AttachPath->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></span></td>
		<td<?php echo $attachments->AttachPath->cellAttributes() ?>>
<span id="el_attachments_AttachPath">
<input type="text" data-table="attachments" data-field="x_AttachPath" name="x_AttachPath" id="x_AttachPath" size="30" maxlength="200" placeholder="<?php echo HtmlEncode($attachments->AttachPath->getPlaceHolder()) ?>" value="<?php echo $attachments->AttachPath->EditValue ?>"<?php echo $attachments->AttachPath->editAttributes() ?>>
</span>
<?php echo $attachments->AttachPath->CustomMsg ?></td>
	</tr>
<?php } ?>
<?php } ?>
<?php if ($attachments->Notes->Visible) { // Notes ?>
<?php if ($attachments_edit->IsMobileOrModal) { ?>
	<div id="r_Notes" class="form-group row">
		<label id="elh_attachments_Notes" for="x_Notes" class="<?php echo $attachments_edit->LeftColumnClass ?>"><?php echo $attachments->Notes->caption() ?><?php echo ($attachments->Notes->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $attachments_edit->RightColumnClass ?>"><div<?php echo $attachments->Notes->cellAttributes() ?>>
<span id="el_attachments_Notes">
<textarea data-table="attachments" data-field="x_Notes" name="x_Notes" id="x_Notes" cols="35" rows="4" placeholder="<?php echo HtmlEncode($attachments->Notes->getPlaceHolder()) ?>"<?php echo $attachments->Notes->editAttributes() ?>><?php echo $attachments->Notes->EditValue ?></textarea>
</span>
<?php echo $attachments->Notes->CustomMsg ?></div></div>
	</div>
<?php } else { ?>
	<tr id="r_Notes">
		<td class="<?php echo $attachments_edit->TableLeftColumnClass ?>"><span id="elh_attachments_Notes"><?php echo $attachments->Notes->caption() ?><?php echo ($attachments->Notes->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></span></td>
		<td<?php echo $attachments->Notes->cellAttributes() ?>>
<span id="el_attachments_Notes">
<textarea data-table="attachments" data-field="x_Notes" name="x_Notes" id="x_Notes" cols="35" rows="4" placeholder="<?php echo HtmlEncode($attachments->Notes->getPlaceHolder()) ?>"<?php echo $attachments->Notes->editAttributes() ?>><?php echo $attachments->Notes->EditValue ?></textarea>
</span>
<?php echo $attachments->Notes->CustomMsg ?></td>
	</tr>
<?php } ?>
<?php } ?>
<?php if ($attachments->_Case->Visible) { // Case ?>
<?php if ($attachments_edit->IsMobileOrModal) { ?>
	<div id="r__Case" class="form-group row">
		<label id="elh_attachments__Case" for="x__Case" class="<?php echo $attachments_edit->LeftColumnClass ?>"><?php echo $attachments->_Case->caption() ?><?php echo ($attachments->_Case->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></label>
		<div class="<?php echo $attachments_edit->RightColumnClass ?>"><div<?php echo $attachments->_Case->cellAttributes() ?>>
<span id="el_attachments__Case">
<input type="text" data-table="attachments" data-field="x__Case" name="x__Case" id="x__Case" size="30" maxlength="200" placeholder="<?php echo HtmlEncode($attachments->_Case->getPlaceHolder()) ?>" value="<?php echo $attachments->_Case->EditValue ?>"<?php echo $attachments->_Case->editAttributes() ?>>
</span>
<?php echo $attachments->_Case->CustomMsg ?></div></div>
	</div>
<?php } else { ?>
	<tr id="r__Case">
		<td class="<?php echo $attachments_edit->TableLeftColumnClass ?>"><span id="elh_attachments__Case"><?php echo $attachments->_Case->caption() ?><?php echo ($attachments->_Case->Required) ? $Language->phrase("FieldRequiredIndicator") : "" ?></span></td>
		<td<?php echo $attachments->_Case->cellAttributes() ?>>
<span id="el_attachments__Case">
<input type="text" data-table="attachments" data-field="x__Case" name="x__Case" id="x__Case" size="30" maxlength="200" placeholder="<?php echo HtmlEncode($attachments->_Case->getPlaceHolder()) ?>" value="<?php echo $attachments->_Case->EditValue ?>"<?php echo $attachments->_Case->editAttributes() ?>>
</span>
<?php echo $attachments->_Case->CustomMsg ?></td>
	</tr>
<?php } ?>
<?php } ?>
<?php if ($attachments_edit->IsMobileOrModal) { ?>
</div><!-- /page* -->
<?php } else { ?>
</table><!-- /table* -->
<?php } ?>
<?php if (!$attachments_edit->IsModal) { ?>
<div class="form-group row"><!-- buttons .form-group -->
	<div class="<?php echo $attachments_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 $attachments_edit->getReturnUrl() ?>"><?php echo $Language->phrase("CancelBtn") ?></button>
	</div><!-- /buttons offset -->
</div><!-- /buttons .form-group -->
<?php } ?>
<?php if (!$attachments_edit->IsMobileOrModal) { ?>
</div><!-- /desktop -->
<?php } ?>
<?php if (!$attachments_edit->IsModal) { ?>
<?php if (!isset($attachments_edit->Pager)) $attachments_edit->Pager = new PrevNextPager($attachments_edit->StartRec, $attachments_edit->DisplayRecs, $attachments_edit->TotalRecs, $attachments_edit->AutoHidePager) ?>
<?php if ($attachments_edit->Pager->RecordCount > 0 && $attachments_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 ($attachments_edit->Pager->FirstButton->Enabled) { ?>
	<a class="btn btn-default" title="<?php echo $Language->phrase("PagerFirst") ?>" href="<?php echo $attachments_edit->pageUrl() ?>start=<?php echo $attachments_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 ($attachments_edit->Pager->PrevButton->Enabled) { ?>
	<a class="btn btn-default" title="<?php echo $Language->phrase("PagerPrevious") ?>" href="<?php echo $attachments_edit->pageUrl() ?>start=<?php echo $attachments_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 $attachments_edit->Pager->CurrentPage ?>">
<div class="input-group-append">
<!-- next page button -->
	<?php if ($attachments_edit->Pager->NextButton->Enabled) { ?>
	<a class="btn btn-default" title="<?php echo $Language->phrase("PagerNext") ?>" href="<?php echo $attachments_edit->pageUrl() ?>start=<?php echo $attachments_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 ($attachments_edit->Pager->LastButton->Enabled) { ?>
	<a class="btn btn-default" title="<?php echo $Language->phrase("PagerLast") ?>" href="<?php echo $attachments_edit->pageUrl() ?>start=<?php echo $attachments_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 $attachments_edit->Pager->PageCount ?></span>
<div class="clearfix"></div>
</div>
<?php } ?>
<div class="clearfix"></div>
<?php } ?>
</form>
<?php
$attachments_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
$attachments_edit->terminate();
?>
