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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt (+19 lines)
Lines 1661-1666 Link Here
1661
</div>
1661
</div>
1662
<!-- /.main.container-fluid -->
1662
<!-- /.main.container-fluid -->
1663
1663
1664
        <!-- Expiration date modal-->
1665
        <div id="expirationDateModal" class="modal" tabindex="-1" role="dialog" aria-labelledby="expirationDateModalLabel" aria-hidden="true">
1666
            <div class="modal-dialog" role="document">
1667
                <div class="modal-content">
1668
                    <div class="modal-header">
1669
                        <button type="button" class="closebtn" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
1670
                        <h4 class="modal-title" id="expirationDateModalLabel">Confirm expiration date</h4>
1671
                    </div>
1672
                    <div class="modal-body">
1673
                        <p>Change expiration date to default for this category?</p>
1674
                    </div>
1675
                    <div class="modal-footer">
1676
                        <button id="expirationDateConfirmBtn" class="btn btn-primary"><i class="fa fa-check" aria-hidden="true"></i> Yes</button>
1677
                        <button id="expirationDateCancelBtn"data-dismiss="modal" class="btn btn-secondary"><i class="fa fa-times" aria-hidden="true"></i> No</button>
1678
                    </div>
1679
                </div>
1680
            </div>
1681
        </div>
1682
1664
[% MACRO jsinclude BLOCK %]
1683
[% MACRO jsinclude BLOCK %]
1665
    [% INCLUDE 'calendar.inc' %]
1684
    [% INCLUDE 'calendar.inc' %]
1666
    [% INCLUDE 'str/members-menu.inc' %]
1685
    [% INCLUDE 'str/members-menu.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/js/members.js (-8 / +12 lines)
Lines 91-103 function update_category_code(category_code) { Link Here
91
91
92
    // Change patron's expiration date
92
    // Change patron's expiration date
93
    $('#categorycode_entry').change(function() {
93
    $('#categorycode_entry').change(function() {
94
        var fp = $("#to").flatpickr();
94
        $('#expirationDateModal').modal('show');
95
        var expiryDate = $('select'+category_selector+' option:selected').data('expiryDate');
95
        // Handle confirmation Yes button click
96
        // Check if expiryDate is available and format it to YYYY-MM-DD
96
        $('#expirationDateConfirmBtn').on('click', function() {
97
        if (expiryDate) {
97
            var fp = $("#to").flatpickr();
98
            var formattedDate = expiryDate.split('T')[0];
98
            var expiryDate = $('select'+category_selector+' option:selected').data('expiryDate');
99
            fp.setDate(formattedDate);
99
            // Check if expiryDate is available and format it to YYYY-MM-DD
100
        }
100
            if (expiryDate) {
101
                var formattedDate = expiryDate.split('T')[0];
102
                fp.setDate(formattedDate);
103
            }
104
            $('#expirationDateModal').modal('hide');
105
        });
101
    });
106
    });
102
}
107
}
103
108
104
- 

Return to bug 32581