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

(-)a/installer/data/mysql/atomicupdate/bug_17718-add_smartform_syspref.sql (+2 lines)
Line 0 Link Here
1
INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES ('SmartformEnable', '0', 'If ON, enable Smartform to simplify address entering during patron registration.', NULL, 'YesNo');
2
INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES ('SmartformClientID', '', 'Smartform service client ID', '', 'Free');
(-)a/installer/data/mysql/sysprefs.sql (+2 lines)
Lines 466-471 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
466
('ShowReviewer','full','none|full|first|surname|firstandinitial|username','Choose how a commenter\'s identity is presented alongside comments in the OPAC','Choice'),
466
('ShowReviewer','full','none|full|first|surname|firstandinitial|username','Choose how a commenter\'s identity is presented alongside comments in the OPAC','Choice'),
467
('ShowReviewerPhoto','1','','If ON, photo of reviewer will be shown beside comments in OPAC','YesNo'),
467
('ShowReviewerPhoto','1','','If ON, photo of reviewer will be shown beside comments in OPAC','YesNo'),
468
('SlipCSS','',NULL,'Slips CSS url.','free'),
468
('SlipCSS','',NULL,'Slips CSS url.','free'),
469
('SmartformEnable', '0', NULL, 'If ON, enable Smartform service to simplify address entering during patron registration.', 'YesNo'),
470
('SmartformClientID', '', '', 'Smartform service client ID', 'Free'),
469
('SMSSendDriver','','','Sets which SMS::Send driver is used to send SMS messages.','free'),
471
('SMSSendDriver','','','Sets which SMS::Send driver is used to send SMS messages.','free'),
470
('SMSSendPassword', '', '', 'Password used to send SMS messages', 'free'),
472
('SMSSendPassword', '', '', 'Password used to send SMS messages', 'free'),
471
('SMSSendUsername', '', '', 'Username/Login used to send SMS messages', 'free'),
473
('SMSSendUsername', '', '', 'Username/Login used to send SMS messages', 'free'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/member-alt-address-style-de.inc (-10 / +34 lines)
Lines 1-3 Link Here
1
[% USE Koha %]
1
        <fieldset class="rows" id="memberentry_address">
2
        <fieldset class="rows" id="memberentry_address">
2
        <legend id="alt_address_lgd">Alternate address</legend><ol>
3
        <legend id="alt_address_lgd">Alternate address</legend><ol>
3
        [% UNLESS noB_address %]
4
        [% UNLESS noB_address %]
Lines 8-14 Link Here
8
                    <label for="B_address">
9
                    <label for="B_address">
9
                [% END %]
10
                [% END %]
10
                Address: </label>
11
                Address: </label>
12
                [% IF Koha.Preference('SmartformEnable') %]
13
                    [% IF ( noB_streetnumber ) %]
14
                        <input type="text" id="B_address" name="B_address" size="40" value="[% B_address %]" class="smartform-instance-alt-address smartform-street-and-number" />
15
                    [% ELSE %]
16
                        <input type="text" id="B_address" name="B_address" size="40" value="[% B_address %]" class="smartform-instance-alt-address smartform-street" />
17
                    [% END %]
18
                [% ELSE %]
11
                    <input type="text" id="B_address" name="B_address" size="40" value="[% B_address %]" />
19
                    <input type="text" id="B_address" name="B_address" size="40" value="[% B_address %]" />
20
                [% END %]
12
      [% IF ( mandatoryB_address ) %]<span class="required">Required</span>[% END %]
21
      [% IF ( mandatoryB_address ) %]<span class="required">Required</span>[% END %]
13
            </li>
22
            </li>
14
        [% END %]
23
        [% END %]
Lines 43-49 Link Here
43
                    <label for="B_streetnumber">
52
                    <label for="B_streetnumber">
44
                [% END %]
53
                [% END %]
45
                Street Number: </label>
54
                Street Number: </label>
55
                [% IF Koha.Preference('SmartformEnable') %]
56
                    <input type="text" id="B_streetnumber" name="B_streetnumber" size="5" value="[% B_streetnumber %]" class="smartform-instance-alt-address smartform-number" />
57
                [% ELSE %]
46
                    <input type="text" id="B_streetnumber" name="B_streetnumber" size="5" value="[% B_streetnumber %]" />
58
                    <input type="text" id="B_streetnumber" name="B_streetnumber" size="5" value="[% B_streetnumber %]" />
59
                [% END %]
47
                [% IF ( mandatoryB_streetnumber ) %]<span class="required">Required</span>[% END %]
60
                [% IF ( mandatoryB_streetnumber ) %]<span class="required">Required</span>[% END %]
48
            </li>
61
            </li>
49
        [% END %]
62
        [% END %]
Lines 61-76 Link Here
61
            </li>
74
            </li>
62
        [% END %]
75
        [% END %]
63
        [% UNLESS noB_zipcode %]
76
        [% UNLESS noB_zipcode %]
64
                        <li>
77
            <li>
65
                                [% IF ( mandatoryB_zipcode ) %]
78
                [% IF ( mandatoryB_zipcode ) %]
66
                                        <label for="B_zipcode" class="required">
79
                    <label for="B_zipcode" class="required">
67
                                [% ELSE %]
80
                [% ELSE %]
68
                                        <label for="B_zipcode">
81
                    <label for="B_zipcode">
69
                                [% END %]
82
                [% END %]
70
                                ZIP/Postal code: </label>
83
                ZIP/Postal code: </label>
84
                [% IF Koha.Preference('SmartformEnable') %]
85
                    <input type="text" id="B_zipcode" name="B_zipcode" maxlength="10" size="10" value="[% B_zipcode %]" class="smartform-instance-alt-address smartform-zip" />
86
                [% ELSE %]
71
                    <input type="text" id="B_zipcode" name="B_zipcode" maxlength="10" size="10" value="[% B_zipcode %]" />
87
                    <input type="text" id="B_zipcode" name="B_zipcode" maxlength="10" size="10" value="[% B_zipcode %]" />
72
          [% IF ( mandatoryB_zipcode ) %]<span class="required">Required</span>[% END %]
88
                [% END %]
73
                        </li>
89
                [% IF ( mandatoryB_zipcode ) %]<span class="required">Required</span>[% END %]
90
            </li>
74
        [% END %]
91
        [% END %]
75
        [% UNLESS noB_city %]
92
        [% UNLESS noB_city %]
76
            <li>
93
            <li>
Lines 80-86 Link Here
80
                    <label for="B_city">
97
                    <label for="B_city">
81
                [% END %]
98
                [% END %]
82
                City: </label>
99
                City: </label>
83
                <input type="text" id="B_city" name="B_city" size="20" value="[% B_city %]" />
100
                [% IF Koha.Preference('SmartformEnable') %]
101
                    <input type="text" id="B_city" name="B_city" size="20" value="[% B_city %]" class="smartform-instance-alt-address smartform-city" />
102
                [% ELSE %]
103
                    <input type="text" id="B_city" name="B_city" size="20" value="[% B_city %]" />
104
                [% END %]
84
      [% IF ( mandatoryB_city ) %]<span class="required">Required</span>[% END %]
105
      [% IF ( mandatoryB_city ) %]<span class="required">Required</span>[% END %]
85
            </li>
106
            </li>
86
        [% END %]
107
        [% END %]
Lines 144-147 Link Here
144
            </li>
165
            </li>
145
        [% END %]
166
        [% END %]
146
            </ol>
167
            </ol>
168
        [% IF Koha.Preference('SmartformEnable') %]
169
            <div id="smartform-result-alt-address" style="margin-left: 110px; margin-top:6px;" class="invisible" ></div>
170
        [% END %]
147
        </fieldset>
171
        </fieldset>
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/member-alt-contact-style-de.inc (-10 / +26 lines)
Lines 1-3 Link Here
1
[% USE Koha %]
1
        <fieldset class="rows" id="memberentry_altaddress">
2
        <fieldset class="rows" id="memberentry_altaddress">
2
            <legend id="alt_contact_lgd">Alternate contact</legend><ol>
3
            <legend id="alt_contact_lgd">Alternate contact</legend><ol>
3
        [% UNLESS noaltcontactsurname %]
4
        [% UNLESS noaltcontactsurname %]
Lines 32-38 Link Here
32
                <label for="altcontactaddress1">
33
                <label for="altcontactaddress1">
33
                [% END %]
34
                [% END %]
34
                Address:</label>
35
                Address:</label>
36
                [% IF Koha.Preference('SmartformEnable') %]
37
                    <input type="text" name="altcontactaddress1" id="altcontactaddress1" value="[% altcontactaddress1 %]" size="40" class="smartform-instance-alt-contact smartform-street-and-number" />
38
                [% ELSE %]
35
                    <input type="text" name="altcontactaddress1" id="altcontactaddress1" value="[% altcontactaddress1 %]" size="40" />
39
                    <input type="text" name="altcontactaddress1" id="altcontactaddress1" value="[% altcontactaddress1 %]" size="40" />
40
                [% END %]
36
                [% IF ( mandatoryaltcontactaddress1 ) %]<span class="required">Required</span>[% END %]
41
                [% IF ( mandatoryaltcontactaddress1 ) %]<span class="required">Required</span>[% END %]
37
            </li>
42
            </li>
38
        [% END %]
43
        [% END %]
Lines 49-64 Link Here
49
            </li>
54
            </li>
50
        [% END %]
55
        [% END %]
51
        [% UNLESS noaltcontactzipcode %]
56
        [% UNLESS noaltcontactzipcode %]
52
                        <li>
57
            <li>
53
                            [% IF ( mandatoryaltcontactzipcode ) %]
58
                [% IF ( mandatoryaltcontactzipcode ) %]
54
                                <label for="altcontactzipcode" class="required">
59
                    <label for="altcontactzipcode" class="required">
55
                                [% ELSE %]
60
                [% ELSE %]
56
                                <label for="altcontactzipcode">
61
                    <label for="altcontactzipcode">
57
                                [% END %]
62
                [% END %]
58
                                ZIP/Postal code:</label>
63
                ZIP/Postal code:</label>
64
                [% IF Koha.Preference('SmartformEnable') %]
65
                    <input type="text" name="altcontactzipcode" id="altcontactzipcode" value="[% altcontactzipcode %]" size="5" class="smartform-instance-alt-contact smartform-zip" />
66
                [% ELSE %]
59
                    <input type="text" name="altcontactzipcode" id="altcontactzipcode" value="[% altcontactzipcode %]" size="5" />
67
                    <input type="text" name="altcontactzipcode" id="altcontactzipcode" value="[% altcontactzipcode %]" size="5" />
60
                                [% IF ( mandatoryaltcontactzipcode ) %]<span class="required">Required</span>[% END %]
68
                [% END %]
61
                        </li>
69
                [% IF ( mandatoryaltcontactzipcode ) %]<span class="required">Required</span>[% END %]
70
            </li>
62
        [% END %]
71
        [% END %]
63
        [% UNLESS noaltcontactaddress3 %]
72
        [% UNLESS noaltcontactaddress3 %]
64
            <li>
73
            <li>
Lines 68-74 Link Here
68
                <label for="altcontactaddress3">
77
                <label for="altcontactaddress3">
69
                [% END %]
78
                [% END %]
70
                City:</label>
79
                City:</label>
71
                <input type="text" name="altcontactaddress3" id="altcontactaddress3" value="[% altcontactaddress3 %]" size="20" />
80
                [% IF Koha.Preference('SmartformEnable') %]
81
                    <input type="text" name="altcontactaddress3" id="altcontactaddress3" value="[% altcontactaddress3 %]" size="20" class="smartform-instance-alt-contact smartform-city" />
82
                [% ELSE %]
83
                    <input type="text" name="altcontactaddress3" id="altcontactaddress3" value="[% altcontactaddress3 %]" size="20" />
84
                [% END %]
72
                [% IF ( mandatoryaltcontactaddress3 ) %]<span class="required">Required</span>[% END %]
85
                [% IF ( mandatoryaltcontactaddress3 ) %]<span class="required">Required</span>[% END %]
73
            </li>
86
            </li>
74
        [% END %]
87
        [% END %]
Lines 109-112 Link Here
109
            </li>
122
            </li>
110
        [% END %]
123
        [% END %]
111
            </ol>
124
            </ol>
125
        [% IF Koha.Preference('SmartformEnable') %]
126
            <div id="smartform-result-alt-contact" style="margin-left: 110px; margin-top:6px;" class="invisible" ></div>
127
        [% END %]
112
        </fieldset>
128
        </fieldset>
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/member-main-address-style-de.inc (+24 lines)
Lines 1-3 Link Here
1
[% USE Koha %]
1
<fieldset class="rows" id="memberentry_mainaddress">
2
<fieldset class="rows" id="memberentry_mainaddress">
2
    <legend id="main_address_lgd">Main address</legend><ol>
3
    <legend id="main_address_lgd">Main address</legend><ol>
3
[% UNLESS nostreettype %]
4
[% UNLESS nostreettype %]
Lines 31-37 Link Here
31
      <label for="address">
32
      <label for="address">
32
      [% END %]
33
      [% END %]
33
      Address: </label>
34
      Address: </label>
35
      [% IF Koha.Preference('SmartformEnable') %]
36
        [% IF ( nostreetnumber ) %]
37
            <input type="text" id="address" name="address" size="35" value="[% address %]" class="smartform-instance-main smartform-street-and-number" />
38
        [% ELSE %]
39
            <input type="text" id="address" name="address" size="35" value="[% address %]" class="smartform-instance-main smartform-street" />
40
        [% END %]
41
      [% ELSE %]
34
            <input type="text" id="address" name="address" size="35" value="[% address %]" />
42
            <input type="text" id="address" name="address" size="35" value="[% address %]" />
43
      [% END %]
35
      [% IF ( mandatoryaddress ) %]<span class="required">Required</span>[% END %]
44
      [% IF ( mandatoryaddress ) %]<span class="required">Required</span>[% END %]
36
    </li>
45
    </li>
37
        [% END %]
46
        [% END %]
Lines 43-49 Link Here
43
      <label for="streetnumber">
52
      <label for="streetnumber">
44
      [% END %]
53
      [% END %]
45
      Street number: </label>
54
      Street number: </label>
55
      [% IF Koha.Preference('SmartformEnable') %]
56
        <input type="text" id="streetnumber" name="streetnumber" size="5" value="[% streetnumber %]" class="smartform-instance-main smartform-number" />
57
      [% ELSE %]
46
        <input type="text" id="streetnumber" name="streetnumber" size="5" value="[% streetnumber %]" />
58
        <input type="text" id="streetnumber" name="streetnumber" size="5" value="[% streetnumber %]" />
59
      [% END %]
47
[% IF ( mandatorystreetnumber ) %]<span class="required">Required</span>[% END %]
60
[% IF ( mandatorystreetnumber ) %]<span class="required">Required</span>[% END %]
48
    </li>
61
    </li>
49
        [% END %]
62
        [% END %]
Lines 67-73 Link Here
67
        <label for="zipcode">
80
        <label for="zipcode">
68
      [% END %]
81
      [% END %]
69
      ZIP/Postal code: </label>
82
      ZIP/Postal code: </label>
83
      [% IF Koha.Preference('SmartformEnable') %]
84
            <input type="text" name="zipcode" id="zipcode" size="10" value="[% zipcode %]" class="smartform-instance-main smartform-zip" />
85
      [% ELSE %]
70
            <input type="text" name="zipcode" id="zipcode" size="10" value="[% zipcode %]" />
86
            <input type="text" name="zipcode" id="zipcode" size="10" value="[% zipcode %]" />
87
      [% END %]
71
          [% IF ( mandatoryzipcode ) %]<span class="required">Required</span>[% END %]
88
          [% IF ( mandatoryzipcode ) %]<span class="required">Required</span>[% END %]
72
    </li>
89
    </li>
73
        [% END %]
90
        [% END %]
Lines 79-85 Link Here
79
        <label for="city">
96
        <label for="city">
80
      [% END %]
97
      [% END %]
81
      City: </label>
98
      City: </label>
99
      [% IF Koha.Preference('SmartformEnable') %]
100
        <input type="text" id="city" name="city" size="20" value="[% city %]" class="smartform-instance-main smartform-city" />
101
      [% ELSE %]
82
        <input type="text" id="city" name="city" size="20" value="[% city %]" />
102
        <input type="text" id="city" name="city" size="20" value="[% city %]" />
103
      [% END %]
83
        [% IF cities.count %]or choose
104
        [% IF cities.count %]or choose
84
        <select id="select_city" name="select_city">
105
        <select id="select_city" name="select_city">
85
            <option value="|||"></option>
106
            <option value="|||"></option>
Lines 122-125 Link Here
122
    </li>
143
    </li>
123
        [% END %]
144
        [% END %]
124
    </ol>
145
    </ol>
146
    [% IF Koha.Preference('SmartformEnable') %]
147
    <div id="smartform-result-main" style="margin-left: 110px; margin-top:6px;" class="invisible" ></div>
148
    [% END %]
125
</fieldset>
149
</fieldset>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref (+11 lines)
Lines 212-214 Patrons: Link Here
212
               yes: Do
212
               yes: Do
213
               no: "Don't"
213
               no: "Don't"
214
         - search the Norwegian national patron database after a local search result was found.
214
         - search the Norwegian national patron database after a local search result was found.
215
    "Smartform service (Czech only)":
216
    -
217
        - pref: SmartformEnable
218
          choices:
219
              yes: Enable
220
              no: Disable
221
        - Smartform autocompletion of postal addresses. This service can be used to simplify patron registration.
222
    -
223
        - Communicate with the Smartform service using
224
        - pref: SmartformClientID
225
        - as the client ID.
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt (-1 / +10 lines)
Lines 5-10 Link Here
5
<title>Koha &rsaquo; Patrons &rsaquo; [% IF ( opadd ) %]Add[% ELSIF ( opduplicate ) %]Duplicate[% ELSE %] Modify[% END %] patron [% IF (firstname) %][% firstname %] [% END %][% IF (surname) %][% surname %] [% END %]([%IF ( categoryname ) %][% categoryname %][% ELSE %][% IF ( I ) %]Organization[% END %][% IF ( A ) %]Adult[% END %][% IF ( C ) %]Child[% END %][% IF ( P ) %]Professional[% END %][% IF ( S ) %]Staff[% END %][% END %])</title>
5
<title>Koha &rsaquo; Patrons &rsaquo; [% IF ( opadd ) %]Add[% ELSIF ( opduplicate ) %]Duplicate[% ELSE %] Modify[% END %] patron [% IF (firstname) %][% firstname %] [% END %][% IF (surname) %][% surname %] [% END %]([%IF ( categoryname ) %][% categoryname %][% ELSE %][% IF ( I ) %]Organization[% END %][% IF ( A ) %]Adult[% END %][% IF ( C ) %]Child[% END %][% IF ( P ) %]Professional[% END %][% IF ( S ) %]Staff[% END %][% END %])</title>
6
[% INCLUDE 'doc-head-close.inc' %]
6
[% INCLUDE 'doc-head-close.inc' %]
7
<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.fixFloat.js"></script>
7
<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.fixFloat.js"></script>
8
[% IF Koha.Preference('SmartformEnable') %]
9
<script type="text/javascript" src="http://smartform.cz/api/v1/smartform.js"></script>
10
<script type="text/javascript">
11
//<![CDATA[
12
        smartform.beforeInit = function () {
13
            smartform.setClientId('[% Koha.Preference('SmartformClientID') %]');
14
        }
15
//]]>
16
</script>
17
[% END %]
8
[% INCLUDE 'calendar.inc' %]
18
[% INCLUDE 'calendar.inc' %]
9
<script type="text/javascript">
19
<script type="text/javascript">
10
//<![CDATA[
20
//<![CDATA[
11
- 

Return to bug 17718