personInUp.tpl.php 5.47 KB
<script language="javascript">
//<![CDATA[
	submit_str = '<?=_('submit')?>';
	delete_str = '<?=_('delete')?>';

	pForm = new personForm (
		'update', 'insert', 'send', person, newPerson, arrRight, arrDown);

	function personFormInit ()
	{
		var tCam    = document.getElementById ('title_photographer');
		var tCamImg = tCam.getElementsByTagName ('img')[0];
		var tWat    = document.getElementById ('title_owner');
		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" action="<?=$_SERVER['PHP_SELF']?>" method="post">
		<div>
			<table cellspacing="0"><tr>
				<td>
					<input type="checkbox" id="update" name="action"
						value="update" disabled="true" 
						onClick="pForm.updateForm ()" />
				</td>
				<td><?=_('update')?></td>
				<td>&nbsp;&nbsp;</td>
				<td>
					<input type="checkbox" id="insert" name="action"
						value="insert"
						onClick="pForm.updateForm ()" />
				</td>
				<td><?=_('insert')?></td>
				<td align="right" width="100%">
					<input type="button" id="send" value="<?=_('submit')?>"
						onClick="return pForm.sendForm ('pForm')" 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"
							name="personId" disabled="true" />
					</div>
					<div>
						<input type="hidden" id="photographerId" value="-1"
							name="photographerId" disabled="true" />
					</div>
					<div>
						<input type="hidden" id="ownerId" value="-1"
							name="ownerId" disabled="true" />
					</div>
					<div>
						<input type="text" style="width: 200px" maxlength="255"
							id="firstname" name="firstname" value="" disabled="true" 
							onChange="pForm.setFirstname (this.value)" />
						<?=_('firstname')?>
					</div>
					<div>
						<input type="text" style="width: 200px" maxlength="255"
							id="surname" name="surname" value="" disabled="true"
							onChange="pForm.setSurname (this.value)" />
						<?=_('surname')?>
					</div>
					<div>
						<input type="text" style="width: 200px" maxlength="255"
							id="company" name="company" value="" disabled="true"
							onChange="pForm.setCompany (this.value)" />
						<?=_('company')?>
					</div>
					<div>
						<input type="text" style="width: 200px" maxlength="255"
							id="email" name="email" value="" disabled="true"
							onChange="pForm.setEmail (this.value)" />
						<?=_('email')?>
					</div>
					<div>
						<input type="text" style="width: 200px" maxlength="255"
							id="url" name="url" value="" disabled="true"
							onChange="pForm.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-head-unset1 d-grp-head1"
				id="title_photographer">
				<table cellspacing="0">
					<tr><td>
						<?=_('photographer')?>
					</td><td width="100%" align="right">
						<img style="
							margin-right: 3px;
							float:        right;
							cursor:       pointer"
							onClick="pForm.showHideBlock ('title_photographer')" />
					</td></tr>
				</table>
			</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" name="cameraId" value="-1" disabled="true"
							onChange="pForm.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-head-unset1 d-grp-head1"
				id="title_owner">
				<table cellspacing="0">
					<tr><td>
						<?=_('owner')?>
					</td><td width="100%" align="right">
						<img style="
								float:        right;
								margin-right: 3px;
								cursor:       pointer"
							onClick="pForm.showHideBlock ('title_owner')" />
					</td></tr>
				</table>
			</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" name="wmWidth" value="" disabled="true"
							onChange="pForm.setWmWidth (this.value)" />
						<?=_('watermark width')?>
					</div>
					<div>
						<input type="text" style="width: 200px" maxlength="255"
							id="wmHeight" name="wmHeight" value="" disabled="true"
							onChange="pForm.setWmHeight (this.value)" />
						<?=_('watermark height')?>
					</div>
					<div>
						<input type="text" style="width: 200px" maxlength="255"
							id="wmXPos" name="wmXPos" value="" disabled="true"
							onChange="pForm.setWmXPos (this.value)" />
						<?=_('watermark xPos')?>
					</div>
					<div>
						<input type="text" style="width: 200px" maxlength="255"
							id="wmYPos" name="wmYPos" value="" disabled="true"
							onChange="pForm.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[
	personFormInit ();
//]]>
</script>