diff --git a/gosa-plugins/mail/personal/mail/generic.tpl b/gosa-plugins/mail/personal/mail/generic.tpl
index af073b5905e4afb892c7f1f72dfefefd47014abf..950004a47206a4d2b3394e755a440ba37f112e6f 100644 (file)
<h2><img class="center" alt="" align="middle" src="images/rightarrow.png" /> {t}Generic{/t}</h2>
<table summary="">
+{if !$multiple_support}
<tr>
<td><label for="mail">{t}Primary address{/t}</label>{$must}</td>
<td>
+ {if !$isModifyableMail && $initially_was_account}
+ <input disabled size=30 value="{$mail}">
+ {else}
{if $domainSelectionEnabled}
{render acl=$mailACL}
<input id="mail" name="mail" size=20 maxlength=65 value="{$mail}">
<input id="mail" name="mail" size=35 maxlength=65 value="{$mail}">
{/render}
{/if}
+ {/if}
</td>
</tr>
<tr>
<td><label for="gosaMailServer">{t}Server{/t}</label></td>
<td>
+ {if !$isModifyableServer && $initially_was_account}
+ <input disabled size=30 value="{$gosaMailServer}">
+ {else}
+
{render acl=$gosaMailServerACL}
<select size="1" id="gosaMailServer" name="gosaMailServer" title="{t}Specify the mail server where the user will be hosted on{/t}">
{html_options values=$MailServers output=$MailServers selected=$gosaMailServer}
<option disabled> </option>
</select>
{/render}
+ {/if}
</td>
</tr>
+{/if}
<tr>
<td>
<tr>
<td><label for="gosaMailQuota">{t}Quota size{/t}</label></td>
<td>
-{render acl=$gosaMailQuotaACL}
+{render acl=$gosaMailQuotaACL checkbox=$multiple_support checked=$use_gosaMailQuota}
<input id="gosaMailQuota" name="gosaMailQuota" size="6" align="middle" maxlength="60"
value="{$gosaMailQuota}"> MB
{/render}
</td>
<td>
+{if !$multiple_support}
<h2><img class="center" alt="" align="middle" src="plugins/mail/images/alternatemail.png" /><label for="alternates_list"> {t}Alternative addresses{/t}</ label></h2>
{render acl=$gosaMailAlternateAddressACL}
<select id="alternates_list" style="width:100%;height:100px;" name="alternates_list[]" size="15" multiple
{render acl=$gosaMailAlternateAddressACL}
<input type=submit value="{msgPool type=delButton}" name="delete_alternate">
{/render}
+{/if}
</td>
</tr>
<tr>
<tr>
<td>
{render acl=$gosaMailDeliveryModeCACL}
- <input class="center" type=checkbox name="own_script" value="1" {$own_script}
+ <input class="center" type=checkbox id="own_script" name="own_script" value="1" {$own_script}
onClick="
changeState('sieveManagement');
changeState('drop_own_mails');
<input type=checkbox name="use_vacation" value="1" {$use_vacation}
id="use_vacation" {if $own_script != ""} disabled {/if}
title="{t}Select to automatically response with the vacation message defined below{/t}" class="center"
- onclick="changeState('day'); changeState('month'); changeState('year');
- changeState('sday'); changeState('smonth'); changeState('syear');"> {t}Activate vacation message{/t}
+ onclick="changeStates()"> {t}Activate vacation message{/t}
{/render}
<br>
<table>
<tr>
<td>{t}from{/t}</td>
- <td>
+ <td style='width:140px'>
{render acl=$gosaVacationMessageACL}
- <select {if $own_script != "" || $use_vacation == ""} disabled {/if} name=day id="day"
- onChange="createResult(this.form,this.form.gosaVacationStart);">
- {html_options values=$days output=$days selected=$start_day}
- </select>
+ <input type="text" id="gosaVacationStart" name="gosaVacationStart" class="date" style='width:100px' value="{$gosaVacationStart}">
+ {if $gosaVacationMessageACL|regex_replace:"/[cdmr]/":"" == "w"}
+ <script type="text/javascript">
+ {literal}
+ var datepicker = new DatePicker({ relative : 'gosaVacationStart', language : '{/literal}{$lang}{literal}', keepFieldEmpty : true, enableCloseEffect : false, enableShowEffect : false });
+ {/literal}
+ </script>
+ {/if}
{/render}
-{render acl=$gosaVacationMessageACL}
- <select {if $own_script != "" || $use_vacation == ""} disabled {/if} name=month id="month"
- onChange="populate(this.form,this.form.gosaVacationStart);">
- {html_options options=$months selected=$start_month}
- </select>
-{/render}
-{render acl=$gosaVacationMessageACL}
- <select {if $own_script != "" || $use_vacation == ""} disabled {/if} name=year id="year"
- onChange="populate(this.form,this.form.gosaVacationStart);">
- {html_options values=$years output=$years selected=$start_year}
- </select>
-{/render}
- <input type="hidden" name="gosaVacationStart" value="{$gosaVacationStart}">
</td>
- </tr>
- <tr>
<td>{t}till{/t}</td>
- <td>
-{render acl=$gosaVacationMessageACL}
- <select {if $own_script != "" || $use_vacation == ""} disabled {/if} name=sday id="sday"
- onChange="createResult2(this.form,this.form.gosaVacationStop);">
- {html_options values=$days output=$days selected=$end_day}
- </select>
-{/render}
+ <td style='width:140px'>
{render acl=$gosaVacationMessageACL}
- <select {if $own_script != "" || $use_vacation == ""} disabled {/if} name=smonth id="smonth"
- onChange="populate2(this.form,this.form.gosaVacationStop);">
- {html_options options=$months selected=$end_month}
- </select>
+ <div id="vacstart"><input type="text" id="gosaVacationStop" name="gosaVacationStop" class="date" style='width:100px' value="{$gosaVacationStop}"></div>
+ {if $gosaVacationMessageACL|regex_replace:"/[cdmr]/":"" == "w"}
+ <script type="text/javascript">
+ {literal}
+ var datepicker2 = new DatePicker({ relative : 'gosaVacationStop', language : '{/literal}{$lang}{literal}', keepFieldEmpty : true, enableCloseEffect : false, enableShowEffect : false });
+ {/literal}
+ </script>
+ {/if}
{/render}
-{render acl=$gosaVacationMessageACL}
- <select {if $own_script != "" || $use_vacation == ""} disabled {/if} name=syear id="syear"
- onChange="populate2(this.form,this.form.gosaVacationStop);">
- {html_options values=$years output=$years selected=$end_year}
- </select>
-{/render}
- <input type="hidden" name="gosaVacationStop" value="{$gosaVacationStop}">
</td>
</tr>
</table>
<label for="gosaSpamSortLevel">{t}Move mails tagged with spam level greater than{/t}</label>
{render acl=$gosaSpamSortLevelACL checkbox=$multiple_support checked=$use_gosaSpamSortLevel}
<select {if $own_script != ""} disabled {/if} id="gosaSpamSortLevel" size="1" name="gosaSpamSortLevel"
- title="{t}Choose spam level - smaller values are more sensitive{/t}">
+ title="{t}Choose spam level - smaller values are more sensitive{/t}">
{html_options values=$spamlevel output=$spamlevel selected=$gosaSpamSortLevel}
</select>
{/render}
{render acl=$gosaMailForwardingAddressACL}
<input id='add_local_forwarder' type="submit" value="{t}Add local{/t}" name="add_local_forwarder" >
{/render}
-{render acl=$gosaMailForwardingAddressACL}
- <input id='add_local_forwarder' type="submit" value="{t}Add local{/t}" name="add_local_forwarder" >
-{/render}
{render acl=$gosaMailForwardingAddressACL}
<input id='delete_forwarder' type="submit" value="{msgPool type=delButton}" name="delete_forwarder">
{/render}
<script language="JavaScript" type="text/javascript">
{literal}
+ function validateClick()
+ {
+alert("yes");
+ if(!document.getElementById('use_vacation').checked){
+ return;
+ }
+ }
+
function changeStates()
{
-
- if(document.getElementById('use_vacation').checked){
- changeState('day');
- changeState('month');
- changeState('year');
- changeState('sday');
- changeState('smonth');
- changeState('syear');
+ if($('own_script').checked) {
+ $("gosaVacationStart", "gosaVacationStop","gosaVacationMessage").invoke("disable");
+ $("datepicker-gosaVacationStop_image", "datepicker-gosaVacationStart_image").invoke("hide");
+ } else {
+ if($('use_vacation').checked) {
+ $("gosaVacationStart", "gosaVacationStop","gosaVacationMessage").invoke("enable");
+ $("datepicker-gosaVacationStop_image", "datepicker-gosaVacationStart_image").invoke("show");
}else{
- changeSubselectState('use_vacation','day');
- changeSubselectState('use_vacation','month');
- changeSubselectState('use_vacation','year');
- changeSubselectState('use_vacation','sday');
- changeSubselectState('use_vacation','smonth');
- changeSubselectState('use_vacation','syear');
+ $("gosaVacationStart", "gosaVacationStop","gosaVacationMessage").invoke("disable");
+ $("datepicker-gosaVacationStop_image", "datepicker-gosaVacationStart_image").invoke("hide");
}
+ }
}
- {/literal}
-<!-- // First input field on page
+ changeStates();
focus_field('mail');
- -->
+ {/literal}
</script>