## $Header: /cvs/sakai2/legacy/tools/src/webapp/vm/admin/chef_users_edit.vm,v 1.2 2005/05/24 19:36:12 gsilver.umich.edu Exp $

<script type="text/javascript" language="JavaScript">
	focus_path = [#if(!$user)"id"#else"first-name"#end];
</script>

<div class="portletBody">
#if($menu)
	#toolbar($menu)
#end
	

		<h3>
			$tlang.getString("useedi.revandmod")
		</h3>
		#if ($alertMessage)<div class="alertMessage">$tlang.getString("useedi.alert") $validator.escapeHtml($alertMessage)</div>#end
		<form name="$form-name" id="useredit" action="#toolForm("$action")" method="post">
			<p class="shorttext  required">
				#if(!$user)<span class="reqStar">*</span>#end 
				<label #if(!$user) for="eid" #end>
					$tlang.getString("useedi.useid")
				</label>
				#if($!user && !$valueEid)
					#set($valueEid=$user.Eid)
				#end
				#if(!$user)
					## creating new account
					<input type="text" name="eid" id="eid" #if($!valueEid)value="$validator.escapeHtml($!valueEid)"#end/>
				#else
					## modifying existing account
					#if($!superUser)
						## only admin type user can modify the eid field
						<input type="text" name="eid" id="eid" #if($!valueEid)value="$validator.escapeHtml($!valueEid)"#end/>
					#else
						$validator.escapeHtml($!valueEid)
					#end
				#end
			</p>	
			<p class="shorttext">
				<label for="first-name">
					$tlang.getString("useedi.firnam")
				</label>	
			#if ($service.allowUpdateUserName($user.Id) || !$user)
				<input type="text" name="first-name" id="first-name" #if($user)value="$validator.escapeHtml($user.FirstName)"#elseif($valueFirstName)value="$validator.escapeHtml($valueFirstName)"#end />
			#else
				#if($user)$validator.escapeHtml($user.FirstName)#elseif($valueFirstName)$validator.escapeHtml($valueFirstName)#end
			#end
			</p>
			<p class="shorttext">
				<label for="last-name">
					$tlang.getString("useedi.lasnam")
				</label>
			#if ($service.allowUpdateUserName($user.Id) || !$user)
				<input type="text" name="last-name" id="last-name" #if($user)value="$validator.escapeHtml($user.LastName)"#elseif($valueLastName)value="$validator.escapeHtml($valueLastName)"#end />
			#else
				#if($user)$validator.escapeHtml($user.LastName)#elseif($valueLastName)$validator.escapeHtml($valueLastName)#end
			#end
			</p>
			<p class="shorttext">
				<label for="email">
					$tlang.getString("useedi.ema")
				</label>
			#if ($service.allowUpdateUserEmail($user.Id) || !$user)
				<input type="text" name="email" id="email"#if($user)value="$validator.escapeHtml($user.Email)"#elseif($valueEmail)value="$validator.escapeHtml($valueEmail)"#end />
			#else
				#if($user)$validator.escapeHtml($user.Email)#elseif($valueEmail)$validator.escapeHtml($valueEmail)#end
			#end
			</p>	
#if ($incPw)
			<p class="shorttext">
				<label for="pw">
					$tlang.getString("useedi.crenewpass")
				</label>
			#if ($service.allowUpdateUserPassword($user.Id) || !$user)
				<input type="password" name="pw" id="pw" />
			#else
				&nbsp;
			#end
			</p>
			<p class="shorttext">
				<label for="pw0">
					$tlang.getString("useedi.vernewpass")
				</label>
			#if ($service.allowUpdateUserPassword($user.Id) || !$user)
				<input type="password" name="pw0" id="pw0" />
			#else
				&nbsp;
			#end
			</p>	
#end
#if ($incType)
			<p class="shorttext">
				<label for="type">
					$tlang.getString("useedi.typ")
				</label>
			#if ($service.allowUpdateUserType($user.Id) || !$user)
				<input type="text" name="type" id="type" #if($user)value="$validator.escapeHtml($user.Type)"#elseif($valueType)value="$validator.escapeHtml($valueType)"#end />
			#else
				#if($user)$validator.escapeHtml($user.Type)#elseif($valueType)$validator.escapeHtml($valueType)#end
			#end
			</p>	
#end
#if ($user)
			<p class="shorttext">
				<label>$tlang.getString("useedi.creby")</label>
				$validator.escapeHtml($user.CreatedBy.DisplayName)
			</p>
			<p class="shorttext">
				<label>$tlang.getString("useedi.cre")</label>
				$validator.escapeHtml($user.CreatedTime.toStringLocalFull())
			</p>
			<p class="shorttext">
				<label>$tlang.getString("useedi.modby")</label>
				$validator.escapeHtml($user.ModifiedBy.DisplayName)
			</p>	
			<p class="shorttext">
				<label>$tlang.getString("useedi.mod")</label>
				$validator.escapeHtml($user.ModifiedTime.toStringLocalFull())
			</p>	
			<p class="shorttext">
				<label>$tlang.getString("useedi.useuid")</label>
				$validator.escapeHtml($user.Id)
			</p>
#end
			<div class="act">
				#if($user)
					<input type="submit" class="active" name="eventSubmit_doSave" value="$tlang.getString("useedi.sav")" accesskey="s" />
				#else
					<input type="submit"  class="active" name="eventSubmit_doSave" value="$tlang.getString("useedi.sav2")" accesskey="s" />
				#end					
				<input type="submit" name="eventSubmit_doCancel" value="$tlang.getString("useedi.can")" accesskey="x" />
			</div>
		</form>
	</div>

