Optimized meal plan entry add/edit dialog titles

This commit is contained in:
Bernd Bestel
2022-04-03 19:08:36 +02:00
parent 49a2b8232f
commit 3091a06194
3 changed files with 20 additions and 26 deletions

View File

@@ -2345,20 +2345,8 @@ msgstr ""
msgid "Now / today"
msgstr ""
msgid "Add recipe meal plan entry"
msgid "Add meal plan entry"
msgstr ""
msgid "Add note meal plan entry"
msgstr ""
msgid "Add product meal plan entry"
msgstr ""
msgid "Edit note meal plan entry"
msgstr ""
msgid "Edit product meal plan entry"
msgstr ""
msgid "Edit recipe meal plan entry"
msgid "Edit meal plan entry"
msgstr ""

View File

@@ -363,7 +363,7 @@ $(document).on("click", ".add-recipe-button", function(e)
{
var day = $(this).parent().parent().data("date");
$("#add-recipe-modal-title").text(__t("Add recipe meal plan entry"));
$("#add-recipe-modal-title").text(__t("Add meal plan entry"));
$(".datetimepicker-wrapper").detach().prependTo("#add-recipe-form");
$("input#day").detach().appendTo("#add-recipe-form");
Grocy.Components.DateTimePicker.Init(true);
@@ -379,7 +379,7 @@ $(document).on("click", ".add-note-button", function(e)
{
var day = $(this).parent().parent().parent().data("date");
$("#add-note-modal-title").text(__t("Add note meal plan entry"));
$("#add-note-modal-title").text(__t("Add meal plan entry"));
$(".datetimepicker-wrapper").detach().prependTo("#add-note-form");
$("input#day").detach().appendTo("#add-note-form")
Grocy.Components.DateTimePicker.Init(true);
@@ -395,7 +395,7 @@ $(document).on("click", ".add-product-button", function(e)
{
var day = $(this).parent().parent().parent().data("date");
$("#add-product-modal-title").text(__t("Add product meal plan entry"));
$("#add-product-modal-title").text(__t("Add meal plan entry"));
$(".datetimepicker-wrapper").detach().prependTo("#add-product-form");
$("input#day").detach().appendTo("#add-product-form")
Grocy.Components.DateTimePicker.Init(true);
@@ -417,7 +417,7 @@ $(document).on("click", ".edit-meal-plan-entry-button", function(e)
$("input#day").detach().appendTo("#add-recipe-form")
Grocy.Components.DateTimePicker.Init(true);
Grocy.Components.DateTimePicker.SetValue(mealPlanEntry.day);
$("#add-recipe-modal-title").text(__t("Edit recipe meal plan entry"));
$("#add-recipe-modal-title").text(__t("Edit meal plan entry"));
$("#recipe_servings").val(mealPlanEntry.recipe_servings);
Grocy.Components.RecipePicker.SetId(mealPlanEntry.recipe_id);
$("#add-recipe-modal").modal("show");
@@ -430,7 +430,7 @@ $(document).on("click", ".edit-meal-plan-entry-button", function(e)
$("input#day").detach().appendTo("#add-product-form")
Grocy.Components.DateTimePicker.Init(true);
Grocy.Components.DateTimePicker.SetValue(mealPlanEntry.day);
$("#add-product-modal-title").text(__t("Edit product meal plan entry"));
$("#add-product-modal-title").text(__t("Edit meal plan entry"));
Grocy.Components.ProductPicker.SetId(mealPlanEntry.product_id);
$("#add-product-modal").modal("show");
$("#section_id_product").val(mealPlanEntry.section_id);
@@ -443,7 +443,7 @@ $(document).on("click", ".edit-meal-plan-entry-button", function(e)
$("input#day").detach().appendTo("#add-note-form");
Grocy.Components.DateTimePicker.Init(true);
Grocy.Components.DateTimePicker.SetValue(mealPlanEntry.day);
$("#add-note-modal-title").text(__t("Edit note meal plan entry"));
$("#add-note-modal-title").text(__t("Edit meal plan entry"));
$("#note").val(mealPlanEntry.note);
$("#add-note-modal").modal("show");
$("#section_id_note").val(mealPlanEntry.section_id);

View File

@@ -151,8 +151,10 @@
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 id="add-recipe-modal-title"
class="modal-title w-100"></h4>
<h4 class="modal-title w-100">
<span id="add-recipe-modal-title"></span>
<span class="text-muted float-right">{{ $__t('Recipe') }}</span>
</h4>
</div>
<div class="modal-body">
<form id="add-recipe-form"
@@ -224,8 +226,10 @@
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 id="add-note-modal-title"
class="modal-title w-100"></h4>
<h4 class="modal-title w-100">
<span id="add-note-modal-title"></span>
<span class="text-muted float-right">{{ $__t('Note') }}</span>
</h4>
</div>
<div class="modal-body">
<form id="add-note-form"
@@ -274,8 +278,10 @@
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 id="add-product-modal-title"
class="modal-title w-100"></h4>
<h4 class="modal-title w-100">
<span id="add-product-modal-title"></span>
<span class="text-muted float-right">{{ $__t('Product') }}</span>
</h4>
</div>
<div class="modal-body">
<form id="add-product-form"