← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 13923: Account invite, simplification

 

------------------------------------------------------------
revno: 13923
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2014-02-04 11:38:44 +0200
message:
  Account invite, simplification
modified:
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/addUserForm.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/javascript/user.js


--
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-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/addUserForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/addUserForm.vm	2014-01-23 15:04:07 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/addUserForm.vm	2014-02-04 09:38:44 +0000
@@ -63,42 +63,42 @@
 		<th colspan="4">$i18n.getString( "details" )</th>
 	</tr>
 
-	<tr id="usernameTR">
+	<tr class="account">
 		<td><label for="username">$i18n.getString( "username" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
 		<td colspan="3"><input type="text" id="username" name="username" autocomplete="off"></td>
 	</tr>
 
-	<tr id="rawPasswordTR">
+	<tr class="account">
 		<td><label for="rawPassword">$i18n.getString( "password" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
 		<td colspan="3"><input type="password" id="rawPassword" name="rawPassword" autocomplete="off"></td>			
 	</tr>
 
-    <tr id="retypePasswordTR">
+    <tr class="account">
 		<td><label for="retypePassword">$i18n.getString( "retype_password" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
 		<td colspan="3"><input type="password" id="retypePassword" name="retypePassword" autocomplete="off"></td>		
 	</tr>
 
-    <tr id="surnameTR">
+    <tr class="account">
 		<td><label for="surname">$i18n.getString( "surname" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
 		<td colspan="3"><input type="text" id="surname" name="surname"></td>
 	</tr>
 
-    <tr id="firstNameTR">
+    <tr class="account">
 		<td><label for="firstName">$i18n.getString( "firstName" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
 		<td colspan="3"><input type="text" id="firstName" name="firstName"></td>		
 	</tr>
 
-	<tr id="emailTR">
+	<tr class="account">
 		<td><label for="email">$i18n.getString( "email" )</label></td>
 		<td colspan="3"><input type="text" id="email" name="email" ></td>
 	</tr>
 
-	<tr id="inviteEmailTR" style="display:none">
+	<tr class="invite" style="display:none">
 		<td><label for="inviteEmail">$i18n.getString( "email" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
 		<td colspan="3"><input type="text" id="inviteEmail" name="inviteEmail" value="validEmail@xxxxxxxxxx" ></td>
 	</tr>
 
-    <tr id="phoneNumberTR">
+    <tr class="account">
         <td><label for="phoneNumber">$i18n.getString( "phone_number" )</label></td>
         <td colspan="3"><input type="text" id="phoneNumber" name="phoneNumber"></td>
     </tr>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/javascript/user.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/javascript/user.js	2014-01-23 15:04:07 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/dhis-web-maintenance-user/javascript/user.js	2014-02-04 09:38:44 +0000
@@ -94,27 +94,13 @@
         $('#email').val( $('#inviteEmail').val() );
         $('#inviteEmail').val( 'validEmail@xxxxxxxxxx' );
 
-        showById('usernameTR');
-        showById('rawPasswordTR');
-        showById('retypePasswordTR');
-        showById('surnameTR');
-        showById('firstNameTR');
-        showById('phoneNumberTR');
-        showById('emailTR');
-
-        hideById('inviteEmailTR');
+        $('.account').show();
+        $('.invite').hide();
     }
     else
     {
-        hideById('usernameTR');
-        hideById('rawPasswordTR');
-        hideById('retypePasswordTR');
-        hideById('surnameTR');
-        hideById('firstNameTR');
-        hideById('phoneNumberTR');
-        hideById('emailTR');
-
-        showById('inviteEmailTR');
+        $('.account').hide();
+        $('.invite').show();
 
         saved["username"] = $('#username').val();
         saved["rawPassword"] = $('#rawPassword').val();