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

(-)a/admin/preferences.pl (+1 lines)
Lines 63-68 sub _get_chunk { Link Here
63
        if ( $options{'type'} eq 'modalselect' ) {
63
        if ( $options{'type'} eq 'modalselect' ) {
64
            $chunk->{'source'}     = $options{'source'};
64
            $chunk->{'source'}     = $options{'source'};
65
            $chunk->{'exclusions'} = $options{'exclusions'} // "";
65
            $chunk->{'exclusions'} = $options{'exclusions'} // "";
66
            $chunk->{'inclusions'} = $options{'inclusions'} // "";
66
            $chunk->{'required'}   = $options{'required'} // "";
67
            $chunk->{'required'}   = $options{'required'} // "";
67
            $chunk->{'type'}       = 'modalselect';
68
            $chunk->{'type'}       = 'modalselect';
68
        } elsif ( $options{'type'} eq 'modaljs' ) {
69
        } elsif ( $options{'type'} eq 'modaljs' ) {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt (-1 / +1 lines)
Lines 134-140 Link Here
134
                        [% END %]
134
                        [% END %]
135
                    </select>
135
                    </select>
136
                    [% ELSIF ( CHUNK.type_modalselect ) %]
136
                    [% ELSIF ( CHUNK.type_modalselect ) %]
137
                        <input type="text" name="pref_[% CHUNK.name | html %]" id="pref_[% CHUNK.name | html %]" class="modalselect preference preference-[% CHUNK.type | html %]" data-source="[% CHUNK.source | html %]" data-required="[% CHUNK.required | html %]" data-exclusions="[% CHUNK.exclusions | html %]" readonly="readonly" value="[% CHUNK.value | html %]"/>
137
                        <input type="text" name="pref_[% CHUNK.name | html %]" id="pref_[% CHUNK.name | html %]" class="modalselect preference preference-[% CHUNK.type | html %]" data-source="[% CHUNK.source | html %]" data-required="[% CHUNK.required | html %]" data-exclusions="[% CHUNK.exclusions | html %]" data-inclusions="[% CHUNK.inclusions | html %]" readonly="readonly" value="[% CHUNK.value | html %]"/>
138
                    [% ELSIF ( CHUNK.type_modaljs ) %]
138
                    [% ELSIF ( CHUNK.type_modaljs ) %]
139
                        <input type="text" name="pref_[% CHUNK.name | html %]" data-initiator="[% CHUNK.initiator | html %]" data-processor="[% CHUNK.processor | html %]" id="pref_[% CHUNK.name | html %]" class="modaljs preference preference-[% CHUNK.type | html %]" readonly="readonly" value="[% CHUNK.value | html %]"/>
139
                        <input type="text" name="pref_[% CHUNK.name | html %]" data-initiator="[% CHUNK.initiator | html %]" data-processor="[% CHUNK.processor | html %]" id="pref_[% CHUNK.name | html %]" class="modaljs preference preference-[% CHUNK.type | html %]" readonly="readonly" value="[% CHUNK.value | html %]"/>
140
                    [% ELSIF ( CHUNK.type_multiple ) %]
140
                    [% ELSIF ( CHUNK.type_multiple ) %]
(-)a/koha-tmpl/intranet-tmpl/prog/js/pages/preferences.js (-1 / +6 lines)
Lines 281-286 $( document ).ready( function () { Link Here
281
    $(".modalselect").on("click", function(){
281
    $(".modalselect").on("click", function(){
282
        var datasource = $(this).data("source");
282
        var datasource = $(this).data("source");
283
        var exclusions = $(this).data("exclusions").split('|');
283
        var exclusions = $(this).data("exclusions").split('|');
284
        var inclusions = $(this).data("inclusions").split('|');
284
        var required = $(this).data("required").split('|');
285
        var required = $(this).data("required").split('|');
285
        var pref_name = this.id.replace(/pref_/, '');
286
        var pref_name = this.id.replace(/pref_/, '');
286
        var pref_value = this.value;
287
        var pref_value = this.value;
Lines 305-314 $( document ).ready( function () { Link Here
305
                style = "disabled";
306
                style = "disabled";
306
                disabled = ' disabled="disabled" ';
307
                disabled = ' disabled="disabled" ';
307
                checked  = "";
308
                checked  = "";
309
            } else if( inclusions.indexOf( key ) >= 0 ){
310
                style = "disabled";
311
                disabled = ' disabled="disabled" ';
312
                checked  = ' checked="checked" ';
308
            } else {
313
            } else {
309
                style = "";
314
                style = "";
310
                disabled = "";
315
                disabled = "";
311
            }
316
            }
317
312
            items.push('<label class="' + style +'"><input class="dbcolumn_selection" type="checkbox" id="' + key + '"' + checked + disabled + ' name="pref" value="' + key + '" /> ' + data[key]+ ' (' + key + ')</label>');
318
            items.push('<label class="' + style +'"><input class="dbcolumn_selection" type="checkbox" id="' + key + '"' + checked + disabled + ' name="pref" value="' + key + '" /> ' + data[key]+ ' (' + key + ')</label>');
313
        });
319
        });
314
        $("<div/>", {
320
        $("<div/>", {
315
- 

Return to bug 27634