Code

Updated proposal stuff for user passwords (MyAccount)
[gosa.git] / gosa-core / plugins / personal / password / password.tpl
index 41f9737a1534e96ff837ee63e3eaadb1196681a5..d5b28604922d633090f93cdbdb2a79dc7f12f7e8 100644 (file)
@@ -4,43 +4,89 @@
   {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}
 </p>
 
-<p>
-  {t}Changing the password affects your authentification on mail, proxy, samba and unix services.{/t}
-</p>
-
-<table summary="" style="vertical-align:top; text-align:left;" cellpadding=4 border=0>
-  <tr>
-    <td><b><LABEL for="current_password">{t}Current password{/t}</LABEL></b></td>
-    <td><input id="current_password" type="password" name="current_password" size="30" maxlength="40"
-               onFocus="nextfield= 'new_password';"></td>
-  </tr>
-  <tr>
-    <td><b><LABEL for="new_password">{t}New password{/t}</LABEL></b></td>
-    <td><input id="new_password" type="password" name="new_password" size="30" maxlength="40"
-               onFocus="nextfield= 'repeated_password';" onkeyup="testPasswordCss(document.getElementById('new_password').value);"></td>
-  </tr>
-  <tr>
-    <td><b><LABEL for="repeated_password">{t}Repeat new password{/t}</LABEL></b></td>
-    <td><input id="repeated_password" type="password" name="repeated_password" size="30" maxlength="40"
-               onFocus="nextfield= 'password_finish';"></td>
-  </tr>
-  <tr>
-    <td><b>{t}Strength{/t}</b></td>
-    <td>
-       <span id="meterEmpty" style="padding:0;margin:0;width:100%;background-color:#DC143C;display:block;height:5px;">
-       <span id="meterFull" style="padding:0;margin:0;z-index:100;width:0;background-color:#006400;display:block;height:5px;"></span></span>
-    </td>
-  </tr>
-</table>
+<hr>
 
+{if !$proposalEnabled}
+  <table cellpadding=4 border=0 summary="{t}Password change dialog{/t}">
+    <tr>
+      <td><b><LABEL for="current_password">{t}Current password{/t}</LABEL></b></td>
+      <td>
+          {factory type='password' name='current_password' id='current_password' onfocus="nextfield= 'new_password';"}
+      </td>
+    </tr>
+    <tr>
+      <td><b><LABEL for="new_password">{t}New password{/t}</LABEL></b></td>
+      <td>
+          {factory type='password' name='new_password' id='new_password' 
+              onkeyup="testPasswordCss(\$('new_password').value)"  onfocus="nextfield= 'repeated_password';"}
+      </td>
+    </tr>
+    <tr>
+      <td><b><LABEL for="repeated_password">{t}Repeat new password{/t}</LABEL></b></td>
+      <td>
+          {factory type='password' name='repeated_password' id='repeated_password' onfocus="nextfield= 'password_finish';"}
+      </td>
+    </tr>
+    <tr>
+      <td><b>{t}Password strength{/t}</b></td>
+      <td>
+      <span id="meterEmpty" style="padding:0;margin:0;width:100%;background-color:#DC143C;display:block;height:7px;">
+      <span id="meterFull" style="padding:0;margin:0;z-index:100;width:0;background-color:#006400;display:block;height:7px;"></span></span>
+      </td>
+    </tr>
+  </table>
+{else}
+  <table cellpadding=4 border=0 summary="{t}Password change dialog{/t}">
+    <tr>
+      <td><b><LABEL for="current_password">{t}Current password{/t}</LABEL></b></td>
+      <td>
+          {factory type='password' name='current_password' id='current_password' onfocus="nextfield= 'new_password';"}
+      </td>
+    </tr>
+    <tr>
+      <td>
+        <input type='radio' value='1' name='proposalSelected'
+            {if $proposalSelected} checked {/if}>&nbsp;<b>{t}Use proposal{/t}</b>
+      </td>
+      <td><b>{$proposal}</b>&nbsp;{image path='images/lists/reload.png' action='refreshProposal'}</td>
+    </tr>
+    <tr>
+      <td>
+        <input type='radio' value='0' name='proposalSelected'
+            {if !$proposalSelected} checked {/if}>&nbsp;<b>{t}Manually specify a password{/t}</b>
+      </td>
+    </tr>
+    <tr>
+      <td style='padding-left:40px;'><b><LABEL for="new_password">{t}New password{/t}</LABEL></b></td>
+      <td>
+          {factory type='password' name='new_password' id='new_password' 
+              onkeyup="testPasswordCss(\$('new_password').value)"  onfocus="nextfield= 'repeated_password';"}
+      </td>
+    </tr>
+    <tr>
+      <td style='padding-left:40px;'><b><LABEL for="repeated_password">{t}Repeat new password{/t}</LABEL></b></td>
+      <td>
+          {factory type='password' name='repeated_password' id='repeated_password' onfocus="nextfield= 'password_finish';"}
+      </td>
+    </tr>
+    <tr>
+      <td  style='padding-left:40px;'><b>{t}Password strength{/t}</b></td>
+      <td>
+      <span id="meterEmpty" style="padding:0;margin:0;width:100%;background-color:#DC143C;display:block;height:7px;">
+      <span id="meterFull" style="padding:0;margin:0;z-index:100;width:0;background-color:#006400;display:block;height:7px;"></span></span>
+      </td>
+    </tr>
+  </table>
+{/if}
 <br>
 
-<p class="plugbottom">
-  <input type=submit name="password_finish" value="{t}Set password{/t}">
-  &nbsp;
-  <input type=reset id="password_cancel" name="password_cancel" value="{t}Clear fields{/t}">
-  <input type='hidden' id='formSubmit'>
-</p>
+<hr>
+<div class="plugin-actions">
+  <button type='submit' name='password_finish'>{t}Set password{/t}</button>
+  <button type=reset id="password_cancel" name="password_cancel">{t}Clear fields{/t}</button>
+</div>
+
+<input type='hidden' id='formSubmit'>
 
 <input type="hidden" name="ignore">