Code

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