~xibo-maintainers/xibo/tempel

« back to all changes in this revision

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

  • Committer: Dan Garner
  • Date: 2016-02-18 16:07:16 UTC
  • mfrom: (454.4.137)
  • Revision ID: git-v1:8867f12675bc9e0e67e7e622c80da7471b9f294a
Merge pull request #139 from dasgarner/feature/nested-display-groups

Feature/nested display groups

Show diffs side-by-side

added added

removed removed

Lines of Context:
10
10
{% import "forms.twig" as forms %}
11
11
 
12
12
{% block formTitle %}
13
 
    {% trans "Weather" %}
 
13
    {% trans "Forecast IO" %}
14
14
{% endblock %}
15
15
 
16
16
{% block formButtons %}
17
 
    {% if currentUser.isSuperAdmin() and settings.SERVER_MODE == "Test" %}
18
 
        {% trans "Export Template" %}, requestTab("forecast"| "{{ urlFor("module.widget.tab.form", {tab: "exporttemplate", id: module.widget.widgetId}) }}")
19
 
    {% endif %}
20
17
    {% trans "Get Forecast" %}, requestTab("forecast"| "{{ urlFor("module.widget.tab.form", {tab: "forecast", id: module.widget.widgetId}) }}")
21
18
    {% trans "Cancel" %}, XiboDialogClose()
22
19
    {% trans "Save" %}, $("#forecastEditForm").submit()
60
57
    ".locationControls": { "display": "none" }
61
58
    }
62
59
    },{
 
60
    "field": "templateId",
 
61
    "trigger": "init",
 
62
    "value": "picture",
 
63
    "operation": "equals",
 
64
    "actions": {
 
65
    ".icon-controls": { "display": "block" }
 
66
    }
 
67
    },{
 
68
    "field": "templateId",
 
69
    "trigger": "change",
 
70
    "value": "picture",
 
71
    "operation": "equals",
 
72
    "actions": {
 
73
    ".icon-controls": { "display": "block" }
 
74
    }
 
75
    },{
 
76
    "field": "templateId",
 
77
    "trigger": "init",
 
78
    "value": "picture",
 
79
    "operation": "not",
 
80
    "actions": {
 
81
    ".icon-controls": { "display": "none" }
 
82
    }
 
83
    },{
 
84
    "field": "templateId",
 
85
    "trigger": "change",
 
86
    "value": "picture",
 
87
    "operation": "not",
 
88
    "actions": {
 
89
    ".icon-controls": { "display": "none" }
 
90
    }
 
91
    },{
63
92
    "field": "overrideTemplate",
64
93
    "trigger": "init",
65
94
    "value": false,
139
168
        <div class="col-md-12">
140
169
            <ul class="nav nav-tabs" role="tablist">
141
170
                <li class="active"><a href="#general" role="tab" data-toggle="tab"><span>{% trans "General" %}</span></a></li>
142
 
                <li><a href="#appearance" role="tab" data-toggle="tab"><span>{% trans "Appearance" %}</span></a></li>
143
 
                <li><a href="#advanced" role="tab" data-toggle="tab"><span>{% trans "Advanced" %}</span></a></li>
 
171
                <li><a href="#advanced" role="tab" data-toggle="tab"><span>{% trans "Appearance" %}</span></a></li>
144
172
                <li><a href="#forecast" role="tab" data-toggle="tab"><span>{% trans "Forecast" %}</span></a></li>
145
173
            </ul>
146
174
            <form id="forecastEditForm" class="XiboForm form-horizontal" method="put" action="{{ urlFor("module.widget.edit", {id: module.widget.widgetId}) }}">
163
191
                        {{ forms.checkbox("useDisplayLocation", title, module.getOption("useDisplayLocation"), helpText) }}
164
192
 
165
193
                        {% set title %}{% trans "Latitude" %}{% endset %}
166
 
                        {% set helpText %}{% trans "The Latitude for this widget" %}{% endset %}
 
194
                        {% set helpText %}{% trans "The Latitude for this weather module" %}{% endset %}
167
195
                        {{ forms.number("latitude", title, module.getOption("latitude"), helpText, "locationControls") }}
168
196
 
169
197
                        {% set title %}{% trans "Longitude" %}{% endset %}
170
 
                        {% set helpText %}{% trans "The Longitude for this widget" %}{% endset %}
 
198
                        {% set helpText %}{% trans "The Longitude for this weather module" %}{% endset %}
171
199
                        {{ forms.number("longitude", title, module.getOption("longitude"), helpText, "locationControls") }}
 
200
 
 
201
                        {% set title %}{% trans "Colour" %}{% endset %}
 
202
                        {% set helpText %}{% trans "Please select a colour for the foreground text." %}{% endset %}
 
203
                        {{ forms.input("color", title, module.getOption("color"), helpText, "", "required") }}
172
204
                    </div>
173
205
 
174
 
                    <div class="tab-pane" id="appearance">
 
206
                    <div class="tab-pane" id="advanced">
175
207
 
176
208
                        {% set title %}{% trans "Weather Template" %}{% endset %}
177
209
                        {% set helpText %}{% trans "Select the template you would like to apply. This can be overridden using the check box below." %}{% endset %}
178
 
                        {{ forms.dropdown("templateId", "single", title, module.getOption("templateId"), module.templatesAvailable(), "id", "value", helpText, "template-selector-control selectPicker selectPickerWithImage", null, null, null, null, null, baseUrl, "image") }}
 
210
                        {{ forms.dropdown("templateId", "single", title, module.getOption("templateId"), module.templatesAvailable(), "id", "value", helpText, "template-selector-control") }}
 
211
 
 
212
                        {% set title %}{% trans "Icons" %}{% endset %}
 
213
                        {% set helpText %}{% trans "Select the icon set you would like to use." %}{% endset %}
 
214
                        {{ forms.dropdown("icons", "single", title, module.getOption("icons"), module.iconsAvailable(), "id", "value", helpText, "icon-controls") }}
 
215
 
 
216
                        {% set title %}{% trans "Size" %}{% endset %}
 
217
                        {% set helpText %}{% trans "Set the size. Start at 1 and work up until the widget fits your region appropriately." %}{% endset %}
 
218
                        {{ forms.number("size", title, module.getOption("size"), helpText, "template-selector-control", "number") }}
 
219
 
 
220
                        {% set title %}{% trans "Units" %}{% endset %}
 
221
                        {% set helpText %}{% trans "Select the units you would like to use." %}{% endset %}
 
222
                        {{ forms.dropdown("units", "single", title, module.getOption("units"), module.unitsAvailable(), "id", "value", helpText) }}
 
223
 
 
224
                        {% set title %}{% trans "Language" %}{% endset %}
 
225
                        {% set helpText %}{% trans "Select the language you would like to use." %}{% endset %}
 
226
                        {{ forms.dropdown("lang", "single", title, module.getOption("lang"), module.supportedLanguages(), "id", "value", helpText) }}
 
227
 
 
228
                        {% set title %}{% trans "Update Interval (mins)" %}{% endset %}
 
229
                        {% set helpText %}{% trans "Please enter the update interval in minutes. This should be kept as high as possible. For example, if the data will only change once per hour this could be set to 60." %}{% endset %}
 
230
                        {{ forms.number("updateInterval", title, module.getOption("updateInterval", 60), helpText, "", "required") }}
 
231
 
 
232
                        {% set title %}{% trans "Only show Daytime weather conditions" %}{% endset %}
 
233
                        {% set helpText %}{% trans "Tick if you would like to only show the Daytime weather conditions." %}{% endset %}
 
234
                        {{ forms.checkbox("dayConditionsOnly", title, module.getOption("dayConditionsOnly"), helpText) }}
179
235
 
180
236
                        {% set title %}{% trans "Override the template?" %}{% endset %}
181
237
                        {% set helpText %}{% trans "Tick if you would like to override the template." %}{% endset %}
182
238
                        {{ forms.checkbox("overrideTemplate", title, module.getOption("overrideTemplate"), helpText) }}
183
239
 
184
 
                        {% set title %}{% trans "Original Width" %}{% endset %}
185
 
                        {% set helpText %}{% trans "This is the intended width of the template and is used to scale the Widget within its region when the template is applied." %}{% endset %}
186
 
                        {{ forms.number("widgetOriginalWidth", title, module.getOption("widgetOriginalWidth", undefined), helpText, "template-override-controls", "", "number") }}
187
 
 
188
 
                        {% set title %}{% trans "Original Height" %}{% endset %}
189
 
                        {% set helpText %}{% trans "This is the intended height of the template and is used to scale the Widget within its region when the template is applied." %}{% endset %}
190
 
                        {{ forms.number("widgetOriginalHeight", title, module.getOption("widgetOriginalHeight", undefined), helpText, "template-override-controls", "", "number") }}
191
 
 
192
240
                        {% set title %}{% trans "Template for Current Forecast" %}{% endset %}
193
241
                        {% set helpText %}{% trans "Enter the template for the current forecast. For a list of substitutions click Request Forecast below." %}{% endset %}
194
242
                        {{ forms.textarea("currentTemplate", title, module.getOption("currentTemplate"), helpText, "template-override-controls", "required", 10) }}
201
249
                        {% set helpText %}{% trans "Enter a CSS style sheet to style the weather widget" %}{% endset %}
202
250
                        {{ forms.textarea("styleSheet", title, module.getOption("styleSheet"), helpText, "template-override-controls", "required", 10) }}
203
251
                    </div>
204
 
                    <div class="tab-pane" id="advanced">
205
 
 
206
 
                        {% set title %}{% trans "Units" %}{% endset %}
207
 
                        {% set helpText %}{% trans "Select the units you would like to use." %}{% endset %}
208
 
                        {{ forms.dropdown("units", "single", title, module.getOption("units"), module.unitsAvailable(), "id", "value", helpText) }}
209
 
 
210
 
                        {% set title %}{% trans "Language" %}{% endset %}
211
 
                        {% set helpText %}{% trans "Select the language you would like to use." %}{% endset %}
212
 
                        {{ forms.dropdown("lang", "single", title, module.getOption("lang"), module.supportedLanguages(), "id", "value", helpText) }}
213
 
 
214
 
                        {% set title %}{% trans "Update Interval (mins)" %}{% endset %}
215
 
                        {% set helpText %}{% trans "Please enter the update interval in minutes. This should be kept as high as possible. For example, if the data will only change once per hour this could be set to 60." %}{% endset %}
216
 
                        {{ forms.number("updateInterval", title, module.getOption("updateInterval", 60), helpText, "", "required") }}
217
 
 
218
 
                        {% set title %}{% trans "Only show Daytime weather conditions" %}{% endset %}
219
 
                        {% set helpText %}{% trans "Tick if you would like to only show the Daytime weather conditions." %}{% endset %}
220
 
                        {{ forms.checkbox("dayConditionsOnly", title, module.getOption("dayConditionsOnly"), helpText) }}
221
 
 
222
 
                        {% set title %}{% trans "Optional JavaScript" %}{% endset %}
223
 
                        {{ forms.textarea("javaScript", "", module.getRawNode("javaScript"), title, "", "", 10) }}
224
 
 
225
 
                    </div>
226
252
                    <div class="tab-pane" id="forecast">
227
253
                        {% set message %}{% trans "Please press Request Forecast" %}{% endset %}
228
254
                        {{ forms.message(message) }}