← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 8422: Made input fields in update user account bigger

 

------------------------------------------------------------
revno: 8422
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Sun 2012-10-07 22:10:20 +0200
message:
  Made input fields in update user account bigger
modified:
  dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/user/hibernate/User.hbm.xml
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/useraccount/updateUserAccountForm.vm
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/useraccount/updateUserProfileForm.vm
  dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/useraccount/action/GetCurrentUserAction.java
  dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/beans.xml
  dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/resources/org/hisp/dhis/dashboard/i18n_module.properties
  dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/profile.vm
  dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/style/dashboard.css


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/user/hibernate/User.hbm.xml'
--- dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/user/hibernate/User.hbm.xml	2012-10-06 08:45:50 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/user/hibernate/User.hbm.xml	2012-10-07 20:10:20 +0000
@@ -30,7 +30,7 @@
 
 	<property name="introduction" type="text" />
 
-	<property name="gender" length="5" />
+	<property name="gender" length="50" />
 
 	<property name="birthday" type="date" />
 

=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/useraccount/updateUserAccountForm.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/useraccount/updateUserAccountForm.vm	2012-10-06 08:45:50 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/useraccount/updateUserAccountForm.vm	2012-10-07 20:10:20 +0000
@@ -15,35 +15,35 @@
 	</tr>
     <tr>
         <td><label for="username">$i18n.getString( "user_name" )</label></td>
-        <td><input type="text" id="username" name="username" value="$!encoder.htmlEncode( $!userCredentials.username )" style="width:20em" disabled="disabled"></td>
+        <td><input type="text" id="username" name="username" value="$!encoder.htmlEncode( $!userCredentials.username )" style="width:25em" disabled="disabled"></td>
     </tr>
     <tr>
         <td><label for="firstName">$i18n.getString( "first_name" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
-        <td><input type="text" id="firstName" name="firstName" value="$!encoder.htmlEncode( $!userCredentials.user.firstName )" style="width:20em"></td>
+        <td><input type="text" id="firstName" name="firstName" value="$!encoder.htmlEncode( $!userCredentials.user.firstName )" style="width:25em"></td>
     </tr>
     <tr>
         <td><label for="surname">$i18n.getString( "last_name" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
-        <td><input type="text" id="surname" name="surname" value="$!encoder.htmlEncode( $!userCredentials.user.surname )" style="width:20em"></td>
+        <td><input type="text" id="surname" name="surname" value="$!encoder.htmlEncode( $!userCredentials.user.surname )" style="width:25em"></td>
     </tr>
 	<tr>
 		<td><label for="rawPassword">$i18n.getString( "old_password" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
-		<td><input type="password" id="oldPassword" name="oldPassword" style="width:20em"></td>
+		<td><input type="password" id="oldPassword" name="oldPassword" style="width:25em"></td>
 	</tr>
 	<tr>
 		<td><label for="rawPassword">$i18n.getString( "new_password" )</label></td>
-		<td><input type="password" id="rawPassword" name="rawPassword" style="width:20em"></td>
+		<td><input type="password" id="rawPassword" name="rawPassword" style="width:25em"></td>
 	</tr>
 	<tr>
 		<td><label for="retypePassword">$i18n.getString( "retype_new_password" )</label></td>
-		<td><input type="password" id="retypePassword" name="retypePassword" style="width:20em"></td>
+		<td><input type="password" id="retypePassword" name="retypePassword" style="width:25em"></td>
 	</tr>
 	<tr>
 		<td><label for="email">$i18n.getString( "email" )</label></td>
-		<td><input type="text" id="email" name="email" value="$!encoder.htmlEncode( $!userCredentials.user.email )" style="width:20em"/></td>
+		<td><input type="text" id="email" name="email" value="$!encoder.htmlEncode( $!userCredentials.user.email )" style="width:25em"/></td>
 	</tr>
     <tr>
         <td><label for="phoneNumber">$i18n.getString( "phone_number" )</label></td>
-        <td><input type="text" id="phoneNumber" name="phoneNumber" value="$!encoder.htmlEncode( $!userCredentials.user.phoneNumber )" style="width:20em"/></td>
+        <td><input type="text" id="phoneNumber" name="phoneNumber" value="$!encoder.htmlEncode( $!userCredentials.user.phoneNumber )" style="width:25em"/></td>
     </tr>
 	<tr>
 		<td></td>

=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/useraccount/updateUserProfileForm.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/useraccount/updateUserProfileForm.vm	2012-10-07 03:21:33 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/useraccount/updateUserProfileForm.vm	2012-10-07 20:10:20 +0000
@@ -11,51 +11,51 @@
 	</tr>
 	<tr>
 		<td><label for="email">$i18n.getString( "email" )</label></td>
-		<td><input type="text" id="email" name="email" value="$!encoder.htmlEncode( $userCredentials.user.email )" style="width:20em"/></td>
+		<td><input type="text" id="email" name="email" value="$!encoder.htmlEncode( $userCredentials.user.email )" style="width:25em"/></td>
 	</tr>
     <tr>
         <td><label for="phoneNumber">$i18n.getString( "phone_number" )</label></td>
-        <td><input type="text" id="phoneNumber" name="phoneNumber" value="$!encoder.htmlEncode( $userCredentials.user.phoneNumber )" style="width:20em"/></td>
+        <td><input type="text" id="phoneNumber" name="phoneNumber" value="$!encoder.htmlEncode( $userCredentials.user.phoneNumber )" style="width:25em"/></td>
     </tr>
     <tr>
         <td><label for="introduction">$i18n.getString( "introduction" )</label></td>
-        <td><textarea id="introduction" name="introduction" style="width:20em;height:10em">$!encoder.htmlEncode( $!userCredentials.user.introduction )</textarea></td>
+        <td><textarea id="introduction" name="introduction" style="width:25em;height:8em">$!encoder.htmlEncode( $!userCredentials.user.introduction )</textarea></td>
     </tr>
 	<tr>
 		<td><label for="jobTitle">$i18n.getString( "job_title" )</label></td>
-		<td><input type="text" id="jobTitle" name="jobTitle" value="$!encoder.htmlEncode( $userCredentials.user.jobTitle )" style="width:20em"></td>
+		<td><input type="text" id="jobTitle" name="jobTitle" value="$!encoder.htmlEncode( $userCredentials.user.jobTitle )" style="width:25em"></td>
 	</tr>
 	<tr>
 		<td><label for="gender">$i18n.getString( "gender" )</label></td>
-		<td><select type="text" id="gender" name="gender" style="width:20em">
-			<option value="M" #if( $!userCredentials.user.gender == "M" ) selected="selected" #end>$i18n.getString( "male" )</option>
-			<option value="F" #if( $!userCredentials.user.gender == "F" ) selected="selected" #end>$i18n.getString( "female" )</option>
-			<option value="O" #if( $!userCredentials.user.gender == "O" ) selected="selected" #end>$i18n.getString( "other" )</option>
+		<td><select type="text" id="gender" name="gender" style="width:25em">
+			<option value="gender_male" #if( $!userCredentials.user.gender == "gender_male" ) selected="selected"#end>$i18n.getString( "male" )</option>
+			<option value="gender_female" #if( $!userCredentials.user.gender == "gender_female" ) selected="selected"#end>$i18n.getString( "female" )</option>
+			<option value="gender_other" #if( $!userCredentials.user.gender == "gender_other" ) selected="selected"#end>$i18n.getString( "other" )</option>
 		</select></td>
 	</tr>
 	<tr>
 		<td><label for="birthday">$i18n.getString( "birthday" )</label></td>
-		<td><input type="text" id="birthday" name="birthday" value="$!format.formatDate( $!userCredentials.user.birthday )" style="width:20em"/></td>
+		<td><input type="text" id="birthday" name="birthday" value="$!format.formatDate( $!userCredentials.user.birthday )" style="width:25em"/></td>
 	</tr>
 	<tr>
 		<td><label for="nationality">$i18n.getString( "nationality" )</label></td>
-		<td><input type="text" id="nationality" name="nationality" value="$!encoder.htmlEncode( $!userCredentials.user.nationality )" style="width:20em"/></td>
+		<td><input type="text" id="nationality" name="nationality" value="$!encoder.htmlEncode( $!userCredentials.user.nationality )" style="width:25em"/></td>
 	</tr>
 	<tr>
 		<td><label for="employer">$i18n.getString( "employer" )</label></td>
-		<td><input type="text" id="employer" name="employer" value="$!encoder.htmlEncode( $!userCredentials.user.employer )" style="width:20em"/></td>
+		<td><input type="text" id="employer" name="employer" value="$!encoder.htmlEncode( $!userCredentials.user.employer )" style="width:25em"/></td>
 	</tr>
 	<tr>
         <td><label for="education">$i18n.getString( "education" )</label></td>
-        <td><textarea id="education" name="education" style="width:20em;height:10em">$!encoder.htmlEncode( $!userCredentials.user.education )</textarea></td>
+        <td><textarea id="education" name="education" style="width:25em;height:8em">$!encoder.htmlEncode( $!userCredentials.user.education )</textarea></td>
     </tr>
 	<tr>
         <td><label for="interests">$i18n.getString( "interests" )</label></td>
-        <td><textarea id="interests" name="interests" style="width:20em;height:10em">$!encoder.htmlEncode( $!userCredentials.user.interests )</textarea></td>
+        <td><textarea id="interests" name="interests" style="width:25em;height:8em">$!encoder.htmlEncode( $!userCredentials.user.interests )</textarea></td>
     </tr>
 	<tr>
         <td><label for="languages">$i18n.getString( "languages" )</label></td>
-        <td><textarea id="languages" name="languages" style="width:20em;height:10em">$!encoder.htmlEncode( $!userCredentials.user.languages )</textarea></td>
+        <td><textarea id="languages" name="languages" style="width:25em;height:8em">$!encoder.htmlEncode( $!userCredentials.user.languages )</textarea></td>
     </tr>
 	<tr>
 		<td></td>

=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/useraccount/action/GetCurrentUserAction.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/useraccount/action/GetCurrentUserAction.java	2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/useraccount/action/GetCurrentUserAction.java	2012-10-07 20:10:20 +0000
@@ -30,7 +30,6 @@
 import org.hisp.dhis.user.CurrentUserService;
 import org.hisp.dhis.user.User;
 import org.hisp.dhis.user.UserCredentials;
-import org.hisp.dhis.user.UserService;
 
 import com.opensymphony.xwork2.Action;
 
@@ -49,8 +48,6 @@
 
     private CurrentUserService currentUserService;
 
-    private UserService userService;
-
     // -------------------------------------------------------------------------
     // Output
     // -------------------------------------------------------------------------
@@ -68,11 +65,6 @@
         this.currentUserService = currentUserService;
     }
 
-    public void setUserService( UserService userService )
-    {
-        this.userService = userService;
-    }
-
     public UserCredentials getUserCredentials()
     {
         return userCredentials;
@@ -97,7 +89,7 @@
     {
         User user = currentUserService.getCurrentUser();
 
-        userCredentials = userService.getUserCredentials( user );
+        userCredentials = user.getUserCredentials();
 
         return SUCCESS;
     }

=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/beans.xml	2012-10-07 07:26:14 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/beans.xml	2012-10-07 20:10:20 +0000
@@ -571,9 +571,6 @@
     <property name="currentUserService">
       <ref bean="org.hisp.dhis.user.CurrentUserService" />
     </property>
-    <property name="userService">
-      <ref bean="org.hisp.dhis.user.UserService" />
-    </property>
   </bean>
 
   <bean id="org.hisp.dhis.useraccount.action.UpdateUserAccountAction" class="org.hisp.dhis.useraccount.action.UpdateUserAccountAction"

=== modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/resources/org/hisp/dhis/dashboard/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/resources/org/hisp/dhis/dashboard/i18n_module.properties	2012-10-07 19:07:53 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/resources/org/hisp/dhis/dashboard/i18n_module.properties	2012-10-07 20:10:20 +0000
@@ -77,4 +77,5 @@
 nationality=Nationality
 email=Email
 phone_number=Phone number
-org_units=Org units
\ No newline at end of file
+org_units=Org units
+edit_profile=Edit profile
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/profile.vm'
--- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/profile.vm	2012-10-07 19:07:53 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/profile.vm	2012-10-07 20:10:20 +0000
@@ -1,16 +1,26 @@
-
-<h3>$!encoder.htmlEncode( $user.firstName ) $!encoder.htmlEncode( $user.surname  )</h3>
-
-<div class="userRow"><div class="userLabel">$i18n.getString( "introduction" )</div><div class="userInfo">$!encoder.htmlEncode( $user.introduction )</div></div>
-<div class="userRow"><div class="userLabel">$i18n.getString( "works_as" )</div><div class="userInfo">$!encoder.htmlEncode( $user.jobTitle )</div></div>
-<div class="userRow"><div class="userLabel">$i18n.getString( "employed_at" )</div><div class="userInfo">$!encoder.htmlEncode( $user.employer )</div></div>
-<div class="userRow"><div class="userLabel">$i18n.getString( "education" )</div><div class="userInfo">$!encoder.htmlEncode( $user.jobTitle )</div></div>
-<div class="userRow"><div class="userLabel">$i18n.getString( "interested_in" )</div><div class="userInfo">$!encoder.htmlEncode( $user.jobTitle )</div></div>
-<div class="userRow"><div class="userLabel">$i18n.getString( "speaks" )</div><div class="userInfo">$!encoder.htmlEncode( $user.languages )</div></div>
-<div class="userRow"><div class="userLabel">$i18n.getString( "birthday" )</div><div class="userInfo">$!format.formatDate( $user.birthday )</div></div>
-<div class="userRow"><div class="userLabel">$i18n.getString( "gender" )</div><div class="userInfo">$!encoder.htmlEncode( $user.gender )</div></div>
-<div class="userRow"><div class="userLabel">$i18n.getString( "nationality" )</div><div class="userInfo">$!encoder.htmlEncode( $user.nationality )</div></div>
-<div class="userRow"><div class="userLabel">$i18n.getString( "email" )</div><div class="userInfo">$!encoder.htmlEncode( $user.email )</div></div>
-<div class="userRow"><div class="userLabel">$i18n.getString( "phone_number" )</div><div class="userInfo">$!encoder.htmlEncode( $user.phoneNumber )</div></div>
-<div class="userRow"><div class="userLabel">$i18n.getString( "org_units" )</div><div class="userInfo">$!encoder.htmlEncode( $user.getOrganisationUnitsName() )</div></div>
-<div class="userRow"><div class="userLabel">$i18n.getString( "user_roles" )</div><div class="userInfo">$!encoder.htmlEncode( $user.getOrganisationUnitsName() )</div></div>
+<style type="text/css">
+#mainPage
+{
+  margin-left: 234px;
+}
+</style>
+
+<div id="userHeader">$!encoder.htmlEncode( $user.firstName ) $!encoder.htmlEncode( $user.surname  )</div>
+
+<div id="userCover"><img src="images/profile_cover.jpg" style="border: none; border-bottom-right-radius: 5px;"></div>
+
+<div id="userInfo">
+<div class="userRow"><div class="userLabel">$i18n.getString( "introduction" )</div><div class="userValue">$!encoder.htmlEncode( $user.introduction )</div></div>
+<div class="userRow"><div class="userLabel">$i18n.getString( "works_as" )</div><div class="userValue">$!encoder.htmlEncode( $user.jobTitle )</div></div>
+<div class="userRow"><div class="userLabel">$i18n.getString( "employed_at" )</div><div class="userValue">$!encoder.htmlEncode( $user.employer )</div></div>
+<div class="userRow"><div class="userLabel">$i18n.getString( "education" )</div><div class="userValue">$!encoder.htmlEncode( $user.jobTitle )</div></div>
+<div class="userRow"><div class="userLabel">$i18n.getString( "interested_in" )</div><div class="userValue">$!encoder.htmlEncode( $user.jobTitle )</div></div>
+<div class="userRow"><div class="userLabel">$i18n.getString( "speaks" )</div><div class="userValue">$!encoder.htmlEncode( $user.languages )</div></div>
+<div class="userRow"><div class="userLabel">$i18n.getString( "birthday" )</div><div class="userValue">$!format.formatDate( $user.birthday )</div></div>
+<div class="userRow"><div class="userLabel">$i18n.getString( "gender" )</div><div class="userValue">$!encoder.htmlEncode( $user.gender )</div></div>
+<div class="userRow"><div class="userLabel">$i18n.getString( "nationality" )</div><div class="userValue">$!encoder.htmlEncode( $user.nationality )</div></div>
+<div class="userRow"><div class="userLabel">$i18n.getString( "email" )</div><div class="userValue">$!encoder.htmlEncode( $user.email )</div></div>
+<div class="userRow"><div class="userLabel">$i18n.getString( "phone_number" )</div><div class="userValue">$!encoder.htmlEncode( $user.phoneNumber )</div></div>
+<div class="userRow"><div class="userLabel">$i18n.getString( "org_units" )</div><div class="userValue">$!encoder.htmlEncode( $user.getOrganisationUnitsName() )</div></div>
+<div class="userRow"><div class="userLabel">$i18n.getString( "user_roles" )</div><div class="userValue">$!encoder.htmlEncode( $user.getOrganisationUnitsName() )</div></div>
+</div>
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/style/dashboard.css'
--- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/style/dashboard.css	2012-10-07 19:07:53 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/style/dashboard.css	2012-10-07 20:10:20 +0000
@@ -68,20 +68,20 @@
 }
 
 #subMenu
-{
-  position: absolute;
+{  
+  position: absolute; 
   margin-top: 6px;
 }
 
 #subMenu ul
 {
-  list-style-type:none;
+  list-style-type: none;
   margin: 0;
 }
 
 #subMenu li
 {
-  float:left;
+  float: left;
 }
 
 #subMenu a
@@ -356,10 +356,31 @@
 /* Profile                                                                    */
 /*----------------------------------------------------------------------------*/
 
+#userHeader
+{
+  margin-left: 36px;
+  font-size: 14pt;
+  color: #303030;
+  padding: 3px 0 15px 0;
+}
+
+#userCover
+{
+  border-top: 1px solid #ccc;
+  width: 100%;
+  height: 100px;
+  margin-bottom: 20px;
+}
+
+#userInfo
+{
+  margin-left: 36px;
+}  
+
 .userRow
 {
   display: block;
-  margin: 6px 0;
+  margin-top: 6px;
 }
 
 .userLabel
@@ -372,7 +393,7 @@
   padding-right: 20px;
 }
 
-.userInfo
+.userValue
 {
   display: inline-block;
   display: inline;