feat(auth-firebase): implement Phase 2 integration - Firebase Auth, Session Sync, Favorites Grid, and Firestore Newsletter
This commit is contained in:
@@ -204,6 +204,11 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && ($_POST['action'] ?? '') === 'delet
|
||||
$comingSoon = isset($_POST['coming_soon']) && $_POST['coming_soon'] === '1';
|
||||
$slugOriginal = trim($_POST['slug_original'] ?? '');
|
||||
|
||||
$nutriCal = (int) ($_POST['nutrition_calories'] ?? 0);
|
||||
$nutriProt = (int) ($_POST['nutrition_protein'] ?? 0);
|
||||
$nutriCarb = (int) ($_POST['nutrition_carbs'] ?? 0);
|
||||
$nutriFat = (int) ($_POST['nutrition_fat'] ?? 0);
|
||||
|
||||
// keep previous language data if fields left blank while editing
|
||||
$prevEn = $editing['i18n']['en'] ?? [];
|
||||
$prevDe = $editing['i18n']['de'] ?? [];
|
||||
@@ -261,6 +266,12 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && ($_POST['action'] ?? '') === 'delet
|
||||
'servings' => $servings,
|
||||
'featured' => $featured,
|
||||
'coming_soon' => $comingSoon,
|
||||
'nutrition' => [
|
||||
'calories' => $nutriCal,
|
||||
'protein' => $nutriProt,
|
||||
'carbs' => $nutriCarb,
|
||||
'fat' => $nutriFat
|
||||
],
|
||||
'i18n' => [
|
||||
'en' => [
|
||||
'title' => $titleEn,
|
||||
@@ -517,6 +528,25 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && ($_POST['action'] ?? '') === 'delet
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div>
|
||||
<label>Calories (kcal)</label>
|
||||
<input type="number" name="nutrition_calories" min="0" value="<?php echo e($editing['nutrition']['calories'] ?? 0); ?>">
|
||||
</div>
|
||||
<div>
|
||||
<label>Protein (g)</label>
|
||||
<input type="number" name="nutrition_protein" min="0" value="<?php echo e($editing['nutrition']['protein'] ?? 0); ?>">
|
||||
</div>
|
||||
<div>
|
||||
<label>Carbs (g)</label>
|
||||
<input type="number" name="nutrition_carbs" min="0" value="<?php echo e($editing['nutrition']['carbs'] ?? 0); ?>">
|
||||
</div>
|
||||
<div>
|
||||
<label>Fat (g)</label>
|
||||
<input type="number" name="nutrition_fat" min="0" value="<?php echo e($editing['nutrition']['fat'] ?? 0); ?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
<h3>English</h3>
|
||||
<div class="row">
|
||||
|
||||
Reference in New Issue
Block a user