- /* Add some HTML to the existing form */
- $s .= '<div class="settings-block">';
- $s .= '<h3>' . DI::l10n()->t('WindowsPhonePush Settings') . '</h3>';
-
- $s .= '<div id="windowsphonepush-enable-wrapper">';
- $s .= '<label id="windowsphonepush-enable-label" for="windowsphonepush-enable-chk">' . DI::l10n()->t('Enable WindowsPhonePush Addon') . '</label>';
- $s .= '<input id="windowsphonepush-enable-chk" type="checkbox" name="windowsphonepush" value="1" ' . $checked_enabled . '/>';
- $s .= '</div><div class="clear"></div>';
-
- $s .= '<div id="windowsphonepush-senditemtext-wrapper">';
- $s .= '<label id="windowsphonepush-senditemtext-label" for="windowsphonepush-senditemtext-chk">' . DI::l10n()->t('Push text of new item') . '</label>';
- $s .= '<input id="windowsphonepush-senditemtext-chk" type="checkbox" name="windowsphonepush-senditemtext" value="1" ' . $checked_senditemtext . '/>';
- $s .= '</div><div class="clear"></div>';
-
- /* provide a submit button - enable und senditemtext can be changed by the user */
- $s .= '<div class="settings-submit-wrapper" ><input type="submit" id="windowsphonepush-submit" name="windowsphonepush-submit" class="settings-submit" value="' . DI::l10n()->t('Save Settings') . '" /></div><div class="clear"></div>';
-
- /* provide further read-only information concerning the addon (useful for */
- $s .= '<div id="windowsphonepush-device_url-wrapper">';
- $s .= '<label id="windowsphonepush-device_url-label" for="windowsphonepush-device_url-text">Device-URL</label>';
- $s .= '<input id="windowsphonepush-device_url-text" type="text" readonly value=' . $device_url . '/>';
- $s .= '</div><div class="clear"></div></div>';
-
- return;
+ $t = Renderer::getMarkupTemplate('settings.tpl', 'addon/windowsphonepush/');
+ $html = Renderer::replaceMacros($t, [
+ '$enabled' => ['windowsphonepush', DI::l10n()->t('Enable WindowsPhonePush Addon'), $enabled],
+ '$senditemtext' => ['windowsphonepush-senditemtext', DI::l10n()->t('Push text of new item'), $senditemtext],
+ '$device_url' => ['', DI::l10n()->t('Device URL'), $device_url, '', false, ' readonly'],
+ ]);
+
+ $data = [
+ 'addon' => 'windowsphonepush',
+ 'title' => DI::l10n()->t('WindowsPhonePush Settings'),
+ 'html' => $html,
+ ];