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

(-)a/admin/patron-attr-types.pl (+2 lines)
Lines 114-119 sub add_update_attribute_type { Link Here
114
    my $description               = $input->param('description');
114
    my $description               = $input->param('description');
115
    my $repeatable                = $input->param('repeatable') ? 1 : 0;
115
    my $repeatable                = $input->param('repeatable') ? 1 : 0;
116
    my $unique_id                 = $input->param('unique_id') ? 1 : 0;
116
    my $unique_id                 = $input->param('unique_id') ? 1 : 0;
117
    my $is_date                   = $input->param('is_date') ? 1 : 0;
117
    my $opac_display              = $input->param('opac_display') ? 1 : 0;
118
    my $opac_display              = $input->param('opac_display') ? 1 : 0;
118
    my $opac_editable             = $input->param('opac_editable') ? 1 : 0;
119
    my $opac_editable             = $input->param('opac_editable') ? 1 : 0;
119
    my $staff_searchable          = $input->param('staff_searchable') ? 1 : 0;
120
    my $staff_searchable          = $input->param('staff_searchable') ? 1 : 0;
Lines 149-154 sub add_update_attribute_type { Link Here
149
        {
150
        {
150
            repeatable                => $repeatable,
151
            repeatable                => $repeatable,
151
            unique_id                 => $unique_id,
152
            unique_id                 => $unique_id,
153
            is_date                   => $is_date,
152
            opac_display              => $opac_display,
154
            opac_display              => $opac_display,
153
            opac_editable             => $opac_editable,
155
            opac_editable             => $opac_editable,
154
            staff_searchable          => $staff_searchable,
156
            staff_searchable          => $staff_searchable,
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tt (-2 / +35 lines)
Lines 154-159 Patron attribute types › Administration › Koha Link Here
154
                  cannot be given to a different record.</span>
154
                  cannot be given to a different record.</span>
155
        </li>
155
        </li>
156
156
157
        <li>
158
            <label for="is_date">Is a date: </label>
159
            [% IF attribute_type.is_date %]
160
                <input type="checkbox" id="is_date" name="is_date" checked="checked" />
161
            [% ELSE %]
162
                <input type="checkbox" id="is_date" name="is_date" />
163
            [% END %]
164
            <span class="hint">If checked, attribute will be a date. Date attributes cannot be repeatable or linked to an authorised value category.</span>
165
        </li>
166
157
       <li><label for="opac_display">Display in OPAC: </label>
167
       <li><label for="opac_display">Display in OPAC: </label>
158
          [% IF attribute_type AND attribute_type.opac_display %]
168
          [% IF attribute_type AND attribute_type.opac_display %]
159
            <input type="checkbox" id="opac_display" name="opac_display" checked="checked" />
169
            <input type="checkbox" id="opac_display" name="opac_display" checked="checked" />
Lines 176-182 Patron attribute types &rsaquo; Administration &rsaquo; Koha Link Here
176
          [% ELSE %]
186
          [% ELSE %]
177
            <input type="checkbox" id="staff_searchable" name="staff_searchable" />
187
            <input type="checkbox" id="staff_searchable" name="staff_searchable" />
178
          [% END %]
188
          [% END %]
179
            <span class="hint">Check to make this attribute staff_searchable in the staff patron search.</span>
189
            <span class="hint">Check to make this attribute searchable in the staff patron search.</span>
180
       </li>
190
       </li>
181
       <li><label for="mandatory">Mandatory: </label>
191
       <li><label for="mandatory">Mandatory: </label>
182
          [% IF attribute_type AND attribute_type.mandatory %]
192
          [% IF attribute_type AND attribute_type.mandatory %]
Lines 391-396 Patron attribute types &rsaquo; Administration &rsaquo; Koha Link Here
391
                }
401
                }
392
            } ).change();
402
            } ).change();
393
403
404
            $("#is_date").change( function() {
405
                if ( this.checked ) {
406
                    $("#repeatable, #authorised_value_category").attr('disabled', true).parent().attr('aria-disabled', 'true');
407
                } else {
408
                    $("#repeatable, #authorised_value_category").removeAttr('disabled').parent().removeAttr('aria-disabled');
409
                }
410
            } ).change();
411
412
            $("#repeatable").change( function() {
413
                if ( this.checked ) {
414
                    $("#is_date").attr('disabled', true).parent().attr('aria-disabled', 'true');
415
                } else {
416
                    $("#is_date").removeAttr('disabled').parent().removeAttr('aria-disabled');
417
                }
418
            } ).change();
419
420
            $("#authorised_value_category").change( function() {
421
                if ( $(this).val() != "" ) {
422
                    $("#is_date").attr('disabled', true).parent().attr('aria-disabled', 'true');
423
                } else {
424
                    $("#is_date").removeAttr('disabled').parent().removeAttr('aria-disabled');
425
                }
426
            } ).change();
427
394
            $(".patron_attributes_types").each(function(){
428
            $(".patron_attributes_types").each(function(){
395
                var tableid = $(this).attr("id");
429
                var tableid = $(this).attr("id");
396
                KohaTable( tableid, {
430
                KohaTable( tableid, {
397
- 

Return to bug 32610