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 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 169-175 Link Here
169
          [% ELSE %]
179
          [% ELSE %]
170
            <input type="checkbox" id="staff_searchable" name="staff_searchable" />
180
            <input type="checkbox" id="staff_searchable" name="staff_searchable" />
171
          [% END %]
181
          [% END %]
172
            <span class="hint">Check to make this attribute staff_searchable in the staff patron search.</span>
182
            <span class="hint">Check to make this attribute searchable in the staff patron search.</span>
173
       </li>
183
       </li>
174
       <li><label for="mandatory">Mandatory: </label>
184
       <li><label for="mandatory">Mandatory: </label>
175
          [% IF attribute_type AND attribute_type.mandatory %]
185
          [% IF attribute_type AND attribute_type.mandatory %]
Lines 386-391 Link Here
386
                }
396
                }
387
            } ).change();
397
            } ).change();
388
398
399
            $("#is_date").change( function() {
400
                if ( this.checked ) {
401
                    $("#repeatable, #authorised_value_category").attr('disabled', true).parent().attr('aria-disabled', 'true');
402
                } else {
403
                    $("#repeatable, #authorised_value_category").removeAttr('disabled').parent().removeAttr('aria-disabled');
404
                }
405
            } ).change();
406
407
            $("#repeatable").change( function() {
408
                if ( this.checked ) {
409
                    $("#is_date").attr('disabled', true).parent().attr('aria-disabled', 'true');
410
                } else {
411
                    $("#is_date").removeAttr('disabled').parent().removeAttr('aria-disabled');
412
                }
413
            } ).change();
414
415
            $("#authorised_value_category").change( function() {
416
                if ( $(this).val() != "" ) {
417
                    $("#is_date").attr('disabled', true).parent().attr('aria-disabled', 'true');
418
                } else {
419
                    $("#is_date").removeAttr('disabled').parent().removeAttr('aria-disabled');
420
                }
421
            } ).change();
422
389
            $(".patron_attributes_types").each(function(){
423
            $(".patron_attributes_types").each(function(){
390
                var tableid = $(this).attr("id");
424
                var tableid = $(this).attr("id");
391
                KohaTable( tableid, {
425
                KohaTable( tableid, {
392
- 

Return to bug 32610