[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb:[3903] branches/1.3



Revision: 3903
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=3903&view=rev
Author:   einhverfr
Date:     2011-10-21 07:55:56 +0000 (Fri, 21 Oct 2011)
Log Message:
-----------
Clarifying admin interface that for an existing user, only password can be changed

Modified Paths:
--------------
    branches/1.3/Changelog
    branches/1.3/UI/Admin/edit_user.html
    branches/1.3/scripts/admin.pl

Modified: branches/1.3/Changelog
===================================================================
--- branches/1.3/Changelog	2011-10-21 07:53:06 UTC (rev 3902)
+++ branches/1.3/Changelog	2011-10-21 07:55:56 UTC (rev 3903)
@@ -13,6 +13,8 @@
 * Correcting LedgerSMB.pot (bug reported by Herman V) (Chris T)
 * Documented parameterized translation syntax for .po files (Herman V)
 * Added en_GB and en_US to language table for new installations (Chris T)
+* Added check for system configuration before tests begin (Chris T)
+* Clarified password reset interface for user management (Chris T)
 
 Changelog for LedgerSMB 1.3.1
 * Language selection for invoice templates fixed (Chris T)

Modified: branches/1.3/UI/Admin/edit_user.html
===================================================================
--- branches/1.3/UI/Admin/edit_user.html	2011-10-21 07:53:06 UTC (rev 3902)
+++ branches/1.3/UI/Admin/edit_user.html	2011-10-21 07:55:56 UTC (rev 3903)
@@ -49,6 +49,7 @@
                 </td>
             </tr>
             <?lsmb END ?>
+            <?lsmb UNLESS user.employee.entity_id ?>
             <tr>
                 <td><?lsmb text('Import') ?></td>
                 <?lsmb 
@@ -73,35 +74,53 @@
                            name    = 'import'
                            type    = 'radio'
                    } ?>
-            <tr>
+            </tr>
+            <?lsmb END # unless user.employee.entity_id ?>
+            <?lsmb UNLESS user.employee.entity_id ?>
+            <tr><td>&nbsp;</td>
                 <td>
                     <select name="salutation">
                         <?lsmb FOREACH sal = salutations ?>
                             <option value="<?lsmb sal.id?>"><?lsmb sal.salutation?></option>
                         <?lsmb END?>
                     </select>
+                       
                 </td>
             </tr>
+            <?lsmb END ?>
             
             <tr>
                 <td><?lsmb ('First Name') ?></td>
                 <td>
+                    <?lsmb IF user.employee.entity_id;
+                               user.employee.first_name;
+                           ELSE; ?>
                     <input type="text" name="first_name" value="<?lsmb user.employee.first_name?>"/>
+                   <?lsmb END ?>
                 </td>
             </tr>
             
             <tr>
                 <td><?lsmb text('Last Name') ?></td>
                 <td>
+                    <?lsmb IF user.employee.entity_id;
+                               user.employee.last_name;
+                           ELSE; ?>
                     <input type="text" name="last_name" value="<?lsmb user.employee.last_name?>"/>
+                   <?lsmb END ?>
                 </td>
             </tr>
             <tr>
                 <td><?lsmb text('Employee No.') ?></td>
                 <td>
+                    <?lsmb IF user.employee.entity_id;
+                               user.employee.employeenumber;
+                           ELSE; ?>
                     <input type="textarea" name="employeenumber" value="<?lsmb user.employee.employeenumber?>"/>
+                   <?lsmb END ?>
                 </td>
             </tr>
+           <?lsmb UNLESS user.employee.entity_id ?>
             <tr>
                 <td><?lsmb text('Country') ?></td>
                 <td>
@@ -119,8 +138,13 @@
                     } ?>
                 </td>
             </tr>
+            <?lsmb END ?>
         </table>
+           <?lsmb IF user.employee.entity_id ?>
+        <button type="submit" value="save_user"><?lsmb text('Set Password') ?>
+           <?lsmb ELSE ?>
         <button type="submit" value="save_user"><?lsmb text('Save User') ?>
+           <?lsmb END ?>
         </button>
     </form>
     <?lsmb IF user.user.username AND user.user.import != 1 ?>

Modified: branches/1.3/scripts/admin.pl
===================================================================
--- branches/1.3/scripts/admin.pl	2011-10-21 07:53:06 UTC (rev 3902)
+++ branches/1.3/scripts/admin.pl	2011-10-21 07:55:56 UTC (rev 3903)
@@ -166,7 +166,7 @@
     my $request = shift @_;
     my $admin = LedgerSMB::DBObject::Admin->new(base=>$request, copy=>'all');
     
-    my $sal = $admin->get_salutations();
+    my @sal = $admin->get_salutations();
     
     my $groups = $admin->get_roles();
     my $user = $request->{_user};
@@ -183,7 +183,7 @@
     
         $template->render(
             {
-                salutations=>$sal,
+                salutations=>..hidden..,
                 roles=>$groups,
                 countries=>$admin->get_countries(),
                 stylesheet => $request->{stylesheet},

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.