mirror of
https://github.com/grocy/grocy.git
synced 2025-08-18 03:25:50 +00:00
UI test/review
This commit is contained in:
@@ -122,12 +122,12 @@ $('.input-group-chore-period-type').on('change', function(e)
|
||||
|
||||
$(".period-type-input").addClass("d-none");
|
||||
$(".period-type-" + periodType).removeClass("d-none");
|
||||
$('#chore-period-type-info').text("");
|
||||
$('#chore-period-type-info').attr("title", "");
|
||||
$("#period_config").val("");
|
||||
|
||||
if (periodType === 'manually')
|
||||
{
|
||||
$('#chore-period-type-info').text(__t('This means the next execution of this chore is not scheduled'));
|
||||
$('#chore-period-type-info').attr("title", __t('This means the next execution of this chore is not scheduled'));
|
||||
}
|
||||
else if (periodType === 'dynamic-regular')
|
||||
{
|
||||
@@ -135,32 +135,32 @@ $('.input-group-chore-period-type').on('change', function(e)
|
||||
$("#period_days").attr("min", "0");
|
||||
$("#period_days").attr("max", "9999");
|
||||
$("#period_days").parent().find(".invalid-feedback").text(__t('This cannot be negative'));
|
||||
$('#chore-period-type-info').text(__t('This means the next execution of this chore is scheduled %s days after the last execution', periodDays.toString()));
|
||||
$('#chore-period-type-info').attr("title", __t('This means the next execution of this chore is scheduled %s days after the last execution', periodDays.toString()));
|
||||
}
|
||||
else if (periodType === 'daily')
|
||||
{
|
||||
$('#chore-period-type-info').text(__t('This means the next execution of this chore is scheduled 1 day after the last execution'));
|
||||
$('#chore-period-interval-info').text(__t('This means the next execution of this chore should only be scheduled every %s days', periodInterval.toString()));
|
||||
$('#chore-period-type-info').attr("title", __t('This means the next execution of this chore is scheduled 1 day after the last execution'));
|
||||
$('#chore-period-interval-info').attr("title", __t('This means the next execution of this chore should only be scheduled every %s days', periodInterval.toString()));
|
||||
}
|
||||
else if (periodType === 'weekly')
|
||||
{
|
||||
$('#chore-period-type-info').text(__t('This means the next execution of this chore is scheduled 1 day after the last execution, but only for the weekdays selected below'));
|
||||
$('#chore-period-type-info').attr("title", __t('This means the next execution of this chore is scheduled 1 day after the last execution, but only for the weekdays selected below'));
|
||||
$("#period_config").val($(".period-type-weekly input:checkbox:checked").map(function() { return this.value; }).get().join(","));
|
||||
$('#chore-period-interval-info').text(__t('This means the next execution of this chore should only be scheduled every %s weeks', periodInterval.toString()));
|
||||
$('#chore-period-interval-info').attr("title", __t('This means the next execution of this chore should only be scheduled every %s weeks', periodInterval.toString()));
|
||||
}
|
||||
else if (periodType === 'monthly')
|
||||
{
|
||||
$('#chore-period-type-info').text(__t('This means the next execution of this chore is scheduled on the below selected day of each month'));
|
||||
$('#chore-period-type-info').attr("title", __t('This means the next execution of this chore is scheduled on the below selected day of each month'));
|
||||
$("label[for='period_days']").text(__t("Day of month"));
|
||||
$("#period_days").attr("min", "1");
|
||||
$("#period_days").attr("max", "31");
|
||||
$("#period_days").parent().find(".invalid-feedback").text(__t('The amount must be between %1$s and %2$s', "1", "31"));
|
||||
$('#chore-period-interval-info').text(__t('This means the next execution of this chore should only be scheduled every %s months', periodInterval.toString()));
|
||||
$('#chore-period-interval-info').attr("title", __t('This means the next execution of this chore should only be scheduled every %s months', periodInterval.toString()));
|
||||
}
|
||||
else if (periodType === 'yearly')
|
||||
{
|
||||
$('#chore-period-type-info').text(__t('This means the next execution of this chore is scheduled 1 year after the last execution'));
|
||||
$('#chore-period-interval-info').text(__t('This means the next execution of this chore should only be scheduled every %s years', periodInterval.toString()));
|
||||
$('#chore-period-type-info').attr("title", __t('This means the next execution of this chore is scheduled 1 year after the last execution'));
|
||||
$('#chore-period-interval-info').attr("title", __t('This means the next execution of this chore should only be scheduled every %s years', periodInterval.toString()));
|
||||
}
|
||||
|
||||
Grocy.FrontendHelpers.ValidateForm('chore-form');
|
||||
@@ -176,23 +176,23 @@ $('.input-group-chore-assignment-type').on('change', function(e)
|
||||
|
||||
if (assignmentType === 'no-assignment')
|
||||
{
|
||||
$('#chore-assignment-type-info').text(__t('This means the next execution of this chore will not be assigned to anyone'));
|
||||
$('#chore-assignment-type-info').attr("title", __t('This means the next execution of this chore will not be assigned to anyone'));
|
||||
}
|
||||
else if (assignmentType === 'who-least-did-first')
|
||||
{
|
||||
$('#chore-assignment-type-info').text(__t('This means the next execution of this chore will be assigned to the one who executed it least'));
|
||||
$('#chore-assignment-type-info').attr("title", __t('This means the next execution of this chore will be assigned to the one who executed it least'));
|
||||
$("#assignment_config").attr("required", "");
|
||||
$("#assignment_config").removeAttr("disabled");
|
||||
}
|
||||
else if (assignmentType === 'random')
|
||||
{
|
||||
$('#chore-assignment-type-info').text(__t('This means the next execution of this chore will be assigned randomly'));
|
||||
$('#chore-assignment-type-info').attr("title", __t('This means the next execution of this chore will be assigned randomly'));
|
||||
$("#assignment_config").attr("required", "");
|
||||
$("#assignment_config").removeAttr("disabled");
|
||||
}
|
||||
else if (assignmentType === 'in-alphabetical-order')
|
||||
{
|
||||
$('#chore-assignment-type-info').text(__t('This means the next execution of this chore will be assigned to the next one in alphabetical order'));
|
||||
$('#chore-assignment-type-info').attr("title", __t('This means the next execution of this chore will be assigned to the next one in alphabetical order'));
|
||||
$("#assignment_config").attr("required", "");
|
||||
$("#assignment_config").removeAttr("disabled");
|
||||
}
|
||||
|
Reference in New Issue
Block a user