Plasma GitLab Archive
Projects Blog Knowledge

<?xml version="1.0" encoding="ISO-8859-1"?>

<!--
  - <COPYRIGHT>
  - Copyright 2003 Gerd Stolpmann
  -
  - <GPL>
  - This file is part of WTimer.
  - 
  - WTimer is free software; you can redistribute it and/or modify
  - it under the terms of the GNU General Public License as published by
  - the Free Software Foundation; either version 2 of the License, or
  - (at your option) any later version.
  -
  - WTimer is distributed in the hope that it will be useful,
  - but WITHOUT ANY WARRANTY; without even the implied warranty of
  - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  - GNU General Public License for more details.
  -
  - You should have received a copy of the GNU General Public License
  - along with WDialog; if not, write to the Free Software
  - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  - </>
  -->

<!--  $Id: admin_password.ui,v 1.4 2003/03/23 11:59:13 gerd Exp $
   -  ======================================================================
   - 
  -->

<!-- This file defines the dialog "admin-password". -->

<ui:dialog name="admin-password" start-page="password">
  <ui:variable name="session" type="dialog"/>

  <ui:variable name="pw-userlist" type="dynamic-enumerator">
    <!-- The list of users for who the login user is allowed to change
       - the password
      -->
    <!--&admin-password-pw-userlist;-->       <!-- Test data -->
  </ui:variable>

  <ui:variable name="pw-user">
    <!-- The user for who the password is changed -->
    <!--&admin-password-pw-user;-->           <!-- Test data -->
  </ui:variable>

  <ui:variable name="pw-login"/>   <!-- The current login password -->
  <ui:variable name="pw-new"/>     <!-- The new password -->
  <ui:variable name="pw-again"/>   <!-- The new password again -->

  <ui:enumeration name="message">
    <ui:enum internal="error-bad-password"
             external="The login password is wrong. Try again!"/>
    <ui:enum internal="error-different-passwords"
             external="The new passwords differ. Please enter the same password twice!"/>
    <ui:enum internal="ok"
             external="The password has been changed. The user can log in with this password."/>
  </ui:enumeration>

  <ui:variable name="message" type="message">
    <!--&admin-password-message;-->          <!-- Test data -->
  </ui:variable>

  <ui:page name="password">
    <t:basic-grid>
      <p:nav-col>
	<t:admin-nav/>
      </p:nav-col>
      <p:headline>
	<t:admin-head suffix="Change password"/>
      </p:headline>
      <p:main-col>
        <div><a href="#help">Help</a></div>
	<ui:enumerate variable="message" template="message"/>
	<table>
	  <tr valign="baseline">
	    <td align="center">
	      The password is changed for the user: <br/><br/>
	      <ui:select variable="pw-user" base="pw-userlist"
		size="$[size(pw-userlist)]"/>
	    </td>
	    <td style="width: 3em">&nbsp;</td>
	    <td>
	      &nbsp;<br/>
	      <table valign="baseline">
		<tr>
		  <td>Your login password:</td>
		  <td><ui:password variable="pw-login" size="20"/></td>
		</tr>
		<tr>
		  <td>New password:</td>
		  <td><ui:password variable="pw-new" size="20" cgi="keep"/></td>
		</tr>
		<tr>
		  <td>New password (again):</td>
		  <td><ui:password variable="pw-again" size="20" cgi="keep"/></td>
		</tr>
		<tr>
		  <td></td>
		  <td><ui:button name="pw-change" label="Change"
		      onclick="admin_pw_check(document.uiform.elements['var_pw-new'], document.uiform.elements['var_pw-again'])"/></td>
		</tr>
	      </table>
	    </td>
	  </tr>
	</table>

	<div class="help">
	  <a name="help"/>
	  <div>
	    This dialog allows you to change your login password. 
	    Administrators can change the password of any user.
	  </div>

	  <div>
	    First select the user whose password you want to change.
	    Additionally, enter your current password, and the new password
	    (the new password twice). Press "Change" to confirm the change.
	  </div>
	  
	  <div>
	    Administrators must enter their own password as current password,
	    so they can set passwords as they want. This is necessary to
	    enter the initial password after an account has been created,
	    and to support users who forgot their passwords.
	  </div>
	</div>

      </p:main-col>
    </t:basic-grid>
  </ui:page>


  <!-- ERROR HANDLING -->

  <!-- See also ocaml class error_behaviour that uses the following
       definitions
    -->

  <ui:variable name="runtime-error"/>

  <ui:page name="runtime-error">
    <t:basic-grid>
      <p:nav-col>
	<!-- empty nav-col: this is a modal dialog -->
      </p:nav-col>
      <p:headline>
	<t:admin-head suffix="Change password"/>
      </p:headline>
      <p:main-col>
	<t:error errid="$[runtime-error]"/>
	<ui:button name="cont-error" label="Continue"/>
      </p:main-col>
    </t:basic-grid>
  </ui:page>

</ui:dialog>
  

<!-- ******************* For Emacs: ********************* -->
<!--
Local Variables:
mode: xml
sgml-parent-document: ("main.ui" "ui:application" "ui:dialog")
End:
-->

This web site is published by Informatikbüro Gerd Stolpmann
Powered by Caml