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 150-155 sub add_update_attribute_type { Link Here
150
        {
151
        {
151
            repeatable                => $repeatable,
152
            repeatable                => $repeatable,
152
            unique_id                 => $unique_id,
153
            unique_id                 => $unique_id,
154
            is_date                   => $is_date,
153
            opac_display              => $opac_display,
155
            opac_display              => $opac_display,
154
            opac_editable             => $opac_editable,
156
            opac_editable             => $opac_editable,
155
            staff_searchable          => $staff_searchable,
157
            staff_searchable          => $staff_searchable,
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tt (-1 / +34 lines)
Lines 147-152 Link Here
147
                  cannot be given to a different record.</span>
147
                  cannot be given to a different record.</span>
148
        </li>
148
        </li>
149
149
150
        <li>
151
            <label for="is_date">Is a date: </label>
152
            [% IF attribute_type.is_date %]
153
                <input type="checkbox" id="is_date" name="is_date" checked="checked" />
154
            [% ELSE %]
155
                <input type="checkbox" id="is_date" name="is_date" />
156
            [% END %]
157
            <span class="hint">If checked, attribute will be a date. Date attributes cannot be repeatable or linked to an authorised value category.</span>
158
        </li>
159
150
       <li><label for="opac_display">Display in OPAC: </label>
160
       <li><label for="opac_display">Display in OPAC: </label>
151
          [% IF attribute_type AND attribute_type.opac_display %]
161
          [% IF attribute_type AND attribute_type.opac_display %]
152
            <input type="checkbox" id="opac_display" name="opac_display" checked="checked" />
162
            <input type="checkbox" id="opac_display" name="opac_display" checked="checked" />
Lines 428-433 Link Here
428
                }
438
                }
429
            } ).change();
439
            } ).change();
430
440
441
            $("#is_date").change( function() {
442
                if ( this.checked ) {
443
                    $("#repeatable, #authorised_value_category").attr('disabled', true).parent().attr('aria-disabled', 'true');
444
                } else {
445
                    $("#repeatable, #authorised_value_category").removeAttr('disabled').parent().removeAttr('aria-disabled');
446
                }
447
            } ).change();
448
449
            $("#repeatable").change( function() {
450
                if ( this.checked ) {
451
                    $("#is_date").attr('disabled', true).parent().attr('aria-disabled', 'true');
452
                } else {
453
                    $("#is_date").removeAttr('disabled').parent().removeAttr('aria-disabled');
454
                }
455
            } ).change();
456
457
            $("#authorised_value_category").change( function() {
458
                if ( $(this).val() != "" ) {
459
                    $("#is_date").attr('disabled', true).parent().attr('aria-disabled', 'true');
460
                } else {
461
                    $("#is_date").removeAttr('disabled').parent().removeAttr('aria-disabled');
462
                }
463
            } ).change();
464
431
            $(".patron_attributes_types").each(function(){
465
            $(".patron_attributes_types").each(function(){
432
                var tableid = $(this).attr("id");
466
                var tableid = $(this).attr("id");
433
                KohaTable( tableid, {
467
                KohaTable( tableid, {
434
- 

Return to bug 32610