~xibo-maintainers/xibo/tempel

« back to all changes in this revision

Viewing changes to modules/clock-form-edit.twig

  • Committer: Dan Garner
  • Date: 2015-08-11 09:29:02 UTC
  • mto: This revision was merged to the branch mainline in revision 453.
  • Revision ID: git-v1:a86fb4369b7395c13367577d23b14c0ab4528c1a
Transitions fixes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
{#
2
2
/*
3
 
 * Xibo - Digital Signage - http://www.xibo.org.uk
4
 
 * Copyright (C) 2012-2016 Spring Signage Ltd - http://www.springsignage.com
5
 
 *
6
 
 * This file is part of Xibo.
7
 
 *
8
 
 * Xibo is free software: you can redistribute it and/or modify
9
 
 * it under the terms of the GNU Affero General Public License as published by
10
 
 * the Free Software Foundation, either version 3 of the License, or
11
 
 * any later version.
12
 
 *
13
 
 * Xibo is distributed in the hope that it will be useful,
14
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
 
 * GNU Affero General Public License for more details.
17
 
 *
18
 
 * You should have received a copy of the GNU Affero General Public License
19
 
 * along with Xibo.  If not, see <http://www.gnu.org/licenses/>.
 
3
 * Spring Signage Ltd - http://www.springsignage.com
 
4
 * Copyright (C) 2015 Spring Signage Ltd
 
5
 * (${FILE_NAME})
20
6
 */
21
7
#}
22
8
 
42
28
        "actions": {
43
29
            ".analogue-control-group": { "display": "block" },
44
30
            ".digital-control-group": { "display": "none" },
45
 
            ".flip-control-group": { "display": "none" }
 
31
            ".flip-control-group": { "display": "none" },
 
32
            ".offset-control-group": { "display": "block" }
46
33
        }
47
34
    },{
48
35
        "field": "clockTypeId",
52
39
        "actions": {
53
40
            ".analogue-control-group": { "display": "block" },
54
41
            ".digital-control-group": { "display": "none" },
55
 
            ".flip-control-group": { "display": "none" }
56
 
        }
57
 
    },{
58
 
        "field": "clockTypeId",
59
 
        "trigger": "init",
60
 
        "value": 2,
61
 
        "operation": "equals",
62
 
        "actions": {
63
 
            ".analogue-control-group": { "display": "none" },
64
 
            ".digital-control-group": { "display": "block" },
65
 
            ".flip-control-group": { "display": "none" }
66
 
        }
67
 
    },{
68
 
        "field": "clockTypeId",
69
 
        "trigger": "change",
70
 
        "value": 2,
71
 
        "operation": "equals",
72
 
        "actions": {
73
 
            ".analogue-control-group": { "display": "none" },
74
 
            ".digital-control-group": { "display": "block" },
75
 
            ".flip-control-group": { "display": "none" }
76
 
        }
77
 
    },{
78
 
        "field": "clockTypeId",
79
 
        "trigger": "init",
80
 
        "value": 3,
81
 
        "operation": "equals",
82
 
        "actions": {
83
 
            ".analogue-control-group": { "display": "none" },
84
 
            ".digital-control-group": { "display": "none" },
85
 
            ".flip-control-group": { "display": "block" }
86
 
        }
87
 
    },{
88
 
        "field": "clockTypeId",
89
 
        "trigger": "change",
90
 
        "value": 3,
91
 
        "operation": "equals",
92
 
        "actions": {
93
 
            ".analogue-control-group": { "display": "none" },
94
 
            ".digital-control-group": { "display": "none" },
95
 
            ".flip-control-group": { "display": "block" }
96
 
        }
97
 
    },{
98
 
        "field": "useDuration",
99
 
        "trigger": "init",
100
 
        "value": false,
101
 
        "operation": "is:checked",
102
 
        "actions": {
103
 
        ".duration-fields": { "display": "none" }
104
 
        }
105
 
        },{
106
 
        "field": "useDuration",
107
 
        "trigger": "change",
108
 
        "value": false,
109
 
        "operation": "is:checked",
110
 
        "actions": {
111
 
        ".duration-fields": { "display": "none" }
112
 
        }
113
 
        },{
114
 
        "field": "useDuration",
115
 
        "trigger": "init",
116
 
        "value": true,
117
 
        "operation": "is:checked",
118
 
        "actions": {
119
 
        ".duration-fields": { "display": "block" }
120
 
        }
121
 
        },{
122
 
        "field": "useDuration",
123
 
        "trigger": "change",
124
 
        "value": true,
125
 
        "operation": "is:checked",
126
 
        "actions": {
127
 
        ".duration-fields": { "display": "block" }
 
42
            ".flip-control-group": { "display": "none" },
 
43
            ".offset-control-group": { "display": "block" }
 
44
        }
 
45
    },{
 
46
        "field": "clockTypeId",
 
47
        "trigger": "init",
 
48
        "value": 2,
 
49
        "operation": "equals",
 
50
        "actions": {
 
51
            ".analogue-control-group": { "display": "none" },
 
52
            ".digital-control-group": { "display": "block" },
 
53
            ".flip-control-group": { "display": "none" },
 
54
            ".offset-control-group": { "display": "block" }
 
55
        }
 
56
    },{
 
57
        "field": "clockTypeId",
 
58
        "trigger": "change",
 
59
        "value": 2,
 
60
        "operation": "equals",
 
61
        "actions": {
 
62
            ".analogue-control-group": { "display": "none" },
 
63
            ".digital-control-group": { "display": "block" },
 
64
            ".flip-control-group": { "display": "none" },
 
65
            ".offset-control-group": { "display": "block" }
 
66
        }
 
67
    },{
 
68
        "field": "clockTypeId",
 
69
        "trigger": "init",
 
70
        "value": 3,
 
71
        "operation": "equals",
 
72
        "actions": {
 
73
            ".analogue-control-group": { "display": "none" },
 
74
            ".digital-control-group": { "display": "none" },
 
75
            ".flip-control-group": { "display": "block" },
 
76
            ".offset-control-group": { "display": "none" }
 
77
        }
 
78
    },{
 
79
        "field": "clockTypeId",
 
80
        "trigger": "change",
 
81
        "value": 3,
 
82
        "operation": "equals",
 
83
        "actions": {
 
84
            ".analogue-control-group": { "display": "none" },
 
85
            ".digital-control-group": { "display": "none" },
 
86
            ".flip-control-group": { "display": "block" },
 
87
            ".offset-control-group": { "display": "none" }
128
88
        }
129
89
    }]
130
90
{% endblock %}
136
96
        <div class="col-md-12">
137
97
            <form id="clockFormEdit" class="XiboForm form-horizontal" method="put" action="{{ urlFor("module.widget.edit", {id: module.widget.widgetId}) }}">
138
98
 
139
 
                {% set title %}{% trans "Name" %}{% endset %}
140
 
                {% set helpText %}{% trans "An optional name for this widget" %}{% endset %}
141
 
                {{ forms.input("name", title, "", helpText) }}
142
 
 
143
 
                {% set title %}{% trans "Set a duration?" %}{% endset %}
144
 
                {% set helpText %}{% trans "Select to provide a specific duration for this Widget" %}{% endset %}
145
 
                {{ forms.checkbox("useDuration", title, module.getUseDuration(), helpText) }}
146
 
 
147
 
                {% set title %}{% trans "Duration" %}{% endset %}
148
 
                {% set helpText %}{% trans "The duration in seconds this should be displayed" %}{% endset %}
149
 
                {{ forms.number("duration", title, module.getDuration(), helpText, "duration-fields", "required") }}
150
 
 
151
99
                {% set title %}{% trans "Clock Type" %}{% endset %}
152
100
                {% set helpText %}{% trans "Please select the type of clock to display." %}{% endset %}
153
101
                {% set analog %}{% trans "Analog" %}{% endset %}
160
108
                ] %}
161
109
                {{ forms.dropdown("clockTypeId", "single", title, module.getOption("clockTypeId"), options, "id", "value", helpText) }}
162
110
 
163
 
                {% set title %}{% trans "Clock Face" %}{% endset %}
164
 
                {% set helpText %}{% trans "Please select a clock face." %}{% endset %}
165
 
                {{ forms.dropdown("clockFace", "single", title, module.getOption("clockFace", "TwentyFourHourClock"), module.clockFaces(), "id", "value", helpText, "flip-control-group") }}
 
111
                {% set title %}{% trans "Duration" %}{% endset %}
 
112
                {% set helpText %}{% trans "The duration in seconds this should be displayed" %}{% endset %}
 
113
                {{ forms.number("duration", title, module.getDuration(), helpText, "", "required") }}
166
114
 
167
115
                {% set title %}{% trans "Offset" %}{% endset %}
168
 
                {% set helpText %}{% trans "The offset in minutes that should be applied to the current time, or if a counter then date/time to run from in the format Y-m-d H:i:s." %}{% endset %}
169
 
                {{ forms.input("offset", title, module.getOption("offset"), helpText) }}
170
 
 
171
 
                {% set title %}{% trans "Show Seconds?" %}{% endset %}
172
 
                {% set helpText %}{% trans "Should the clock show seconds or not?" %}{% endset %}
173
 
                {{ forms.checkbox("showSeconds", title, module.getOption("showSeconds", 1), helpText, "flip-control-group") }}
 
116
                {% set helpText %}{% trans "The offset in minutes that should be applied to the current time." %}{% endset %}
 
117
                {{ forms.number("offset", title, module.getOption("offset"), helpText, "", "", "offset-control-group") }}
174
118
 
175
119
                {% set title %}{% trans "Theme" %}{% endset %}
176
120
                {% set helpText %}{% trans "Please select a theme for the clock." %}{% endset %}