~xibo-maintainers/xibo/tempel

« back to all changes in this revision

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

  • Committer: Dan Garner
  • Date: 2016-09-05 09:24:54 UTC
  • mto: This revision was merged to the branch mainline in revision 532.
  • Revision ID: git-v1:77103204f31838a57f591ebdebf5e79b2375a66e
Working daypart add/edit/delete forms.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
{% endblock %}
28
28
 
29
29
{% block formButtons %}
30
 
    {% trans "Help" %}, XiboHelpRender("{{ help }}")
31
30
    {% trans "Cancel" %}, XiboDialogClose()
32
31
    {% trans "Save" %}, $("#dayPartEditForm").submit()
33
32
{% endblock %}
34
33
 
 
34
{% block extra %}{{ extra|json_encode|raw }}{% endblock %}
 
35
 
 
36
{% block callBack %}dayPartFormOpen{% endblock %}
 
37
 
35
38
{% block formHtml %}
36
39
    <div class="row">
37
40
        <div class="col-md-12">
 
41
            <ul class="nav nav-tabs" role="tablist">
 
42
                <li class="active"><a href="#general" role="tab" data-toggle="tab"><span>{% trans "General" %}</span></a></li>
 
43
                <li><a href="#description" role="tab" data-toggle="tab"><span>{% trans "Description" %}</span></a></li>
 
44
                <li><a href="#exceptions" role="tab" data-toggle="tab"><span>{% trans "Exceptions" %}</span></a></li>
 
45
            </ul>
38
46
            <form id="dayPartEditForm" class="XiboForm form-horizontal" method="put" action="{{ urlFor("daypart.edit", {id: dayPart.dayPartId}) }}">
39
 
 
40
 
                {% set title %}{% trans "Name" %}{% endset %}
41
 
                {% set helpText %}{% trans "The Name for this Daypart" %}{% endset %}
42
 
                {{ forms.input("dayPart", title, dayPart.name, helpText, "", "required") }}
43
 
 
44
 
                {% set title %}{% trans "Description" %}{% endset %}
45
 
                {% set helpText %}{% trans "A Description of Daypart" %}{% endset %}
46
 
                {{ forms.textarea("description", title, dayPart.description, helpText) }}
47
 
 
48
 
                {% set title %}{% trans "Retired" %}{% endset %}
49
 
                {% set helpText %}{% trans "Retire? It will no longer be visible when scheduling" %}{% endset %}
50
 
                {{ forms.checkbox("retired", title, dayPart.isRetired, helpText) }}
51
 
 
52
 
                {% set title %}{% trans "Monday start time" %}{% endset %}
53
 
                {{ forms.time("monStart", title, dayPart.monStart) }}
54
 
 
 
47
                <div class="tab-content">
 
48
                    <div class="tab-pane active" id="general">
 
49
                        {% set title %}{% trans "Name" %}{% endset %}
 
50
                        {% set helpText %}{% trans "The Name for this Daypart" %}{% endset %}
 
51
                        {{ forms.input("name", title, dayPart.name, helpText, "", "required") }}
 
52
 
 
53
                        {% set title %}{% trans "Retired" %}{% endset %}
 
54
                        {% set helpText %}{% trans "Retire? It will no longer be visible when scheduling" %}{% endset %}
 
55
                        {{ forms.checkbox("retired", title, dayPart.isRetired, helpText) }}
 
56
 
 
57
                        {% set title %}{% trans "Start Time" %}{% endset %}
 
58
                        {% set helpText %}{% trans "Enter the start time for this daypart" %}{% endset %}
 
59
                        {{ forms.time("startTime", title, dayPart.startTime, helpText) }}
 
60
 
 
61
                        {% set title %}{% trans "End Time" %}{% endset %}
 
62
                        {% set helpText %}{% trans "Enter the end time for this daypart. If the end time is after the start time, then the daypart will cross midnight." %}{% endset %}
 
63
                        {{ forms.time("endTime", title, dayPart.endTime, helpText) }}
 
64
 
 
65
                    </div>
 
66
                    <div class="tab-pane" id="description">
 
67
                        {% set title %}{% trans "Description" %}{% endset %}
 
68
                        {% set helpText %}{% trans "A Description of Daypart" %}{% endset %}
 
69
                        {{ forms.textarea("description", title, dayPart.description, helpText) }}
 
70
                    </div>
 
71
                    <div class="tab-pane" id="exceptions">
 
72
                        {% set title %}{% trans "If there are any exceptions enter them below by selecting the Day from the list and entering a start/end time." %}{% endset %}
 
73
                        {{ forms.message(title) }}
 
74
                        <div id="dayPartExceptions">
 
75
 
 
76
                        </div>
 
77
                    </div>
 
78
                </div>
55
79
            </form>
56
80
        </div>
57
81
    </div>