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

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/member-attribute-types.inc (+84 lines)
Line 0 Link Here
1
[% BLOCK 'memberentry_patron_attributes_form' %]
2
    [% UNLESS ( no_patron_attribute_types ) %]
3
        <fieldset class="rows" id="memberentry_patron_attributes">
4
            <legend class="expanded" id="patron_attributes_lgd">
5
                <i class="fa fa-caret-down" aria-hidden="true"></i>
6
                Additional attributes and identifiers
7
            </legend>
8
            <div class="attributes_tables">
9
                <input type="hidden" name="setting_extended_patron_attributes" value="1" />
10
                [% FOREACH pa_loo IN patron_attributes %]
11
                    <ol class="attributes_table">
12
                        <div id="aai_[% pa_loo.class | html %]">
13
                            [% IF pa_loo.class %]
14
                                <h3 id="[% pa_loo.class | html %]_lgd">[% pa_loo.lib | html %]</h3>
15
                            [% END %]
16
                            [% FOREACH patron_attribute IN pa_loo.items %]
17
                                <li data-category_code="[% patron_attribute.category_code | html %]" data-pa_code="[% patron_attribute.code | replace('[^a-zA-Z0-9_-]', '') %]">
18
                                    [% IF patron_attribute.mandatory %]
19
                                        <label for="[% patron_attribute.form_id | html %]" class="required" required="required">[% patron_attribute.description | html %]: </label>
20
                                    [% ELSE %]
21
                                        <label for="[% patron_attribute.form_id | html %]">[% patron_attribute.description | html %]: </label>
22
                                    [% END %]
23
                                    [% IF ( patron_attribute.use_dropdown ) %]
24
                                        <select id="[% patron_attribute.form_id | html %]" name="[% patron_attribute.form_id | html %]" [% IF patron_attribute.mandatory %]required="required"[% END %]>
25
                                            <option value=""></option>
26
                                            [% FOREACH auth_val_loo IN patron_attribute.auth_val_loop %]
27
                                                [% IF auth_val_loo.authorised_value == patron_attribute.value %]
28
                                                    <option value="[% auth_val_loo.authorised_value | html %]" selected="selected"> [% auth_val_loo.lib | html %] </option>
29
                                                [% ELSE %]
30
                                                    <option value="[% auth_val_loo.authorised_value | html %]"> [% auth_val_loo.lib | html %] </option>
31
                                                [% END %]
32
                                            [% END %]
33
                                        </select>
34
                                    [% ELSE %]
35
                                        [% IF patron_attribute.mandatory %]
36
                                            [% IF patron_attribute.is_date %]
37
                                                <input
38
                                                    type="text"
39
                                                    id="[% patron_attribute.form_id | html %]"
40
                                                    name="[% patron_attribute.form_id | html %]"
41
                                                    maxlength="10"
42
                                                    size="10"
43
                                                    value="[% patron_attribute.value | html %]"
44
                                                    required="required"
45
                                                    class="flatpickr"
46
                                                />
47
                                            [% ELSE %]
48
                                                <textarea rows="2" cols="30" id="[% patron_attribute.form_id | html %]" name="[% patron_attribute.form_id | html %]" required="required">    [% patron_attribute.value | html %]</textarea>
49
                                            [% END %]
50
                                        [% ELSE %]
51
                                            [% IF patron_attribute.is_date %]
52
                                                <input
53
                                                    type="text"
54
                                                    id="[% patron_attribute.form_id | html %]"
55
                                                    name="[% patron_attribute.form_id | html %]"
56
                                                    maxlength="10"
57
                                                    size="10"
58
                                                    value="[% patron_attribute.value | html %]"
59
                                                    class="flatpickr"
60
                                                />
61
                                            [% ELSE %]
62
                                                <textarea rows="2" cols="30" id="[% patron_attribute.form_id | html %]" name="[% patron_attribute.form_id | html %]">[% patron_attribute.value | html %]</textarea>
63
                                            [% END %]
64
                                        [% END %]
65
                                    [% END # /IF ( patron_attribute.use_dropdown ) %]
66
                                    <input type="hidden" id="[% patron_attribute.form_id | html %]_code" name="[% patron_attribute.form_id | html %]_code" value="[% patron_attribute.code | html %]" />
67
                                    [% IF ( !patron_attribute.is_date ) %]
68
                                        <a href="#" class="clear_attribute"><i class="fa fa-fw fa-trash-can"></i> Clear</a>
69
                                    [% END %]
70
                                    [% IF ( patron_attribute.repeatable ) %]
71
                                        <a href="#" class="clone_attribute"><i class="fa fa-fw fa-plus"></i> New</a>
72
                                    [% END %]
73
                                    [% IF patron_attribute.mandatory %]<span class="required">Required</span>[% END %]
74
                                </li>
75
                            [% END # /FOREACH patron_attribute %]
76
                        </div>
77
                    </ol>
78
                [% END # /FOREACH pa_loo %]
79
            </div>
80
            <!-- /.attributes_tables -->
81
        </fieldset>
82
        <!-- /#memberentry_patron_attributes -->
83
    [% END # UNLESS ( no_patron_attribute_types ) %]
84
[% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt (-85 / +2 lines)
Lines 7-12 Link Here
7
[% PROCESS 'member-main-address-style.inc' %]
7
[% PROCESS 'member-main-address-style.inc' %]
8
[% PROCESS 'member-alt-address-style.inc' %]
8
[% PROCESS 'member-alt-address-style.inc' %]
9
[% PROCESS 'member-alt-contact-style.inc' %]
9
[% PROCESS 'member-alt-contact-style.inc' %]
10
[% PROCESS 'member-attribute-types.inc' %]
10
[% PROCESS 'restriction-types.inc' %]
11
[% PROCESS 'restriction-types.inc' %]
11
[% PROCESS 'i18n.inc' %]
12
[% PROCESS 'i18n.inc' %]
12
[% SET footerjs = 1 %]
13
[% SET footerjs = 1 %]
Lines 1505-1594 Link Here
1505
1506
1506
                        [% IF ( step_4 ) %]
1507
                        [% IF ( step_4 ) %]
1507
                            [% IF Koha.Preference('ExtendedPatronAttributes') %]
1508
                            [% IF Koha.Preference('ExtendedPatronAttributes') %]
1508
                                [% UNLESS ( no_patron_attribute_types ) %]
1509
                                [% PROCESS 'memberentry_patron_attributes_form' patron_attributes=patron_attributes %]
1509
                                    <fieldset class="rows" id="memberentry_patron_attributes">
1510
                                        <legend class="expanded" id="patron_attributes_lgd">
1511
                                            <i class="fa fa-caret-down" aria-hidden="true"></i>
1512
                                            Additional attributes and identifiers
1513
                                        </legend>
1514
                                        <div class="attributes_tables">
1515
                                            <input type="hidden" name="setting_extended_patron_attributes" value="1" />
1516
                                            [% FOREACH pa_loo IN patron_attributes %]
1517
                                                <ol class="attributes_table">
1518
                                                    <div id="aai_[% pa_loo.class | html %]">
1519
                                                        [% IF pa_loo.class %]
1520
                                                            <h3 id="[% pa_loo.class | html %]_lgd">[% pa_loo.lib | html %]</h3>
1521
                                                        [% END %]
1522
                                                        [% FOREACH patron_attribute IN pa_loo.items %]
1523
                                                            <li data-category_code="[% patron_attribute.category_code | html %]" data-pa_code="[% patron_attribute.code | replace('[^a-zA-Z0-9_-]', '') %]">
1524
                                                                [% IF patron_attribute.mandatory %]
1525
                                                                    <label for="[% patron_attribute.form_id | html %]" class="required" required="required">[% patron_attribute.description | html %]: </label>
1526
                                                                [% ELSE %]
1527
                                                                    <label for="[% patron_attribute.form_id | html %]">[% patron_attribute.description | html %]: </label>
1528
                                                                [% END %]
1529
                                                                [% IF ( patron_attribute.use_dropdown ) %]
1530
                                                                    <select id="[% patron_attribute.form_id | html %]" name="[% patron_attribute.form_id | html %]" [% IF patron_attribute.mandatory %]required="required"[% END %]>
1531
                                                                        <option value=""></option>
1532
                                                                        [% FOREACH auth_val_loo IN patron_attribute.auth_val_loop %]
1533
                                                                            [% IF auth_val_loo.authorised_value == patron_attribute.value %]
1534
                                                                                <option value="[% auth_val_loo.authorised_value | html %]" selected="selected"> [% auth_val_loo.lib | html %] </option>
1535
                                                                            [% ELSE %]
1536
                                                                                <option value="[% auth_val_loo.authorised_value | html %]"> [% auth_val_loo.lib | html %] </option>
1537
                                                                            [% END %]
1538
                                                                        [% END %]
1539
                                                                    </select>
1540
                                                                [% ELSE %]
1541
                                                                    [% IF patron_attribute.mandatory %]
1542
                                                                        [% IF patron_attribute.is_date %]
1543
                                                                            <input
1544
                                                                                type="text"
1545
                                                                                id="[% patron_attribute.form_id | html %]"
1546
                                                                                name="[% patron_attribute.form_id | html %]"
1547
                                                                                maxlength="10"
1548
                                                                                size="10"
1549
                                                                                value="[% patron_attribute.value | html %]"
1550
                                                                                required="required"
1551
                                                                                class="flatpickr"
1552
                                                                            />
1553
                                                                        [% ELSE %]
1554
                                                                            <textarea rows="2" cols="30" id="[% patron_attribute.form_id | html %]" name="[% patron_attribute.form_id | html %]" required="required">
1555
    [% patron_attribute.value | html %]</textarea
1556
                                                                            >
1557
                                                                        [% END %]
1558
                                                                    [% ELSE %]
1559
                                                                        [% IF patron_attribute.is_date %]
1560
                                                                            <input
1561
                                                                                type="text"
1562
                                                                                id="[% patron_attribute.form_id | html %]"
1563
                                                                                name="[% patron_attribute.form_id | html %]"
1564
                                                                                maxlength="10"
1565
                                                                                size="10"
1566
                                                                                value="[% patron_attribute.value | html %]"
1567
                                                                                class="flatpickr"
1568
                                                                            />
1569
                                                                        [% ELSE %]
1570
                                                                            <textarea rows="2" cols="30" id="[% patron_attribute.form_id | html %]" name="[% patron_attribute.form_id | html %]">[% patron_attribute.value | html %]</textarea>
1571
                                                                        [% END %]
1572
                                                                    [% END %]
1573
                                                                [% END # /IF ( patron_attribute.use_dropdown ) %]
1574
                                                                <input type="hidden" id="[% patron_attribute.form_id | html %]_code" name="[% patron_attribute.form_id | html %]_code" value="[% patron_attribute.code | html %]" />
1575
                                                                [% IF ( !patron_attribute.is_date ) %]
1576
                                                                    <a href="#" class="clear_attribute"><i class="fa fa-fw fa-trash-can"></i> Clear</a>
1577
                                                                [% END %]
1578
                                                                [% IF ( patron_attribute.repeatable ) %]
1579
                                                                    <a href="#" class="clone_attribute"><i class="fa fa-fw fa-plus"></i> New</a>
1580
                                                                [% END %]
1581
                                                                [% IF patron_attribute.mandatory %]<span class="required">Required</span>[% END %]
1582
                                                            </li>
1583
                                                        [% END # /FOREACH patron_attribute %]
1584
                                                    </div>
1585
                                                </ol>
1586
                                            [% END # /FOREACH pa_loo %]
1587
                                        </div>
1588
                                        <!-- /.attributes_tables -->
1589
                                    </fieldset>
1590
                                    <!-- /#memberentry_patron_attributes -->
1591
                                [% END # UNLESS ( no_patron_attribute_types ) %]
1592
                            [% END # IF Koha.Preference('ExtendedPatronAttributes') %]
1510
                            [% END # IF Koha.Preference('ExtendedPatronAttributes') %]
1593
                        [% END # IF ( step_4 ) %]
1511
                        [% END # IF ( step_4 ) %]
1594
1512
1595
- 

Return to bug 39971