Fixed more chore form validation edge cases (fixes #2001)

This commit is contained in:
Bernd Bestel 2022-09-20 15:02:24 +02:00
parent ff056f8d81
commit a5c2157320
No known key found for this signature in database
GPG Key ID: 71BD34C0D4891300

View File

@ -166,11 +166,13 @@ $('.input-group-chore-period-type').on('change keyup', function(e)
else if (periodType === 'daily') else if (periodType === 'daily')
{ {
$('#chore-schedule-info').text(__n(periodInterval, "This means the next execution of this chore is scheduled at the same time (based on the start date) every day", "This means the next execution of this chore is scheduled at the same time (based on the start date) every %s days")); $('#chore-schedule-info').text(__n(periodInterval, "This means the next execution of this chore is scheduled at the same time (based on the start date) every day", "This means the next execution of this chore is scheduled at the same time (based on the start date) every %s days"));
$("#period_days").val(1);
} }
else if (periodType === 'weekly') else if (periodType === 'weekly')
{ {
$('#chore-schedule-info').text(__n(periodInterval, "This means the next execution of this chore is scheduled every week on the selected weekdays", "This means the next execution of this chore is scheduled every %s weeks on the selected weekdays")); $('#chore-schedule-info').text(__n(periodInterval, "This means the next execution of this chore is scheduled every week on the selected weekdays", "This means the next execution of this chore is scheduled every %s weeks on the selected weekdays"));
$("#period_config").val($(".period-type-weekly input:checkbox:checked").map(function() { return this.value; }).get().join(",")); $("#period_config").val($(".period-type-weekly input:checkbox:checked").map(function() { return this.value; }).get().join(","));
$("#period_days").val(1);
} }
else if (periodType === 'monthly') else if (periodType === 'monthly')
{ {
@ -182,6 +184,7 @@ $('.input-group-chore-period-type').on('change keyup', function(e)
else if (periodType === 'yearly') else if (periodType === 'yearly')
{ {
$('#chore-schedule-info').text(__n(periodInterval, 'This means the next execution of this chore is scheduled every year on the same day (based on the start date)', 'This means the next execution of this chore is scheduled every %s years on the same day (based on the start date)')); $('#chore-schedule-info').text(__n(periodInterval, 'This means the next execution of this chore is scheduled every year on the same day (based on the start date)', 'This means the next execution of this chore is scheduled every %s years on the same day (based on the start date)'));
$("#period_days").val(1);
} }
else if (periodType === 'adaptive') else if (periodType === 'adaptive')
{ {