Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 6988b41a

Von Sven Schöling vor etwa 15 Jahren hinzugefügt

  • ID 6988b41a11ed749448acbb44d3faf0ae15257ca3
  • Vorgänger 561744fd
  • Nachfolger 5114d0d5

Ungültige Custom Variablen in der Verkaufsmaske ausblenden.

Unterschiede anzeigen:

SL/CVar.pm
360 360
  my %options  = ( name_prefix       => "$params{name_prefix}",
361 361
                   name_postfix      => "$params{name_postfix}",
362 362
                   hide_non_editable => $params{hide_non_editable},
363
                   show_disabled_message => $params{show_disabled_message},
363 364
                 );
364 365

  
365 366
  foreach my $var (@{ $params{variables} }) {
366
    $var->{HTML_CODE} = $form->parse_html_template('amcvar/render_inputs', { 'var' => $var, %options });
367
    $var->{VALID_BOX} = "<input type=checkbox name='$options{name_prefix}cvar_$var->{name}$options{name_postfix}_valid'@{[$var->{valid} ? ' checked' : '']}>";
367
    $var->{HTML_CODE} = $form->parse_html_template('amcvar/render_inputs',     { var => $var, %options });
368
    $var->{VALID_BOX} = $form->parse_html_template('amcvar/render_checkboxes', { var => $var, %options });
368 369
  }
369 370

  
370 371
  $main::lxdebug->leave_sub();
bin/mozilla/ic.pl
1545 1545

  
1546 1546
  $form->{CUSTOM_VARIABLES} = CVar->get_custom_variables('module' => 'IC', 'trans_id' => $form->{id});
1547 1547

  
1548
  CVar->render_inputs('variables' => $form->{CUSTOM_VARIABLES}) if (scalar @{ $form->{CUSTOM_VARIABLES} });
1548
  CVar->render_inputs('variables' => $form->{CUSTOM_VARIABLES}, show_disabled_message => 1)
1549
    if (scalar @{ $form->{CUSTOM_VARIABLES} });
1549 1550

  
1550 1551
  $form->header;
1551 1552
  #print $form->parse_html_template('ic/form_header', { ALL_PRICE_FACTORS => $form->{ALL_PRICE_FACTORS},
bin/mozilla/io.pl
372 372
    $form->{invsubtotal} += $linetotal;
373 373

  
374 374
    # Benutzerdefinierte Variablen für Waren/Dienstleistungen/Erzeugnisse
375
    _render_custom_variables_inputs(ROW2 => \@ROW2, row => $i);
375
    _render_custom_variables_inputs(ROW2 => \@ROW2, row => $i, part_id => $form->{"id_$i"});
376 376

  
377 377
    push @ROWS, { ROW1 => \@ROW1, ROW2 => \@ROW2, HIDDENS => \@HIDDENS, colspan => $colspan, error => $form->{"row_error_$i"}, };
378 378
  }
......
1980 1980
  }
1981 1981

  
1982 1982
  foreach my $cvar (@{ $form->{CVAR_CONFIGS}->{IC} }) {
1983
    $cvar->{valid} = $params{part_id}
1984
      ? CVar->get_custom_variables_validity(config_id => $cvar->{id}, trans_id => $params{part_id})
1985
      : $vcar->{valid};
1986

  
1983 1987
    $cvar->{value} = $form->{"ic_cvar_" . $cvar->{name} . "_$params{row}"};
1984 1988
  }
1985 1989

  
......
1991 1995
  my $num_visible_cvars = 0;
1992 1996
  foreach my $cvar (@{ $form->{CVAR_CONFIGS}->{IC} }) {
1993 1997
    my $description = '';
1994
    if ($cvar->{flag_editable}) {
1998
    if ($cvar->{flag_editable} && $cvar->{valid}) {
1995 1999
      $num_visible_cvars++;
1996 2000
      $description = $cvar->{description} . ' ';
1997 2001
    }
locale/de/all
643 643
  'Edit the stylesheet'         => 'Stilvorlage bearbeiten',
644 644
  'Edit units'                  => 'Einheiten bearbeiten',
645 645
  'Editable'                    => 'Bearbeitbar',
646
  'Element disabled'            => 'Element deaktiviert',
646 647
  'Employee'                    => 'Bearbeiter',
647 648
  'Empty transaction!'          => 'Buchung ist leer!',
648 649
  'Enter a description for this new draft.' => 'Geben Sie eine Beschreibung f&uuml;r diesen Entwurf ein.',
templates/webpages/amcvar/render_checkboxes_de.html
1
[%- USE HTML %]
2
[%- SET var_valid = HTML.escape(name_prefix) _ "cvar_" _ HTML.escape(var.name) _ HTML.escape(name_postfix) _ '_valid' -%]
3
<input type=checkbox name='[% var_valid %]'[% IF var.valid %] checked[% END %]>
templates/webpages/amcvar/render_checkboxes_master.html
1
[%- USE HTML %]
2
[%- SET var_valid = HTML.escape(name_prefix) _ "cvar_" _ HTML.escape(var.name) _ HTML.escape(name_postfix) _ '_valid' -%]
3
<input type=checkbox name='[% var_valid %]'[% IF var.valid %] checked[% END %]>
templates/webpages/amcvar/render_inputs_de.html
5 5
[%- IF hide_non_editable && !var.flag_editable %]
6 6
<input type="hidden" name="[% var_name %]" value="[% HTML.escape(var.value) %]">
7 7

  
8
[%- ELSIF !var.valid %]
9
  [%- IF show_disabled_message %]
10
<i>Element deaktiviert</i>
11
  [%- END %]
12

  
8 13
[%- ELSIF var.type == 'bool' %]
9 14
<input type="checkbox" name="[% var_name %]" value="1"[% IF var.value %] checked[% END %]>
10 15

  
templates/webpages/amcvar/render_inputs_master.html
5 5
[%- IF hide_non_editable && !var.flag_editable %]
6 6
<input type="hidden" name="[% var_name %]" value="[% HTML.escape(var.value) %]">
7 7

  
8
[%- ELSIF !var.valid %]
9
  [%- IF show_disabled_message %]
10
<i><translate>Element disabled</translate></i>
11
  [%- END %]
12

  
8 13
[%- ELSIF var.type == 'bool' %]
9 14
<input type="checkbox" name="[% var_name %]" value="1"[% IF var.value %] checked[% END %]>
10 15

  

Auch abrufbar als: Unified diff