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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tt (-15 / +4 lines)
Lines 148-164 Link Here
148
            <span class="hint">If checked, attribute will be a unique identifier. If a value is given to a patron record, the same value
148
            <span class="hint">If checked, attribute will be a unique identifier. If a value is given to a patron record, the same value
149
                  cannot be given to a different record.</span>
149
                  cannot be given to a different record.</span>
150
        </li>
150
        </li>
151
151
        <li><label for="is_date">Is a date: </label>
152
        <li>
152
            [% IF attribute_type AND attribute_type.is_date %]
153
            <label for="is_date">Is a date: </label>
154
            [% IF attribute_type.is_date %]
155
                <input type="checkbox" id="is_date" name="is_date" checked="checked" />
153
                <input type="checkbox" id="is_date" name="is_date" checked="checked" />
156
            [% ELSE %]
154
            [% ELSE %]
157
                <input type="checkbox" id="is_date" name="is_date" />
155
                <input type="checkbox" id="is_date" name="is_date" />
158
            [% END %]
156
            [% END %]
159
            <span class="hint">If checked, attribute will be a date. Date attributes cannot be repeatable or linked to an authorised value category.</span>
157
            <span class="hint">If checked, attribute will be a date. Date attributes cannot be repeatable or linked to an authorised value category.</span>
160
        </li>
158
        </li>
161
162
       <li><label for="opac_display">Display in OPAC: </label>
159
       <li><label for="opac_display">Display in OPAC: </label>
163
          [% IF attribute_type AND attribute_type.opac_display %]
160
          [% IF attribute_type AND attribute_type.opac_display %]
164
            <input type="checkbox" id="opac_display" name="opac_display" checked="checked" />
161
            <input type="checkbox" id="opac_display" name="opac_display" checked="checked" />
Lines 443-459 Link Here
443
440
444
            $("#is_date").change( function() {
441
            $("#is_date").change( function() {
445
                if ( this.checked ) {
442
                if ( this.checked ) {
446
                    $("#repeatable, #authorised_value_category").attr('disabled', true).parent().attr('aria-disabled', 'true');
443
                    $("#authorised_value_category").attr('disabled', true).parent().attr('aria-disabled', 'true');
447
                } else {
448
                    $("#repeatable, #authorised_value_category").removeAttr('disabled').parent().removeAttr('aria-disabled');
449
                }
450
            } ).change();
451
452
            $("#repeatable").change( function() {
453
                if ( this.checked ) {
454
                    $("#is_date").attr('disabled', true).parent().attr('aria-disabled', 'true');
455
                } else {
444
                } else {
456
                    $("#is_date").removeAttr('disabled').parent().removeAttr('aria-disabled');
445
                    $("#authorised_value_category").removeAttr('disabled').parent().removeAttr('aria-disabled');
457
                }
446
                }
458
            } ).change();
447
            } ).change();
459
448
(-)a/koha-tmpl/intranet-tmpl/prog/js/members.js (-1 / +9 lines)
Lines 57-62 function clone_entry(node) { Link Here
57
    $("input#patron_attr_" + newId, clone).attr('value','');
57
    $("input#patron_attr_" + newId, clone).attr('value','');
58
    $("select#patron_attr_" + newId, clone).attr('value','');
58
    $("select#patron_attr_" + newId, clone).attr('value','');
59
    $(original).after(clone);
59
    $(original).after(clone);
60
61
    // regenerate flatpickr calendars to add event listeners
62
    $(`.flatpickr_wrapper`, clone).remove();
63
    var date = $("> .flatpickr", original).val();
64
    $(".flatpickr", clone).each(function(){
65
        apply_flatpickr(this);
66
    });
67
    $(`.flatpickr_wrapper .flatpickr, #patron_attr_${newId}.flatpickr`, clone).val(date);
68
60
    return false;
69
    return false;
61
}
70
}
62
71
63
- 

Return to bug 32610