~xibo-maintainers/xibo/tempel

« back to all changes in this revision

Viewing changes to views/notification-form-edit.twig

  • Committer: Dan Garner
  • Date: 2015-03-26 14:08:33 UTC
  • Revision ID: git-v1:70d14044444f8dc5d602b99890d59dea46d9470c
Moved web servable files to web folder

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
{#
2
 
/*
3
 
 * Spring Signage Ltd - http://www.springsignage.com
4
 
 * Copyright (C) 2016 Spring Signage Ltd
5
 
 * (${FILE_NAME})
6
 
 */
7
 
 
8
 
#}
9
 
 
10
 
{% extends "form-base.twig" %}
11
 
{% import "forms.twig" as forms %}
12
 
 
13
 
{% block formTitle %}
14
 
    {% trans "Edit Notification" %}
15
 
{% endblock %}
16
 
 
17
 
{% block callBack %}notificationFormOpen{% endblock %}
18
 
 
19
 
{% block formButtons %}
20
 
    {% trans "Help" %}, XiboHelpRender("{{ help }}")
21
 
    {% trans "Cancel" %}, XiboDialogClose()
22
 
    {% trans "Save" %}, $("#notificationForm").submit()
23
 
{% endblock %}
24
 
 
25
 
{% block formHtml %}
26
 
    <div class="row">
27
 
        <div class="col-md-12">
28
 
            <ul class="nav nav-tabs" role="tablist">
29
 
                <li class="active"><a href="#general" role="tab" data-toggle="tab"><span>{% trans "General" %}</span></a></li>
30
 
                <li><a href="#message-body" role="tab" data-toggle="tab"><span>{% trans "Message" %}</span></a></li>
31
 
                <li><a href="#audience" role="tab" data-toggle="tab"><span>{% trans "Audience" %}</span></a></li>
32
 
            </ul>
33
 
            <form id="notificationForm" class="XiboForm form-horizontal" method="put" action="{{ urlFor("notification.edit", {id: notification.notificationId}) }}">
34
 
                <div class="tab-content">
35
 
                    <div class="tab-pane active" id="general">
36
 
                        {% set title %}{% trans "Subject" %}{% endset %}
37
 
                        {% set helpText %}{% trans "A subject line for the notification - used as a title." %}{% endset %}
38
 
                        {{ forms.input("subject", title, notification.subject, helpText, "", "required") }}
39
 
 
40
 
                        {% set title %}{% trans "Release Date" %}{% endset %}
41
 
                        {% set helpText %}{% trans "The date when this notification will be published" %}{% endset %}
42
 
                        {{ forms.dateTime("releaseDt", title, notification.releaseDt, helpText, "starttime-control", "required") }}
43
 
 
44
 
                        {% set title %}{% trans "Email?" %}{% endset %}
45
 
                        {% set helpText %}{% trans "Should the notification be emailed?" %}{% endset %}
46
 
                        {{ forms.checkBox("isEmail", title, notification.isEmail, helpText) }}
47
 
 
48
 
                        {% set title %}{% trans "Interrupt?" %}{% endset %}
49
 
                        {% set helpText %}{% trans "Should the notification interrupt nagivation in the Web Portal? Including Login." %}{% endset %}
50
 
                        {{ forms.checkBox("isInterrupt", title, notification.isInterrupt, helpText) }}
51
 
 
52
 
                    </div>
53
 
                    <div class="tab-pane" id="message-body">
54
 
                        {% set title %}{% trans "Add the body of your message in the box below. If you are going to target this message to a Display/DisplayGroup be aware that the formatting you apply here will be removed." %}{% endset %}
55
 
                        {{ forms.message(title) }}
56
 
 
57
 
                        {{ forms.textarea("body", "", notification.body, "", "", 10) }}
58
 
                    </div>
59
 
                    <div class="tab-pane" id="audience">
60
 
                        {% set title %}{% trans "Users" %}{% endset %}
61
 
                        {% set helpText %}{% trans "Please select one or more users / groups who will receive this notification." %}{% endset %}
62
 
                        {% set attributes = [
63
 
                        { name: "data-live-search", value: "true" },
64
 
                        { name: "data-selected-text-format", value: "count > 4" }
65
 
                        ] %}
66
 
                        {% set transUserGroups %}{% trans "Groups" %}{% endset %}
67
 
                        {% set transUsers %}{% trans "Users" %}{% endset %}
68
 
                        {% set optionGroups = [
69
 
                        {id: "group", label: transUserGroups},
70
 
                        {id: "user", label: transUsers}
71
 
                        ] %}
72
 
                        {{ forms.dropdown("userGroupIds[]", "dropdownmulti", title, userGroupIds, {group: userGroups, user: users}, "groupId", "group", helpText, "", "", "", "", attributes, optionGroups) }}
73
 
 
74
 
 
75
 
                        {% set title %}{% trans "Displays" %}{% endset %}
76
 
                        {% set helpText %}{% trans "Please select one or more displays / groups for this notification to be shown on - Layouts will need the notification widget." %}{% endset %}
77
 
                        {% set attributes = [
78
 
                        { name: "data-live-search", value: "true" },
79
 
                        { name: "data-selected-text-format", value: "count > 4" }
80
 
                        ] %}
81
 
                        {% set transGroups %}{% trans "Groups" %}{% endset %}
82
 
                        {% set transDisplays %}{% trans "Display" %}{% endset %}
83
 
                        {% set optionGroups = [
84
 
                        {id: "group", label: transGroups},
85
 
                        {id: "display", label: transDisplays}
86
 
                        ] %}
87
 
                        {{ forms.dropdown("displayGroupIds[]", "dropdownmulti", title, displayGroupIds, {group: displayGroups, display: displays}, "displayGroupId", "displayGroup", helpText, "", "", "", "", attributes, optionGroups) }}
88
 
 
89
 
                    </div>
90
 
                </div>
91
 
            </form>
92
 
        </div>
93
 
    </div>
94
 
{% endblock %}
 
 
b'\\ No newline at end of file'