aboutsummaryrefslogtreecommitdiffstats
path: root/templates/web/base/admin/template_edit.html
blob: b2e734756620c1cac569640663cbbf8714661f35 (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
[% INCLUDE 'admin/header.html' title=tprintf(loc('Response Template for %s'), body.name) -%]
[% rt = response_template %]

[% UNLESS rt.id %]<h3>[% loc('New template') %]</h3>[% END %]

<form method="post"
    action="[% c.uri_for('templates', body.id, rt.id || 'new' ) %]"
    enctype="application/x-www-form-urlencoded"
    accept-charset="utf-8"
    class="validate">

    <p>
        <strong>[% loc('Title:') %] </strong>
        <input type="text" name="title" class="required form-control" size="30" value="[% rt.title| html %]">
    </p>
    <p>
        <strong>[% loc('Text:') %] </strong>
        <textarea class="form-control" name="text" class="required">[% rt.text |html %]</textarea>
    </p>
    <p>
      <label>
        <strong>[% loc('Auto-response:') %]</strong>
        <input type="checkbox" name="auto_response" [% 'checked' IF rt.auto_response %] />
      </label>
    </p>

    <div class="admin-hint">
      <p>
        [% loc('If you only want this template to be an option for specific categories, pick them here. By default they will show for all categories.') %]
      </p>
    </div>
    [% INCLUDE 'admin/category-checkboxes.html' %]

    <p>
      <input type="hidden" name="token" value="[% csrf_token %]" >
      <input type="submit" class="btn" name="Edit templates" value="[% rt.id ? loc('Save changes') : loc('Create template') %]" >
    </p>
    [% IF rt.id %]
        <p>
            <input class="delete btn-danger" type="submit" name="delete_template" value="[% loc('Delete template') %]">
        </p>
    [% END %]
</form>

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