diff --git a/gnot/gnot.php b/gnot/gnot.php index 7adf045f..2168f97a 100644 --- a/gnot/gnot.php +++ b/gnot/gnot.php @@ -11,6 +11,7 @@ use Friendica\Core\Hook; use Friendica\Core\L10n; use Friendica\Core\Logger; use Friendica\Core\PConfig; +use Friendica\Core\Renderer; function gnot_install() { @@ -76,20 +77,16 @@ function gnot_settings(&$a,&$s) { $gnot_checked = (($gnot) ? ' checked="checked" ' : '' ); + $t = Renderer::getMarkupTemplate('settings.tpl', 'addon/gnot/'); /* Add some HTML to the existing form */ - $s .= '
'; - $s .= '

' . L10n::t('Gnot Settings') . '

'; - $s .= '
'; - $s .= '
' . L10n::t("Allows threading of email comment notifications on Gmail and anonymising the subject line.") . '
'; - $s .= ''; - $s .= ''; - $s .= '
'; - - /* provide a submit button */ - - $s .= '
'; - + $s .= Renderer::replaceMacros($t, [ + '$title' => L10n::t('Gnot Settings') , + '$submit' => L10n::t('Save Settings'), + '$enable' => L10n::t('Enable this addon?'), + '$enabled' => $gnot_checked, + '$text' => L10n::t("Allows threading of email comment notifications on Gmail and anonymising the subject line.") + ]); } diff --git a/gnot/templates/settings.tpl b/gnot/templates/settings.tpl new file mode 100644 index 00000000..1323eb4d --- /dev/null +++ b/gnot/templates/settings.tpl @@ -0,0 +1,20 @@ + +

{{$title}}

+
+