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

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/member-alt-address-style-de.inc (-12 / +27 lines)
Lines 1-17 Link Here
1
        <fieldset class="rows" id="memberentry_address">
1
        <fieldset class="rows" id="memberentry_address">
2
        <legend id="alt_address_lgd">Alternate address</legend><ol>
2
        <legend id="alt_address_lgd">Alternate address</legend><ol>
3
        [% UNLESS noB_address %]
4
            <li>
5
                [% IF ( mandatoryB_address ) %]
6
                    <label for="B_address" class="required">
7
                [% ELSE %]
8
                    <label for="B_address">
9
                [% END %]
10
                Address: </label>
11
                    <input type="text" id="B_address" name="B_address" size="40" value="[% patron.B_address | html %]" />
12
      [% IF ( mandatoryB_address ) %]<span class="required">Required</span>[% END %]
13
            </li>
14
        [% END %]
15
3
16
        [% IF roadtypes %]
4
        [% IF roadtypes %]
17
                <li>
5
                <li>
Lines 35-40 Link Here
35
            </li>
23
            </li>
36
        [% END %]
24
        [% END %]
37
25
26
        [% UNLESS noB_address %]
27
            <li>
28
                [% IF ( mandatoryB_address ) %]
29
                    <label for="B_address" class="required">
30
                [% ELSE %]
31
                    <label for="B_address">
32
                [% END %]
33
                Address: </label>
34
                    <input type="text" id="B_address" name="B_address" size="40" value="[% patron.B_address | html %]" />
35
      [% IF ( mandatoryB_address ) %]<span class="required">Required</span>[% END %]
36
            </li>
37
        [% END %]
38
38
        [% UNLESS noB_streetnumber %]
39
        [% UNLESS noB_streetnumber %]
39
            <li>
40
            <li>
40
                [% IF ( mandatoryB_streetnumber ) %]
41
                [% IF ( mandatoryB_streetnumber ) %]
Lines 81-86 Link Here
81
                [% END %]
82
                [% END %]
82
                City: </label>
83
                City: </label>
83
                <input type="text" id="B_city" name="B_city" size="20" value="[% patron.B_city | html %]" />
84
                <input type="text" id="B_city" name="B_city" size="20" value="[% patron.B_city | html %]" />
85
                [% IF cities.count %]or choose
86
                    <select class="select_city" data-addressfield="B_" name="select_city">
87
                        <option value="|||"></option>
88
                        [% FOREACH c IN cities %]
89
                            [% IF c.city_name == patron.B_city && c.city_state == patron.B_state && c.city_zipcode == patron.B_zipcode %]
90
                            <option value="[% c.city_zipcode | html %]|[% c.city_name | html %]|[% c.city_state | html %]|[% c.city_country | html %]" selected="selected">
91
                            [% ELSE %]
92
                            <option value="[% c.city_zipcode | html %]|[% c.city_name | html %]|[% c.city_state | html %]|[% c.city_country | html %]">
93
                            [% END %]
94
                                [% c.city_name | html %] [% c.city_state | html %] [% c.city_zipcode | html %]
95
                            </option>
96
                        [% END %]
97
                    </select>
98
                [% END %]
84
      [% IF ( mandatoryB_city ) %]<span class="required">Required</span>[% END %]
99
      [% IF ( mandatoryB_city ) %]<span class="required">Required</span>[% END %]
85
            </li>
100
            </li>
86
        [% END %]
101
        [% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/member-alt-address-style-fr.inc (+14 lines)
Lines 82-87 Link Here
82
    [% END %]
82
    [% END %]
83
    City: </label>
83
    City: </label>
84
    <input type="text" id="B_city" name="B_city" size="20" value="[% patron.B_city | html %]" />
84
    <input type="text" id="B_city" name="B_city" size="20" value="[% patron.B_city | html %]" />
85
                [% IF cities.count %]or choose
86
                    <select class="select_city" data-addressfield="B_" name="select_city">
87
                        <option value="|||"></option>
88
                        [% FOREACH c IN cities %]
89
                            [% IF c.city_name == patron.B_city && c.city_state == patron.B_state && c.city_zipcode == patron.B_zipcode %]
90
                            <option value="[% c.city_zipcode | html %]|[% c.city_name | html %]|[% c.city_state | html %]|[% c.city_country | html %]" selected="selected">
91
                            [% ELSE %]
92
                            <option value="[% c.city_zipcode | html %]|[% c.city_name | html %]|[% c.city_state | html %]|[% c.city_country | html %]">
93
                            [% END %]
94
                                [% c.city_name | html %] [% c.city_state | html %] [% c.city_zipcode | html %]
95
                            </option>
96
                        [% END %]
97
                    </select>
98
                [% END %]
85
    [% IF ( mandatoryB_city ) %]<span class="required">Required</span>[% END %]
99
    [% IF ( mandatoryB_city ) %]<span class="required">Required</span>[% END %]
86
    </li>
100
    </li>
87
[% END %]
101
[% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/member-alt-address-style-us.inc (-2 / +16 lines)
Lines 68-74 Link Here
68
                [% END %]
68
                [% END %]
69
                City: </label>
69
                City: </label>
70
                <input type="text" id="B_city" name="B_city" size="20" value="[% patron.B_city | html %]" />
70
                <input type="text" id="B_city" name="B_city" size="20" value="[% patron.B_city | html %]" />
71
      [% IF ( mandatoryB_city ) %]<span class="required">Required</span>[% END %]
71
                [% IF cities.count %]or choose
72
                    <select class="select_city" data-addressfield="B_" name="select_city">
73
                        <option value="|||"></option>
74
                        [% FOREACH c IN cities %]
75
                            [% IF c.city_name == patron.B_city && c.city_state == patron.B_state && c.city_zipcode == patron.B_zipcode %]
76
                            <option value="[% c.city_zipcode | html %]|[% c.city_name | html %]|[% c.city_state | html %]|[% c.city_country | html %]" selected="selected">
77
                            [% ELSE %]
78
                            <option value="[% c.city_zipcode | html %]|[% c.city_name | html %]|[% c.city_state | html %]|[% c.city_country | html %]">
79
                            [% END %]
80
                                [% c.city_name | html %] [% c.city_state | html %] [% c.city_zipcode | html %]
81
                            </option>
82
                        [% END %]
83
                    </select>
84
                [% END %]
85
                [% IF ( mandatoryB_city ) %]<span class="required">Required</span>[% END %]
72
            </li>
86
            </li>
73
        [% END %]
87
        [% END %]
74
        [% UNLESS noB_state %]
88
        [% UNLESS noB_state %]
Lines 138-144 Link Here
138
                <label for="contactnote">
152
                <label for="contactnote">
139
                [% END %]
153
                [% END %]
140
                Contact note: </label>
154
                Contact note: </label>
141
                <textarea id="contactnote" name="contactnote" cols="40" rows="2">[% contactnote | html %]</textarea>
155
                <textarea id="contactnote" name="contactnote" cols="40" rows="2">[% patron.contactnote | html %]</textarea>
142
        [% IF ( mandatorycontactnote ) %]<span class="required">Required</span>[% END %]
156
        [% IF ( mandatorycontactnote ) %]<span class="required">Required</span>[% END %]
143
            </li>
157
            </li>
144
        [% END %]
158
        [% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/member-alt-contact-style-de.inc (-1 / +15 lines)
Lines 68-74 Link Here
68
                <label for="altcontactaddress3">
68
                <label for="altcontactaddress3">
69
                [% END %]
69
                [% END %]
70
                City:</label>
70
                City:</label>
71
                <input type="text" name="altcontactaddress3" id="altcontactaddress3" value="[% patron.altcontactaddress3 | html %]" size="20" />
71
                <input type="text" name="altcontactaddress3" id="altcontactcity" value="[% patron.altcontactaddress3 | html %]" size="20" />
72
                [% IF cities.count %]or choose
73
                    <select class="select_city" data-addressfield="altcontact" name="select_city">
74
                        <option value="|||"></option>
75
                        [% FOREACH c IN cities %]
76
                            [% IF c.city_name == patron.altcontactaddress3 && c.city_state == patron.altcontactstate && c.city_zipcode == patron.altcontactzipcode %]
77
                            <option value="[% c.city_zipcode | html %]|[% c.city_name | html %]|[% c.city_state | html %]|[% c.city_country | html %]" selected="selected">
78
                            [% ELSE %]
79
                            <option value="[% c.city_zipcode | html %]|[% c.city_name | html %]|[% c.city_state | html %]|[% c.city_country | html %]">
80
                            [% END %]
81
                                [% c.city_name | html %] [% c.city_state | html %] [% c.city_zipcode | html %]
82
                            </option>
83
                        [% END %]
84
                    </select>
85
                [% END %]
72
                [% IF ( mandatoryaltcontactaddress3 ) %]<span class="required">Required</span>[% END %]
86
                [% IF ( mandatoryaltcontactaddress3 ) %]<span class="required">Required</span>[% END %]
73
            </li>
87
            </li>
74
        [% END %]
88
        [% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/member-alt-contact-style-fr.inc (-3 / +17 lines)
Lines 63-74 Link Here
63
[% UNLESS noaltcontactaddress3 %]
63
[% UNLESS noaltcontactaddress3 %]
64
    <li>
64
    <li>
65
    [% IF ( mandatoryaltcontactaddress3 ) %]
65
    [% IF ( mandatoryaltcontactaddress3 ) %]
66
        <label for="altcontactaddress3" class="required">
66
        <label for="altcontactcity" class="required">
67
    [% ELSE %]
67
    [% ELSE %]
68
        <label for="altcontactaddress3">
68
        <label for="altcontactcity">
69
    [% END %]
69
    [% END %]
70
    City:</label>
70
    City:</label>
71
    <input type="text" name="altcontactaddress3" id="altcontactaddress3" value="[% patron.altcontactaddress3 | html %]" size="20" />
71
    <input type="text" name="altcontactaddress3" id="altcontactcity" value="[% patron.altcontactaddress3 | html %]" size="20" />
72
    [% IF cities.count %]or choose
73
        <select class="select_city" data-addressfield="altcontact" name="select_city">
74
            <option value="|||"></option>
75
            [% FOREACH c IN cities %]
76
                [% IF c.city_name == patron.altcontactaddress3 && c.city_state == patron.altcontactstate && c.city_zipcode == patron.altcontactzipcode %]
77
                <option value="[% c.city_zipcode | html %]|[% c.city_name | html %]|[% c.city_state | html %]|[% c.city_country | html %]" selected="selected">
78
                [% ELSE %]
79
                <option value="[% c.city_zipcode | html %]|[% c.city_name | html %]|[% c.city_state | html %]|[% c.city_country | html %]">
80
                [% END %]
81
                    [% c.city_name | html %] [% c.city_state | html %] [% c.city_zipcode | html %]
82
                </option>
83
            [% END %]
84
        </select>
85
    [% END %]
72
    [% IF ( mandatoryaltcontactaddress3 ) %]<span class="required">Required</span>[% END %]
86
    [% IF ( mandatoryaltcontactaddress3 ) %]<span class="required">Required</span>[% END %]
73
    </li>
87
    </li>
74
[% END %]
88
[% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/member-alt-contact-style-us.inc (-3 / +17 lines)
Lines 51-62 Link Here
51
        [% UNLESS noaltcontactaddress3 %]
51
        [% UNLESS noaltcontactaddress3 %]
52
            <li>
52
            <li>
53
                [% IF ( mandatoryaltcontactaddress3 ) %]
53
                [% IF ( mandatoryaltcontactaddress3 ) %]
54
                <label for="altcontactaddress3" class="required">
54
                <label for="altcontactcity" class="required">
55
                [% ELSE %]
55
                [% ELSE %]
56
                <label for="altcontactaddress3">
56
                <label for="altcontactcity">
57
                [% END %]
57
                [% END %]
58
                City:</label>
58
                City:</label>
59
                <input type="text" name="altcontactaddress3" id="altcontactaddress3" value="[% patron.altcontactaddress3 | html %]" size="20" />
59
                <input type="text" name="altcontactaddress3" id="altcontactcity" value="[% patron.altcontactaddress3 | html %]" size="20" />
60
                [% IF cities.count %]or choose
61
                    <select class="select_city" data-addressfield="altcontact" name="select_city">
62
                        <option value="|||"></option>
63
                        [% FOREACH c IN cities %]
64
                            [% IF c.city_name == patron.altcontactaddress3 && c.city_state == patron.altcontactstate && c.city_zipcode == patron.altcontactzipcode %]
65
                            <option value="[% c.city_zipcode | html %]|[% c.city_name | html %]|[% c.city_state | html %]|[% c.city_country | html %]" selected="selected">
66
                            [% ELSE %]
67
                            <option value="[% c.city_zipcode | html %]|[% c.city_name | html %]|[% c.city_state | html %]|[% c.city_country | html %]">
68
                            [% END %]
69
                                [% c.city_name | html %] [% c.city_state | html %] [% c.city_zipcode | html %]
70
                            </option>
71
                        [% END %]
72
                    </select>
73
                [% END %]
60
                [% IF ( mandatoryaltcontactaddress3 ) %]<span class="required">Required</span>[% END %]
74
                [% IF ( mandatoryaltcontactaddress3 ) %]<span class="required">Required</span>[% END %]
61
            </li>
75
            </li>
62
        [% END %]
76
        [% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/member-main-address-style-de.inc (-1 / +1 lines)
Lines 81-87 Link Here
81
      City: </label>
81
      City: </label>
82
        <input type="text" id="city" name="city" size="20" value="[% patron.city | html %]" />
82
        <input type="text" id="city" name="city" size="20" value="[% patron.city | html %]" />
83
        [% IF cities.count %]or choose
83
        [% IF cities.count %]or choose
84
        <select id="select_city" name="select_city">
84
        <select class="select_city" data-addressfield="" name="select_city">
85
            <option value="|||"></option>
85
            <option value="|||"></option>
86
            [% FOREACH c IN cities %]
86
            [% FOREACH c IN cities %]
87
                [% IF c.city_name == patron.city && c.city_state == patron.state && c.city_zipcode == patron.zipcode %]
87
                [% IF c.city_name == patron.city && c.city_state == patron.state && c.city_zipcode == patron.zipcode %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/member-main-address-style-fr.inc (-9 / +11 lines)
Lines 2-15 Link Here
2
    <legend id="main_address_lgd">Main address</legend><ol>
2
    <legend id="main_address_lgd">Main address</legend><ol>
3
[% UNLESS nostreettype %]
3
[% UNLESS nostreettype %]
4
    [% UNLESS nostreetnumber %]
4
    [% UNLESS nostreetnumber %]
5
        [% IF ( mandatorystreetnumber ) %]
5
        <li>
6
            <label for="streetnumber" class="required">
6
            [% IF ( mandatorystreetnumber ) %]
7
        [% ELSE %]
7
                <label for="streetnumber" class="required">
8
            <label for="streetnumber">
8
            [% ELSE %]
9
        [% END %]
9
                <label for="streetnumber">
10
            Street number: </label>
10
            [% END %]
11
            <input type="text" id="streetnumber" name="streetnumber" size="5" value="[% patron.streetnumber | html %]" />
11
                Street number: </label>
12
        [% IF ( mandatorystreetnumber ) %]<span class="required">Required</span>[% END %]
12
                <input type="text" id="streetnumber" name="streetnumber" size="5" value="[% patron.streetnumber | html %]" />
13
            [% IF ( mandatorystreetnumber ) %]<span class="required">Required</span>[% END %]
14
        </li>
13
    [% END %]
15
    [% END %]
14
16
15
    [% IF roadtypes %]
17
    [% IF roadtypes %]
Lines 80-86 Link Here
80
    City: </label>
82
    City: </label>
81
    <input type="text" id="city" name="city" size="20" value="[% patron.city | html %]" />
83
    <input type="text" id="city" name="city" size="20" value="[% patron.city | html %]" />
82
    [% IF cities.count %]or choose
84
    [% IF cities.count %]or choose
83
        <select id="select_city" name="select_city">
85
        <select class="select_city" data-addressfield="" name="select_city">
84
            <option value="|||"></option>
86
            <option value="|||"></option>
85
        [% FOREACH c IN cities %]
87
        [% FOREACH c IN cities %]
86
            [% IF c.city_name == patron.city && c.city_state == patron.state && c.city_zipcode == patron.zipcode %]
88
            [% IF c.city_name == patron.city && c.city_state == patron.state && c.city_zipcode == patron.zipcode %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/member-main-address-style-us.inc (-1 / +1 lines)
Lines 69-75 Link Here
69
      City: </label>
69
      City: </label>
70
        <input type="text" id="city" name="city" size="20" value="[% patron.city | html %]" />
70
        <input type="text" id="city" name="city" size="20" value="[% patron.city | html %]" />
71
        [% IF cities.count %]or choose
71
        [% IF cities.count %]or choose
72
        <select id="select_city" name="select_city">
72
        <select class="select_city" data-addressfield="" name="select_city">
73
            <option value="|||"></option>
73
            <option value="|||"></option>
74
            [% FOREACH c IN cities %]
74
            [% FOREACH c IN cities %]
75
                [% IF c.city_name == patron.city && c.city_state == patron.state && c.city_zipcode == patron.zipcode %]
75
                [% IF c.city_name == patron.city && c.city_state == patron.state && c.city_zipcode == patron.zipcode %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt (-7 / +4 lines)
Lines 141-147 Link Here
141
    [% IF opadd %]
141
    [% IF opadd %]
142
        <a class="btn btn-default" href="/cgi-bin/koha/members/member.pl" class="toggler save_entryform">
142
        <a class="btn btn-default" href="/cgi-bin/koha/members/member.pl" class="toggler save_entryform">
143
    [% ELSE %]
143
    [% ELSE %]
144
        <a class="btn btn-default btn-sm" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber | html %]">
144
        <a class="btn btn-default" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber | html %]">
145
    [% END %]
145
    [% END %]
146
        <i class="fa fa-times"></i> Cancel
146
        <i class="fa fa-times"></i> Cancel
147
    </a>
147
    </a>
Lines 425-436 Link Here
425
425
426
[% END %]
426
[% END %]
427
[% UNLESS noaddress && noaddress2 && nocity && nostate && nozipcode && nocountry %]
427
[% UNLESS noaddress && noaddress2 && nocity && nostate && nozipcode && nocountry %]
428
    [% SWITCH Koha.Preference( 'AddressFormat' ) %]
428
    [% IF Koha.Preference( 'AddressFormat' ) %]
429
        [% CASE 'de' %]
429
        [% INCLUDE "member-main-address-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
430
            [% INCLUDE 'member-main-address-style-de.inc' %]
430
    [% END %]
431
        [% CASE # us %]
432
            [% INCLUDE 'member-main-address-style-us.inc' %]
433
     [% END %]
434
[% END # nostreet && nocity etc group%]
431
[% END # nostreet && nocity etc group%]
435
432
436
[% UNLESS nophone && nophonepro && nomobile && noemail && noemailpro && nofax %]
433
[% UNLESS nophone && nophonepro && nomobile && noemail && noemailpro && nofax %]
(-)a/koha-tmpl/intranet-tmpl/prog/js/members.js (-8 / +8 lines)
Lines 293-306 $(document).ready(function(){ Link Here
293
        $("#quick_add_form #guarantorsearch, #guarantorsearch").val(LABEL_SET_TO_PATRON);
293
        $("#quick_add_form #guarantorsearch, #guarantorsearch").val(LABEL_SET_TO_PATRON);
294
    });
294
    });
295
295
296
    $(document.body).on('change','select[name="select_city"]',function(){
296
    $(document.body).on('change','.select_city',function(){
297
        $('select[name="select_city"]').val( $(this).val() );
297
        var selected_city = $(this).val();
298
        var addressfield = $(this).data("addressfield");
298
        var myRegEx=new RegExp(/(.*)\|(.*)\|(.*)\|(.*)/);
299
        var myRegEx=new RegExp(/(.*)\|(.*)\|(.*)\|(.*)/);
299
        $(this).val().match(myRegEx);
300
        var matches = selected_city.match( myRegEx );
300
        $('input[name="zipcode"]').val( RegExp.$1 );
301
        $("#" + addressfield + "zipcode").val( matches[1] );
301
        $('input[name="city"]').val( RegExp.$2 );
302
        $("#" + addressfield + "city").val( matches[2] );
302
        $('input[name="state"]').val( RegExp.$3 );
303
        $("#" + addressfield + "state").val( matches[3] );
303
        $('input[name="country"]').val( RegExp.$4 );
304
        $("#" + addressfield + "country").val( matches[4] );
304
    });
305
    });
305
306
306
    dateformat = $("#dateofbirth").siblings(".hint").first().html();
307
    dateformat = $("#dateofbirth").siblings(".hint").first().html();
307
- 

Return to bug 3766