Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision a5f96099

Von Hans P. Schlaepfer vor fast 5 Jahren hinzugefügt

  • ID a5f960997dd777a3635e24a046c99b0c120d20ac
  • Vorgänger 33c610e2
  • Nachfolger bcb18cc4

Neues Design 2019 Standard-Code templates/webpages/amcvar/render_inputs.html

Unterschiede anzeigen:

templates/webpages/amcvar/render_inputs.html
3 3
[% USE L %]
4 4
[% USE P %]
5 5

  
6
[%- SET var_name = HTML.escape(name_prefix) _ "cvar_" _ HTML.escape(var.name) _ HTML.escape(name_postfix) -%]
6
[% SET var_name = HTML.escape(name_prefix) _ "cvar_" _ HTML.escape(var.name) _ HTML.escape(name_postfix) %]
7 7

  
8
[%- IF (hide_non_editable && !var.flag_editable) || var.partsgroup_filtered %]
9
<input type="hidden" name="[% var_name %]" value="[% HTML.escape(var.value) %]">
8
[% IF (hide_non_editable && !var.flag_editable) || var.partsgroup_filtered %]
9
  <input type="hidden" name="[% var_name %]" value="[% HTML.escape(var.value) %]">
10 10

  
11
[%- ELSIF !var.valid %]
12
  [%- IF show_disabled_message %]
13
<i>[% 'Element disabled' | $T8 %]</i>
14
  [%- END %]
11
[% ELSIF !var.valid %]
12
  [% IF show_disabled_message %]
13
    <i>[% 'Element disabled' | $T8 %]</i>
14
  [% END %]
15 15

  
16
[%- ELSIF var.type == 'bool' %]
17
<input type="checkbox" name="[% var_name %]" value="1"[% IF var.value %] checked[% END %]>
16
[% ELSIF var.type == 'bool' %]
17
  <input type="checkbox" name="[% var_name %]" value="1"[% IF var.value %] checked[% END %]>
18 18

  
19
[%- ELSIF var.type == 'textfield' %]
20
<textarea name="[% var_name %]" cols="[% HTML.escape(var.width) %]" rows="[% HTML.escape(var.height) %]">[% HTML.escape(var.value) %]</textarea>
19
[% ELSIF var.type == 'textfield' %]
20
  <textarea name="[% var_name %]" cols="[% HTML.escape(var.width) %]" rows="[% HTML.escape(var.height) %]">[% HTML.escape(var.value) %]</textarea>
21 21

  
22
[%- ELSIF var.type == 'date' %]
23
[% L.date_tag(var_name, var.value) %]
22
[% ELSIF var.type == 'date' %]
23
  [% L.date_tag(var_name, var.value) %]
24 24

  
25
[%- ELSIF var.type == 'timestamp' %]
26
<input name="[% var_name %]" value="[% HTML.escape(var.value) %]">
25
[% ELSIF var.type == 'timestamp' %]
26
  <input type="text" name="[% var_name %]" value="[% HTML.escape(var.value) %]">
27 27

  
28
[%- ELSIF var.type == 'customer' %]
29
[% P.customer_vendor.picker(var_name, var.value, type='customer') %]
28
[% ELSIF var.type == 'customer' %]
29
  [% P.customer_vendor.picker(var_name, var.value, type='customer') %]
30 30

  
31
[%- ELSIF var.type == 'vendor' %]
32
[% P.customer_vendor.picker(var_name, var.value, type='vendor') %]
31
[% ELSIF var.type == 'vendor' %]
32
  [% P.customer_vendor.picker(var_name, var.value, type='vendor') %]
33 33

  
34
[%- ELSIF var.type == 'part' %]
35
[% P.part.picker(var_name, var.value) %]
34
[% ELSIF var.type == 'part' %]
35
  [% P.part.picker(var_name, var.value) %]
36 36

  
37
[%- ELSIF var.type == 'select' %]
37
[% ELSIF var.type == 'select' %]
38
  <select name="[% var_name %]">
39
    [% FOREACH option = var.OPTIONS %]
40
      <option value="[% option.value | html %]"[% IF option.value == var.value %] selected[% END %]>[% HTML.escape(option.value) %]</option>
41
    [% END %]
42
  </select>
38 43

  
39
<select name="[% var_name %]">
40
 [%- FOREACH option = var.OPTIONS %]
41
 <option value="[% option.value | html %]"[% IF option.value == var.value %] selected[% END %]>[% HTML.escape(option.value) %]</option>
42
 [%- END %]
43
</select>
44
[% ELSE %]
45
  <input type="text" name="[% var_name %]" value="[% HTML.escape(var.value) %]"[% IF var.maxlength %] maxlength="[% HTML.escape(var.maxlength) %]"[% END %]>
44 46

  
45
[%- ELSE %]
46
<input name="[% var_name %]" value="[% HTML.escape(var.value) %]" [%- IF var.maxlength %] maxlength="[% HTML.escape(var.maxlength) %]"[% END -%]>
47
[%- END %]
47
[% END %]

Auch abrufbar als: Unified diff