- $gnot = intval(PConfig::get(local_user(),'gnot','enable'));
-
- $gnot_checked = (($gnot) ? ' checked="checked" ' : '' );
-
- /* Add some HTML to the existing form */
-
- $s .= '<div class="settings-block">';
- $s .= '<h3>' . t('Gnot Settings') . '</h3>';
- $s .= '<div id="gnot-wrapper">';
- $s .= '<div id="gnot-desc">' . t("Allows threading of email comment notifications on Gmail and anonymising the subject line.") . '</div>';
- $s .= '<label id="gnot-label" for="gnot">' . t('Enable this plugin/addon?') . '</label>';
- $s .= '<input id="gnot-input" type="checkbox" name="gnot" value="1"'. $gnot_checked . '/>';
- $s .= '</div><div class="clear"></div>';
-
- /* provide a submit button */
-
- $s .= '<div class="settings-submit-wrapper" ><input type="submit" name="gnot-submit" class="settings-submit" value="' . t('Save Settings') . '" /></div></div>';
+ $t = Renderer::getMarkupTemplate('settings.tpl', 'addon/gnot/');
+ $html = Renderer::replaceMacros($t, [
+ '$text' => DI::l10n()->t("Allows threading of email comment notifications on Gmail and anonymising the subject line."),
+ '$enabled' => ['gnot', DI::l10n()->t('Enable this addon?'), $gnot],
+ ]);