From 4d3aed3095767e56307613e2d43d59b95595096e Mon Sep 17 00:00:00 2001 From: Christian Wiwie Date: Sun, 15 Mar 2020 21:19:42 +0100 Subject: [PATCH] #8374: Using sub-templates for input field --- showmore_dyn/showmore_dyn.php | 4 ++-- showmore_dyn/templates/settings.tpl | 5 +---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/showmore_dyn/showmore_dyn.php b/showmore_dyn/showmore_dyn.php index 41de11a3..73eb7b17 100644 --- a/showmore_dyn/showmore_dyn.php +++ b/showmore_dyn/showmore_dyn.php @@ -41,7 +41,7 @@ function showmore_dyn_settings_post() } if (isset($_POST['showmore_dyn-submit'])) { - $limitHeight = $_POST['showmore_dyn_height']; + $limitHeight = $_POST['limitHeight']; if ($limitHeight && is_numeric($limitHeight)) { DI::pConfig()->set(local_user(), 'showmore_dyn', 'limitHeight', $limitHeight); } @@ -62,7 +62,7 @@ function showmore_dyn_settings(App &$a, &$o) '$submit' => DI::l10n()->t('Save Settings'), '$title' => 'Showmore Dynamic', '$label' => DI::l10n()->t('Limit Height'), - '$limitHeight' => $limitHeight, + '$limitHeight' => ['limitHeight', DI::l10n()->t('Limit Height'), $limitHeight, 'The maximal height of posts when collapsed', '', '', 'number'], ]); } diff --git a/showmore_dyn/templates/settings.tpl b/showmore_dyn/templates/settings.tpl index 782d1fdf..5e8bc3f1 100644 --- a/showmore_dyn/templates/settings.tpl +++ b/showmore_dyn/templates/settings.tpl @@ -1,9 +1,6 @@

{{$title}}

-
- - -
+ {{include file="field_input.tpl" field=$limitHeight}}
-- 2.39.5