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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt (-4 / +14 lines)
Lines 475-481 Link Here
475
                                       <option value="0">Exactly on</option>
475
                                       <option value="0">Exactly on</option>
476
                                       <option value="1">After</option>
476
                                       <option value="1">After</option>
477
                                    </select>
477
                                    </select>
478
                                    <input type="text" size="10" id="hardduedate" name="hardduedate" class="flatpickr" />
478
                                    <input type="text" size="10" id="hardduedate" name="hardduedate" value="[% hardduedate | html %]"class="flatpickr" />
479
                                    <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
479
                                    <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
480
                                </td>
480
                                </td>
481
                                <td><input type="text" name="decreaseloanholds" id="decreaseloanholds" size="2" /></td>
481
                                <td><input type="text" name="decreaseloanholds" id="decreaseloanholds" size="2" /></td>
Lines 1504-1512 Link Here
1504
                        $(current_column).find("input[type='text']").val(note);
1504
                        $(current_column).find("input[type='text']").val(note);
1505
                    } else if ( i == 9 || i == 26 ) {
1505
                    } else if ( i == 9 || i == 26 ) {
1506
                        // specific processing for Hard due date and No automatic renewal after (hard limit)
1506
                        // specific processing for Hard due date and No automatic renewal after (hard limit)
1507
                        var dateCheck = /\d{1,2}\/\d{1,2}\/\d{2,4}/
1507
                        if (itm_text) {
1508
                        if (itm_text) {
1508
                            input_values = itm_text.split(' ');
1509
                            if(i == 9) {
1509
                            $(current_column).find("input[type='text']").val( input_values[1] );
1510
                                var input_values = itm_text.split(' ');
1511
                                var date = input_values[1];
1512
                                itm_text = dateCheck.test(date) ? date : ''
1513
                            }
1514
                            var formatted_date = flatpickr.formatDate(new Date(itm_text), "Y-m-d")
1515
                            $(current_column).find("input[type='hidden']").val(formatted_date);
1516
                            $(current_column).find("input[type='text']").val(itm_text);
1517
                            $(current_column).find("select").val(itm_code);
1518
                        } else {
1519
                            $(current_column).find("input[type='hidden']").val('');
1520
                            $(current_column).find("input[type='text']").val('');
1510
                            $(current_column).find("select").val(itm_code);
1521
                            $(current_column).find("select").val(itm_code);
1511
                        }
1522
                        }
1512
                    } else if ( i == 16 ) {
1523
                    } else if ( i == 16 ) {
1513
- 

Return to bug 35341