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

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



Revision: 6032
          http://sourceforge.net/p/ledger-smb/code/6032
Author:   einhverfr
Date:     2013-09-15 15:14:47 +0000 (Sun, 15 Sep 2013)
Log Message:
-----------
Timecard form now renders mostly, but business units not showing yet, nor are dropdowns populated

Modified Paths:
--------------
    trunk/LedgerSMB/Template.pm
    trunk/UI/lib/utilities.html
    trunk/UI/timecards/timecard.html

Modified: trunk/LedgerSMB/Template.pm
===================================================================
--- trunk/LedgerSMB/Template.pm	2013-09-15 13:44:56 UTC (rev 6031)
+++ trunk/LedgerSMB/Template.pm	2013-09-15 15:14:47 UTC (rev 6032)
@@ -330,7 +330,9 @@
 	}
         $cleanvars->{escape} = sub { return $format->escape(@_)};
 	if (UNIVERSAL::isa($self->{locale}, 'LedgerSMB::Locale')){
-		$cleanvars->{text} = sub { return $self->escape($self->{locale}->text(@_))};
+		$cleanvars->{text} = sub { 
+                    return $self->escape($self->{locale}->text(@_)) 
+                        if defined $_[0]};
 	} 
 	else {
             $cleanvars->{text} = sub { return $self->escape(shift @_) };

Modified: trunk/UI/lib/utilities.html
===================================================================
--- trunk/UI/lib/utilities.html	2013-09-15 13:44:56 UTC (rev 6031)
+++ trunk/UI/lib/utilities.html	2013-09-15 15:14:47 UTC (rev 6032)
@@ -25,3 +25,17 @@
  default_values = [media]
 }; ?></div>
 <?lsmb END ?>
+<?lsmb- BLOCK employee;
+IF !element_name;
+    element_name = 'employee';
+END;
+
+PROCESS select element_data = {
+            name = element_name
+         options = employees
+  default_values = $element_name
+           class = 'employees'
+           label = label
+};
+
+END; ?>

Modified: trunk/UI/timecards/timecard.html
===================================================================
--- trunk/UI/timecards/timecard.html	2013-09-15 13:44:56 UTC (rev 6031)
+++ trunk/UI/timecards/timecard.html	2013-09-15 15:14:47 UTC (rev 6032)
@@ -7,13 +7,12 @@
 <form action="timecard.pl" method="post">
 <div class="listtop"><?lsmb text('Time or Materials Card') ?></div>
 <table>
-<?lsmb PROCESS employee; ?>
-<tr><th colspan="2" class="listtop"><?lsmb text('Business Units') ?> : 
-                                    <?lsmb text('Please select only one') ?>
+<?lsmb PROCESS employee element_name="person_id" label=text('Employee'); ?>
+<tr><th colspan="2" class="listtop"><?lsmb text('Category') ?> : 
     </th>
 </tr>
-<?lsmb PROCESS business_units; ?>
-<tr><th><?lsmb text('Partnumber') ?></th>
+<?lsmb # PROCESS business_units; ?>
+<tr><th><?lsmb  text('Partnumber') ?></th>
     <td><?lsmb PROCESS input element_data = {
                name = 'partnumber'
               value = partnumber

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


------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/22/13. 
http://pubads.g.doubleclick.net/gampad/clk?id=64545871&iu=/4140/ostg.clktrk
_______________________________________________
Ledger-smb-commits mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-commits