You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by an...@apache.org on 2007/02/20 16:03:52 UTC

svn commit: r509591 - in /lenya/trunk/src/modules-core/administration/usecases: changePassword.jx changePasswordAdmin.jx passwordForm.jx

Author: andreas
Date: Tue Feb 20 07:03:52 2007
New Revision: 509591

URL: http://svn.apache.org/viewvc?view=rev&rev=509591
Log:
Imporved changePassword usecase view

Modified:
    lenya/trunk/src/modules-core/administration/usecases/changePassword.jx
    lenya/trunk/src/modules-core/administration/usecases/changePasswordAdmin.jx
    lenya/trunk/src/modules-core/administration/usecases/passwordForm.jx

Modified: lenya/trunk/src/modules-core/administration/usecases/changePassword.jx
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules-core/administration/usecases/changePassword.jx?view=diff&rev=509591&r1=509590&r2=509591
==============================================================================
--- lenya/trunk/src/modules-core/administration/usecases/changePassword.jx (original)
+++ lenya/trunk/src/modules-core/administration/usecases/changePassword.jx Tue Feb 20 07:03:52 2007
@@ -30,12 +30,11 @@
   <page:body>
     <div class="lenya-box">
       <div class="lenya-box-title">
-      <i18n:text>Change Password for</i18n:text> Current User
+        <i18n:text>Change Password</i18n:text>
+      </div>
+      <div class="lenya-box-body">
+        <jx:import uri="fallback://lenya/modules/administration/usecases/passwordForm.jx"/>
       </div>
-    </div>
-
-    <div class="lenya-box-body">
-      <jx:import uri="fallback://lenya/modules/administration/usecases/passwordForm.jx"/>
     </div>
   </page:body>
 </page:page>

Modified: lenya/trunk/src/modules-core/administration/usecases/changePasswordAdmin.jx
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules-core/administration/usecases/changePasswordAdmin.jx?view=diff&rev=509591&r1=509590&r2=509591
==============================================================================
--- lenya/trunk/src/modules-core/administration/usecases/changePasswordAdmin.jx (original)
+++ lenya/trunk/src/modules-core/administration/usecases/changePasswordAdmin.jx Tue Feb 20 07:03:52 2007
@@ -28,15 +28,7 @@
     <div id="contentblock1" class="lenya-tab">
     
       <h1>
-        <i18n:text>Change Password for</i18n:text>
-        <jx:choose>
-          <jx:when test="${usecase.getParameter('userId')}">
-             User "<jx:out value="${usecase.getParameter('userId')}"/>".
-          </jx:when>
-          <jx:otherwise>
-             Current User.
-          </jx:otherwise>
-        </jx:choose>
+        <i18n:text>Change Password</i18n:text>
       </h1>
       
       <jx:import uri="fallback://lenya/modules/administration/usecases/passwordForm.jx"/>

Modified: lenya/trunk/src/modules-core/administration/usecases/passwordForm.jx
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules-core/administration/usecases/passwordForm.jx?view=diff&rev=509591&r1=509590&r2=509591
==============================================================================
--- lenya/trunk/src/modules-core/administration/usecases/passwordForm.jx (original)
+++ lenya/trunk/src/modules-core/administration/usecases/passwordForm.jx Tue Feb 20 07:03:52 2007
@@ -25,13 +25,20 @@
   <form id="form-change_password">
     <input type="hidden" name="lenya.continuation" value="${continuation.id}"/>
     <input type="hidden" name="lenya.usecase" value="${request.getParameter('lenya.usecase')}"/>
-
+    
+    <jx:set var="currentUserId" value="${usecase.getParameter('private.session').getIdentity().getUser().getId()}"/>
+    <jx:set var="userId" value="${usecase.getParameter('userId', currentUserId)}"/>
+    
     <table class="lenya-table-noborder">
       <tr>
         <td colspan="2">
           <jx:import uri="fallback://lenya/modules/usecase/templates/messages.jx"/>
         </td>
       </tr>
+      <tr>
+        <td class="lenya-entry-caption"><i18n:text>Username</i18n:text></td>
+        <td><jx:out value="${userId}"/></td>
+      </tr>
       <jx:if test="${usecase.getView().getParameter('checkPassword').equals('true')}">
         <tr>
           <td class="lenya-entry-caption"><label for="oldPassword"><i18n:text>Old Password</i18n:text> *</label></td>
@@ -51,7 +58,9 @@
         <td/>
         <td>
           <input i18n:attr="value" type="submit" name="submit" value="Save"/>
-          <input i18n:attr="value" type="submit" name="cancel" value="Cancel"/>
+          <a href="?lenya.usecase=admin.user&amp;userId=${userId}">
+            <input type="button" name="cancel" value="Cancel" i18n:attr="value"/>
+          </a>
         </td>
       </tr>
     </table>



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org