View | Details | Raw Unified | Return to bug 42096
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/clubs-add-modify.tt (-27 / +51 lines)
Lines 50-56 Link Here
50
        <input type="hidden" name="id" value="[% club.id | html %]" />
50
        <input type="hidden" name="id" value="[% club.id | html %]" />
51
        <input type="hidden" name="club_template_id" value="[% club_template.id | html %]" />
51
        <input type="hidden" name="club_template_id" value="[% club_template.id | html %]" />
52
52
53
        <fieldset class="rows">
53
        <fieldset class="fg">
54
            <legend>
54
            <legend>
55
                <h1>
55
                <h1>
56
                    [% IF club %]
56
                    [% IF club %]
Lines 61-103 Link Here
61
                </h1>
61
                </h1>
62
            </legend>
62
            </legend>
63
63
64
            <ol>
64
            <div class="fg-row">
65
                <li>
65
                <div class="fg-label">
66
                    <label class="required" for="club-name">Name:</label>
66
                    <label class="required" for="club-name">Name:</label>
67
                </div>
68
                <div class="fg-input">
67
                    <input id="club-name" name="name" type="text" value="[% club.name | html %]" required="required" />
69
                    <input id="club-name" name="name" type="text" value="[% club.name | html %]" required="required" />
68
                    <span class="required">Required</span>
70
                </div>
69
                </li>
71
                <div class="required">Required</div>
72
            </div>
70
73
71
                <li>
74
            <div class="fg-row">
75
                <div class="fg-label">
72
                    <label for="club-template-name">Description:</label>
76
                    <label for="club-template-name">Description:</label>
77
                </div>
78
                <div class="fg-input">
73
                    <input id="club-template-name" name="description" type="text" value="[% club.description | html %]" size="40" />
79
                    <input id="club-template-name" name="description" type="text" value="[% club.description | html %]" size="40" />
74
                </li>
80
                </div>
81
            </div>
75
82
76
                <li>
83
            <div class="fg-row">
84
                <div class="fg-label">
77
                    <label for="from">Enrollment start date:</label>
85
                    <label for="from">Enrollment start date:</label>
86
                </div>
87
                <div class="fg-input">
78
                    <input name="date_start" id="from" size="10" class="flatpickr" data-date_to="to" value="[% club.date_start | html %]" />
88
                    <input name="date_start" id="from" size="10" class="flatpickr" data-date_to="to" value="[% club.date_start | html %]" />
79
                </li>
89
                </div>
90
            </div>
80
91
81
                <li>
92
            <div class="fg-row">
93
                <div class="fg-label">
82
                    <label for="to">Enrollment end date:</label>
94
                    <label for="to">Enrollment end date:</label>
95
                </div>
96
                <div class="fg-input">
83
                    <input name="date_end" id="to" size="10" class="flatpickr" value="[% club.date_end | html %]" />
97
                    <input name="date_end" id="to" size="10" class="flatpickr" value="[% club.date_end | html %]" />
84
                </li>
98
                </div>
99
            </div>
85
100
86
                <li>
101
            <div class="fg-row">
102
                <div class="fg-label">
87
                    <label for="club-template-branchcode">Library:</label>
103
                    <label for="club-template-branchcode">Library:</label>
104
                </div>
105
                <div class="fg-input">
88
                    <select name="branchcode" id="club-template-branchcode">
106
                    <select name="branchcode" id="club-template-branchcode">
89
                        <option value=""></option>
107
                        <option value="">None</option>
90
                        [% PROCESS options_for_libraries libraries => Branches.all( selected => club.branch.branchcode ) %]
108
                        [% PROCESS options_for_libraries libraries => Branches.all( selected => club.branch.branchcode ) %]
91
                    </select>
109
                    </select>
92
                </li>
110
                </div>
111
            </div>
93
112
94
                [% IF club %]
113
            [% IF club %]
95
                    [% FOREACH f IN club.club_fields %]
114
                [% FOREACH f IN club.club_fields %]
96
                        <li>
115
                    <div class="fg-row">
116
                        <div class="fg-label">
97
                            <input type="hidden" name="club_template_field_id" value="[% f.club_template_field.id | html %]" />
117
                            <input type="hidden" name="club_template_field_id" value="[% f.club_template_field.id | html %]" />
98
                            <input type="hidden" name="club_field_id" value="[% f.id | html %]" />
118
                            <input type="hidden" name="club_field_id" value="[% f.id | html %]" />
99
100
                            <label for="club_field_[% f.club_template_field_id | html %]">[% f.club_template_field.name | html %]</label>
119
                            <label for="club_field_[% f.club_template_field_id | html %]">[% f.club_template_field.name | html %]</label>
120
                        </div>
121
                        <div class="fg-input">
101
                            [% IF f.club_template_field.authorised_value_category %]
122
                            [% IF f.club_template_field.authorised_value_category %]
102
                                <select name="club_field" id="club_field_[% f.club_template_field_id | html %]">
123
                                <select name="club_field" id="club_field_[% f.club_template_field_id | html %]">
103
                                    [% FOREACH a IN AuthorisedValues.Get( f.club_template_field.authorised_value_category ) %]
124
                                    [% FOREACH a IN AuthorisedValues.Get( f.club_template_field.authorised_value_category ) %]
Lines 111-124 Link Here
111
                            [% ELSE %]
132
                            [% ELSE %]
112
                                <input type="text" name="club_field" id="club_field_[% f.club_template_field_id | html %]" value="[% f.value | html %]" size="40" />
133
                                <input type="text" name="club_field" id="club_field_[% f.club_template_field_id | html %]" value="[% f.value | html %]" size="40" />
113
                            [% END %]
134
                            [% END %]
114
                        </li>
135
                        </div>
115
                    [% END %]
136
                    </div>
116
                [% ELSE %]
137
                [% END %]
117
                    [% FOREACH f IN club_template.club_template_fields %]
138
            [% ELSE %]
118
                        <li>
139
                [% FOREACH f IN club_template.club_template_fields %]
140
                    <div class="fg-row">
141
                        <div class="fg-label">
119
                            <input type="hidden" name="club_template_field_id" value="[% f.id | html %]" />
142
                            <input type="hidden" name="club_template_field_id" value="[% f.id | html %]" />
120
121
                            <label for="club_template_field_[% f.id | html %]">[% f.name | html %]</label>
143
                            <label for="club_template_field_[% f.id | html %]">[% f.name | html %]</label>
144
                        </div>
145
                        <div class="fg-input">
122
                            [% IF f.authorised_value_category %]
146
                            [% IF f.authorised_value_category %]
123
                                <select name="club_field" id="club_template_field_[% f.id | html %]">
147
                                <select name="club_field" id="club_template_field_[% f.id | html %]">
124
                                    [% FOREACH a IN AuthorisedValues.Get( f.authorised_value_category ) %]
148
                                    [% FOREACH a IN AuthorisedValues.Get( f.authorised_value_category ) %]
Lines 128-137 Link Here
128
                            [% ELSE %]
152
                            [% ELSE %]
129
                                <input type="text" name="club_field" id="club_template_field_[% f.id | html %]" size="40" />
153
                                <input type="text" name="club_field" id="club_template_field_[% f.id | html %]" size="40" />
130
                            [% END %]
154
                            [% END %]
131
                        </li>
155
                        </div>
132
                    [% END %]
156
                    </div>
133
                [% END %]
157
                [% END %]
134
            </ol>
158
            [% END %]
135
        </fieldset>
159
        </fieldset>
136
160
137
        <fieldset class="action">
161
        <fieldset class="action">
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/patron-enroll.tt (-27 / +33 lines)
Lines 7-22 Link Here
7
        <input type="hidden" name="id" value="[% club.id | html %]" />
7
        <input type="hidden" name="id" value="[% club.id | html %]" />
8
        <input type="hidden" name="borrowernumber" value="[% borrowernumber | html %]" />
8
        <input type="hidden" name="borrowernumber" value="[% borrowernumber | html %]" />
9
        <input type="hidden" name="enrollent_id" value="[% enrollent_id | html %]" />
9
        <input type="hidden" name="enrollent_id" value="[% enrollent_id | html %]" />
10
        <fieldset class="rows">
10
        <fieldset class="fg">
11
            <ol>
11
            [% IF club_enrollment_fields %]
12
                [% IF club_enrollment_fields %]
12
                [% FOREACH f IN club.club_template.club_template_enrollment_fields %]
13
                    [% FOREACH f IN club.club_template.club_template_enrollment_fields %]
13
                    [% FOREACH c IN club_enrollment_fields %]
14
                        [% FOREACH c IN club_enrollment_fields %]
14
                        [% IF f.id == c.club_template_enrollment_field_id %]
15
                            [% IF f.id == c.club_template_enrollment_field_id %]
15
                            <div class="fg-row">
16
                                <li>
16
                                <div class="fg-label">
17
                                    <label>[% f.name | html %]</label>
17
                                    <label for="club_enrollment_field_[% f.id | html %]">[% f.name | html %]</label>
18
                                </div>
19
                                <div class="fg-input">
18
                                    [% IF f.authorised_value_category %]
20
                                    [% IF f.authorised_value_category %]
19
                                        <select name="[% f.id | html %]">
21
                                        <select id="club_enrollment_field_[% f.id | html %]" name="[% f.id | html %]">
20
                                            [% FOREACH a IN AuthorisedValues.Get( f.authorised_value_category ) %]
22
                                            [% FOREACH a IN AuthorisedValues.Get( f.authorised_value_category ) %]
21
                                                [% IF a.authorised_value == c.value %]
23
                                                [% IF a.authorised_value == c.value %]
22
                                                    <option value="[% a.authorised_value | html %]" selected="selected">[% a.lib | html %]</option>
24
                                                    <option value="[% a.authorised_value | html %]" selected="selected">[% a.lib | html %]</option>
Lines 26-60 Link Here
26
                                            [% END %]
28
                                            [% END %]
27
                                        </select>
29
                                        </select>
28
                                    [% ELSE %]
30
                                    [% ELSE %]
29
                                        <input type="text" name="[% f.id | html %]" value="[% c.value | html %]" />
31
                                        <input id="club_enrollment_field_[% f.id | html %]" type="text" name="[% f.id | html %]" value="[% c.value | html %]" />
30
                                    [% END %]
32
                                    [% END %]
31
                                    <span class="hint">[% f.description | html %]</span>
33
                                </div>
32
                                </li>
34
                                <div class="hint">[% f.description | html %]</div>
33
                            [% END %]
35
                            </div>
34
                        [% END %]
36
                        [% END %]
35
                    [% END %]
37
                    [% END %]
36
                [% ELSE %]
38
                [% END %]
37
                    [% FOREACH f IN club.club_template.club_template_enrollment_fields %]
39
            [% ELSE %]
38
                        <li>
40
                [% FOREACH f IN club.club_template.club_template_enrollment_fields %]
39
                            <label>[% f.name | html %]</label>
41
                    <div class="fg-row">
42
                        <div class="fg-label">
43
                            <label for="club_enrollment_field_[% f.id | html %]">[% f.name | html %]</label>
44
                        </div>
45
                        <div class="fg-input">
40
                            [% IF f.authorised_value_category %]
46
                            [% IF f.authorised_value_category %]
41
                                <select name="[% f.id | html %]">
47
                                <select id="club_enrollment_field_[% f.id | html %]" name="[% f.id | html %]">
42
                                    [% FOREACH a IN AuthorisedValues.Get( f.authorised_value_category ) %]
48
                                    [% FOREACH a IN AuthorisedValues.Get( f.authorised_value_category ) %]
43
                                        <option value="[% a.authorised_value | html %]">[% a.lib | html %]</option>
49
                                        <option value="[% a.authorised_value | html %]">[% a.lib | html %]</option>
44
                                    [% END %]
50
                                    [% END %]
45
                                </select>
51
                                </select>
46
                            [% ELSE %]
52
                            [% ELSE %]
47
                                <input type="text" name="[% f.id | html %]" />
53
                                <input id="club_enrollment_field_[% f.id | html %]" type="text" name="[% f.id | html %]" />
48
                            [% END %]
54
                            [% END %]
49
                            <span class="hint">[% f.description | html %]</span>
55
                        </div>
50
                        </li>
56
                        <div class="hint">[% f.description | html %]</div>
51
                    [% END %]
57
                    </div>
52
                [% END %]
58
                [% END %]
53
                <li>
59
            [% END %]
54
                    <a href="#" class="btn btn-sm btn-default" onclick="addEnrollment(); return false;">Finish enrollment</a>
60
        </fieldset>
55
                    <a class="cancel" href="#" onclick="showClubs(); return false;">Cancel</a>
61
        <fieldset class="action">
56
                </li>
62
            <a href="#" class="btn btn-primary" onclick="addEnrollment(); return false;">Finish enrollment</a>
57
            </ol>
63
            <a class="cancel" href="#" onclick="showClubs(); return false;">Cancel</a>
58
        </fieldset>
64
        </fieldset>
59
    </form>
65
    </form>
60
</div>
66
</div>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/templates-add-modify.tt (-129 / +198 lines)
Lines 22-27 Link Here
22
    .club-field,
22
    .club-field,
23
    .enrollment-field {
23
    .enrollment-field {
24
        border-top: 1px solid #ddd;
24
        border-top: 1px solid #ddd;
25
        padding-top: 1rem;
25
    }
26
    }
26
</style>
27
</style>
27
</head>
28
</head>
Lines 62-192 Link Here
62
            [% END %]
63
            [% END %]
63
        </h1>
64
        </h1>
64
65
65
        <fieldset class="rows">
66
        <fieldset class="fg">
66
            <ol>
67
            <div class="fg-row">
67
                <li>
68
                <div class="fg-label">
68
                    <label class="required" for="name">Name:</label>
69
                    <label class="required" for="club-template-name">Name:</label>
70
                </div>
71
                <div class="fg-input">
69
                    <input id="club-template-name" name="name" type="text" value="[% club_template.name | html %]" required="required" />
72
                    <input id="club-template-name" name="name" type="text" value="[% club_template.name | html %]" required="required" />
70
                    <span class="required">Required</span>
73
                </div>
71
                </li>
74
                <div class="required">Required</div>
75
            </div>
72
76
73
                <li>
77
            <div class="fg-row">
78
                <div class="fg-label">
74
                    <label for="club-template-description">Description:</label>
79
                    <label for="club-template-description">Description:</label>
80
                </div>
81
                <div class="fg-input">
75
                    <input id="club-template-description" name="description" type="text" value="[% club_template.description | html %]" />
82
                    <input id="club-template-description" name="description" type="text" value="[% club_template.description | html %]" />
76
                </li>
83
                </div>
84
            </div>
77
85
78
                <li>
86
            <div class="fg-row input-checkbox">
79
                    <label for="club-template-is-enrollable-from-opac">Allow public enrollment:</label>
87
                <div class="fg-label">
88
                    <label for="club-template-is-enrollable-from-opac">Allow public enrollment</label>
89
                </div>
90
                <div class="fg-input">
80
                    [% IF club_template.is_enrollable_from_opac %]
91
                    [% IF club_template.is_enrollable_from_opac %]
81
                        <input type="checkbox" id="club-template-is-enrollable-from-opac" name="is_enrollable_from_opac" checked="checked" />
92
                        <input type="checkbox" id="club-template-is-enrollable-from-opac" name="is_enrollable_from_opac" checked="checked" />
82
                    [% ELSE %]
93
                    [% ELSE %]
83
                        <input type="checkbox" id="club-template-is-enrollable-from-opac" name="is_enrollable_from_opac" />
94
                        <input type="checkbox" id="club-template-is-enrollable-from-opac" name="is_enrollable_from_opac" />
84
                    [% END %]
95
                    [% END %]
85
                    <span class="hint">If a template allows public enrollment, patrons can enroll in a club based on this template from the public catalog.</span>
96
                </div>
86
                </li>
97
                <div class="hint">If a template allows public enrollment, patrons can enroll in a club based on this template from the public catalog.</div>
98
            </div>
87
99
88
                <li>
100
            <div class="fg-row input-checkbox">
89
                    <label for="club-template-is-email-required">Require valid email address:</label>
101
                <div class="fg-label">
102
                    <label for="club-template-is-email-required">Require valid email address</label>
103
                </div>
104
                <div class="fg-input">
90
                    [% IF club_template.is_email_required %]
105
                    [% IF club_template.is_email_required %]
91
                        <input type="checkbox" id="club-template-is-email-required" name="is_email_required" checked="checked" />
106
                        <input type="checkbox" id="club-template-is-email-required" name="is_email_required" checked="checked" />
92
                    [% ELSE %]
107
                    [% ELSE %]
93
                        <input type="checkbox" id="club-template-is-email-required" name="is_email_required" />
108
                        <input type="checkbox" id="club-template-is-email-required" name="is_email_required" />
94
                    [% END %]
109
                    [% END %]
95
                    <span class="hint">If set, a club based on this template can only be enrolled in by patrons with a valid email address.</span>
110
                </div>
96
                </li>
111
                <div class="hint">If set, a club based on this template can only be enrolled in by patrons with a valid email address.</div>
112
            </div>
97
113
98
                <li>
114
            <div class="fg-row">
115
                <div class="fg-label">
99
                    <label for="club-template-branchcode">Library:</label>
116
                    <label for="club-template-branchcode">Library:</label>
117
                </div>
118
                <div class="fg-input">
100
                    <select name="branchcode" id="club-template-branchcode">
119
                    <select name="branchcode" id="club-template-branchcode">
101
                        <option value=""></option>
120
                        <option value="">None</option>
102
                        [% PROCESS options_for_libraries libraries => Branches.all( selected => club_template.branchcode ) %]
121
                        [% PROCESS options_for_libraries libraries => Branches.all( selected => club_template.branchcode ) %]
103
                    </select>
122
                    </select>
104
                    <div class="hint">If set, only librarians logged in with this branch will be able to modify this club template.</div>
123
                </div>
105
                </li>
124
                <div class="hint">If set, only librarians logged in with this branch will be able to modify this club template.</div>
106
            </ol>
125
            </div>
107
        </fieldset>
126
        </fieldset>
108
127
109
        <fieldset class="rows">
128
        <div class="page-section">
110
            <legend>Club fields:</legend>
129
            <h2>Club fields</h2>
111
            <p><span class="hint">These fields will be used in the creation of clubs based on this template</span></p>
130
            <p><span class="hint">These fields will be used in the creation of clubs based on this template</span></p>
112
            <div id="club-template-fields">
131
            <div id="club-template-fields">
113
                [% FOREACH f IN club_template.club_template_fields %]
132
                <fieldset class="fg">
114
                    <div class="club-field">
133
                    [% FOREACH f IN club_template.club_template_fields %]
115
                        <ol class="clearfix">
134
                        <div class="club-field">
116
                            <input type="hidden" name="club_template_field_id" value="[% f.id | html %]" />
135
                            <input type="hidden" name="club_template_field_id" value="[% f.id | html %]" />
117
                            <li>
118
                                <label for="field-name-[% f.id | html %]">Name:</label>
119
                                <input type="text" name="club_template_field_name" id="field-name-[% f.id | html %]" value="[% f.name | html %]" />
120
                            </li>
121
122
                            <li>
123
                                <label for="field-description-[% f.id | html %]">Description:</label>
124
                                <input type="text" name="club_template_field_description" id="field-description-[% f.id | html %]" value="[% f.description | html %]" />
125
                            </li>
126
136
127
                            <li>
137
                            <div class="fg-row">
128
                                <label for="field-authorised-value-category-[% f.id | html %]">Authorised value category:</label>
138
                                <div class="fg-label">
129
                                <select name="club_template_field_authorised_value_category" id="field-authorised-value-category-[% f.id | html %]">
139
                                    <label for="field-name-[% f.id | html %]">Name:</label>
130
                                    <option value=""></option>
140
                                </div>
131
                                    [% PROCESS options_for_authorised_value_categories authorised_value_categories => AuthorisedValues.GetCategories( selected => f.authorised_value_category) %]
141
                                <div class="fg-input">
132
                                </select>
142
                                    <input type="text" name="club_template_field_name" id="field-name-[% f.id | html %]" value="[% f.name | html %]" />
133
                            </li>
143
                                </div>
134
144
                            </div>
135
                            <li>
145
                            <div class="fg-row">
136
                                <label for="field-delete-[% f.id | html %]">Delete field:</label>
146
                                <div class="fg-label">
137
                                <input type="checkbox" name="club_template_field_delete" id="field-delete-[% f.id | html %]" value="[% f.id | html %]" />
147
                                    <label for="field-description-[% f.id | html %]">Description:</label>
138
                            </li>
148
                                </div>
139
                        </ol>
149
                                <div class="fg-input">
140
                    </div>
150
                                    <input type="text" name="club_template_field_description" id="field-description-[% f.id | html %]" value="[% f.description | html %]" />
141
                [% END %]
151
                                </div>
152
                            </div>
153
                            <div class="fg-row">
154
                                <div class="fg-label">
155
                                    <label for="field-authorised-value-category-[% f.id | html %]">Authorised value category:</label>
156
                                </div>
157
                                <div class="fg-input">
158
                                    <select name="club_template_field_authorised_value_category" id="field-authorised-value-category-[% f.id | html %]">
159
                                        <option value="">None</option>
160
                                        [% PROCESS options_for_authorised_value_categories authorised_value_categories => AuthorisedValues.GetCategories( selected => f.authorised_value_category) %]
161
                                    </select>
162
                                </div>
163
                            </div>
164
                            <div class="fg-row input-checkbox">
165
                                <div class="fg-label">
166
                                    <label for="field-delete-[% f.id | html %]">Check to delete this field upon saving</label>
167
                                </div>
168
                                <div class="fg-input">
169
                                    <input type="checkbox" name="club_template_field_delete" id="field-delete-[% f.id | html %]" value="[% f.id | html %]" />
170
                                </div>
171
                            </div>
172
                        </div>
173
                    [% END %]
174
                </fieldset>
142
            </div>
175
            </div>
143
            <fieldset class="action">
176
            <fieldset class="action">
144
                <a href="#" class="add_club_field"> <i class="fa fa-plus"></i> Add new field </a>
177
                <a href="#" class="add_club_field"> <i class="fa fa-plus"></i> Add new field </a>
145
            </fieldset>
178
            </fieldset>
146
        </fieldset>
179
        </div>
147
180
148
        <fieldset class="rows">
181
        <div class="page-section">
149
            <legend>Enrollment fields</legend>
182
            <h2>Enrollment fields</h2>
150
            <p><span class="hint">These fields will be used when enrolling a patron in a club based on this template</span></p>
183
            <p><span class="hint">These fields will be used when enrolling a patron in a club based on this template</span></p>
151
            <div id="club-template-enrollment-fields">
184
            <div id="club-template-enrollment-fields">
152
                [% FOREACH f IN club_template.club_template_enrollment_fields %]
185
                <fieldset class="fg">
153
                    <div class="enrollment-field">
186
                    [% FOREACH f IN club_template.club_template_enrollment_fields %]
154
                        <ol class="clearfix">
187
                        <div class="enrollment-field">
155
                            <li>
188
                            <div class="fg-row">
156
                                <span class="label">&nbsp;</span>
189
                                <div class="fg-label">
157
                                <strong>Enrollment field</strong>
190
                                    <input type="hidden" name="club_template_enrollment_field_id" value="[% f.id | html %]" />
158
                            </li>
191
                                    <label for="enrollment-field-name-[% f.id | html %]">Name:</label>
159
                            <li>
192
                                </div>
160
                                <input type="hidden" name="club_template_enrollment_field_id" value="[% f.id | html %]" />
193
                                <div class="fg-input">
161
                                <label for="enrollment-field-name-[% f.id | html %]">Name:</label>
194
                                    <input type="text" name="club_template_enrollment_field_name" id="enrollment-field-name-[% f.id | html %]" value="[% f.name | html %]" />
162
                                <input type="text" name="club_template_enrollment_field_name" id="enrollment-field-name-[% f.id | html %]" value="[% f.name | html %]" size="40" />
195
                                </div>
163
                            </li>
196
                            </div>
164
197
165
                            <li>
198
                            <div class="fg-row">
166
                                <label for="enrollment-field-description-[% f.id | html %]">Description:</label>
199
                                <div class="fg-label">
167
                                <input type="text" name="club_template_enrollment_field_description" id="enrollment-field-description-[% f.id | html %]" value="[% f.description | html %]" size="40" />
200
                                    <label for="enrollment-field-description-[% f.id | html %]">Description:</label>
168
                            </li>
201
                                </div>
202
                                <div class="fg-input">
203
                                    <input type="text" name="club_template_enrollment_field_description" id="enrollment-field-description-[% f.id | html %]" value="[% f.description | html %]" />
204
                                </div>
205
                            </div>
169
206
170
                            <li>
207
                            <div class="fg-row">
171
                                <label for="enrollment-field-authorised-value-category-[% f.id | html %]">Authorised value category:</label>
208
                                <div class="fg-label">
172
                                <select name="club_template_enrollment_field_authorised_value_category" id="enrollment-field-authorised-value-category-[% f.id | html %]">
209
                                    <label for="enrollment-field-authorised-value-category-[% f.id | html %]">Authorised value category:</label>
173
                                    <option value=""></option>
210
                                </div>
174
                                    [% PROCESS options_for_authorised_value_categories authorised_value_categories => AuthorisedValues.GetCategories( selected => f.authorised_value_category) %]
211
                                <div class="fg-input">
175
                                </select>
212
                                    <select name="club_template_enrollment_field_authorised_value_category" id="enrollment-field-authorised-value-category-[% f.id | html %]">
176
                            </li>
213
                                        <option value="">None</option>
214
                                        [% PROCESS options_for_authorised_value_categories authorised_value_categories => AuthorisedValues.GetCategories( selected => f.authorised_value_category) %]
215
                                    </select>
216
                                </div>
217
                            </div>
177
218
178
                            <li>
219
                            <div class="fg-row input-checkbox">
179
                                <label for="enrollment-field-delete-[% f.id | html %]">Delete field:</label>
220
                                <div class="fg-label">
180
                                <input type="checkbox" name="club_template_enrollment_field_delete" id="enrollment-field-delete-[% f.id | html %]" value="[% f.id | html %]" />
221
                                    <label for="enrollment-field-delete-[% f.id | html %]">Check to delete this field upon saving</label>
181
                            </li>
222
                                </div>
182
                        </ol>
223
                                <div class="fg-input">
183
                    </div>
224
                                    <input type="checkbox" name="club_template_enrollment_field_delete" id="enrollment-field-delete-[% f.id | html %]" value="[% f.id | html %]" />
184
                [% END %]
225
                                </div>
226
                            </div>
227
                        </div>
228
                    [% END %]
229
                </fieldset>
185
            </div>
230
            </div>
186
            <fieldset class="action">
231
            <fieldset class="action">
187
                <a href="#" class="add_enrollment_field"> <i class="fa fa-plus"></i> Add new field </a>
232
                <a href="#" class="add_enrollment_field"> <i class="fa fa-plus"></i> Add new field </a>
188
            </fieldset>
233
            </fieldset>
189
        </fieldset>
234
        </div>
190
235
191
        <fieldset class="action">
236
        <fieldset class="action">
192
            <input type="hidden" name="id" value="[% club_template.id | html %]" />
237
            <input type="hidden" name="id" value="[% club_template.id | html %]" />
Lines 197-254 Link Here
197
[% END %]
242
[% END %]
198
243
199
<div id="new-field-template" class="club-field" style="display:none">
244
<div id="new-field-template" class="club-field" style="display:none">
200
    <h4 style="margin-left:1em;">New club field</h4>
245
    <fieldset class="fg">
201
    <input type="hidden" name="club_template_field_id" value="" />
246
        <legend>New club field</legend>
202
    <ol class="clearfix">
247
        <input type="hidden" name="club_template_field_id" value="" />
203
        <li>
248
        <div class="fg-row">
204
            <label for="club_template_field_name">Name:</label>
249
            <div class="fg-label">
205
            <input type="text" name="club_template_field_name" />
250
                <label for="club_template_field_name">Name:</label>
206
        </li>
251
            </div>
252
            <div class="fg-input">
253
                <input type="text" name="club_template_field_name" />
254
            </div>
255
        </div>
207
256
208
        <li>
257
        <div class="fg-row">
209
            <label for="club_template_field_description">Description:</label>
258
            <div class="fg-label">
210
            <input type="text" name="club_template_field_description" />
259
                <label for="club_template_field_description">Description:</label>
211
        </li>
260
            </div>
261
            <div class="fg-input">
262
                <input type="text" name="club_template_field_description" />
263
            </div>
264
        </div>
212
265
213
        <li>
266
        <div class="fg-row">
214
            <label for="club_template_field_authorised_value_category">Authorised value category:</label>
267
            <div class="fg-label">
215
            <select name="club_template_field_authorised_value_category">
268
                <label for="club_template_field_authorised_value_category">Authorised value category:</label>
216
                <option value=""></option>
269
            </div>
217
                [% PROCESS options_for_authorised_value_categories authorised_value_categories => AuthorisedValues.GetCategories() %]
270
            <div class="fg-input">
218
            </select>
271
                <select name="club_template_field_authorised_value_category">
219
        </li>
272
                    <option value="">None</option>
220
    </ol>
273
                    [% PROCESS options_for_authorised_value_categories authorised_value_categories => AuthorisedValues.GetCategories() %]
221
    <fieldset class="action"
274
                </select>
222
        ><a href="#" class="delete_club_field"><i class="fa fa-trash-can"></i> Delete field</a></fieldset
275
            </div>
223
    >
276
        </div>
277
    </fieldset>
278
    <fieldset class="action">
279
        <a href="#" class="delete_club_field"><i class="fa fa-trash-can"></i> Delete field</a>
280
    </fieldset>
224
    <hr />
281
    <hr />
225
</div>
282
</div>
226
283
227
<div id="new-enrollment-field-template" class="enrollment-field" style="display:none">
284
<div id="new-enrollment-field-template" class="enrollment-field" style="display:none">
228
    <h4 style="margin-left:1em;">New enrollment field</h4>
285
    <fieldset class="fg">
229
    <input type="hidden" name="club_template_enrollment_field_id" value="" />
286
        <legend>New enrollment field</legend>
230
    <ol class="clearfix">
287
        <input type="hidden" name="club_template_enrollment_field_id" value="" />
231
        <li>
288
        <div class="fg-row">
232
            <label for="club_template_enrollment_field_name">Name:</label>
289
            <div class="fg-label">
233
            <input type="text" name="club_template_enrollment_field_name" />
290
                <label for="club_template_enrollment_field_name">Name:</label>
234
        </li>
291
            </div>
292
            <div class="fg-input">
293
                <input type="text" name="club_template_enrollment_field_name" />
294
            </div>
295
        </div>
235
296
236
        <li>
297
        <div class="fg-row">
237
            <label for="club_template_enrollment_field_description">Description:</label>
298
            <div class="fg-label">
238
            <input type="text" name="club_template_enrollment_field_description" />
299
                <label for="club_template_enrollment_field_description">Description:</label>
239
        </li>
300
            </div>
301
            <div class="fg-input">
302
                <input type="text" name="club_template_enrollment_field_description" />
303
            </div>
304
        </div>
240
305
241
        <li>
306
        <div class="fg-row">
242
            <label for="club_template_enrollment_field_authorised_value_category">Authorised value category:</label>
307
            <div class="fg-label">
243
            <select name="club_template_enrollment_field_authorised_value_category">
308
                <label for="club_template_enrollment_field_authorised_value_category">Authorised value category:</label>
244
                <option value=""></option>
309
            </div>
245
                [% PROCESS options_for_authorised_value_categories authorised_value_categories => AuthorisedValues.GetCategories() %]
310
            <div class="fg-input">
246
            </select>
311
                <select name="club_template_enrollment_field_authorised_value_category">
247
        </li>
312
                    <option value="">None</option>
248
    </ol>
313
                    [% PROCESS options_for_authorised_value_categories authorised_value_categories => AuthorisedValues.GetCategories() %]
249
    <fieldset class="action"
314
                </select>
250
        ><a href="#" class="delete_enrollment_field"><i class="fa fa-trash-can"></i> Delete field</a></fieldset
315
            </div>
251
    >
316
        </div>
317
    </fieldset>
318
    <fieldset class="action">
319
        <a href="#" class="delete_enrollment_field"><i class="fa fa-trash-can"></i> Delete field</a>
320
    </fieldset>
321
    <hr />
252
</div>
322
</div>
253
323
254
[% MACRO jsinclude BLOCK %]
324
[% MACRO jsinclude BLOCK %]
255
- 

Return to bug 42096