<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html metal:use-macro="container/page_macro/macros/master_page">

<span tal:omit-tag="" metal:fill-slot="main_content_slot">
<span tal:omit-tag="" tal:condition="python:context.get_uname()==curUser.get_uname() or isTeacher">

	<h2 i18n:translate="">Edit user: <name tal:omit-tag="" i18n:name="uname" tal:content="python:context.get_uname()"/></h2>

		<if tal:omit-tag="" tal:condition="python:context.getSetting('perm_must_change')"><p><strong i18n:translate="">Change password</strong></p></if>

		<form action="edit_user_form_handler" method="post" enctype="multipart/form-data">
		<table border="0" cellpadding="2" cellspacing="0" width="100%">
				<tr>
					<td i18n:translate="">Username:</td>
					<td tal:content="context/get_uname">Username(get)</td>
				</tr>
				<tr>
				<td i18n:translate="">Password:</td>
				<td><input type="password" name="pwd" value="#" tal:attributes="value context/empty_pwd1; disabled python:context.getSetting('perm_pass')" tabindex="2" class="width120" />
				</td>
			</tr>
			<tr>
				<td i18n:translate="">Confirm password:</td>
				<td><input type="password" name="pwd_confirm" value="<dtml-var empty_pwd>" tal:attributes="value context/empty_pwd2; disabled python:context.getSetting('perm_pass')" tabindex="3" class="width120" />
				</td>
			</tr>
			<tr>
				<td i18n:translate="">First name:</td>
				<td><input name="first_name" type="text" value="First name" tal:attributes="value context/get_first_name" size="36" tabindex="4" class="width120" /> *</td>
			</tr>
			<tr>
				<td i18n:translate="">Last name:</td>
				<td><input name="last_name" type="text" value="Last name" tal:attributes="value context/get_last_name" size="36" tabindex="5" class="width120" /> *</td>
			</tr>
			<tr>
				<td i18n:translate="">Email:</td>
				<td>
					<input name="email" type="text" value="" tal:attributes="value context/get_email | nothing" size="36" tabindex="6" class="width240" /> *
				</td>
			</tr>
			<tr>
				<td i18n:translate="">Language:</td>
				<td>
					<select name="language" tabindex="7" class="width120">
						<option tal:repeat="language context/get_languages" selected="selected" tal:content="python:language" i18n:translate="" tal:attributes="selected python:context.get_language()==language and default; value python:language">language</option>
					</select>
				</td>
			</tr>
			<tr>
				<td><x i18n:translate="">Follow browsers language preference:</x></td>
				<td>
					<input type="checkbox" tal:attributes="checked context/kasKeelBrauserist" name="keel_brauserist" />
				</td>
			</tr>
			<tr>
				<td>&nbsp;</td>
				<td i18n:translate="">* Required field</td>
			</tr>
			<tr>
				<td colspan="2">&nbsp;</td>
			</tr>
			<tr>
				<td>&nbsp;</td>
				<td>
<!--					<img tal:condition="context/has_photo" alt="" src="get_photo" />-->
					<img tal:condition="context/has_photo" tal:replace="structure context/get_photo_tag" />
					<img tal:condition="python:not(context.has_photo())" alt="" src="images/user" />
				</td>
			</tr>
			<tr>
				<td i18n:translate="">Upload your image:</td>
				<td><input tabindex="9" name="photo_upload" type="file" size="32" class="width240" /></td>
			</tr>
			<tr>
				<td i18n:translate="">...or give a link to an image:</td>
				<td>
					<input name="photo_url" type="text" value="http://" size="36" tabindex="10" class="width240" tal:attributes="value context/photo_url | default "/>
				</td>
			</tr>
			<tr>
				<td colspan="2">&nbsp;</td>
			</tr>
			<tr>
				<td i18n:translate="">Homepage:</td>
				<td>
					<input name="homepage:string" type="text"
  value="" tal:attributes="value context/get_homepage" size="36" tabindex="513" class="width240" /></td>
			</tr>
			<tr>
				<td i18n:translate="">Organization:</td>
				<td tal:content="structure python:context.erialadeKombo(request, 'organization',opt='full',vaikimisiID=getattr(request, 'eriala','-1'))">
				<!-- needs testing -->
				</td>
			</tr>
			<tr>
				<td i18n:translate="">Address line 1:</td>
				<td>
					<input name="address1:string" type="text" value="" tal:attributes="value context/get_address1" size="36" tabindex="515" class="width240" />
				</td>
			</tr>
			<tr>
				<td i18n:translate="">Address line 2:</td>
				<td>
					<input name="address2:string" type="text" value="" tal:attributes="value context/get_address2" size="36" tabindex="515" class="width240" />
  				</td>
			</tr>
			<tr>
				<td i18n:translate="">City:</td>
				<td>
					<input name="city:string" type="text" value="" tal:attributes="value context/get_city" size="36" tabindex="517" class="width240" />
				</td>
			</tr>
			<tr>
				<td i18n:translate="">Country:</td>
				<td>
					<select name="country" tabindex="518" class="width240">
						<option value="Select country" i18n:translate="" i18n:attributes="value">Select country</option>
						<option tal:repeat="country context/get_countries" selected="selected" value="#" tal:attributes="value country; selected python:context.get_country()==country and default" tal:content="country"></option>
					</select>
  					<a href="http://www.web.amnesty.org/rmp/dplibrary.nsf/ba4275cdead20d858025677e0059735b/46e4de9db9087e35802568810050f05f!OpenDocument"><img src="images/dot" alt="" height="9" width="9" border="0" /></a>
				</td>
			</tr>
			<tr>
				<td i18n:translate="">Phone:</td>
				<td>
					<input name="phone:string" type="text" tal:attributes="value context/get_phone | nothing" value="" size="36" tabindex="519" class="width240" />
				</td>
			</tr>
			<tr>
				<td i18n:translate="">GSM:</td>
				<td><input name="gsm:string" type="text" tal:attributes="value context/get_gsm" value="" size="36" tabindex="520" class="width240" /></td>
			</tr>
			<tr>
				<td colspan="2">&nbsp;</td>
			</tr>
			<tr>
				<td valign="top" i18n:translate="">Quote:</td>
				<td>
					<textarea name="quote:text" rows="3" cols="30" tabindex="521" class="width240" tal:content="context/get_quote"></textarea>
				</td>
			</tr>
			<tr>
				<td valign="top" i18n:translate="">Background:</td>
				<td>
					<textarea name="background:text" rows="3" cols="30" tabindex="522" class="width240" tal:content="context/get_background"></textarea>
				</td>
			</tr>
			<tr>
				<td valign="top" i18n:translate="">Personal interests:</td>
				<td>
					<textarea name="personal_interests:text" rows="3" cols="30" tabindex="523" class="width240" tal:content="context/get_personal_interests"></textarea>
				</td>
			</tr>
			<tr>
				<td valign="top" i18n:translate="">Professional interests:</td>
				<td>
					<textarea name="professional_interests:text" rows="3" cols="30" tabindex="524" class="width240" tal:content="context/get_professional_interests"></textarea>
				</td>
			</tr>
			<tr>
				<td valign="top" i18n:translate="">Send to email:</td>
				<td>
					<input type="checkbox" name="email_kirjad" value="1" checked="checked" tal:attributes="checked context/email_kirjad | nothing" /><x tal:omit-tag="" i18n:translate="">internal mail messages</x> <br/>
					<input type="checkbox" name="email_hinded" value="1" checked="checked" tal:attributes="checked context/email_hinded | nothing" /><x tal:omit-tag="" i18n:translate="">grades</x> <br/>
					<input type="checkbox" name="email_raamat" value="1" checked="checked" tal:attributes="checked context/email_raamat | nothing" /><x tal:omit-tag="" i18n:translate="">Bookshelf change notification</x> <br/>
					<input type="checkbox" name="email_teadm" value="1" checked="checked" tal:attributes="checked context/email_teadm | nothing" /><x tal:omit-tag="" i18n:translate="">Knowledge Building change notification</x> <br/>
					<input type="checkbox" name="email_meedia" value="1" checked="checked" tal:attributes="checked context/email_meedia | nothing" /><x tal:omit-tag="" i18n:translate="">Jamming change notification</x> <br/>
				</td>
			</tr>
			<tr>
				<td i18n:translate="">Display events on front page:</td>
				<td>
					<select name="eventLimit">
						<option selected="selected" tal:attributes="selected python:context.get_event_limit()==0 and default" value="0" i18n:translate="">No</option>
						<option selected="selected" tal:attributes="selected python:context.get_event_limit()==1 and default" value="1" i18n:translate="">+/- 1 week</option>
						<option selected="selected" tal:attributes="selected python:context.get_event_limit()==2 and default" value="2" i18n:translate="">+/- 2 weeks</option>
					</select>
				</td>
			</tr>
			<tr>
				<td colspan="2">&nbsp;</td>
			</tr>
			<tr>
				<td>&nbsp;</td>
				<td>
					<input type="submit" i18n:attributes="value" value="Submit" name="commit" tabindex="525" /> 
					<input type="submit" i18n:attributes="value" value="Cancel" name="cancel" tabindex="526" />
				</td>
			</tr>
		</table>
	</form>


</span>
</span>  
</html>
