~xibo-maintainers/xibo/tempel

« back to all changes in this revision

Viewing changes to modules/pdf-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) 2015 Spring Signage Ltd
5
 
 * (${FILE_NAME})
6
 
 */
7
 
#}
8
 
 
9
 
{% extends "form-base.twig" %}
10
 
{% import "forms.twig" as forms %}
11
 
 
12
 
{% block formTitle %}
13
 
    {% trans "Edit PDF" %}
14
 
{% endblock %}
15
 
 
16
 
{% block formButtons %}
17
 
    {% trans "Cancel" %}, XiboDialogClose()
18
 
    {% trans "Save" %}, $("#audioEditForm").submit()
19
 
{% endblock %}
20
 
 
21
 
{% block formFieldActions %}
22
 
    [{
23
 
    "field": "duration",
24
 
    "trigger": "init",
25
 
    "value": "0",
26
 
    "operation": "equals",
27
 
    "actions": {
28
 
    ".loop-fields": { "display": "none" }
29
 
    }
30
 
    },{
31
 
    "field": "duration",
32
 
    "trigger": "change",
33
 
    "value": "0",
34
 
    "operation": "equals",
35
 
    "actions": {
36
 
    ".loop-fields": { "display": "none" }
37
 
    }
38
 
    },{
39
 
    "field": "duration",
40
 
    "trigger": "init",
41
 
    "value": "0",
42
 
    "operation": "not",
43
 
    "actions": {
44
 
    ".loop-fields": { "display": "block" }
45
 
    }
46
 
    },{
47
 
    "field": "duration",
48
 
    "trigger": "change",
49
 
    "value": "0",
50
 
    "operation": "not",
51
 
    "actions": {
52
 
    ".loop-fields": { "display": "block" }
53
 
    }
54
 
    },{
55
 
    "field": "useDuration",
56
 
    "trigger": "init",
57
 
    "value": false,
58
 
    "operation": "is:checked",
59
 
    "actions": {
60
 
    ".duration-fields": { "display": "none" },
61
 
    ".loop-fields": { "display": "none" }
62
 
    }
63
 
    },{
64
 
    "field": "useDuration",
65
 
    "trigger": "change",
66
 
    "value": false,
67
 
    "operation": "is:checked",
68
 
    "actions": {
69
 
    ".duration-fields": { "display": "none" },
70
 
    ".loop-fields": { "display": "none" }
71
 
    }
72
 
    },{
73
 
    "field": "useDuration",
74
 
    "trigger": "init",
75
 
    "value": true,
76
 
    "operation": "is:checked",
77
 
    "actions": {
78
 
    ".duration-fields": { "display": "block" },
79
 
    ".loop-fields": { "display": "block" }
80
 
    }
81
 
    },{
82
 
    "field": "useDuration",
83
 
    "trigger": "change",
84
 
    "value": true,
85
 
    "operation": "is:checked",
86
 
    "actions": {
87
 
    ".duration-fields": { "display": "block" },
88
 
    ".loop-fields": { "display": "block" }
89
 
    }
90
 
    }]
91
 
{% endblock %}
92
 
 
93
 
{% block callBack %}mediaEditFormOpen{% endblock %}
94
 
 
95
 
{% block formHtml %}
96
 
    <div class="row">
97
 
        <div class="col-md-12">
98
 
            <form id="audioEditForm" class="XiboForm form-horizontal" method="put" action="{{ urlFor("module.widget.edit", {id: module.widget.widgetId}) }}" data-widget-id="{{ module.widget.widgetId }}" data-media-id="{{ module.getMediaId() }}" data-media-editable="{{ currentUser.checkEditable(module.getMedia()) }}" data-valid-extensions="{{ validExtensions }}">
99
 
                {% set title %}{% trans "Name" %}{% endset %}
100
 
                {% set helpText %}{% trans "An optional name for this widget" %}{% endset %}
101
 
                {{ forms.input("name", title, module.getOption("name"), helpText) }}
102
 
 
103
 
                {% set title %}{% trans "Set a duration?" %}{% endset %}
104
 
                {% set helpText %}{% trans "Select to provide a specific duration for this Widget" %}{% endset %}
105
 
                {{ forms.checkbox("useDuration", title, module.getUseDuration(), helpText) }}
106
 
 
107
 
                {% set title %}{% trans "Duration" %}{% endset %}
108
 
                {% set helpText %}{% trans "The duration in seconds this should be displayed" %}{% endset %}
109
 
                {{ forms.number("duration", title, module.getDuration(), helpText, "duration-fields", "required") }}
110
 
 
111
 
            </form>
112
 
        </div>
113
 
    </div>
114
 
{% endblock %}
 
 
b'\\ No newline at end of file'