personInUp.tpl.php 5.58 KB
<script language="javascript">
//<![CDATA[
	pInUp = new personInUp (
		'update', 'insert', 'submit', person, newPerson, arrRight, arrDown);

	function showHideBlock (titleId)
	{
		var titleElement = document.getElementById (titleId);
		var imgElement   = titleElement.getElementsByTagName ('img')[0];
		var blockElement = titleElement.parentNode;
		var dataElement  = blockElement.getElementsByTagName ('div')[1];

		if (dataElement.style.display == 'none')
		{
			dataElement.style.display = 'block';
			imgElement.src = arrDown.getImgUrl (titleElement);
		}
		else
		{
			dataElement.style.display = 'none';
			imgElement.src = arrRight.getImgUrl (titleElement);
		}
	}

	function personInUpInit ()
	{
		var tCam    = document.getElementById ('_title_camera');
		var tCamImg = tCam.getElementsByTagName ('img')[0];
		var tWat    = document.getElementById ('_title_watermark');
		var tWatImg = tWat.getElementsByTagName ('img')[0];

		tCamImg.src = arrRight.getImgUrl (tCam);
		tWatImg.src = arrRight.getImgUrl (tWat);
	}
//]]>
</script>

<div class="bgc-bg1 d-bg1 f-bg1">
	<form id="pForm" onSubmit="return false">
		<div>
			<table width="100%"><tr>
				<td style="vertical-align: middle">
					<input type="checkbox" id="update" name="action"
						value="update" disabled="true" 
						onClick="pInUp.updateForm ()" />
				</td>
				<td style="vertical-align: middle"><?=_('update')?></td>
				<td style="vertical-align: middle">&nbsp;&nbsp;</td>
				<td style="vertical-align: middle">
					<input type="checkbox" id="insert" name="action"
						value="insert"
						onClick="pInUp.updateForm ()" />
				</td>
				<td style="vertical-align: middle"><?=_('insert')?></td>
				<td align="right" width="100%">
					<input type="button" id="submit"
						value="<?=_('submit')?>" disabled="true" />
				</td>
			</tr></table>
		</div>
		<div class="bgc-grp1 d-grp1" style="margin-top: 2px">
			<div class="bgc-grp-head1 f-grp-head1 d-grp-head1">
				<?=_('personal data')?>
			</div>
			<div>
				<div class="bgc-box1 f-box1 d-box1">
					<div>
						<input type="hidden" id="personId" value="-1"
							disabled="true" />
					</div>
					<div>
						<input type="hidden" id="photographerId" value="-1"
							disabled="true" />
					</div>
					<div>
						<input type="hidden" id="ownerId" value="-1"
							disabled="true" />
					</div>
					<div>
						<input type="text" style="width: 200px" maxlength="255"
							id="firstname" value="" disabled="true" 
							onChange="pInUp.setFirstname (this.value)" />
						<?=_('firstname')?>
					</div>
					<div>
						<input type="text" style="width: 200px" maxlength="255"
							id="surname" value="" disabled="true"
							onChange="pInUp.setSurname (this.value)" />
						<?=_('surname')?>
					</div>
					<div>
						<input type="text" style="width: 200px" maxlength="255"
							id="company" value="" disabled="true"
							onChange="pInUp.setCompany (this.value)" />
						<?=_('company')?>
					</div>
					<div>
						<input type="text" style="width: 200px" maxlength="255"
							id="email" value="" disabled="true"
							onChange="pInUp.setEmail (this.value)" />
						<?=_('email')?>
					</div>
					<div>
						<input type="text" style="width: 200px" maxlength="255"
							id="url" value="" disabled="true"
							onChange="pInUp.setUrl (this.value)" />
						<?=_('url')?>
					</div>
				</div>
			</div>
		</div>

		<div class="bgc-grp1 d-grp1" style="margin-top: 2px">
			<div class="bgc-grp-head1 f-grp-head1 d-grp-head1" id="_title_camera">
				<img style="
						position:     relative;
						float:        right;
						margin-right: 3px;
						cursor:       pointer"
					onClick="showHideBlock ('_title_camera')" />
				<?=_('photographer')?>
			</div>
			<div style="display: none">
				<div class="bgc-box1 f-box1 d-box1">
					<div class="bgc-box-head1 f-box-head1 d-box-head1">camera</div>
					<div>
						<input type="text" style="width: 200px" maxlength="255"
							id="cameraId" value="-1" disabled="true"
							onChange="pInUp.setCameraId (this.value)" />
						<?=_('cameraId')?>
					</div>
				</div>
			</div>
		</div>

		<div class="bgc-grp1 d-grp1" style="margin-top: 2px">
			<div class="bgc-grp-head1 f-grp-head1 d-grp-head1"
				id="_title_watermark">
				<img style="
						position:     relative;
						float:        right;
						margin-right: 3px;
						cursor:       pointer"
					onClick="showHideBlock ('_title_watermark')" />
				<?=_('owner')?>
			</div>
			<div style="display: none">
				<div class="bgc-box1 f-box1 d-box1">
					<div class="bgc-box-head1 f-box-head1 d-box-head1">
						watermark</div>
					<div>
						<input type="text" style="width: 200px" maxlength="255"
							id="wmWidth" value="" disabled="true"
							onChange="pInUp.setWmWidth (this.value)" />
						<?=_('watermark width')?>
					</div>
					<div>
						<input type="text" style="width: 200px" maxlength="255"
							id="wmHeight" value="" disabled="true"
							onChange="pInUp.setWmHeight (this.value)" />
						<?=_('watermark height')?>
					</div>
					<div>
						<input type="text" style="width: 200px" maxlength="255"
							id="wmXPos" value="" disabled="true"
							onChange="pInUp.setWmXPos (this.value)" />
						<?=_('watermark xPos')?>
					</div>
					<div>
						<input type="text" style="width: 200px" maxlength="255"
							id="wmYPos" value="" disabled="true"
							onChange="pInUp.setWmYPos (this.value)" />
						<?=_('watermark yPos')?>
					</div>
				</div>
				<div class="bgc-box1 f-box1 d-box1">
					<div class="bgc-box-head1 f-box-head1 d-box-head1">more</div>
				</div>
			</div>
		</div>
	</form>
</div>

<script language="javascript">
//<![CDATA[
	personInUpInit ();
//]]>
</script>