Merge branch 'master' of vc.linet-services.de:public/lx-office-erp
authorJan Büren <jan@lx-office-hosting.de>
Wed, 18 Jan 2012 15:10:55 +0000 (16:10 +0100)
committerJan Büren <jan@lx-office-hosting.de>
Wed, 18 Jan 2012 15:10:55 +0000 (16:10 +0100)
SL/Template/Plugin/L.pm
scripts/find-use.pl
templates/webpages/is/_payments.html
templates/webpages/is/form_footer.html
templates/webpages/is/form_header.html
templates/webpages/webdav/_list.html

index d8d223e..bc38088 100644 (file)
@@ -17,6 +17,11 @@ sub _tag_id {
 }
 }
 
+my %_valueless_attributes = map { $_ => 1 } qw(
+  checked compact declare defer disabled ismap multiple noresize noshade nowrap
+  readonly selected
+);
+
 sub _H {
   my $string = shift;
   return $::locale->quote_special_chars('HTML', $string);
@@ -62,9 +67,9 @@ sub attributes {
   my @result = ();
   while (my ($name, $value) = each %options) {
     next unless $name;
-    next if $name eq 'disabled' && !$value;
+    next if $_valueless_attributes{$name} && !$value;
     $value = '' if !defined($value);
-    push @result, _H($name) . '="' . _H($value) . '"';
+    push @result, $_valueless_attributes{$name} ? _H($name) : _H($name) . '="' . _H($value) . '"';
   }
 
   return @result ? ' ' . join(' ', @result) : '';
@@ -277,7 +282,8 @@ sub date_tag {
     s/y+/\%Y/gi;
   } $::myconfig{"dateformat"};
 
-  my $cal_align =  delete $params{cal_align} || 'BR';
+  my $cal_align = delete $params{cal_align} || 'BR';
+  my $onchange  = delete $params{onchange};
   my $str_value = blessed $value ? $value->to_lxoffice : $value;
 
   $self->input_tag($name, $str_value,
@@ -285,6 +291,9 @@ sub date_tag {
     size   => 11,
     title  => _H($::myconfig{dateformat}),
     onBlur => 'check_right_date_format(this)',
+    ($onchange ? (
+    onChange => $onchange,
+    ) : ()),
     %params,
   ) . ((!$params{no_cal}) ?
   $self->html_tag('img', undef,
index f65143e..9024221 100755 (executable)
@@ -5,6 +5,7 @@ use File::Find;
 use Module::CoreList;
 use SL::InstallationCheck;
 use Term::ANSIColor;
+use Getopt::Long;
 
 my (%uselines, %modules, %supplied, %requires);
 
@@ -37,6 +38,10 @@ my (%uselines, %modules, %supplied, %requires);
   }
 );
 
+GetOptions(
+  'files-with-match|l' => \ my $l,
+);
+
 find(sub {
   return unless /(\.p[lm]|console)$/;
 
@@ -118,8 +123,12 @@ while ($changed) {
   }
 }
 
-print sprintf "%8s : %s (%s)", color_text($modules{$_}->{status}), $_, join(' ', @{ $modules{$_}->{files} || [] })
-  for sort {
+do {
+  print sprintf "%8s : %s", color_text($modules{$_}->{status}), $_;
+  if ($l) {
+    print " $_" for @{ $modules{$_}->{files} || [] };
+  }
+} for sort {
        $modules{$a}->{status} cmp $modules{$b}->{status}
     ||                    $a  cmp $b
   } keys %modules;
index 4a64d0d..771cede 100644 (file)
   [% SET paid          = 'paid_'          _ i %]
   [% SET AR_paid       = 'AR_paid_'       _ i %]
   [% SET selectAR_paid_ref = 'selectAR_paid_' _ i %]
-
-     <input type=hidden name="acc_trans_id_[% i %]" value=[% $acc_trans_id %]>
-     <input type=hidden name="gldate_[% i %]" value=[% $gldate %]>
+     <tr style='display:none'>
+       <td>
+         <input type=hidden name="acc_trans_id_[% i %]" value="[% $acc_trans_id %]">
+         <input type=hidden name="gldate_[% i %]" value="[% $gldate %]">
+       </td>
+     </tr>
 
      <tr>
      <td align="center">
 
     </tr>
   [% IF $changeable %]
+    <tr style='display:none'>
+     <td>
     <script type='text/javascript'>
      Calendar.setup({ inputField : "datepaid_[% i %]", ifFormat :"[% myconfig_jsc_dateformat %]", align : "TR", button : "trigger_datepaid_[% i %]" });
      $('input[name="paid_[% i %]"]').blur(function(){ check_right_number_format(this) });
      $('#datepaid_[% i %]').blur(function(){ check_right_date_format(this) });
     </script>
+     </td>
+    </tr>
   [% END %]
 
 [% END # foreach %]
       <td align="center">[%- 'Missing amount' | $T8 %]</td>
       <td align="center">[% LxERP.format_amount(paid_missing, 2) | html %]</td>
     </tr>
-
+    <tr style='display:none'>
+     <td>
      <input type="hidden" name="paidaccounts" value="[% paidaccounts %]">
      <input type="hidden" name="selectAR_paid" value="[% selectAR_paid %]">
      <input type="hidden" name="oldinvtotal" value="[% oldinvtotal %]">
 
      <input type="hidden" name="oldtotalpaid" value="[% totalpaid %]">
+    </td>
+   </tr>
     </table>
 
     </td>
index 6314c21..3a86b2a 100644 (file)
         </tr>
         <tr valign="top">
          <td>
-          <textarea name="notes" rows="[% rows %]" cols="26" wrap="soft">[% notes %]</textarea>
+          <textarea name="notes" rows="[% rows %]" cols="26">[% notes %]</textarea>
          </td>
          <td>
-          <textarea name="intnotes" rows="[% rows %]" cols="35" wrap="soft">[% intnotes %]</textarea>
+          <textarea name="intnotes" rows="[% rows %]" cols="35">[% intnotes %]</textarea>
          </td>
          <td>
             [%- INCLUDE 'generic/multibox.html'
        <table>
         <tr>
          <th  align=left>[% 'Ertrag' | $T8 %]</th>
-         <td>[% LxERP.format_amount(marge_total, 2, 0) %]</td>
+         <td>
+          [% LxERP.format_amount(marge_total, 2, 0) %]
+          <input type=hidden name="marge_total" value="[% marge_total %]">
+         </td>
         </tr>
         <tr>
          <th  align=left>[% 'Ertrag prozentual' | $T8 %]</th>
-         <td>[% LxERP.format_amount(marge_percent, 2, 0) %] %</td>
+         <td>
+          [% LxERP.format_amount(marge_percent, 2, 0) %] %
+          <input type=hidden name="marge_percent" value="[% marge_percent %]">
+         </td>
         </tr>
-        <input type=hidden name="marge_total" value="[% marge_total %]">
-        <input type=hidden name="marge_percent" value="[% marge_percent %]">
        </table>
       </td>
       <td align="right">
   [% END %]
 
 <input type="hidden" name="rowcount" value="[% rowcount %]">
-<input type="hidden" name="callback" value="[% callback %]">
+<input type="hidden" name="callback" value="[% callback | html %]">
 <input type="hidden" name="draft_id" value="[% draft_id %]">
 <input type="hidden" name="draft_description" value="[% draft_description %]">
 <input type="hidden" name="customer_discount" value="[% customer_discount %]">
index ca2b536..c322a77 100644 (file)
@@ -21,7 +21,7 @@
 <input type="hidden" name="follow_up_trans_info_1" value="[% HTML.escape(follow_up_trans_info) %]">
 <input type="hidden" name="follow_up_rowcount" value="1">
 
-<p><div class="listtop" width="100%">[% title %]</div></p>
+<h1>[% title %]</h1>
 
 <p>[% saved_message %]</p>
 
                  allow_textbox = 1,
                  onChange      = "document.getElementById('update_button').click();" -%]
             <input type="button" value="[% 'Details (one letter abbreviation)' | $T8 %]" onclick="show_vc_details('[% HTML.escape(vc) %]')">
-          </td>
           <input type="hidden" name="customer_klass" value="[% HTML.escape(customer_klass) %]">
           <input type="hidden" name="customer_id" value="[% HTML.escape(customer_id) %]">
           <input type="hidden" name="oldcustomer" value="[% HTML.escape(oldcustomer) %]">
           <input type="hidden" name="selectcustomer" value="[% HTML.escape(selectcustomer) %]">
+          </td>
         </tr>
 [%- IF ALL_CONTACTS.size %]
         <tr>
 [%- END %]
         <tr>
           <th align="right" nowrap>[% 'Record in' | $T8 %]</th>
-          <td colspan="3"><select name="AR" style="width:250px;">[% selectAR %]</select></td>
-          <input type="hidden" name="selectAR" value="[% selectAR %]">
+          <td colspan="3">
+            <select name="AR" style="width:250px;">[% selectAR %]</select>
+            <input type="hidden" name="selectAR" value="[% selectAR | html %]">
+          </td>
         </tr>
         <tr>
           <th align="right">[% 'Steuersatz' | $T8 %]</th>
           <td>
-            [% L.select_tag('taxzone_id', L.options_for_select(ALL_TAXZONES, default=taxzone_id, title='description'), readonly=(id ? 1 : 0), style='width: 250px', onchange="document.getElementById('update_button').click();") %]
-          </td>
+            [% L.select_tag('taxzone_id', L.options_for_select(ALL_TAXZONES, default=taxzone_id, title='description'), disabled=(id ? 1 : 0), style='width: 250px', onchange="document.getElementById('update_button').click();") %]
   [%- IF id %]
           <input type='hidden' name='taxzone_id' value='[% taxzone_id %]'>
   [%- END %]
+          </td>
         </tr>
 [%- IF all_departments %]
         <tr>
           <td>[% currencies %]</td>
         </tr>
 [%- END %]
-        <input type="hidden" name="fxgain_accno" value="[% fxgain_accno %]">
-        <input type="hidden" name="fxloss_accno" value="[% fxloss_accno %]">
+        <tr style='display:none'>
+          <td>
+            <input type="hidden" name="fxgain_accno" value="[% fxgain_accno %]">
+            <input type="hidden" name="fxloss_accno" value="[% fxloss_accno %]">
+          </td>
+        </tr>
 [%- IF show_exchangerate %]
         <tr>
           <th align="right">[% 'Exchangerate' | $T8 %]</th>
         </tr>
         <tr>
           <th align="right">[% 'Credit Note Date' | $T8 %]</th>
-          <td>[% L.date_tag('invdate', invdate, onBlur='check_right_date_format(this)', cal_align='BL', onChange='set_duedate()') %]</td>
+          <td>[% L.date_tag('invdate', invdate, cal_align='BL', onchange='set_duedate()') %]</td>
         </tr>
 [%- ELSE %]
         <tr>
         </tr>
         <tr>
           <th align="right">[% 'Invoice Date' | $T8 %]</th>
-          <td>[% L.date_tag('invdate', invdate, onBlur='check_right_date_format(this)', cal_align='BL', onChange='set_duedate()') %]</td>
+          <td>[% L.date_tag('invdate', invdate, cal_align='BL', onchange='set_duedate()') %]</td>
         </tr>
         <tr>
           <th align="right">[% 'Due Date' | $T8 %]</th>
-          <td>[% L.date_tag('duedate', duedate, onBlur='check_right_date_format(this)', cal_align='BL') %]</td>
+          <td>[% L.date_tag('duedate', duedate, cal_align='BL') %]</td>
         </tr>
         <tr>
         <th align="right" nowrap>[% 'Delivery Order Number' | $T8 %]</th>
         </tr>
         <tr>
           <th align="right">[% 'Delivery Date' | $T8 %]</th>
-          <td>[% L.date_tag('deliverydate', deliverydate, onBlur='check_right_date_format(this)', cal_align='BL') %]</td>
+          <td>[% L.date_tag('deliverydate', deliverydate, cal_align='BL') %]</td>
         </tr>
 [%- END %]
 
         </tr>
         <tr>
           <th align="right" nowrap>[% 'Order Date' | $T8 %]</th>
-          <td>[% L.date_tag('orddate', orddate, onBlur='check_right_date_format(this)', cal_align='BL') %]</td>
+          <td>[% L.date_tag('orddate', orddate, cal_align='BL') %]</td>
         </tr>
         <tr>
           <th align="right" nowrap>[% 'Quotation Number' | $T8 %]</th>
         </tr>
         <tr>
           <th align="right" nowrap>[% 'Quotation Date' | $T8 %]</th>
-          <td>[% L.date_tag('quodate', quodate, onBlur='check_right_date_format(this)', cal_align='BL') %]</td>
+          <td>[% L.date_tag('quodate', quodate, cal_align='BL') %]</td>
         </tr>
         <tr>
           <th align="right" nowrap>[% 'Customer Order Number' | $T8 %]</th>
       </table>
     </td>
   </tr>
-</table>
-    </td>
-  </tr>
-  <tr>
+  <tr style='display:none'>
     <td>
+      <input type="hidden" name="webdav" value="[% webdav %]">
     </td>
   </tr>
+</table>
+
   <script type="text/javascript" src="js/show_form_details.js"></script>
   <script type="text/javascript" src="js/show_vc_details.js"></script>
   <script type="text/javascript" src="js/show_history.js"></script>
      }
    //-->
   </script>
-
-  <input type="hidden" name="webdav" value="[% webdav %]">
+<table width="100%">
index 3432fc6..5e86bec 100644 (file)
@@ -6,6 +6,8 @@
   <tr>
    <th class="listtop" align="left">Dokumente im Webdav-Repository</th>
   </tr>
+  <tr>
+   <td>
    <table width="100%">
     <tr>
      <td align="left" width="30%"><b>Dateiname</b></td>
@@ -18,5 +20,6 @@
     </tr>
  [%- END %]
    </table>
+   </td>
   </tr>
 [% END %]