<!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">
<!-- your input here -->
	&gt; <label tal:omit-tag="" i18n:translate="">IVA Setup</label>
	<br />
	<br />
	<span tal:omit-tag="" tal:condition="python:user.has_role(('Manager','IVAAdmin',),context)">
	<label style="color:red" tal:content="options/mess | nothing" />

	<fieldset style="width:45%;border:1px solid red;position:relative;float:right">
		<legend i18n:translate="">IVA Pictures</legend>
		<form action="manage_iva_setup_pictures" method="post" enctype="multipart/form-data">
		<table style="width:100%">
			<tr>
				<td colspan="2" class="helpLabel" i18n:translate="">Recommended image dimensions 200x200</td>
			</tr>
			<tr>
				<td i18n:translate="">Upload image:</td>
				<td><input type="file" name="newimage" /></td>
			</tr>
			<tr><td colspan="2"><input type="submit" name="uploadB" value="Upload" i18n:attributes="value" /></td></tr>
			<tr>
				<td>&nbsp;</td>
			</tr>
			<tr>
				<th colspan="2" style="border-bottom:1px solid black" i18n:translate="">Current images</th>
			</tr>
			<tr>
				<td style="text-align:center;border-bottom:1px solid black" colspan="2">
				<span tal:repeat="x container/images/frontpage/objectValues">
					<input type="checkbox" value="" tal:attributes="value x/getId" name="dele" />
					<a href="" tal:attributes="href x/absolute_url">
						<img tal:replace="structure python:x.tag(width=90, height=90)" />
					</a>
				
				<span tal:replace="structure string:</td></tr><tr><td colspan='2' style='text-align:center;;border-bottom:1px solid black'>" tal:condition="repeat/x/odd" />
				</span>
				</td>
			</tr>
			<tr>
				<td colspan="2"><input i18n:attributes="value" type="submit" value="Delete selected images" name="deleteB" /></td>
			</tr>
		</table>
		</form>
	</fieldset>
	
	<form action="manage_iva_setup_handler" method="post">
		<fieldset style="width:45%">
		<legend i18n:translate="">IVA Settings</legend>
		<table style="width:100%">
			<tr>
				<td i18n:translate="">Allow user registration?</td> 
				<td>
					<input type="checkbox" value="1" name="autoregister" checked="checked"
						tal:attributes="checked python:context.get_allow_autoregister() and default" />
				</td>
			</tr>
			<tr>
				<td colspan="2" class="helpLabel" i18n:translate="">users can request an account or not.</td>
			</tr>
			<tr>
				<td i18n:translate="">Quota</td>
			</tr>
			<tr>
				<td i18n:translate="">Use Quota?</td>
				<td>
					<input type="checkbox" name="useQuota" value="1" checked="checked" 
						tal:attributes="checked python:context.webtop_quota and default" />
				</td>
			</tr>
			<tr>
				<td i18n:translate="">Quota amount:</td>
				<td>
					<input type="text" name="quota" value="" tal:attributes="value context/webtop_quota_amount" />
				</td>
			</tr>
			<tr>
				<td i18n:translate="">Mail Host & port</td>
				<td tal:condition="python:hasattr(context, 'MailHost')">
					<input type="text" name="smtp_host" value="" tal:attributes="value python:context.MailHost.smtp_host" /> 
					<label tal:omit-tag="" i18n:translate="">Port:</label> <input type="text" name="smtp_port" value="25" tal:attributes="value python:context.MailHost.smtp_port" /><br />
				</td>
				<td tal:condition="python:not hasattr(context, 'MailHost')">
					<input type="text" name="smtp_host" value=""  /> 
					<label tal:omit-tag="" i18n:translate="">Port:</label> <input type="text" name="smtp_port" value="25"  /><br />
				</td>
				
			</tr>
			<tr>
				<td i18n:translate="">Mail from</td>
				<td>
					<input type="text" name="mailfrom" value="" tal:attributes="value context/MFROM" />
				</td>
			</tr>
			<tr>
				<td i18n:translate="">default language</td>
				<td>
					<select name="lang">
						<span tal:omit-tag="" tal:repeat="x context/get_languages">
	 						<option value="en" selected="selected" tal:content="x"
								tal:attributes="value x;selected python:context.get_default_language()==x and default" i18n:attributes="value">en</option>
						</span>
					</select>
				</td>
			</tr>
			<tr>
				<td i18n:translate="">by default user must change password</td>
				<td>
					<input type="checkbox" value="1" checked="checked" name="def_passwd"
						tal:attributes="checked context/def_passwd" />
				</td>
			</tr>
			<tr>
				<td i18n:translate="">by default users cannot change password</td>
				<td>
					<input type="checkbox" value="1" checked="checked" name="def_not_change"
						tal:attributes="checked context/def_not_change" />
				</td>
			</tr>
			<tr>
				<td i18n:translate="">by default users cannot change affiliation</td>
				<td>
					<input type="checkbox" value="1" checked="checked" name="def_not_aff"
						tal:attributes="checked context/def_not_aff" />	
				</td>
			</tr>
			<tr>
				<td style="font-weight: bold;" i18n:translate="">User info</td><td></td>
			</tr>
			<tr><td class="helpLabel" colspan="2" i18n:translate="">user's first and last name are fetched.</td></tr>
			<tr>
				<td i18n:translate="">Get user info from:</td><td></td>
			</tr>
			<tr>
				<td i18n:translate=""> - finger daemon:</td>
				<td><input type="checkbox" value="1" name="useFinger" 
					tal:attributes="checked context/getUseFinger" /></td>
			</tr>
			<tr><td class="helpLabel" i18n:translate="" colspan="2">Check above if you want to use finger services.</td></tr>
			<tr>
				<td style="margin-left:4em" i18n:translate="">finger host:</td>
				<td style="margin-left:4em"><input type="text" value="" name="fingerHost" tal:attributes="value context/getFingerHost" /></td>
			</tr>
			<tr>
				<td>finger port:</td>
				<td><input type="text" value="25" tal:attributes="value context/getFingerPort" name="fingerPort" /></td>
			</tr>
			<tr>
				<td> - ldap daemon:</td>
				<td><input type="checkbox" value="1" name="useLDAP" disabled="disabled" /></td>
			</tr>
			<tr>
				<td>
				</td>
				<td>
				</td>
			</tr>
		</table>
		<input type="submit" value="Save" name="saveB" i18n:attributes="value" />
		</fieldset>
		<br />
	</form>
	</span>	
</span>
  
</html>

