aboutsummaryrefslogtreecommitdiffstats
path: root/templates/web/base/admin/reportextrafields/edit.html
blob: bc2f60ab3ec79dcf0f8aa9118e985e02a51bb394 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
[% INCLUDE 'admin/header.html' title=loc('Extra Fields') -%]

<form method=post action="[% c.uri_for('', extra.id || 'new' ) %]">
    <div class="admin-hint">
      <p>
        [% loc('Give this collection of fields a name. It is not shown publicly, just here in the admin.') %]
      </p>
    </div>
    <p>
        <label>
            [% loc('Name') %]
            <input type=text name="name" value="[% extra.name | html %]" />
        </label>
    </p>

    [% IF cobrands.size > 1 %]
        <div class="admin-hint">
        <p>
            [% loc('To limit this collection of fields to a single cobrand, select it here.') %]
        </p>
        </div>
        <p>
            <label>
                [% loc('Cobrand') %]
                <select name="cobrand">
                    <option value="">[% loc('All cobrands') %]</option>
                [% FOREACH cobrand IN cobrands %]
                <option value="[% cobrand | html %]" [% IF cobrand == extra.cobrand %]selected[% END %]>[% cobrand | html %]</option>
                [% END %]
                </select>
            </label>
        </p>
    [% ELSE %]
        <input type=hidden name=cobrand value="[% extra.cobrand | html %]" />
    [% END %]

    [% IF languages.size > 1 %]
        <div class="admin-hint">
        <p>
            [% loc('To limit this collection of fields to a single language, select it here.') %]
        </p>
        </div>
        <p>
            <label>
                [% loc('Language') %]
                <select name="language">
                    <option value="">[% loc('All languages') %]</option>
                    [% FOREACH lang IN languages.pairs %]
                        <option value="[% lang.key | html %]" [% IF lang.key == extra.language %]selected[% END %]>[% lang.value.name | html %]</option>
                    [% END %]
                </select>
            </label>
        </p>
    [% ELSE %]
        <input type=hidden name=language value="[% extra.language | html %]" />
    [% END %]
    <p>
        <label>[% loc('Fields') %]</label>
        [% INCLUDE 'admin/extra-metadata-form.html' metas=extra.get_extra_fields %]
    </p>

    <p>
      <input type="hidden" name="token" value="[% csrf_token %]" >
      <input type="submit" class="btn" name="save" value="[% extra.in_storage ? loc('Save changes') : loc('Save new fields') %]">
    </p>
</form>

[% INCLUDE 'admin/footer.html' %]