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

SF.net SVN: ledger-smb:[5762] trunk



Revision: 5762
          http://sourceforge.net/p/ledger-smb/code/5762
Author:   einhverfr
Date:     2013-05-11 07:54:36 +0000 (Sat, 11 May 2013)
Log Message:
-----------
Correcting error handling and died error when saving user

Modified Paths:
--------------
    trunk/UI/Contact/contact.css
    trunk/UI/Contact/divs/user.html
    trunk/lsmb-request.pl

Modified: trunk/UI/Contact/contact.css
===================================================================
--- trunk/UI/Contact/contact.css	2013-05-11 06:58:00 UTC (rev 5761)
+++ trunk/UI/Contact/contact.css	2013-05-11 07:54:36 UTC (rev 5762)
@@ -122,15 +122,28 @@
        width: 40em;
 }
 
-#user_div input[type=~'checkbox'] {
+#user_div input[type=~'checkbox'], #user_div input[type=~'radio'] {
        float: left;
 }
 
+#user_div div.input_group {
+       float: left;
+       overflow: auto;
+}
+#user_div div.input_line {
+       overflow: auto;
+       display: block;
+}
+
 #user_div label {
       width: 8em;
       text-align: right;
 }
 
+#user_div table .input_group label {
+      width: 2em;
+}
+
 #user_div table label {
       width: 15em;
 }

Modified: trunk/UI/Contact/divs/user.html
===================================================================
--- trunk/UI/Contact/divs/user.html	2013-05-11 06:58:00 UTC (rev 5761)
+++ trunk/UI/Contact/divs/user.html	2013-05-11 07:54:36 UTC (rev 5762)
@@ -14,7 +14,7 @@
                 END ?>
         </div>
     
-    <form method="POST" action="admin.pl">
+    <form method="POST" action="employee.pl">
         <input type="hidden" name="entity_id" value="<?lsmb entity_id ?>"/>
         <table>
 
@@ -39,7 +39,6 @@
                 </td>
             </tr>
             <?lsmb END?>
-            <?lsmb UNLESS request.import ?>
             <tr>
                 <td><?lsmb text('Password') ?></td>
                 <td>
@@ -58,20 +57,21 @@
                       importc1 = '';
                       importc0 = 'CHECKED';
                   END; ?> 
-                <td><?lsmb INCLUDE input element_data = {
+                <td><div class="input_line"><div overflow="auto" class="input_group">
+                  <?lsmb INCLUDE input element_data = {
                            label   = 'Yes'
                            value   = '1'
                            checked = importc1
                            name    = 'import'
                            type    = 'radio'
-                   };
+                   } ?></div><div overflow="auto" class="input_group"><?lsmb
                    INCLUDE input element_data = {
                            label   = 'No'
                            value   = '0'
                            checked = importc0
                            name    = 'import'
                            type    = 'radio'
-                   } ?>
+                   } ?></div></div>
             </tr>
             <?lsmb END # unless employee.entity_id ?>
         </table>
@@ -92,11 +92,16 @@
                         value = 'create_user'
                 };
            END;
+                PROCESS input element_data = {
+                         type = 'hidden'
+                         name = 'form_id'
+                        value = form_id
+                };
     ?>
     </form>
     <?lsmb IF user.username AND request.import != 1 ?>
         <hr /> 
-        <form name="groups" method="POST" action="admin.pl">
+        <form name="groups" method="POST" action="employee.pl">
             <?lsmb PROCESS input element_data = {
                type="hidden"
                name="user_id"

Modified: trunk/lsmb-request.pl
===================================================================
--- trunk/lsmb-request.pl	2013-05-11 06:58:00 UTC (rev 5761)
+++ trunk/lsmb-request.pl	2013-05-11 07:54:36 UTC (rev 5762)
@@ -101,11 +101,10 @@
     $request->{_script_handle} = $script;
 
     eval "require $script;"
-      || $request->error($locale->text('Unable to open script') . 
-                          ": $script : $!: $@"
-          );
+      || die $locale->text('Unable to open script') . 
+                          ": $script : $!: $@";
     $script->can($request->{action}) 
-      || $request->error($locale->text("Action Not Defined: ") . $request->{action});
+      || die $locale->text("Action Not Defined: ") . $request->{action};
     $script->can( $request->{action} )->($request);
     LedgerSMB::App_State->cleanup();
   }
@@ -116,7 +115,7 @@
       # -- CT
      $LedgerSMB::App_State::DBH->rollback if ($LedgerSMB::App_State::DBH and $_ eq 'Died');
      LedgerSMB::App_State->cleanup();
-     $request->_error($_) unless $_ eq 'Died';
+     $request->_error($_) unless $_ =~ 'Died at';
   };
 }
 1;

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