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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt (-2 / +27 lines)
Lines 237-243 Link Here
237
                                    <ol>
237
                                    <ol>
238
                                        [% FOREACH field IN fields %]
238
                                        [% FOREACH field IN fields %]
239
                                        <li>
239
                                        <li>
240
                                            <label style="width:20em;">[% field.lib %]</label>
240
                                            <label style="width:20em;">
241
                                            [% SWITCH ( field.name ) %]
242
                                                [% CASE 'surname' %]
243
                                                Surname:
244
                                                [% CASE 'firstname' %]
245
                                                First name:
246
                                                [% CASE 'branchcode' %]
247
                                                Library:
248
                                                [% CASE 'categorycode' %]
249
                                                Category
250
                                                [% CASE 'sort1' %]
251
                                                Sort 1:
252
                                                [% CASE 'sort2' %]
253
                                                Sort 2:
254
                                                [% CASE 'dateenrolled' %]
255
                                                Registration date:
256
                                                [% CASE 'dateexpiry' %]
257
                                                Expiry date:
258
                                                [% CASE 'debarred' %]
259
                                                Restricted:
260
                                                [% CASE 'debarredcomment' %]
261
                                                Restriction comment:
262
                                                [% CASE 'borrowernotes' %]
263
                                                Circulation note:
264
                                            [% END %]
265
                                            </label>
241
                                            [% IF field.mandatory %]
266
                                            [% IF field.mandatory %]
242
                                                <input type="checkbox" title="This field is mandatory" name="disable_input" value="[% field.name %]" readonly="readonly" onclick="return false;" />
267
                                                <input type="checkbox" title="This field is mandatory" name="disable_input" value="[% field.name %]" readonly="readonly" onclick="return false;" />
243
                                            [% ELSE %]
268
                                            [% ELSE %]
Lines 265-271 Link Here
265
                                        [% END %]
290
                                        [% END %]
266
                                        [% IF ( patron_attributes_codes ) %]
291
                                        [% IF ( patron_attributes_codes ) %]
267
                                            <li class="attributes">
292
                                            <li class="attributes">
268
                                                <label style="width:20em;">Attribute
293
                                                <label style="width:20em;">Attribute:
269
                                                    <select name="patron_attributes">
294
                                                    <select name="patron_attributes">
270
                                                        [% FOREACH pac IN patron_attributes_codes %]
295
                                                        [% FOREACH pac IN patron_attributes_codes %]
271
                                                            <option value="[% pac.attribute_code %]" data-type="[% pac.type %]" data-category="[% pac.category_lib %]">[% pac.attribute_lib %]</option>
296
                                                            <option value="[% pac.attribute_code %]" data-type="[% pac.type %]" data-category="[% pac.category_lib %]">[% pac.attribute_lib %]</option>
(-)a/tools/modborrowers.pl (-12 lines)
Lines 155-175 if ( $op eq 'show' ) { Link Here
155
    my @fields = (
155
    my @fields = (
156
        {
156
        {
157
            name => "surname",
157
            name => "surname",
158
            lib  => "Surname",
159
            type => "text",
158
            type => "text",
160
            mandatory => ( grep /surname/, @mandatoryFields ) ? 1 : 0
159
            mandatory => ( grep /surname/, @mandatoryFields ) ? 1 : 0
161
        }
160
        }
162
        ,
161
        ,
163
        {
162
        {
164
            name => "firstname",
163
            name => "firstname",
165
            lib  => "Firstname",
166
            type => "text",
164
            type => "text",
167
            mandatory => ( grep /surname/, @mandatoryFields ) ? 1 : 0,
165
            mandatory => ( grep /surname/, @mandatoryFields ) ? 1 : 0,
168
        }
166
        }
169
        ,
167
        ,
170
        {
168
        {
171
            name => "branchcode",
169
            name => "branchcode",
172
            lib  => "Branchname",
173
            type => "select",
170
            type => "select",
174
            option => \@branches_option,
171
            option => \@branches_option,
175
            mandatory => ( grep /branchcode/, @mandatoryFields ) ? 1 : 0,
172
            mandatory => ( grep /branchcode/, @mandatoryFields ) ? 1 : 0,
Lines 177-183 if ( $op eq 'show' ) { Link Here
177
        ,
174
        ,
178
        {
175
        {
179
            name => "categorycode",
176
            name => "categorycode",
180
            lib  => "Category",
181
            type => "select",
177
            type => "select",
182
            option => \@categories_option,
178
            option => \@categories_option,
183
            mandatory => ( grep /categorycode/, @mandatoryFields ) ? 1 : 0,
179
            mandatory => ( grep /categorycode/, @mandatoryFields ) ? 1 : 0,
Lines 185-191 if ( $op eq 'show' ) { Link Here
185
        ,
181
        ,
186
        {
182
        {
187
            name => "sort1",
183
            name => "sort1",
188
            lib  => "Sort 1",
189
            type => @sort1_option ? "select" : "text",
184
            type => @sort1_option ? "select" : "text",
190
            option => \@sort1_option,
185
            option => \@sort1_option,
191
            mandatory => ( grep /sort1/, @mandatoryFields ) ? 1 : 0,
186
            mandatory => ( grep /sort1/, @mandatoryFields ) ? 1 : 0,
Lines 193-199 if ( $op eq 'show' ) { Link Here
193
        ,
188
        ,
194
        {
189
        {
195
            name => "sort2",
190
            name => "sort2",
196
            lib  => "Sort 2",
197
            type => @sort2_option ? "select" : "text",
191
            type => @sort2_option ? "select" : "text",
198
            option => \@sort2_option,
192
            option => \@sort2_option,
199
            mandatory => ( grep /sort2/, @mandatoryFields ) ? 1 : 0,
193
            mandatory => ( grep /sort2/, @mandatoryFields ) ? 1 : 0,
Lines 201-235 if ( $op eq 'show' ) { Link Here
201
        ,
195
        ,
202
        {
196
        {
203
            name => "dateenrolled",
197
            name => "dateenrolled",
204
            lib  => "Date enrolled",
205
            type => "date",
198
            type => "date",
206
            mandatory => ( grep /dateenrolled/, @mandatoryFields ) ? 1 : 0,
199
            mandatory => ( grep /dateenrolled/, @mandatoryFields ) ? 1 : 0,
207
        }
200
        }
208
        ,
201
        ,
209
        {
202
        {
210
            name => "dateexpiry",
203
            name => "dateexpiry",
211
            lib  => "Date expiry",
212
            type => "date",
204
            type => "date",
213
            mandatory => ( grep /dateexpiry/, @mandatoryFields ) ? 1 : 0,
205
            mandatory => ( grep /dateexpiry/, @mandatoryFields ) ? 1 : 0,
214
        }
206
        }
215
        ,
207
        ,
216
        {
208
        {
217
            name => "debarred",
209
            name => "debarred",
218
            lib  => "Debarred",
219
            type => "date",
210
            type => "date",
220
            mandatory => ( grep /debarred/, @mandatoryFields ) ? 1 : 0,
211
            mandatory => ( grep /debarred/, @mandatoryFields ) ? 1 : 0,
221
        }
212
        }
222
        ,
213
        ,
223
        {
214
        {
224
            name => "debarredcomment",
215
            name => "debarredcomment",
225
            lib  => "Debarred comment",
226
            type => "text",
216
            type => "text",
227
            mandatory => ( grep /debarredcomment/, @mandatoryFields ) ? 1 : 0,
217
            mandatory => ( grep /debarredcomment/, @mandatoryFields ) ? 1 : 0,
228
        }
218
        }
229
        ,
219
        ,
230
        {
220
        {
231
            name => "borrowernotes",
221
            name => "borrowernotes",
232
            lib  => "Borrower Notes",
233
            type => "text",
222
            type => "text",
234
            mandatory => ( grep /borrowernotes/, @mandatoryFields ) ? 1 : 0,
223
            mandatory => ( grep /borrowernotes/, @mandatoryFields ) ? 1 : 0,
235
        }
224
        }
236
- 

Return to bug 8980