<!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 metal:fill-slot="main_content_slot">

			<edit tal:omit-tag="" i18n:translate="">Edit <name tal:content="context/get_nickname"/><dtml-var get_nickname></edit>			
			
			<!-- Strange lights!? 

<dtml-if expr="kasOmaVeebilaual(REQUEST)">
<dtml-else>
  <dtml-call expr="REQUEST.RESPONSE.redirect(this().fle_root().absolute_url())">
</dtml-if>
  
<dtml-var hdr>  
-->


			<h2 i18n:translate="">Edit User : <name tal:content="python:context.get_uname()"/></h2>

				<if tal:condition="python:context.perm_must_change"><p><strong i18n:translate="">Change password</strong></p></if>

			<!--<dtml-var "state_form(REQUEST, 'edit_user_form_handler', 'post', 'multipart/form-data')">-->
		<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_pwd; disabled python:context.getSetting('perm_pass')" tabindex="2" class="width120" />
<!--	<dtml-try perm_pass><dtml-if expr="perm_pass==1"> disabled="disabled" </dtml-if><dtml-except></dtml-try>type="password"name="pwd" value=<dtml-try perm_must_change><dtml-if expr="perm_must_change==1">"kala"<dtml-else>"<dtml-var empty_pwd>"</dtml-if><dtml-except>"<dtml-var empty_pwd>"</dtml-try>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_pwd; disabled python:context.getSetting('perm_pass')" tabindex="3" class="width120" />
<!--        <dtml-try perm_pass>disabled python:context.perm_pass
                <dtml-if expr="perm_pass==1"> disabled="disabled" </dtml-if>
	<dtml-except>
        </dtml-try>
	type="password" name="pwd_confirm" value="<dtml-var empty_pwd>" 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="">Language:</td>
				<td>
					<select name="language" tabindex="6" class="width120">
						<option tal:repeat="language context/get_languages" selected="selected" tal:content="python:language[1]" tal:attributes="selected python:context.get_language()==language[0] and default; value python:language[0]">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 tal:condition="python:context.is_power_user(context.get_current_user(request))">
				<td i18n:translate="">Role:</td>
					<td>
						<select name="role_tmp" tabindex="7" class="width120">
							<option>not implemented<option/>							
						</select>
<!--    <select name="role" tabindex="7" class="width120">
      <option value="User" <dtml-unless "has_any_role(('Staff', 
'FLEAdmin'))">selected="selected"</dtml-unless>><dtml-var "L_role_user"></option>
      <option value="Staff" <dtml-if "has_role('Staff') and not 
has_role('FLEAdmin')">selected="selected"</dtml-if>><dtml-var "L_role_staff"></option>
      <dtml-if "has_user_global_role(get_current_user(REQUEST), 'FLEAdmin')">
        <option value="FLEAdmin" <dtml-if "has_role('FLEAdmin')">selected</dtml-if>><dtml-var 
"L_role_fleadmin"></option>
      </dtml-if>
    </select>-->
				</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="python:not(context.has_photo())" alt="" src="images/user" />
<!--  <dtml-if has_photo> tal:attributes="src context/get_photo" 
    <img src="get_photo" alt="" />
  <dtml-else>
    <dtml-var "images.user.tag(alt='', vspace='0')">
  </dtml-if>-->
				</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>
<!--  <dtml-comment>### Change Userinfo.edit_user_form_handler() if you change
  default value from http:// ###</dtml-comment> -->
				<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="">Email:</td>
				<td>
					<input name="email" type="text" value="" tal:attributes="value context/email | nothing" size="36" tabindex="512" class="width240" />
				</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">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">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">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">Send to email:</td>
				<td>
					<input type="checkbox" name="email_kirjad" value="1" checked="checked" tal:attributes="checked python:context.email_kirjad and default" /><x i18n:translate="">internal mail messages</x> <br/>
					<input type="checkbox" name="email_hinded" value="1" checked="checked" tal:attributes="checked python:context.email_hinded and default" /><x i18n:translate="">grades</x> <br/>
					<input type="checkbox" name="email_raamat" value="1" checked="checked" tal:attributes="checked python:context.email_raamat and default" /><x i18n:translate="">Bookshelf change notification</x> <br/>
					<input type="checkbox" name="email_teadm" value="1" checked="checked" tal:attributes="checked python:context.email_teadm and default" /><x i18n:translate="">Knowledge Building change notification</x> <br/>
					<input type="checkbox" name="email_meedia" value="1" checked="checked" tal:attributes="checked python:context.email_meedia and default" /><x i18n:translate="">Jamming change notification</x> <br/>
				</td>
			</tr>
			<tr>
				<td colspan="2">&nbsp;</td>
			</tr>
			<tr>
				<td>&nbsp;</td>
				<td>
					<input type="submit" value="Submit" name="commit" tabindex="525" /> 
					<input type="submit" value="Cancel" name="cancel" tabindex="526" />
				</td>
			</tr>
		</table>
	</form>


</span>
  
</html>
