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

(-)a/installer/data/mysql/sysprefs.sql (-1 / +2 lines)
Lines 471-475 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
471
('XSLTDetailsDisplay','default','','Enable XSL stylesheet control over details page display on intranet','Free'),
471
('XSLTDetailsDisplay','default','','Enable XSL stylesheet control over details page display on intranet','Free'),
472
('XSLTResultsDisplay','default','','Enable XSL stylesheet control over results page display on intranet','Free'),
472
('XSLTResultsDisplay','default','','Enable XSL stylesheet control over results page display on intranet','Free'),
473
('z3950AuthorAuthFields','701,702,700',NULL,'Define the MARC biblio fields for Personal Name Authorities to fill biblio.author','free'),
473
('z3950AuthorAuthFields','701,702,700',NULL,'Define the MARC biblio fields for Personal Name Authorities to fill biblio.author','free'),
474
('z3950NormalizeAuthor','0','','If ON, Personal Name Authorities will replace authors in biblio.author','YesNo')
474
('z3950NormalizeAuthor','0','','If ON, Personal Name Authorities will replace authors in biblio.author','YesNo'),
475
('addressformat','us','','Choose format to display postal addresses', 'Choice')
475
;
476
;
(-)a/installer/data/mysql/updatedatabase.pl (+9 lines)
Lines 9902-9907 if (C4::Context->preference("Version") < TransformToNum($DBversion)) { Link Here
9902
    SetVersion ($DBversion);
9902
    SetVersion ($DBversion);
9903
}
9903
}
9904
9904
9905
$DBversion = "XXX";
9906
if ( CheckVersion($DBversion) ) {
9907
    $dbh->do(q|
9908
        INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('addressformat','us','Choose format to display postal addresses',NULL,'Choice')
9909
    |);
9910
    print "Upgrade to $DBversion done (Bug 4041: Address Format as a I18N/L10N system preference\n";
9911
    SetVersion ($DBversion);
9912
}
9913
9905
=head1 FUNCTIONS
9914
=head1 FUNCTIONS
9906
9915
9907
=head2 TableExists($table)
9916
=head2 TableExists($table)
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/member-alt-address-style-de.inc (+111 lines)
Line 0 Link Here
1
		<fieldset class="rows" id="memberentry_address">
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="[% B_address %]" />
12
	  [% IF ( mandatoryB_address ) %]<span class="required">Required</span>[% END %]
13
			</li>
14
        [% END %]
15
        [% UNLESS noB_address2 %]
16
			<li>
17
				[% IF ( mandatoryB_address2 ) %]
18
					<label for="B_address2" class="required">
19
				[% ELSE %]
20
					<label for="B_address2">
21
				[% END %]
22
				Address 2: </label>
23
                    <input type="text" id="B_address2" name="B_address2" size="40" value="[% B_address2 %]" />
24
	  [% IF ( mandatoryB_address2 ) %]<span class="required">Required</span>[% END %]
25
			</li>
26
        [% END %]
27
        [% UNLESS noB_zipcode %]
28
                        <li>
29
                                [% IF ( mandatoryB_zipcode ) %]
30
                                        <label for="B_zipcode" class="required">
31
                                [% ELSE %]
32
                                        <label for="B_zipcode">
33
                                [% END %]
34
                                Zip/Postal code: </label>
35
                    <input type="text" id="B_zipcode" name="B_zipcode" maxlength="10" size="10" value="[% B_zipcode %]" />
36
          [% IF ( mandatoryB_zipcode ) %]<span class="required">Required</span>[% END %]
37
                        </li>
38
        [% END %]
39
        [% UNLESS noB_city %]
40
			<li>
41
				[% IF ( mandatoryB_city ) %]
42
					<label for="B_city" class="required" >
43
				[% ELSE %]
44
					<label for="B_city">
45
				[% END %]
46
				City: </label>
47
                <input type="text" id="B_city" name="B_city" size="20" value="[% B_city %]" />
48
	  [% IF ( mandatoryB_city ) %]<span class="required">Required</span>[% END %]
49
			</li>
50
        [% END %]
51
        [% UNLESS noB_state %]
52
			<li>
53
				[% IF ( mandatoryB_state ) %]
54
					<label for="B_state" class="required" >
55
				[% ELSE %]
56
					<label for="B_state">
57
				[% END %]
58
				State: </label>
59
                <input type="text" id="B_state" name="B_state" size="20" value="[% B_state %]" />
60
	  [% IF ( mandatoryB_state ) %]<span class="required">Required</span>[% END %]
61
			</li>
62
        [% END %]
63
        [% UNLESS noB_country %]
64
			<li>
65
				[% IF ( mandatoryB_country ) %]
66
					<label for="B_country" class="required">
67
				[% ELSE %]
68
					<label for="B_country">
69
				[% END %]
70
				Country: </label>
71
                    <input type="text" id="B_country" name="B_country" size="20" value="[% B_country %]" />
72
	  [% IF ( mandatoryB_country ) %]<span class="required">Required</span>[% END %]
73
			</li>
74
        [% END %]
75
        [% UNLESS noB_phone %]
76
            <li>
77
                [% IF ( mandatoryB_phone ) %]
78
                <label for="B_phone" class="required">
79
                [% ELSE %]
80
                <label for="B_phone">
81
                [% END %]
82
                Phone: </label>
83
                    <input type="text" id="B_phone" name="B_phone" value="[% B_phone %]" />
84
                [% IF ( mandatoryB_phone ) %]<span class="required">Required</span>[% END %]
85
            </li>
86
        [% END %]
87
        [% UNLESS noB_email %]
88
			<li>
89
        [% IF ( mandatoryB_email ) %]
90
          <label for="B_email" class="required">
91
        [% ELSE %]
92
          <label for="B_email">
93
        [% END %]
94
        Email: </label>
95
            <input type="text" id="B_email" name="B_email" size="45" value="[% B_email %]" />
96
		[% IF ( mandatoryB_email ) %]<span class="required">Required</span>[% END %] </li>
97
        [% END %]
98
        [% UNLESS nocontactnote %]
99
            <li>
100
                [% IF ( mandatorycontactnote ) %]
101
                <label for="contactnote" class="required">
102
                [% ELSE %]
103
                <label for="contactnote">
104
                [% END %]
105
                Contact note: </label>
106
                <textarea id="contactnote" name="contactnote" cols="40" rows="2">[% contactnote %]</textarea>
107
        [% IF ( mandatorycontactnote ) %]<span class="required">Required</span>[% END %]
108
            </li>
109
        [% END %]
110
			</ol>
111
		</fieldset>
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/member-alt-contact-style-de.inc (+112 lines)
Line 0 Link Here
1
		<fieldset class="rows" id="memberentry_altaddress">
2
            <legend id="alt_contact_lgd">Alternate contact</legend><ol>
3
        [% UNLESS noaltcontactsurname %]
4
			<li>
5
			    [% IF ( mandatoryaltcontactsurname ) %]
6
				<label for="altcontactsurname" class="required">
7
				[% ELSE %]
8
				<label for="altcontactsurname">
9
				[% END %]
10
				Surname:</label>
11
                    <input type="text" name="altcontactsurname" id="altcontactsurname" value="[% altcontactsurname %]" />
12
				[% IF ( mandatoryaltcontactsurname ) %]<span class="required">Required</span>[% END %]
13
			</li>
14
        [% END %]
15
        [% UNLESS noaltcontactfirstname %]
16
			<li>
17
			    [% IF ( mandatoryaltcontactfirstname ) %]
18
				<label for="altcontactfirstname" class="required">
19
				[% ELSE %]
20
				<label for="altcontactfirstname">
21
				[% END %]
22
				First name:</label>
23
                    <input type="text" name="altcontactfirstname" id="altcontactfirstname" value="[% altcontactfirstname %]" />
24
				[% IF ( mandatoryaltcontactfirstname ) %]<span class="required">Required</span>[% END %]
25
			</li>
26
        [% END %]
27
        [% UNLESS noaltcontactaddress1 %]
28
			<li>
29
			    [% IF ( mandatoryaltcontactaddress1 ) %]
30
				<label for="altcontactaddress1" class="required">
31
				[% ELSE %]
32
				<label for="altcontactaddress1">
33
				[% END %]
34
				Address:</label>
35
                    <input type="text" name="altcontactaddress1" id="altcontactaddress1" value="[% altcontactaddress1 %]" size="40" />
36
				[% IF ( mandatoryaltcontactaddress1 ) %]<span class="required">Required</span>[% END %]
37
			</li>
38
        [% END %]
39
        [% UNLESS noaltcontactaddress2 %]
40
			<li>
41
			    [% IF ( mandatoryaltcontactaddress2 ) %]
42
				<label for="altcontactaddress2" class="required">
43
				[% ELSE %]
44
				<label for="altcontactaddress2">
45
				[% END %]
46
				Address 2:</label>
47
                <input type="text" name="altcontactaddress2" id="altcontactaddress2" value="[% altcontactaddress2 %]" size="40" />
48
				[% IF ( mandatoryaltcontactaddress2 ) %]<span class="required">Required</span>[% END %]
49
			</li>
50
        [% END %]
51
        [% UNLESS noaltcontactzipcode %]
52
                        <li>
53
                            [% IF ( mandatoryaltcontactzipcode ) %]
54
                                <label for="altcontactzipcode" class="required">
55
                                [% ELSE %]
56
                                <label for="altcontactzipcode">
57
                                [% END %]
58
                                Zip/Postal code:</label>
59
                    <input type="text" name="altcontactzipcode" id="altcontactzipcode" value="[% altcontactzipcode %]" size="5" />
60
                                [% IF ( mandatoryaltcontactzipcode ) %]<span class="required">Required</span>[% END %]
61
                        </li>
62
        [% END %]
63
        [% UNLESS noaltcontactaddress3 %]
64
			<li>
65
			    [% IF ( mandatoryaltcontactaddress3 ) %]
66
				<label for="altcontactaddress3" class="required">
67
				[% ELSE %]
68
				<label for="altcontactaddress3">
69
				[% END %]
70
				City:</label>
71
                <input type="text" name="altcontactaddress3" id="altcontactaddress3" value="[% altcontactaddress3 %]" size="20" />
72
				[% IF ( mandatoryaltcontactaddress3 ) %]<span class="required">Required</span>[% END %]
73
			</li>
74
        [% END %]
75
        [% UNLESS noaltcontactstate %]
76
			<li>
77
			    [% IF ( mandatoryaltcontactstate ) %]
78
				<label for="altcontactstate" class="required">
79
				[% ELSE %]
80
				<label for="altcontactstate">
81
				[% END %]
82
				State:</label>
83
                <input type="text" name="altcontactstate" id="altcontactstate" value="[% altcontactstate %]" size="20" />
84
				[% IF ( mandatoryaltcontactstate ) %]<span class="required">Required</span>[% END %]
85
			</li>
86
        [% END %]
87
        [% UNLESS noaltcontactcountry %]
88
			<li>
89
			    [% IF ( mandatoryaltcontactcountry ) %]
90
				<label for="altcontactcountry" class="required">
91
				[% ELSE %]
92
				<label for="altcontactcountry">
93
				[% END %]
94
				Country:</label>
95
                    <input type="text" name="altcontactcountry" id="altcontactcountry" value="[% altcontactcountry %]" size="20" />
96
				[% IF ( mandatoryaltcontactcountry ) %]<span class="required">Required</span>[% END %]
97
			</li>
98
        [% END %]
99
        [% UNLESS noaltcontactphone %]
100
			<li>
101
			    [% IF ( mandatoryaltcontactphone ) %]
102
				<label for="altcontactphone" class="required">
103
				[% ELSE %]
104
				<label for="altcontactphone">
105
				[% END %]
106
				Phone:</label>
107
                    <input type="text" name="altcontactphone" id="altcontactphone" value="[% altcontactphone %]" />
108
				[% IF ( mandatoryaltcontactphone ) %]<span class="required">Required</span>[% END %]
109
			</li>
110
        [% END %]
111
            </ol>
112
        </fieldset>
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/member-main-address-style-de.inc (+124 lines)
Line 0 Link Here
1
<fieldset class="rows" id="memberentry_mainaddress">
2
    <legend id="main_address_lgd">Main address</legend><ol>
3
[% UNLESS nostreettype %]
4
    [% IF roadtypes %]
5
      <li>
6
      [% IF ( mandatorystreettype ) %]
7
      <label for="streettype" class="required">
8
      [% ELSE %]
9
      <label for="streettype">
10
      [% END %]
11
      Street type: </label>
12
      <select name="streettype">
13
        <option value=""></option>
14
        [% FOR roadtype IN roadtypes %]
15
          [% IF roadtype.selected %]
16
            <option value="[% roadtype.authorised_value %]" selected="selected">[% roadtype.lib %]</option>
17
          [% ELSE %]
18
            <option value="[% roadtype.authorised_value %]">[% roadtype.lib %]</option>
19
          [% END %]
20
        [% END %]
21
      </select>
22
	  [% IF ( mandatorystreettype ) %]<span class="required">Required</span>[% END %]
23
      </li>
24
    [% END %]
25
        [% END %]
26
        [% UNLESS noaddress %]
27
    <li>
28
      [% IF ( mandatoryaddress ) %]
29
      <label for="address" class="required">
30
      [% ELSE %]
31
      <label for="address">
32
      [% END %]
33
      Address: </label>
34
            <input type="text" id="address" name="address" size="35" value="[% address %]" />
35
	  [% IF ( mandatoryaddress ) %]<span class="required">Required</span>[% END %]
36
    </li>
37
        [% END %]
38
        [% UNLESS nostreetnumber %]
39
    <li>
40
      [% IF ( mandatorystreetnumber ) %]
41
      <label for="streetnumber" class="required">
42
      [% ELSE %]
43
      <label for="streetnumber">
44
      [% END %]
45
      Street number: </label>
46
        <input type="text" id="streetnumber" name="streetnumber" size="5" value="[% streetnumber %]" />
47
[% IF ( mandatorystreetnumber ) %]<span class="required">Required</span>[% END %]
48
    </li>
49
        [% END %]
50
        [% UNLESS noaddress2 %]
51
    <li>
52
      [% IF ( mandatoryaddress2 ) %]
53
      <label for="address2" class="required">
54
      [% ELSE %]
55
      <label for="address2">
56
      [% END %]
57
      Address 2: </label>
58
            <input type="text" id="address2" name="address2" size="35" value="[% address2 %]" />
59
	  [% IF ( mandatoryaddress2 ) %]<span class="required">Required</span>[% END %]
60
    </li>
61
        [% END %]
62
        [% UNLESS nozipcode %]
63
    <li>
64
      [% IF ( mandatoryzipcode ) %]
65
        <label for="zipcode" class="required">
66
      [% ELSE %]
67
        <label for="zipcode">
68
      [% END %]
69
      Zip/Postal code: </label>
70
            <input type="text" name="zipcode" id="zipcode" size="10" value="[% zipcode %]" />
71
          [% IF ( mandatoryzipcode ) %]<span class="required">Required</span>[% END %]
72
    </li>
73
        [% END %]
74
        [% UNLESS nocity %]
75
    <li>
76
      [% IF ( mandatorycity ) %]
77
        <label for="city" class="required">
78
      [% ELSE %]
79
        <label for="city">
80
      [% END %]
81
      City: </label>
82
        <input type="text" id="city" name="city" size="20" value="[% city %]" />
83
        [% IF ( city_cgipopup ) %]or <strong>choose</strong>
84
        <select id="select_city" name="select_city">
85
        [% FOREACH city_loo IN city_loop %]
86
            [% IF ( city_loo.selected ) %]
87
            <option value="[% city_loo.city_zipcode %]|[% city_loo.city_name %]|[% city_loo.city_state %]|[% city_loo.city_country %]" selected="selected">
88
            [% ELSE %]
89
            <option value="[% city_loo.city_zipcode %]|[% city_loo.city_name %]|[% city_loo.city_state %]|[% city_loo.city_country %]">
90
            [% END %]
91
                [% city_loo.city_name %] [% city_loo.city_state %] [% city_loo.city_zipcode %]
92
            </option>
93
        [% END %]
94
        </select>
95
        [% END %]
96
	  [% IF ( mandatorycity ) %]<span class="required">Required</span>[% END %]
97
    </li>
98
        [% END %]
99
        [% UNLESS nostate %]
100
    <li>
101
      [% IF ( mandatorystate ) %]
102
        <label for="state" class="required">
103
      [% ELSE %]
104
        <label for="state">
105
      [% END %]
106
      State: </label>
107
      <input type="text" name="state" id="state" size="20" value="[% state %]" />
108
	  [% IF ( mandatorystate ) %]<span class="required">Required</span>[% END %]
109
    </li>
110
        [% END %]
111
        [% UNLESS nocountry %]
112
    <li>
113
      [% IF ( mandatorycountry ) %]
114
        <label for="country" class="required">
115
      [% ELSE %]
116
        <label for="country">
117
      [% END %]
118
      Country: </label>
119
        <input type="text" name="country" id="country" size="20" value="[% country %]" />
120
	  [% IF ( mandatorycountry ) %]<span class="required">Required</span>[% END %]
121
    </li>
122
        [% END %]
123
	</ol>
124
</fieldset>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/i18n_l10n.pref (+7 lines)
Lines 44-46 I18N/L10N: Link Here
44
        - pref: alphabet
44
        - pref: alphabet
45
          class: long
45
          class: long
46
        - for lists of browsable letters. This should be a space separated list of uppercase letters.
46
        - for lists of browsable letters. This should be a space separated list of uppercase letters.
47
    -
48
        - Format postal addresses using
49
        - pref: addressformat
50
          default: us
51
          choices:
52
              us: US style
53
              de: German style
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt (-4 / +15 lines)
Lines 470-476 Link Here
470
470
471
[% END %]
471
[% END %]
472
[% UNLESS noaddress && noaddress2 && nocity && nostate && nozipcode && nocountry %]
472
[% UNLESS noaddress && noaddress2 && nocity && nostate && nozipcode && nocountry %]
473
[% INCLUDE 'member-main-address-style-us.inc' %]
473
    [% IF Koha.Preference( 'addressformat' ) %]
474
        [% INCLUDE "member-main-address-style-${ Koha.Preference( 'addressformat' ) }.inc" %]
475
    [% ELSE %]
476
        [% INCLUDE 'member-main-address-style-us.inc' %]
477
    [% END %]
474
[% END # nostreet && nocity etc group%]
478
[% END # nostreet && nocity etc group%]
475
479
476
[% UNLESS nophone && nophonepro && nomobile && noemail && noemailpro && nofax %]
480
[% UNLESS nophone && nophonepro && nomobile && noemail && noemailpro && nofax %]
Lines 559-570 Link Here
559
[% IF ( step_6 ) %]
563
[% IF ( step_6 ) %]
560
564
561
    [% UNLESS noB_address && noB_address2 && noB_city && noB_zipcode && noB_state && noB_country &&nocontactnote && noB_phone && noB_email %]
565
    [% UNLESS noB_address && noB_address2 && noB_city && noB_zipcode && noB_state && noB_country &&nocontactnote && noB_phone && noB_email %]
562
[% INCLUDE 'member-alt-address-style-us.inc' %]
566
        [% IF Koha.Preference( 'addressformat' ) %]
567
            [% INCLUDE "member-alt-address-style-${ Koha.Preference( 'addressformat' ) }.inc" %]
568
        [% ELSE %]
569
            [% INCLUDE 'member-alt-address-style-us.inc' %]
570
        [% END %]
563
    [% END # UNLESS noB_address && noB_city && noB_state && noB_phone && noB_email %]
571
    [% END # UNLESS noB_address && noB_city && noB_state && noB_phone && noB_email %]
564
[% END %]
572
[% END %]
565
[% IF ( step_2 ) %]
573
[% IF ( step_2 ) %]
566
    [% UNLESS noaltcontactsurname && noaltcontactfirstname && noaltcontactaddress1 && noaltcontactaddress2 && noaltcontactaddress3 && noaltcontactstate && noaltcontactzipcode && noaltcontactcountry && noaltcontactphone %]
574
    [% UNLESS noaltcontactsurname && noaltcontactfirstname && noaltcontactaddress1 && noaltcontactaddress2 && noaltcontactaddress3 && noaltcontactstate && noaltcontactzipcode && noaltcontactcountry && noaltcontactphone %]
567
[% INCLUDE 'member-alt-contact-style-us.inc' %]
575
        [% IF Koha.Preference( 'addressformat' ) %]
576
            [% INCLUDE "member-alt-contact-style-${ Koha.Preference( 'addressformat' ) }.inc" %]
577
        [% ELSE %]
578
            [% INCLUDE 'member-alt-contact-style-us.inc' %]
579
        [% END %]
568
    [% END # UNLESS noaltcontactsurname && noaltcontactfirstname etc %]
580
    [% END # UNLESS noaltcontactsurname && noaltcontactfirstname etc %]
569
581
570
[% END %]
582
[% END %]
571
- 

Return to bug 4041