3
* Spring Signage Ltd - http://www.springsignage.com
4
* Copyright (C) 2015 Spring Signage Ltd
9
{% extends "form-base.twig" %}
10
{% import "forms.twig" as forms %}
13
{% trans "Google Traffic" %}
16
{% block formButtons %}
17
{% trans "Cancel" %}, XiboDialogClose()
18
{% trans "Save" %}, $("#googleTrafficForm").submit()
21
{% block callBack %}forecastIoFormSetup{% endblock %}
23
{% block extra %}{{ module.templatesAvailable()|json_encode|raw }}{% endblock %}
25
{% block formFieldActions %}
27
"field": "useDisplayLocation",
30
"operation": "is:checked",
32
".locationControls": { "display": "block" }
35
"field": "useDisplayLocation",
38
"operation": "is:checked",
40
".locationControls": { "display": "block" }
43
"field": "useDisplayLocation",
46
"operation": "is:checked",
48
".locationControls": { "display": "none" }
51
"field": "useDisplayLocation",
54
"operation": "is:checked",
56
".locationControls": { "display": "none" }
59
"field": "useDuration",
62
"operation": "is:checked",
64
".duration-fields": { "display": "none" }
67
"field": "useDuration",
70
"operation": "is:checked",
72
".duration-fields": { "display": "none" }
75
"field": "useDuration",
78
"operation": "is:checked",
80
".duration-fields": { "display": "block" }
83
"field": "useDuration",
86
"operation": "is:checked",
88
".duration-fields": { "display": "block" }
95
<div class="col-md-12">
96
<form id="googleTrafficForm" class="XiboForm form-horizontal" method="put" action="{{ urlFor("module.widget.edit", {id: module.widget.widgetId}) }}">
97
{% set title %}{% trans "Name" %}{% endset %}
98
{% set helpText %}{% trans "An optional name for this widget" %}{% endset %}
99
{{ forms.input("name", title, module.getOption("name"), helpText) }}
101
{% set title %}{% trans "Set a duration?" %}{% endset %}
102
{% set helpText %}{% trans "Select to provide a specific duration for this Widget" %}{% endset %}
103
{{ forms.checkbox("useDuration", title, module.getUseDuration(), helpText) }}
105
{% set title %}{% trans "Duration" %}{% endset %}
106
{% set helpText %}{% trans "The duration in seconds this item should be displayed." %}{% endset %}
107
{{ forms.number("duration", title, module.getDuration(), helpText, "duration-fields", "required") }}
109
{% set title %}{% trans "Use the Display Location" %}{% endset %}
110
{% set helpText %}{% trans "Use the location configured on the display" %}{% endset %}
111
{{ forms.checkbox("useDisplayLocation", title, module.getOption("useDisplayLocation"), helpText) }}
113
{% set title %}{% trans "Latitude" %}{% endset %}
114
{% set helpText %}{% trans "The Latitude for this widget" %}{% endset %}
115
{{ forms.number("latitude", title, module.getOption("latitude"), helpText, "locationControls") }}
117
{% set title %}{% trans "Longitude" %}{% endset %}
118
{% set helpText %}{% trans "The Longitude for this widget" %}{% endset %}
119
{{ forms.number("longitude", title, module.getOption("longitude"), helpText, "locationControls") }}
121
{% set title %}{% trans "Zoom" %}{% endset %}
122
{% set helpText %}{% trans "How far should the map be zoomed in? The higher the number the closer, 1 represents the entire globe." %}{% endset %}
123
{{ forms.number("zoom", title, module.getOption("zoom"), helpText) }}
125
{% set message %}{% trans "This module is rendered on the Player which means the Player must have an internet connection." %}{% endset %}
126
{{ forms.message(message, "alert alert-info") }}
128
{% if module.getSetting("apiKey") == "" %}
129
{% set message %}{% trans "The Traffic Widget has not been configured yet, please ask your CMS Administrator to look at it for you." %}{% endset %}
130
{{ forms.message(message, "alert alert-danger") }}
b'\\ No newline at end of file'