Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 4f82ce00

Von Moritz Bunkus vor etwa 16 Jahren hinzugefügt

  • ID 4f82ce002979fbe9a59d5e69a53e3697b7df20c1
  • Vorgänger 602a4d98
  • Nachfolger 58ff4d6a

form_footer in ic.pl in Template ausgelagert.

Unterschiede anzeigen:

bin/mozilla/ic.pl
1491 1491

  
1492 1492
  $auth->assert('part_service_assembly_edit');
1493 1493

  
1494
  if ($form->{item} eq "assembly") {
1495

  
1496
    print qq|
1497
	<tr>
1498
	  <td>
1499
            <table width="100%">
1500
              <tr>
1501
                <th colspan=2 align=right>| . $locale->text('Total') . qq|&nbsp;</th>
1502
                <th align=right>| . $form->format_amount(\%myconfig, $form->{assemblytotal}, 2) . qq|</th>
1503
              </tr>
1504
            </table>
1505
          </td>
1506
        </tr>
1507
        <input type=hidden name=assembly_rows value=$form->{assembly_rows}>
1508
|;
1509
  }
1510

  
1511
  print qq|
1512
      <input type=hidden name=callback value="$form->{callback}">
1513
      <input type=hidden name=previousform value="$form->{previousform}">
1514
      <input type=hidden name=taxaccount2 value="$form->{taxaccount2}">
1515
      <input type=hidden name=vc value=$form->{vc}>
1516
  <tr>
1517
    <td><hr size=3 noshade></td>
1518
  </tr>
1519
</table>
1520

  
1521
<br>
1522
<input class=submit type=submit name=action value="|
1523
    . $locale->text('Update') . qq|">
1524
  |;
1525

  
1526
####### moved into makemodel_row #############
1527
#  unless ($form->{item} eq "service") {
1528
#    print qq|
1529
#      <input type=hidden name=makemodel_rows value=$form->{makemodel_rows}>
1530
#    |;
1531
#  }
1532

  
1533
  print qq|
1534
     <input type=hidden name=price_rows value=$form->{price_rows}>|;
1535

  
1536
  print qq|
1537
      <input class=submit type=submit name=action value="|
1538
    . $locale->text('Save') . qq|">|;
1539

  
1540
  if ($form->{id}) {
1541

  
1542
    if (!$form->{previousform}) {
1543
      print qq|
1544
      <input class=submit type=submit name=action value="|
1545
        . $locale->text('Save as new') . qq|">|;
1546
    }
1547

  
1548
    if ($form->{orphaned}) {
1549
      if (!$form->{previousform}) {
1550
        if ($form->{item} eq 'assembly') {
1551
          if (!$form->{onhand}) {
1552
            print qq|
1553
      <input class=submit type=submit name=action value="|
1554
              . $locale->text('Delete') . qq|">|;
1555
          }
1556
        } else {
1557
          print qq|
1558
      <input class=submit type=submit name=action value="|
1559
            . $locale->text('Delete') . qq|">|;
1560
        }
1561
      }
1562
    }
1563
  }
1564

  
1565
  if (!$form->{previousform}) {
1566
    if ($form->{menubar}) {
1567
      require "bin/mozilla/menu.pl";
1568
      &menubar;
1569
    }
1570
  }
1571
# button for saving history
1572
  if($form->{id} ne "") {
1573
  	print qq|
1574
  		<input type=button class=submit onclick=set_history_window(|
1575
  		. $form->{id} 
1576
  		. qq|); name=history id=history value=|
1577
  		. $locale->text('history') 
1578
  		. qq|>|;
1579
  }
1580
# /button for saving history
1581
  print qq|
1582

  
1583
</form>
1584

  
1585
<script type="text/javascript" src="js/wz_tooltip.js"></script>
1586

  
1587
</body>
1588
</html>
1589
|;
1494
  print $form->parse_html_template('ic/form_footer');
1590 1495

  
1591 1496
  $lxdebug->leave_sub();
1592 1497
}
......
1595 1500
  $lxdebug->enter_sub();
1596 1501
  my ($numrows) = @_;
1597 1502
  
1598
  my @mm_data = grep { $_->{make} ne '' || $_->{model} ne '' } map +{ make => $form->{"make_$_"}, model => $form->{"model_$_"} }, 1 .. $numrows;
1503
  my @mm_data = grep { any { $_ ne '' } @$_{qw(make model)} } map +{ make => $form->{"make_$_"}, model => $form->{"model_$_"} }, 1 .. $numrows;
1599 1504
  print $form->parse_html_template('ic/makemodel', { MM_DATA => [ @mm_data, {} ], mm_rows => scalar @mm_data + 1 });
1600 1505

  
1601 1506
  $lxdebug->leave_sub();

Auch abrufbar als: Unified diff