diff --git a/gosa-core/plugins/admin/users/password.tpl b/gosa-core/plugins/admin/users/password.tpl
index 04ec469a8c6e5a7792bfd652b0b4d461f3c67fb8..ecceb548576e08946567e8b242de7e627513803c 100644 (file)
<table summary="{t}Password input dialog{/t}" cellpadding=4 border=0>
<tr>
<td>
<table summary="{t}Password input dialog{/t}" cellpadding=4 border=0>
<tr>
<td>
- <input type='radio' value='1' name='proposalSelected'
+ <input type='radio' value='1' name='proposalSelected' id='proposalSelected' onClick='updateFields();'
{if $proposalSelected} checked {/if}> <b>{t}Use proposal{/t}</b>
</td>
{if $proposalSelected} checked {/if}> <b>{t}Use proposal{/t}</b>
</td>
- <td><b>{$proposal}</b> {image path='images/lists/reload.png' action='refreshProposal'}</td>
+ <td>
+ <div id='proposalText' style='
+ width:180px;
+ border:1px solid #CCC;
+ padding:3px;
+ padding-top:5px;
+ padding-bottom:4px;
+ '>{$proposal}</div>
+ </td>
+ <td style='vertical-align: middle;'>
+ {image path='images/lists/reload.png' action='refreshProposal'}
+ </td>
</tr>
<tr>
<td>
</tr>
<tr>
<td>
- <input type='radio' value='0' name='proposalSelected'
+ <input type='radio' value='0' name='proposalSelected' onClick='updateFields();'
{if !$proposalSelected} checked {/if}> <b>{t}Manually specify a password{/t}</b>
</td>
</tr>
{if !$proposalSelected} checked {/if}> <b>{t}Manually specify a password{/t}</b>
</td>
</tr>
{/if}
{/if}
-<br>
+{if $passwordChangeForceable}
+ <hr>
+ <input type='checkbox' name='enforcePasswordChange' value='1' id='enforcePasswordChange'
+ {if $enforcePasswordChange} checked {/if}>
+ <LABEL for='enforcePasswordChange'>{t}Enforce password change on next login.{/t}</LABEL>
+{/if}
+<br>
<hr>
<div class="plugin-actions">
<button type='submit' id='password_finish'name='password_finish'>{t}Set password{/t}</button>
<hr>
<div class="plugin-actions">
<button type='submit' id='password_finish'name='password_finish'>{t}Set password{/t}</button>
<!-- Place cursor -->
<script language="JavaScript" type="text/javascript">
<!-- Place cursor -->
<script language="JavaScript" type="text/javascript">
- <!-- // First input field on page
nextfield= "new_password";
focus_field('new_password');
nextfield= "new_password";
focus_field('new_password');
- -->
+
+ function updateFields()
+ {
+ if($('proposalSelected').checked){
+ $('new_password').disable();
+ $('repeated_password').disable();
+ $('proposalText').setStyle(
+ 'background-color:#FFF;' +
+ 'color:#000;' +
+ 'width:180px;' +
+ 'border:1px solid #CCC;' +
+ 'padding:3px;' +
+ 'padding-top:5px;' +
+ 'padding-bottom:4px;');
+ }else{
+ $('new_password').enable();
+ $('repeated_password').enable();
+ $('proposalText').setStyle(
+ 'background-color:#F0F0F0;' +
+ 'color:#666;' +
+ 'width:180px;' +
+ 'border:1px solid #CCC;' +
+ 'padding:3px;' +
+ 'padding-top:5px;' +
+ 'padding-bottom:4px;');
+ }
+ }
+ updateFields();
</script>
</script>
+
+