Code

Updated password proposal handling
[gosa.git] / gosa-core / plugins / admin / users / password.tpl
1 <script type="text/javascript" src="include/pwdStrength.js"></script>
3 <p>
4  {t}To change the user password use the fields below. The changes take effect immediately. Please memorize the new password, because the user wouldn't be able to login without it.{/t}
5 </p>
7 <hr>
9 {if !$proposalEnabled}
11   <table summary="{t}Password input dialog{/t}" cellpadding=4 border=0>
12     <tr>
13       <td><b><LABEL for="new_password">{t}New password{/t}</LABEL></b></td>
14       <td>
15           {factory type='password' id='new_password' name='new_password' 
16               onfocus="nextfield='repeated_password';" onkeyup="testPasswordCss(\$('new_password').value);"}
17       </td>
18     </tr>
19     <tr>
20       <td><b><LABEL for="repeated_password">{t}Repeat new password{/t}</LABEL></b></td>
21       <td>
22           {factory type='password' id='repeated_password' name='repeated_password'
23               onfocus="nextfield='password_finish';"}
24       </td>
25     </tr>
26     <tr>
27       <td><b>{t}Strength{/t}</b></td>
28       <td>
29         <span id="meterEmpty" style="padding:0;margin:0;width:100%;
30           background-color:#DC143C;display:block;height:7px;">
31         <span id="meterFull" style="padding:0;margin:0;z-index:100;width:0;
32           background-color:#006400;display:block;height:7px;"></span></span>
33       </td>
34     </tr>
35   </table>
37 {else}
38   <input type='hidden' name='passwordQueue' value='1'>
39   <table summary="{t}Password input dialog{/t}" cellpadding=4 border=0>
40     <tr>
41       <td>
42         <input type='radio' value='1' name='proposalSelected' onChange='document.mainform.submit();'
43             {if $proposalSelected} checked {/if}>&nbsp;<b>{t}Use proposal{/t}</b>
44       </td>
45       <td>
46         <div style='
47                 {if !$proposalSelected}
48                   background-color:#F0F0F0;
49                   color:#666;
50                 {/if}
51                   width:180px;
52                   border:1px solid #CCC;
53                   padding:3px;
54                   padding-top:5px;
55                   padding-bottom:4px;
56             '>{$proposal}</div>
57       </td>
58       <td style='vertical-align: middle;'>
59             {image path='images/lists/reload.png' action='refreshProposal'}
60       </td>
61     </tr>
62     <tr>
63       <td>
64         <input type='radio' value='0' name='proposalSelected' onChange='document.mainform.submit();'
65             {if !$proposalSelected} checked {/if}>&nbsp;<b>{t}Manually specify a password{/t}</b>
66       </td>
67     </tr>
68     <tr>
69       <td style='padding-left:40px;'><b><LABEL for="new_password">{t}New password{/t}</LABEL></b></td>
70       <td>
71           {if $proposalSelected}
72               {factory type='password' name='new_password' id='new_password' disabled
73                   onkeyup="testPasswordCss(\$('new_password').value)"  onfocus="nextfield= 'repeated_password';"}
74           {else}
75               {factory type='password' name='new_password' id='new_password'
76                   onkeyup="testPasswordCss(\$('new_password').value)"  onfocus="nextfield= 'repeated_password';"}
77           {/if}
78       </td>
79     </tr>
80     <tr>
81       <td style='padding-left:40px;'><b><LABEL for="repeated_password">{t}Repeat new password{/t}</LABEL></b></td>
82       <td>
83           {if $proposalSelected}
84             {factory type='password' name='repeated_password' id='repeated_password' disabled
85                 onfocus="nextfield= 'password_finish';"}
86           {else}
87             {factory type='password' name='repeated_password' id='repeated_password'
88                 onfocus="nextfield= 'password_finish';"}
89           {/if}
90       </td>
91     </tr>
92     <tr>
93       <td style='padding-left:40px;'><b>{t}Strength{/t}</b></td>
94       <td>
95         <span id="meterEmpty" style="padding:0;margin:0;width:100%;
96           background-color:#DC143C;display:block;height:7px;">
97         <span id="meterFull" style="padding:0;margin:0;z-index:100;width:0;
98           background-color:#006400;display:block;height:7px;"></span></span>
99       </td>
100     </tr>
101   </table>
103 {/if}
105 {if $passwordChangeForceable}
106     <hr>
107     <input type='checkbox' name='enforcePasswordChange' value='1' id='enforcePasswordChange'
108         {if $enforcePasswordChange} checked {/if}>&nbsp;
109             <LABEL for='enforcePasswordChange'>{t}Enforce password change on next login.{/t}</LABEL>
110 {/if}
112 <br>
113 <hr>
114 <div class="plugin-actions">
115   <button type='submit' id='password_finish'name='password_finish'>{t}Set password{/t}</button>
116   <button type='submit' id='password_cancel'name='password_cancel'>{msgPool type=cancelButton}</button>
117 </div>
119 <input type='hidden' id='formSubmit'>
121 <!-- Place cursor -->
122 <script language="JavaScript" type="text/javascript">
123   <!-- // First input field on page
124         nextfield= "new_password";
125         focus_field('new_password');
126   -->
127 </script>