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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt (+20 lines)
Lines 1752-1757 legend.collapsed i.fa.fa-caret-down::before { Link Here
1752
                </div> <!-- /.col-sm-2.col-sm-pull-10 -->
1752
                </div> <!-- /.col-sm-2.col-sm-pull-10 -->
1753
            [% END %]
1753
            [% END %]
1754
        </div> <!-- /.row -->
1754
        </div> <!-- /.row -->
1755
1756
        <!-- Expiration date modal-->
1757
        <div id="expirationDateModal" class="modal" tabindex="-1" role="dialog" aria-labelledby="expirationDateModalLabel" aria-hidden="true">
1758
            <div class="modal-dialog" role="document">
1759
                <div class="modal-content">
1760
                    <div class="modal-header">
1761
                        <button type="button" class="closebtn" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
1762
                        <h4 class="modal-title" id="expirationDateModalLabel">Confirm expiration date</h4>
1763
                    </div>
1764
                    <div class="modal-body">
1765
                        <p>Change expiration date to default for this category?</p>
1766
                    </div>
1767
                    <div class="modal-footer">
1768
                        <button id="expirationDateConfirmBtn" class="btn btn-primary"><i class="fa fa-check" aria-hidden="true"></i> Yes</button>
1769
                        <button id="expirationDateCancelBtn"data-dismiss="modal" class="btn btn-secondary"><i class="fa fa-times" aria-hidden="true"></i> No</button>
1770
                    </div>
1771
                </div>
1772
            </div>
1773
        </div>
1774
1755
[% MACRO jsinclude BLOCK %]
1775
[% MACRO jsinclude BLOCK %]
1756
    [% Asset.js("lib/hc-sticky/hc-sticky.js") | $raw %]
1776
    [% Asset.js("lib/hc-sticky/hc-sticky.js") | $raw %]
1757
    [% INCLUDE 'calendar.inc' %]
1777
    [% INCLUDE 'calendar.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/js/members.js (-8 / +12 lines)
Lines 84-96 function update_category_code(category_code) { Link Here
84
84
85
    // Change patron's expiration date
85
    // Change patron's expiration date
86
    $('#categorycode_entry').change(function() {
86
    $('#categorycode_entry').change(function() {
87
        var fp = $("#to").flatpickr();
87
        $('#expirationDateModal').modal('show');
88
        var expiryDate = $('select'+category_selector+' option:selected').data('expiryDate');
88
        // Handle confirmation Yes button click
89
        // Check if expiryDate is available and format it to YYYY-MM-DD
89
        $('#expirationDateConfirmBtn').on('click', function() {
90
        if (expiryDate) {
90
            var fp = $("#to").flatpickr();
91
            var formattedDate = expiryDate.split('T')[0];
91
            var expiryDate = $('select'+category_selector+' option:selected').data('expiryDate');
92
            fp.setDate(formattedDate);
92
            // Check if expiryDate is available and format it to YYYY-MM-DD
93
        }
93
            if (expiryDate) {
94
                var formattedDate = expiryDate.split('T')[0];
95
                fp.setDate(formattedDate);
96
            }
97
            $('#expirationDateModal').modal('hide');
98
        });
94
    });
99
    });
95
}
100
}
96
101
97
- 

Return to bug 32581