Fixed chore form validation edge case (fixes #1905)

This commit is contained in:
Bernd Bestel 2022-06-01 20:59:57 +02:00
parent 3d3e4bac75
commit fd7a4e02be
No known key found for this signature in database
GPG Key ID: 71BD34C0D4891300

View File

@ -156,6 +156,8 @@ $('.input-group-chore-period-type').on('change keyup', function(e)
if (periodType === 'manually') if (periodType === 'manually')
{ {
$('#chore-schedule-info').text(__t('This means the next execution of this chore is not scheduled')); $('#chore-schedule-info').text(__t('This means the next execution of this chore is not scheduled'));
$("#period_days").val(1);
$("#period_interval").val(1);
} }
else if (periodType === 'hourly') else if (periodType === 'hourly')
{ {
@ -184,6 +186,8 @@ $('.input-group-chore-period-type').on('change keyup', function(e)
else if (periodType === 'adaptive') else if (periodType === 'adaptive')
{ {
$('#chore-schedule-info').text(__t('This means the next execution of this chore is scheduled dynamically based on the past average execution frequency')); $('#chore-schedule-info').text(__t('This means the next execution of this chore is scheduled dynamically based on the past average execution frequency'));
$("#period_days").val(1);
$("#period_interval").val(1);
} }
Grocy.FrontendHelpers.ValidateForm('chore-form'); Grocy.FrontendHelpers.ValidateForm('chore-form');