Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision e7367fb5

Von Thomas Kasulke vor mehr als 17 Jahren hinzugefügt

  • ID e7367fb51e706abc8c54495e1623a5e1d2aca7fa
  • Vorgänger 16821864
  • Nachfolger 2f23933d

Bindestriche und ID aus den PopupMenus entfernt und in der FOrm.pm die Speicherung der Historie angepasst, damit nur der aktuell eingeloggte Bearbeiter gespeichert wird und somit
Manipulationen vermieden werden können.

Unterschiede anzeigen:

bin/mozilla/oe.pl
428 428
  @values = ();
429 429

  
430 430
  foreach my $item (@{ $form->{($form->{vc} eq "customer" ? "ALL_CUSTOMERS" : "ALL_VENDORS")}}) {
431
    push(@values, $item->{name}.qq|--|.$item->{"id"});
432
    $labels{$item->{"id"}} = $item->{name}.qq|--|.$item->{"id"};
431
    push(@values, $item->{"name"}.qq|--|.$item->{"id"});
432
    $labels{$item->{"name"}.qq|--|.$item->{"id"}} = $item->{name};
433 433
  }
434 434

  
435 435
  $vc = qq|
......
438 438
      <th align="right">| . $locale->text(ucfirst($form->{vc})) . qq|</th>
439 439
      <td>| . 
440 440
        (($myconfig{vclimit} <=  scalar(@values)) 
441
              ? qq|<input type="text" value="| . H($form->{"old$form->{vc}"}) . qq|" name="$form->{vc}">| 
441
              ? qq|<input type="text" value="| . H(($form->{"old$form->{vc}"} =~ /^(.*)\-\-.*$/)) . qq|" name="$form->{vc}">| 
442 442
              : (NTI($cgi->popup_menu('-name' => "$form->{vc}", '-default' => $form->{"old$form->{vc}"}, 
443 443
                             '-onChange' => 'document.getElementById(\'update_button\').click();',
444 444
                             '-values' => \@values, '-labels' => \%labels, '-style' => 'width: 250px')))) . qq|
......
1386 1386

  
1387 1387
  $form->get_lists("projects" => { "key" => "ALL_PROJECTS",
1388 1388
                                   "all" => 1 },
1389
                   "employees" => "ALL_EMPLOYEES",          
1389 1390
                   $vc => "ALL_" . uc($vc));
1390 1391

  
1391 1392
  my %labels = ();
......
1398 1399
    NTI($cgi->popup_menu('-name' => 'project_id', '-values' => \@values,
1399 1400
                         '-labels' => \%labels));
1400 1401

  
1402
  #employees
1403
  %labels = ();
1404
  @values = ();
1405
  foreach my $item (@{ $form->{"ALL_EMPLOYEES"} }) {
1406
    push(@values, $item->{"id"});
1407
    $labels{$item->{"id"}} = $item->{"name"} ne "" ? $item->{"name"} : $item->{"login"};
1408
  }
1409

  
1410
  my $employee = qq|
1411
    <tr>
1412
      <th align="right">| . $locale->text('Employee') . qq|</th>
1413
      <td>| .
1414
        NTI($cgi->popup_menu('-name' => 'employee_id', '-default' => $form->{"employee_id"},
1415
                             '-values' => \@values, '-labels' => \%labels)) . qq|
1416
      </td>
1417
    </tr>|;
1418

  
1401 1419
  %labels = ();
1402 1420
  @values = ("");
1403 1421

  
1404 1422
  foreach my $item (@{ $form->{($form->{vc} eq "customer" ? "ALL_CUSTOMERS" : "ALL_VENDORS")}}) {
1405 1423
    push(@values, $item->{name}.qq|--|.$item->{"id"});
1406
    $labels{$item->{"id"}} = $item->{name}.qq|--|.$item->{"id"};
1424
    $labels{$item->{name}.qq|--|.$item->{"id"}} = $item->{"name"};
1407 1425
  }
1408 1426

  
1409 1427
  my $vc_label = $form->{vc} eq "customer" ? $locale->text('Customer') : $locale->text('Vendor');
1410 1428
  $vc =
1411 1429
    $myconfig{vclimit} <=  scalar(@values)
1412
    ? qq|<input type="text" value="| . H($form->{"old$form->{vc}"}) . qq|" name="$form->{vc}">|
1430
    ? qq|<input type="text" value="| . H(($form->{"old$form->{vc}"} =~ /^(.*)\-\-.*$/)) . qq|" name="$form->{vc}">| 
1413 1431
    : NTI($cgi->popup_menu('-name' => "$form->{vc}",
1414 1432
                           '-default' => $form->{"old$form->{vc}"},
1415 1433
                           '-onChange' => 'document.getElementById(\'update_button\').click();',
1416 1434
                           '-values' => \@values,
1417 1435
                           '-labels' => \%labels));
1418

  
1419 1436
  $form->header;
1420 1437

  
1421 1438
  print qq|
......
1440 1457
          <th align=right>$ordlabel</th>
1441 1458
          <td colspan=3><input name="$ordnumber" size=20></td>
1442 1459
        </tr>
1460
  $employee
1443 1461
        <tr>
1444 1462
          <th align="right">| . $locale->text('Transaction description') . qq|</th>
1445 1463
          <td colspan="3"><input name="transaction_description" size=20></td>

Auch abrufbar als: Unified diff