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

(-)a/admin/identity_providers.pl (-12 / +17 lines)
Lines 63-69 if ( !$domain_ops && $op eq 'cud-add' ) { Link Here
63
    # Domain configuration params
63
    # Domain configuration params
64
    my $allow_opac          = $input->param('allow_opac') // 0;
64
    my $allow_opac          = $input->param('allow_opac') // 0;
65
    my $allow_staff         = $input->param('allow_staff') // 0;
65
    my $allow_staff         = $input->param('allow_staff') // 0;
66
    my $auto_register       = $input->param('auto_register') // 0;
66
    my $auto_register_opac  = $input->param('auto_register_opac')  // 0;
67
    my $auto_register_staff = $input->param('auto_register_staff') // 0;
67
    my $default_category_id = $input->param('default_category_id');
68
    my $default_category_id = $input->param('default_category_id');
68
    my $default_library_id  = $input->param('default_library_id');
69
    my $default_library_id  = $input->param('default_library_id');
69
    my $domain              = $input->param('domain');
70
    my $domain              = $input->param('domain');
Lines 84-93 if ( !$domain_ops && $op eq 'cud-add' ) { Link Here
84
                )->store;
85
                )->store;
85
86
86
                Koha::Auth::Identity::Provider::Domain->new(
87
                Koha::Auth::Identity::Provider::Domain->new(
87
                    {   identity_provider_id => $provider->identity_provider_id,
88
                    {
89
                        identity_provider_id => $provider->identity_provider_id,
88
                        allow_opac           => $allow_opac,
90
                        allow_opac           => $allow_opac,
89
                        allow_staff          => $allow_staff,
91
                        allow_staff          => $allow_staff,
90
                        auto_register        => $auto_register,
92
                        auto_register_opac   => $auto_register_opac,
93
                        auto_register_staff  => $auto_register_staff,
91
                        default_category_id  => $default_category_id,
94
                        default_category_id  => $default_category_id,
92
                        default_library_id   => $default_library_id,
95
                        default_library_id   => $default_library_id,
93
                        domain               => $domain,
96
                        domain               => $domain,
Lines 118-124 elsif ( $domain_ops && $op eq 'cud-add' ) { Link Here
118
    my $allow_opac              = $input->param('allow_opac');
121
    my $allow_opac              = $input->param('allow_opac');
119
    my $allow_staff             = $input->param('allow_staff');
122
    my $allow_staff             = $input->param('allow_staff');
120
    my $identity_provider_id    = $input->param('identity_provider_id');
123
    my $identity_provider_id    = $input->param('identity_provider_id');
121
    my $auto_register           = $input->param('auto_register');
124
    my $auto_register_opac      = $input->param('auto_register_opac');
125
    my $auto_register_staff     = $input->param('auto_register_staff');
122
    my $default_category_id     = $input->param('default_category_id') || undef;
126
    my $default_category_id     = $input->param('default_category_id') || undef;
123
    my $default_library_id      = $input->param('default_library_id') || undef;
127
    my $default_library_id      = $input->param('default_library_id') || undef;
124
    my $domain                  = $input->param('domain');
128
    my $domain                  = $input->param('domain');
Lines 128-141 elsif ( $domain_ops && $op eq 'cud-add' ) { Link Here
128
132
129
        Koha::Auth::Identity::Provider::Domain->new(
133
        Koha::Auth::Identity::Provider::Domain->new(
130
            {
134
            {
131
                allow_opac          => $allow_opac,
135
                allow_opac           => $allow_opac,
132
                allow_staff         => $allow_staff,
136
                allow_staff          => $allow_staff,
133
                identity_provider_id    => $identity_provider_id,
137
                identity_provider_id => $identity_provider_id,
134
                auto_register       => $auto_register,
138
                auto_register_opac   => $auto_register_opac,
135
                default_category_id => $default_category_id,
139
                auto_register_staff  => $auto_register_staff,
136
                default_library_id  => $default_library_id,
140
                default_category_id  => $default_category_id,
137
                domain              => $domain,
141
                default_library_id   => $default_library_id,
138
                update_on_auth      => $update_on_auth,
142
                domain               => $domain,
143
                update_on_auth       => $update_on_auth,
139
            }
144
            }
140
        )->store;
145
        )->store;
141
146
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/identity_provider_domains.tt (-10 / +42 lines)
Lines 113-124 Link Here
113
                        <span>user data on login</span>
113
                        <span>user data on login</span>
114
                    </li>
114
                    </li>
115
                    <li>
115
                    <li>
116
                        <label for="auto_register">Auto register: </label>
116
                        <label for="auto_register_opac">Auto register (OPAC): </label>
117
                        <select name="auto_register" id="auto_register">
117
                        <select name="auto_register_opac" id="auto_register_opac">
118
                            <option value="1">Allow</option>
118
                            <option value="1">Allow</option>
119
                            <option value="0" selected="selected">Don't allow</option>
119
                            <option value="0" selected="selected">Don't allow</option>
120
                        </select>
120
                        </select>
121
                        <span>users to auto register on login</span>
121
                        <span>users to auto register on login (OPAC)</span>
122
                    </li>
123
                    <li>
124
                        <label for="auto_register_staff">Auto register (Staff interface): </label>
125
                        <select name="auto_register_staff" id="auto_register_staff">
126
                            <option value="1">Allow</option>
127
                            <option value="0" selected="selected">Don't allow</option>
128
                        </select>
129
                        <span>users to auto register on login (Staff interface)</span>
122
                    </li>
130
                    </li>
123
                    <li>
131
                    <li>
124
                        <label for="default_library_id">Default library: </label>
132
                        <label for="default_library_id">Default library: </label>
Lines 201-209 Link Here
201
                        <span>user data on login</span>
209
                        <span>user data on login</span>
202
                    </li>
210
                    </li>
203
                    <li>
211
                    <li>
204
                        <label for="auto_register">Auto register: </label>
212
                        <label for="auto_register_opac">Auto register (OPAC): </label>
205
                        <select name="auto_register" id="auto_register">
213
                        <select name="auto_register_opac" id="auto_register_opac">
206
                        [% IF identity_provider_domain.auto_register == "1" %]
214
                        [% IF identity_provider_domain.auto_register_opac == "1" %]
215
                            <option value="1" selected="selected">Allow</option>
216
                            <option value="0">Don't allow</option>
217
                        [% ELSE %]
218
                            <option value="1">Allow</option>
219
                            <option value="0" selected="selected">Don't allow</option>
220
                        [% END %]
221
                        </select>
222
                        <span>users to auto register on OPAC login</span>
223
                    </li>
224
                    <li>
225
                        <label for="auto_register_staff">Auto register (Staff): </label>
226
                        <select name="auto_register_staff" id="auto_register_staff">
227
                        [% IF identity_provider_domain.auto_register_staff == "1" %]
207
                            <option value="1" selected="selected">Allow</option>
228
                            <option value="1" selected="selected">Allow</option>
208
                            <option value="0">Don't allow</option>
229
                            <option value="0">Don't allow</option>
209
                        [% ELSE %]
230
                        [% ELSE %]
Lines 211-217 Link Here
211
                            <option value="0" selected="selected">Don't allow</option>
232
                            <option value="0" selected="selected">Don't allow</option>
212
                        [% END %]
233
                        [% END %]
213
                        </select>
234
                        </select>
214
                        <span>users to auto register on login</span>
235
                        <span>users to auto register on staff interface login</span>
215
                    </li>
236
                    </li>
216
                    <li>
237
                    <li>
217
                        <label for="default_library_id">Default library: </label>
238
                        <label for="default_library_id">Default library: </label>
Lines 285-291 Link Here
285
                <tr>
306
                <tr>
286
                    <th>Domain</th>
307
                    <th>Domain</th>
287
                    <th>Update on login</th>
308
                    <th>Update on login</th>
288
                    <th>Auto register</th>
309
                    <th>Auto register (OPAC)</th>
310
                    <th>Auto register (Staff)</th>
289
                    <th>Default library</th>
311
                    <th>Default library</th>
290
                    <th>Default category</th>
312
                    <th>Default category</th>
291
                    <th>Allow OPAC</th>
313
                    <th>Allow OPAC</th>
Lines 393-399 Link Here
393
                    },
415
                    },
394
                    {
416
                    {
395
                        "data": function( row, type, val, meta ) {
417
                        "data": function( row, type, val, meta ) {
396
                            if (row.auto_register) {
418
                            if (row.auto_register_opac) {
419
                                return _("Yes");
420
                            } else {
421
                                return _("No");
422
                            }
423
                        },
424
                        "searchable": true,
425
                        "orderable": true
426
                    },
427
                    {
428
                        "data": function( row, type, val, meta ) {
429
                            if (row.auto_register_staff) {
397
                                return _("Yes");
430
                                return _("Yes");
398
                            } else {
431
                            } else {
399
                                return _("No");
432
                                return _("No");
400
- 

Return to bug 37711