<!-- To change the layout of the detail view form, we recommend using JS code in hooks/flugplaetze_oe-dv.js rather than editing this file -->

<div id="detail-view"></div>
<div class="panel-heading"><h3 class="panel-title"><strong><%%DETAIL_VIEW_TITLE%%></strong></h3></div>

<div id="flugplaetze_oe_dv_container-loading" class="text-center text-info text-bold vspacer-lg"><i class="glyphicon glyphicon-refresh loop-rotate"></i> <%%TRANSLATION(Loading ...)%%></div>

<div class="panel-body hidden" id="flugplaetze_oe_dv_container">
	<!-- child links -->
	<div class="row vspacer-md">
		<div class="col-xs-12 children-links">
			<input type="hidden" id="flugbuch_verein_hclink" value="flugbuch_verein_view.php?filterer_flugplatz=<%%URLVALUE(id)%%>&<%%EMBEDDED%%>">
			<div class="clearfix"></div>
		</div>
	</div>
	<hr class="hidden-xs hidden-sm">

	<div class="row">
		<!-- form inputs -->
		<div class="col-md-8 col-lg-9 dv-form" id="flugplaetze_oe_dv_form" data-tablename="flugplaetze_oe">
			<fieldset class="form-horizontal">

				<!-- Field: Nummer des Flugplatzes -->
				<div class="form-group flugplaetze_oe-flugplatznummer">
					<hr class="hidden-md hidden-lg">
					<label class="control-label col-lg-3" for="flugplatznummer">Nummer des Flugplatzes<span class="text-danger"><%%TRANSLATION(*)%%></span> <i class="glyphicon glyphicon-info-sign text-info" data-toggle="collapse" data-target="#flugplatznummer-description"></i></label>
					<div class="col-lg-9">
						<span class="help-block bspacer-xs collapse" id="flugplatznummer-description"><div class="alert alert-info bspacer-xs">Diese Nummer ist der Vereinsnummer des &#214;AeC gleichgesetzt</div></span>
						<input maxlength="15" type="text" class="form-control" name="flugplatznummer" id="flugplatznummer" value="<%%VALUE(flugplatznummer)%%>" required><div class="text-danger vspacer-md" id="flugplatznummer-uniqueness-note" style="display: none;"><%%TRANSLATION(unique field error)%%></div>
					</div>
				</div>

				<!-- Field: Artikel 16 -->
				<div class="form-group flugplaetze_oe-artikel_16">
					<hr class="hidden-md hidden-lg">
					<label class="control-label col-lg-3" for="artikel_16">Artikel 16 <i class="glyphicon glyphicon-info-sign text-info" data-toggle="collapse" data-target="#artikel_16-description"></i></label>
					<div class="col-lg-9">
						<span class="help-block bspacer-xs collapse" id="artikel_16-description"><div class="alert alert-info bspacer-xs">Besteht f&#252;r diesen Modellflugplatz ein Artikel 16 Bescheid ?</div></span>
						<%%COMBO(artikel_16)%%>
					</div>
				</div>

				<!-- Field: Bescheid -->
				<div class="form-group flugplaetze_oe-artikel16">
					<hr class="hidden-md hidden-lg">
					<label class="control-label col-lg-3">Bescheid <i class="glyphicon glyphicon-info-sign text-info" data-toggle="collapse" data-target="#artikel16-description"></i></label>
					<div class="col-lg-9">
						<span class="help-block bspacer-xs collapse" id="artikel16-description"><div class="alert alert-info bspacer-xs">Artikel 16 Bescheid der ACG.</div></span>
						<div class="form-control-static well well-sm">
							<div class="row" style="margin-right: 0; margin-left: 0;">
								<div class="col-md-6" style="padding-left: 0;"><a id="artikel16-link" href="link.php?t=flugplaetze_oe&f=artikel16&i=<%%VALUE(id)%%>" target="_blank" class="rspacer-lg"><i class="glyphicon glyphicon-file" title="<%%VALUE(artikel16)%%>" style="font-size: 4em;"></i></a></div>
								<div class="hidden-md hidden-lg vspacer-lg"></div>
								<div class="col-md-6 well upload-toolbox">
									<%%REMOVEFILE(artikel16)%%>
									<%%UPLOADFILE(artikel16)%%>
									<div class="text-bold text-danger file-type-error hidden"><%%TRANSLATION(invalid file type)%%></div>
									<div class="text-bold text-danger file-size-error hidden"><%%TRANSLATION(file too large)%%></div>
								</div>
							</div>
						</div>
						<script>/* disable empty links */ $j(() => { const e_artikel16 = '<%%VALUE(artikel16)%%>'; if(e_artikel16 == '' || e_artikel16 == '&nbsp;' || e_artikel16 == 'blank.gif') { $j('#artikel16-link').hide(); $j('#artikel16-image').parents('a').attr('href', '').on('click', (e) => e.preventDefault()); } });</script>
					</div>
				</div>

				<!-- Field: Modellflugplatzbetriebsordnung -->
				<div class="form-group flugplaetze_oe-mfbo">
					<hr class="hidden-md hidden-lg">
					<label class="control-label col-lg-3">Modellflugplatzbetriebsordnung <i class="glyphicon glyphicon-info-sign text-info" data-toggle="collapse" data-target="#mfbo-description"></i></label>
					<div class="col-lg-9">
						<span class="help-block bspacer-xs collapse" id="mfbo-description"><div class="alert alert-info bspacer-xs">Modellflugplatzbetriebsordnung</div></span>
						<div class="form-control-static well well-sm">
							<div class="row" style="margin-right: 0; margin-left: 0;">
								<div class="col-md-6" style="padding-left: 0;"><a id="mfbo-link" href="link.php?t=flugplaetze_oe&f=mfbo&i=<%%VALUE(id)%%>" target="_blank" class="rspacer-lg"><i class="glyphicon glyphicon-file" title="<%%VALUE(mfbo)%%>" style="font-size: 4em;"></i></a></div>
								<div class="hidden-md hidden-lg vspacer-lg"></div>
								<div class="col-md-6 well upload-toolbox">
									<%%REMOVEFILE(mfbo)%%>
									<%%UPLOADFILE(mfbo)%%>
									<div class="text-bold text-danger file-type-error hidden"><%%TRANSLATION(invalid file type)%%></div>
									<div class="text-bold text-danger file-size-error hidden"><%%TRANSLATION(file too large)%%></div>
								</div>
							</div>
						</div>
						<script>/* disable empty links */ $j(() => { const e_mfbo = '<%%VALUE(mfbo)%%>'; if(e_mfbo == '' || e_mfbo == '&nbsp;' || e_mfbo == 'blank.gif') { $j('#mfbo-link').hide(); $j('#mfbo-image').parents('a').attr('href', '').on('click', (e) => e.preventDefault()); } });</script>
					</div>
				</div>

				<!-- Field: Richtlinien -->
				<div class="form-group flugplaetze_oe-richtlinie">
					<hr class="hidden-md hidden-lg">
					<label class="control-label col-lg-3">Richtlinien <i class="glyphicon glyphicon-info-sign text-info" data-toggle="collapse" data-target="#richtlinie-description"></i></label>
					<div class="col-lg-9">
						<span class="help-block bspacer-xs collapse" id="richtlinie-description"><div class="alert alert-info bspacer-xs">Richtlinien f&#252;r den Betrieb von UAS / Flugmodellen.</div></span>
						<div class="form-control-static well well-sm">
							<div class="row" style="margin-right: 0; margin-left: 0;">
								<div class="col-md-6" style="padding-left: 0;"><a id="richtlinie-link" href="link.php?t=flugplaetze_oe&f=richtlinie&i=<%%VALUE(id)%%>" target="_blank" class="rspacer-lg"><i class="glyphicon glyphicon-file" title="<%%VALUE(richtlinie)%%>" style="font-size: 4em;"></i></a></div>
								<div class="hidden-md hidden-lg vspacer-lg"></div>
								<div class="col-md-6 well upload-toolbox">
									<%%REMOVEFILE(richtlinie)%%>
									<%%UPLOADFILE(richtlinie)%%>
									<div class="text-bold text-danger file-type-error hidden"><%%TRANSLATION(invalid file type)%%></div>
									<div class="text-bold text-danger file-size-error hidden"><%%TRANSLATION(file too large)%%></div>
								</div>
							</div>
						</div>
						<script>/* disable empty links */ $j(() => { const e_richtlinie = '<%%VALUE(richtlinie)%%>'; if(e_richtlinie == '' || e_richtlinie == '&nbsp;' || e_richtlinie == 'blank.gif') { $j('#richtlinie-link').hide(); $j('#richtlinie-image').parents('a').attr('href', '').on('click', (e) => e.preventDefault()); } });</script>
					</div>
				</div>

				<!-- Field: Flugplatzordnung -->
				<div class="form-group flugplaetze_oe-flugplatzordnung">
					<hr class="hidden-md hidden-lg">
					<label class="control-label col-lg-3">Flugplatzordnung <i class="glyphicon glyphicon-info-sign text-info" data-toggle="collapse" data-target="#flugplatzordnung-description"></i></label>
					<div class="col-lg-9">
						<span class="help-block bspacer-xs collapse" id="flugplatzordnung-description"><div class="alert alert-info bspacer-xs">Lokale Flugplatzordnung</div></span>
						<div class="form-control-static well well-sm">
							<div class="row" style="margin-right: 0; margin-left: 0;">
								<div class="col-md-6" style="padding-left: 0;"><a id="flugplatzordnung-link" href="link.php?t=flugplaetze_oe&f=flugplatzordnung&i=<%%VALUE(id)%%>" target="_blank" class="rspacer-lg"><i class="glyphicon glyphicon-file" title="<%%VALUE(flugplatzordnung)%%>" style="font-size: 4em;"></i></a></div>
								<div class="hidden-md hidden-lg vspacer-lg"></div>
								<div class="col-md-6 well upload-toolbox">
									<%%REMOVEFILE(flugplatzordnung)%%>
									<%%UPLOADFILE(flugplatzordnung)%%>
									<div class="text-bold text-danger file-type-error hidden"><%%TRANSLATION(invalid file type)%%></div>
									<div class="text-bold text-danger file-size-error hidden"><%%TRANSLATION(file too large)%%></div>
								</div>
							</div>
						</div>
						<script>/* disable empty links */ $j(() => { const e_flugplatzordnung = '<%%VALUE(flugplatzordnung)%%>'; if(e_flugplatzordnung == '' || e_flugplatzordnung == '&nbsp;' || e_flugplatzordnung == 'blank.gif') { $j('#flugplatzordnung-link').hide(); $j('#flugplatzordnung-image').parents('a').attr('href', '').on('click', (e) => e.preventDefault()); } });</script>
					</div>
				</div>

				<!-- Field: Verhaltensregeln -->
				<div class="form-group flugplaetze_oe-verhaltensregeln">
					<hr class="hidden-md hidden-lg">
					<label class="control-label col-lg-3">Verhaltensregeln <i class="glyphicon glyphicon-info-sign text-info" data-toggle="collapse" data-target="#verhaltensregeln-description"></i></label>
					<div class="col-lg-9">
						<span class="help-block bspacer-xs collapse" id="verhaltensregeln-description"><div class="alert alert-info bspacer-xs">Verhaltensregeln am Modellflugplatz</div></span>
						<div class="form-control-static well well-sm">
							<div class="row" style="margin-right: 0; margin-left: 0;">
								<div class="col-md-6" style="padding-left: 0;"><a id="verhaltensregeln-link" href="link.php?t=flugplaetze_oe&f=verhaltensregeln&i=<%%VALUE(id)%%>" target="_blank" class="rspacer-lg"><i class="glyphicon glyphicon-file" title="<%%VALUE(verhaltensregeln)%%>" style="font-size: 4em;"></i></a></div>
								<div class="hidden-md hidden-lg vspacer-lg"></div>
								<div class="col-md-6 well upload-toolbox">
									<%%REMOVEFILE(verhaltensregeln)%%>
									<%%UPLOADFILE(verhaltensregeln)%%>
									<div class="text-bold text-danger file-type-error hidden"><%%TRANSLATION(invalid file type)%%></div>
									<div class="text-bold text-danger file-size-error hidden"><%%TRANSLATION(file too large)%%></div>
								</div>
							</div>
						</div>
						<script>/* disable empty links */ $j(() => { const e_verhaltensregeln = '<%%VALUE(verhaltensregeln)%%>'; if(e_verhaltensregeln == '' || e_verhaltensregeln == '&nbsp;' || e_verhaltensregeln == 'blank.gif') { $j('#verhaltensregeln-link').hide(); $j('#verhaltensregeln-image').parents('a').attr('href', '').on('click', (e) => e.preventDefault()); } });</script>
					</div>
				</div>

				<!-- Field: Allgemeine Datei -->
				<div class="form-group flugplaetze_oe-sonstige_datei">
					<hr class="hidden-md hidden-lg">
					<label class="control-label col-lg-3">Allgemeine Datei <i class="glyphicon glyphicon-info-sign text-info" data-toggle="collapse" data-target="#sonstige_datei-description"></i></label>
					<div class="col-lg-9">
						<span class="help-block bspacer-xs collapse" id="sonstige_datei-description"><div class="alert alert-info bspacer-xs">allgemeine Datei mit Zusatzinformationen</div></span>
						<div class="form-control-static well well-sm">
							<div class="row" style="margin-right: 0; margin-left: 0;">
								<div class="col-md-6" style="padding-left: 0;"><a id="sonstige_datei-link" href="link.php?t=flugplaetze_oe&f=sonstige_datei&i=<%%VALUE(id)%%>" target="_blank" class="rspacer-lg"><i class="glyphicon glyphicon-file" title="<%%VALUE(sonstige_datei)%%>" style="font-size: 4em;"></i></a></div>
								<div class="hidden-md hidden-lg vspacer-lg"></div>
								<div class="col-md-6 well upload-toolbox">
									<%%REMOVEFILE(sonstige_datei)%%>
									<%%UPLOADFILE(sonstige_datei)%%>
									<div class="text-bold text-danger file-type-error hidden"><%%TRANSLATION(invalid file type)%%></div>
									<div class="text-bold text-danger file-size-error hidden"><%%TRANSLATION(file too large)%%></div>
								</div>
							</div>
						</div>
						<script>/* disable empty links */ $j(() => { const e_sonstige_datei = '<%%VALUE(sonstige_datei)%%>'; if(e_sonstige_datei == '' || e_sonstige_datei == '&nbsp;' || e_sonstige_datei == 'blank.gif') { $j('#sonstige_datei-link').hide(); $j('#sonstige_datei-image').parents('a').attr('href', '').on('click', (e) => e.preventDefault()); } });</script>
					</div>
				</div>

				<!-- Field: Vereinsname -->
				<div class="form-group flugplaetze_oe-vereinsname">
					<hr class="hidden-md hidden-lg">
					<label class="control-label col-lg-3" for="vereinsname">Vereinsname<span class="text-danger"><%%TRANSLATION(*)%%></span> <i class="glyphicon glyphicon-info-sign text-info" data-toggle="collapse" data-target="#vereinsname-description"></i></label>
					<div class="col-lg-9">
						<span class="help-block bspacer-xs collapse" id="vereinsname-description"><div class="alert alert-info bspacer-xs">Name des Vereins - wid dem zentralen Melderegister f&#252;r Vereine (ZVR) entnommen.</div></span>
						<input maxlength="60" type="text" class="form-control" name="vereinsname" id="vereinsname" value="<%%VALUE(vereinsname)%%>" required><div class="text-danger vspacer-md" id="vereinsname-uniqueness-note" style="display: none;"><%%TRANSLATION(unique field error)%%></div>
					</div>
				</div>

				<!-- Field: Bundesland -->
				<div class="form-group flugplaetze_oe-bundesland">
					<hr class="hidden-md hidden-lg">
					<label class="control-label col-lg-3" for="bundesland">Bundesland <i class="glyphicon glyphicon-info-sign text-info" data-toggle="collapse" data-target="#bundesland-description"></i></label>
					<div class="col-lg-9">
						<span class="help-block bspacer-xs collapse" id="bundesland-description"><div class="alert alert-info bspacer-xs">Name des Bundeslandes in Kurzform</div></span>
						<input maxlength="40" type="text" class="form-control" name="bundesland" id="bundesland" value="<%%VALUE(bundesland)%%>">
					</div>
				</div>

				<!-- Field: Webseite -->
				<div class="form-group flugplaetze_oe-webseite">
					<hr class="hidden-md hidden-lg">
					<label class="control-label col-lg-3" for="webseite">Webseite <i class="glyphicon glyphicon-info-sign text-info" data-toggle="collapse" data-target="#webseite-description"></i></label>
					<div class="col-lg-9">
						<span class="help-block bspacer-xs collapse" id="webseite-description"><div class="alert alert-info bspacer-xs">Webseitenadresse</div></span>
						<div class="input-group">
							<input maxlength="150" type="text" class="form-control" name="webseite" id="webseite" value="<%%VALUE(webseite)%%>">
							<span class="input-group-btn">
								<button id="webseite-link" class="btn btn-default" type="button" title="<%%VALUE(webseite)%%>" onclick="if(this.title) window.open(this.title, '_blank')"><i class="glyphicon glyphicon-new-window"></i></button>
							</span>
						</div>
					</div>
				</div>

				<!-- Field: Telefonnummer -->
				<div class="form-group flugplaetze_oe-telefon">
					<hr class="hidden-md hidden-lg">
					<label class="control-label col-lg-3" for="telefon">Telefonnummer <i class="glyphicon glyphicon-info-sign text-info" data-toggle="collapse" data-target="#telefon-description"></i></label>
					<div class="col-lg-9">
						<span class="help-block bspacer-xs collapse" id="telefon-description"><div class="alert alert-info bspacer-xs">Telefonische Erreichbarkeit des Modellflugplatzbetreiber .</div></span>
						<input maxlength="40" type="text" class="form-control" name="telefon" id="telefon" value="<%%VALUE(telefon)%%>">
					</div>
				</div>

				<!-- Field: Vorname -->
				<div class="form-group flugplaetze_oe-vorname">
					<hr class="hidden-md hidden-lg">
					<label class="control-label col-lg-3" for="vorname">Vorname <i class="glyphicon glyphicon-info-sign text-info" data-toggle="collapse" data-target="#vorname-description"></i></label>
					<div class="col-lg-9">
						<span class="help-block bspacer-xs collapse" id="vorname-description"><div class="alert alert-info bspacer-xs">Vorname des Obmannes</div></span>
						<input maxlength="40" type="text" class="form-control" name="vorname" id="vorname" value="<%%VALUE(vorname)%%>">
					</div>
				</div>

				<!-- Field: Nachname -->
				<div class="form-group flugplaetze_oe-nachname">
					<hr class="hidden-md hidden-lg">
					<label class="control-label col-lg-3" for="nachname">Nachname <i class="glyphicon glyphicon-info-sign text-info" data-toggle="collapse" data-target="#nachname-description"></i></label>
					<div class="col-lg-9">
						<span class="help-block bspacer-xs collapse" id="nachname-description"><div class="alert alert-info bspacer-xs">Nachname des Obmannes</div></span>
						<input maxlength="40" type="text" class="form-control" name="nachname" id="nachname" value="<%%VALUE(nachname)%%>">
					</div>
				</div>

				<!-- Field: Email -->
				<div class="form-group flugplaetze_oe-email">
					<hr class="hidden-md hidden-lg">
					<label class="control-label col-lg-3" for="email">Email <i class="glyphicon glyphicon-info-sign text-info" data-toggle="collapse" data-target="#email-description"></i></label>
					<div class="col-lg-9">
						<span class="help-block bspacer-xs collapse" id="email-description"><div class="alert alert-info bspacer-xs">E-Mail Adresse des Vereines</div></span>
						<div class="input-group">
							<input maxlength="80" type="text" class="form-control" name="email" id="email" value="<%%VALUE(email)%%>">
							<span class="input-group-btn">
								<button id="email-link" class="btn btn-default" type="button" title="<%%VALUE(email)%%>" onclick="if(this.title) window.open(`mailto:${this.title}`, '_blank')"><i class="glyphicon glyphicon-envelope"></i></button>
							</span>
						</div>
					</div>
				</div>

				<!-- Field: ZVR - Nummer -->
				<div class="form-group flugplaetze_oe-zvr">
					<hr class="hidden-md hidden-lg">
					<label class="control-label col-lg-3" for="zvr">ZVR - Nummer <i class="glyphicon glyphicon-info-sign text-info" data-toggle="collapse" data-target="#zvr-description"></i></label>
					<div class="col-lg-9">
						<span class="help-block bspacer-xs collapse" id="zvr-description"><div class="alert alert-info bspacer-xs">ZVR des Betreibers des Modellflugplatzes.</div></span>
						<input maxlength="40" type="text" class="form-control" name="zvr" id="zvr" value="<%%VALUE(zvr)%%>">
					</div>
				</div>

				<!-- Field: max. zul&#228;ssige Flugh&#246;he -->
				<div class="form-group flugplaetze_oe-flughoehe">
					<hr class="hidden-md hidden-lg">
					<label class="control-label col-lg-3" for="flughoehe">max. zul&#228;ssige Flugh&#246;he <i class="glyphicon glyphicon-info-sign text-info" data-toggle="collapse" data-target="#flughoehe-description"></i></label>
					<div class="col-lg-9">
						<span class="help-block bspacer-xs collapse" id="flughoehe-description"><div class="alert alert-info bspacer-xs">Max. zul&#228;ssige Flugh&#246;he gem. dem Artikel 16 - Bescheid.</div></span>
						<input maxlength="10" type="text" class="form-control" name="flughoehe" id="flughoehe" value="<%%VALUE(flughoehe)%%>">
					</div>
				</div>

				<!-- Field: Max. take off Mass -->
				<div class="form-group flugplaetze_oe-mtom">
					<hr class="hidden-md hidden-lg">
					<label class="control-label col-lg-3" for="mtom">Max. take off Mass <i class="glyphicon glyphicon-info-sign text-info" data-toggle="collapse" data-target="#mtom-description"></i></label>
					<div class="col-lg-9">
						<span class="help-block bspacer-xs collapse" id="mtom-description"><div class="alert alert-info bspacer-xs">Maximale zul&#228;ssige Abflugmasse</div></span>
						<input maxlength="10" type="text" class="form-control" name="mtom" id="mtom" value="<%%VALUE(mtom)%%>">
					</div>
				</div>

				<!-- Field: Google MAP -->
				<div class="form-group flugplaetze_oe-google_map">
					<hr class="hidden-md hidden-lg">
					<label class="control-label col-lg-3" for="google_map-edit-link">Google MAP <i class="glyphicon glyphicon-info-sign text-info" data-toggle="collapse" data-target="#google_map-description"></i></label>
					<div class="col-lg-9">
						<span class="help-block bspacer-xs collapse" id="google_map-description"><div class="alert alert-info bspacer-xs">Link zu google-map</div></span>
						<div class="input-group">
							<input maxlength="65500" type="text" class="form-control" name="google_map" id="google_map" value="<%%VALUE(google_map)%%>">
							<span class="input-group-btn">
								<button id="google_map-link" class="btn btn-default" type="button" title="<%%VALUE(google_map)%%>" onclick="if(this.title) window.open(this.title, '_blank')"><i class="glyphicon glyphicon-new-window"></i></button>
							</span>
						</div>
					</div>
				</div>

				<!-- Field: Open Street MAP -->
				<div class="form-group flugplaetze_oe-open_street_map">
					<hr class="hidden-md hidden-lg">
					<label class="control-label col-lg-3" for="open_street_map">Open Street MAP <i class="glyphicon glyphicon-info-sign text-info" data-toggle="collapse" data-target="#open_street_map-description"></i></label>
					<div class="col-lg-9">
						<span class="help-block bspacer-xs collapse" id="open_street_map-description"><div class="alert alert-info bspacer-xs">Link zu open street map</div></span>
						<div class="input-group">
							<input maxlength="65500" type="text" class="form-control" name="open_street_map" id="open_street_map" value="<%%VALUE(open_street_map)%%>">
							<span class="input-group-btn">
								<button id="open_street_map-link" class="btn btn-default" type="button" title="<%%VALUE(open_street_map)%%>" onclick="if(this.title) window.open(this.title, '_blank')"><i class="glyphicon glyphicon-new-window"></i></button>
							</span>
						</div>
					</div>
				</div>

				<!-- Field: ACG MAP -->
				<div class="form-group flugplaetze_oe-acg_map">
					<hr class="hidden-md hidden-lg">
					<label class="control-label col-lg-3" for="acg_map">ACG MAP <i class="glyphicon glyphicon-info-sign text-info" data-toggle="collapse" data-target="#acg_map-description"></i></label>
					<div class="col-lg-9">
						<span class="help-block bspacer-xs collapse" id="acg_map-description"><div class="alert alert-info bspacer-xs">Link zur ACG map</div></span>
						<div class="input-group">
							<input maxlength="65500" type="text" class="form-control" name="acg_map" id="acg_map" value="<%%VALUE(acg_map)%%>">
							<span class="input-group-btn">
								<button id="acg_map-link" class="btn btn-default" type="button" title="<%%VALUE(acg_map)%%>" onclick="if(this.title) window.open(this.title, '_blank')"><i class="glyphicon glyphicon-new-window"></i></button>
							</span>
						</div>
					</div>
				</div>

				<!-- Field: zul&#228;ssiger Flugbereich -->
				<div class="form-group flugplaetze_oe-flugbereich">
					<hr class="hidden-md hidden-lg">
					<label class="control-label col-lg-3">zul&#228;ssiger Flugbereich <i class="glyphicon glyphicon-info-sign text-info" data-toggle="collapse" data-target="#flugbereich-description"></i></label>
					<div class="col-lg-9">
						<span class="help-block bspacer-xs collapse" id="flugbereich-description"><div class="alert alert-info bspacer-xs">Skizze bzw. Bild des zul&#228;ssigen Flugbereiches des Modellflugplatzes.<br><br>Maximale Dateigr&#246;&#223;e: 2000 KB (2 MB)<br>Zul&#228;ssige Dateitypen: doc, docx, docm, odt, pdf, xls, xlsx, zip, jpg, jpeg, gif, png</div></span>
						<div class="form-control-static well well-sm">
							<div class="row" style="margin-right: 0; margin-left: 0;">
								<div class="col-md-6" style="padding-left: 0;"><a id="flugbereich-link" href="link.php?t=flugplaetze_oe&f=flugbereich&i=<%%VALUE(id)%%>" target="_blank" class="rspacer-lg"><i class="glyphicon glyphicon-picture" title="<%%VALUE(flugbereich)%%>" style="font-size: 4em;"></i></a></div>
								<div class="hidden-md hidden-lg vspacer-lg"></div>
								<div class="col-md-6 well upload-toolbox">
									<%%REMOVEFILE(flugbereich)%%>
									<%%UPLOADFILE(flugbereich)%%>
									<div class="text-bold text-danger file-type-error hidden"><%%TRANSLATION(invalid file type)%%></div>
									<div class="text-bold text-danger file-size-error hidden"><%%TRANSLATION(file too large)%%></div>
								</div>
							</div>
						</div>
						<script>/* disable empty links */ $j(() => { const e_flugbereich = '<%%VALUE(flugbereich)%%>'; if(e_flugbereich == '' || e_flugbereich == '&nbsp;' || e_flugbereich == 'blank.gif') { $j('#flugbereich-link').hide(); $j('#flugbereich-image').parents('a').attr('href', '').on('click', (e) => e.preventDefault()); } });</script>
					</div>
				</div>

				<!-- Field: Bild 1 -->
				<div class="form-group flugplaetze_oe-bild1">
					<hr class="hidden-md hidden-lg">
					<label class="control-label col-lg-3">Bild 1 <i class="glyphicon glyphicon-info-sign text-info" data-toggle="collapse" data-target="#bild1-description"></i></label>
					<div class="col-lg-9">
						<span class="help-block bspacer-xs collapse" id="bild1-description"><div class="alert alert-info bspacer-xs">Bild 1 des Modellflugplatzes<br>Maximale Dateigr&#246;&#223;e: 20 MB<br>Zul&#228;ssige Dateitypen: jpg, jpeg, gif, png, webp</div></span>
						<div class="form-control-static well well-sm">
							<div class="row" style="margin-right: 0; margin-left: 0;">
								<div class="col-md-6" style="padding-left: 0;"><a href="<%%BASE_UPLOAD_PATH%%><%%VALUE(bild1)%%>" data-lightbox="flugplaetze_oe_dv"><img src="thumbnail.php?i=<%%VALUE(bild1)%%>&t=flugplaetze_oe&f=bild1&v=dv" class="img-thumbnail" id="bild1-image"></a></div>
								<div class="hidden-md hidden-lg vspacer-lg"></div>
								<div class="col-md-6 well upload-toolbox">
									<%%REMOVEFILE(bild1)%%>
									<%%UPLOADFILE(bild1)%%>
									<div class="text-bold text-danger file-type-error hidden"><%%TRANSLATION(invalid file type)%%></div>
									<div class="text-bold text-danger file-size-error hidden"><%%TRANSLATION(file too large)%%></div>
								</div>
							</div>
						</div>
						<script>/* disable empty links */ $j(() => { const e_bild1 = '<%%VALUE(bild1)%%>'; if(e_bild1 == '' || e_bild1 == '&nbsp;' || e_bild1 == 'blank.gif') { $j('#bild1-link').hide(); $j('#bild1-image').parents('a').attr('href', '').on('click', (e) => e.preventDefault()); } });</script>
					</div>
				</div>

				<!-- Field: Bild 2 -->
				<div class="form-group flugplaetze_oe-bild2">
					<hr class="hidden-md hidden-lg">
					<label class="control-label col-lg-3">Bild 2 <i class="glyphicon glyphicon-info-sign text-info" data-toggle="collapse" data-target="#bild2-description"></i></label>
					<div class="col-lg-9">
						<span class="help-block bspacer-xs collapse" id="bild2-description"><div class="alert alert-info bspacer-xs">Bild 2 des Modellflugplatzes<br>Maximale Dateigr&#246;&#223;e: 20 MB<br>Zul&#228;ssige Dateitypen: jpg, jpeg, gif, png, webp</div></span>
						<div class="form-control-static well well-sm">
							<div class="row" style="margin-right: 0; margin-left: 0;">
								<div class="col-md-6" style="padding-left: 0;"><a href="<%%BASE_UPLOAD_PATH%%><%%VALUE(bild2)%%>" data-lightbox="flugplaetze_oe_dv"><img src="thumbnail.php?i=<%%VALUE(bild2)%%>&t=flugplaetze_oe&f=bild2&v=dv" class="img-thumbnail" id="bild2-image"></a></div>
								<div class="hidden-md hidden-lg vspacer-lg"></div>
								<div class="col-md-6 well upload-toolbox">
									<%%REMOVEFILE(bild2)%%>
									<%%UPLOADFILE(bild2)%%>
									<div class="text-bold text-danger file-type-error hidden"><%%TRANSLATION(invalid file type)%%></div>
									<div class="text-bold text-danger file-size-error hidden"><%%TRANSLATION(file too large)%%></div>
								</div>
							</div>
						</div>
						<script>/* disable empty links */ $j(() => { const e_bild2 = '<%%VALUE(bild2)%%>'; if(e_bild2 == '' || e_bild2 == '&nbsp;' || e_bild2 == 'blank.gif') { $j('#bild2-link').hide(); $j('#bild2-image').parents('a').attr('href', '').on('click', (e) => e.preventDefault()); } });</script>
					</div>
				</div>

				<!-- Field: Bild 3 -->
				<div class="form-group flugplaetze_oe-bild3">
					<hr class="hidden-md hidden-lg">
					<label class="control-label col-lg-3">Bild 3 <i class="glyphicon glyphicon-info-sign text-info" data-toggle="collapse" data-target="#bild3-description"></i></label>
					<div class="col-lg-9">
						<span class="help-block bspacer-xs collapse" id="bild3-description"><div class="alert alert-info bspacer-xs">Bild 3 des Modellflugplatzes<br>Maximale Dateigr&#246;&#223;e: 20 MB<br>Zul&#228;ssige Dateitypen: jpg, jpeg, gif, png, webp</div></span>
						<div class="form-control-static well well-sm">
							<div class="row" style="margin-right: 0; margin-left: 0;">
								<div class="col-md-6" style="padding-left: 0;"><a href="<%%BASE_UPLOAD_PATH%%><%%VALUE(bild3)%%>" data-lightbox="flugplaetze_oe_dv"><img src="thumbnail.php?i=<%%VALUE(bild3)%%>&t=flugplaetze_oe&f=bild3&v=dv" class="img-thumbnail" id="bild3-image"></a></div>
								<div class="hidden-md hidden-lg vspacer-lg"></div>
								<div class="col-md-6 well upload-toolbox">
									<%%REMOVEFILE(bild3)%%>
									<%%UPLOADFILE(bild3)%%>
									<div class="text-bold text-danger file-type-error hidden"><%%TRANSLATION(invalid file type)%%></div>
									<div class="text-bold text-danger file-size-error hidden"><%%TRANSLATION(file too large)%%></div>
								</div>
							</div>
						</div>
						<script>/* disable empty links */ $j(() => { const e_bild3 = '<%%VALUE(bild3)%%>'; if(e_bild3 == '' || e_bild3 == '&nbsp;' || e_bild3 == 'blank.gif') { $j('#bild3-link').hide(); $j('#bild3-image').parents('a').attr('href', '').on('click', (e) => e.preventDefault()); } });</script>
					</div>
				</div>

				<!-- Field: Kontrollzone -->
				<div class="form-group flugplaetze_oe-kontrollzone">
					<hr class="hidden-md hidden-lg">
					<label class="control-label col-lg-3" for="kontrollzone">Kontrollzone <i class="glyphicon glyphicon-info-sign text-info" data-toggle="collapse" data-target="#kontrollzone-description"></i></label>
					<div class="col-lg-9">
						<span class="help-block bspacer-xs collapse" id="kontrollzone-description"><div class="alert alert-info bspacer-xs">Liegt der Modellflugplatz in einer Kontrollzone ?</div></span>
						<%%COMBO(kontrollzone)%%>
					</div>
				</div>

				<!-- Field: Besonderheit -->
				<div class="form-group flugplaetze_oe-besonderheit">
					<hr class="hidden-md hidden-lg">
					<label class="control-label col-lg-3" for="besonderheit">Besonderheit <i class="glyphicon glyphicon-info-sign text-info" data-toggle="collapse" data-target="#besonderheit-description"></i></label>
					<div class="col-lg-9">
						<span class="help-block bspacer-xs collapse" id="besonderheit-description"><div class="alert alert-info bspacer-xs">Welche Besonderheiten liegen auf diesem Modellflugplatz vor ?</div></span>
						<input maxlength="40" type="text" class="form-control" name="besonderheit" id="besonderheit" value="<%%VALUE(besonderheit)%%>">
					</div>
				</div>

				<!-- Field: Beschreibung -->
				<div class="form-group flugplaetze_oe-beschreibung">
					<hr class="hidden-md hidden-lg">
					<label class="control-label col-lg-3" for="beschreibung">Beschreibung <i class="glyphicon glyphicon-info-sign text-info" data-toggle="collapse" data-target="#beschreibung-description"></i></label>
					<div class="col-lg-9">
						<span class="help-block bspacer-xs collapse" id="beschreibung-description"><div class="alert alert-info bspacer-xs">Allgemeine Beschreibung des Modellflugplatzes.</div></span>
						<textarea maxlength="65500" class="form-control" name="beschreibung" id="beschreibung" rows=" 5"><%%VALUE(beschreibung)%%></textarea>
					</div>
				</div>

			</fieldset>
		</div>

		<!-- DV action buttons -->
		<hr class="hidden-md hidden-lg">
		<div class="col-md-4 col-lg-3 dv-action-buttons" id="flugplaetze_oe_dv_action_buttons" data-tablename="flugplaetze_oe">
			<div class="btn-toolbar">
				<div class="btn-group-vertical btn-group-lg" style="width: 100%;">
					<%%UPDATE_BUTTON%%>
				</div><p></p>
				<div class="btn-group-vertical btn-group-lg" style="width: 100%;">
					<%%DESELECT_BUTTON%%>
					<%%DVPRINT_BUTTON%%>
					<%%DELETE_BUTTON%%>
				</div><p></p>
				<div class="btn-group-vertical btn-group-lg" style="width: 100%;">
					<%%INSERT_BUTTON%%>
				</div>
			</div>
		</div>
	</div>


	<!-- child records -->
	<hr>
	<div class="row">
		<div class="col-lg-10 col-lg-offset-1">
			<div id="flugplaetze_oe-children" class="children-tabs">
				<div class="text-center"><i class="glyphicon glyphicon-refresh loop-rotate"></i> <%%TRANSLATION(Loading ...)%%></div>
			</div>
		</div>
	</div>

</div><!-- /div class="panel-body" -->
	<script>
		$j(function() {
			var add_new_mode = (!$j('input[name=SelectedID]').val());
			var embedded_mode = ($j('input[name=Embedded]').val() == 1);

			/* auto-close embedded page? */
			var autoclose_mode = ($j('input[name=AutoClose]').val() == 1);
			var record_added_ok = (location.search.split('record-added-ok=').length == 2);
			var record_updated_ok = (location.search.split('record-updated-ok=').length == 2);
			if((record_added_ok || record_updated_ok) && embedded_mode && autoclose_mode) {
				setTimeout(AppGini.closeParentModal, 2000);
			}


			/* enable DV action buttons to float on scrolling down the form */
			enable_dvab_floating();

			$j('#flugplaetze_oe_dv_container-loading').addClass('hidden');
			$j('#flugplaetze_oe_dv_container').removeClass('hidden');
			if(!$j('.table_view').length || $j('[name=SelectedID]').val().length) AppGini.focusFormElement('flugplaetze_oe', 'flugplatznummer');

			$j('a[href="<%%BASE_UPLOAD_PATH%%>"]').click(function() { return false; });

			if(embedded_mode) {
				/* hide links to children tables in embedded mode */
				$j('.detail_view a[id$=_link]').remove();

				/* append embedded mode to all links */
				var append_embedded = function() {
					$j('a[href]:not([href^="#"]):not([href^="javascript"]):not([href$="Embedded=1"]):not([href*="link.php?t="]):not([href^="mailto:"]):not([href$=".jpg"]):not([href$=".png"]):not([href$=".gif"])').each(
						function() {
							$j(this).attr('href', $j(this).attr('href') + '&Embedded=1');
						}
					);
				}
				setInterval(append_embedded, 1000);
			}

			/* when no record is selected ('add new' mode) */
			if(add_new_mode) {
				/* hide links to children tables */
				$j('.detail_view a[id$=_link]').remove();
			} else {
				post(
					'parent-children.php', {
						ParentTable: 'flugplaetze_oe',
						SelectedID: '<%%VALUE(id)%%>',
						Operation: 'show-children'
					},
					'flugplaetze_oe-children'
				);
			}

			const autoCloseTables = <%%AUTO_CLOSE_PARENT_TABLES%%>;

			if(true /* !embedded_mode */) {
				$j('.add_new_parent').click(function() {
					const fieldId = $j(this).prevAll('input:hidden').eq(0).attr('id');
					const pt = $j(this).attr('id').replace(/_add_new$/, '');
					const autoCloseParam = (autoCloseTables.includes(pt) ? '&AutoClose=1' : '');

					modal_window({
						url: `${pt}_view.php?addNew_x=1&Embedded=1${autoCloseParam}`,
						close: function() {
							$j(`#${fieldId}-container`).select2('focus').select2('focus');

							/* if a new parent was added, select it */
							var new_id = AppGini.localStorage.getItem(`${pt}_last_added_id`);
							if(new_id === null) return;

							AppGini.localStorage.removeItem(`${pt}_last_added_id`);
							AppGini.lookupText({
								id: new_id,
								table: AppGini.currentTableName(),
								field: fieldId,
								callback: function(data) {
									$j(`#${fieldId}-container`).select2('data', data, true);
								}
							});
						},
						beforeClose: AppGini.confirmBeforeClosingModal,
						size: 'full',
						title: $j(this).attr('title')
					});
				});
			}

			AppGini.hideViewParentLinks();

			$j('form').on('click', '.view_parent', function() {
				const pt = $j(this).attr('id').replace(/_view_parent$/, '');
				const fieldId = $j(this).prevAll('input:hidden').eq(0).attr('id');
				const autoCloseParam = (autoCloseTables.includes(pt) ? '&AutoClose=1' : '');

				let parent_id = '{empty_value}';
				if(fieldId) {
					parent_id = $j(`#${fieldId}`).val();
				} else if($j(this).prevAll('[type=radio]').length) { /* handle radio lookups */
					parent_id = $j(this).prevAll('[type=radio]').eq(0).val();
				} else {
					parent_id = $j(this).prevAll().children('input:hidden').eq(0).val();
				}

				if(parent_id != '{empty_value}' && parent_id !== undefined && parent_id !== '') {
					const parent_link = $j(this).parents('.form-group').children('label').data('parent_link');
					switch(parent_link) {
						case 'view_parent_hidden':
							break;
						case 'view_parent_modal':
							modal_window({
								url: `${pt}_view.php?Embedded=1&SelectedID=${encodeURIComponent(parent_id)}${autoCloseParam}`,
								close: function() {
									$j(`#${fieldId}-container`).select2('focus').select2('focus');

									// update lookup text in case the parent record was updated
									AppGini.lookupText({
										id: parent_id,
										table: AppGini.currentTableName(),
										field: fieldId,
										cache: false,
										callback: function(data) {
											$j(`#${fieldId}-container`).select2('data', data, true);

											// update auto-fills
											const updaterName = `${fieldId}_update_autofills`;
											if(typeof(window[updaterName]) == 'function')
												window[updaterName]();
										}
									});
								},
								beforeClose: AppGini.confirmBeforeClosingModal,
								size: 'full',
								title: $j(this).attr('title')
							});
							break;
						case 'view_parent_same_window':
							window.location = `${pt}_view.php?Embedded=${embedded_mode ? '1' : ''}&SelectedID=${encodeURIComponent(parent_id)}`;
							break;
						case 'view_parent_new_window':
							window.open(`${pt}_view.php?SelectedID=${encodeURIComponent(parent_id)}`);
							break;
					}

				}
			});

			flugplaetze_oeUniqueFields.forEach(fieldName => enforce_uniqueness('flugplaetze_oe', fieldName));

			/* load admin tools for admin user */
			if(!add_new_mode) {
				$j('body').append('<div id="admin-tools-appendix"></div>');
				$j('#admin-tools-appendix').load(
					'ajax_admin_tools.php?table=flugplaetze_oe&id=<%%URLVALUE(id)%%>',
					function(resp) {
						if(!resp.length) return;
						$j.ajax('ajax_admin_tools.php?action=get_admin_tools_js&table=flugplaetze_oe&id=<%%URLVALUE(id)%%>');
					}
				);
			}
		});

		var flugplaetze_oeUniqueFields = [
			'flugplatznummer',
			'vereinsname',
		];
	</script>