mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-14 05:38:28 +00:00
Various code related to the recurring transactions.
This commit is contained in:
34
public/js/ff/recurring/create.js
vendored
34
public/js/ff/recurring/create.js
vendored
@@ -32,12 +32,44 @@ $(document).ready(function () {
|
||||
initializeButtons();
|
||||
initializeAutoComplete();
|
||||
respondToFirstDateChange();
|
||||
respondToRepetitionEnd();
|
||||
$('.switch-button').on('click', switchTransactionType);
|
||||
$('#ffInput_repetition_end').on('change', respondToRepetitionEnd);
|
||||
$('#ffInput_first_date').on('change', respondToFirstDateChange);
|
||||
|
||||
|
||||
$('#calendar-link').on('click', showRepCalendar);
|
||||
});
|
||||
|
||||
function showRepCalendar() {
|
||||
|
||||
// fill model with calendar:
|
||||
|
||||
|
||||
$('#defaultModal').modal({});
|
||||
return false;
|
||||
}
|
||||
|
||||
function respondToRepetitionEnd() {
|
||||
var obj = $('#ffInput_repetition_end');
|
||||
var value = obj.val();
|
||||
switch (value) {
|
||||
case 'forever':
|
||||
$('#repeat_until_holder').hide();
|
||||
$('#repetitions_holder').hide();
|
||||
break;
|
||||
case 'until_date':
|
||||
$('#repeat_until_holder').show();
|
||||
$('#repetitions_holder').hide();
|
||||
break;
|
||||
case 'times':
|
||||
$('#repeat_until_holder').hide();
|
||||
$('#repetitions_holder').show();
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
function respondToFirstDateChange() {
|
||||
var obj = $('#ffInput_first_date');
|
||||
var select = $('#ffInput_repetition_type');
|
||||
|
||||
Reference in New Issue
Block a user