Show custom CSS to hosted users

This commit is contained in:
Hillel Coren 2023-11-12 09:28:26 +02:00
parent 33876d8f14
commit ac9ad12077
2 changed files with 9 additions and 12 deletions

View File

@ -731,20 +731,19 @@ class _ClientPortalState extends State<ClientPortal>
maxLines: 6, maxLines: 6,
keyboardType: TextInputType.multiline, keyboardType: TextInputType.multiline,
), ),
if (isSelfHosted(context)) ...[ DecoratedFormField(
DecoratedFormField( label: localization.customCss,
label: localization.customCss, controller: _customCssController,
controller: _customCssController, maxLines: 6,
maxLines: 6, keyboardType: TextInputType.multiline,
keyboardType: TextInputType.multiline, ),
), if (isSelfHosted(context))
DecoratedFormField( DecoratedFormField(
label: localization.customJavascript, label: localization.customJavascript,
controller: _customJavaScriptController, controller: _customJavaScriptController,
maxLines: 6, maxLines: 6,
keyboardType: TextInputType.multiline, keyboardType: TextInputType.multiline,
), ),
],
], ],
) )
], ],

View File

@ -609,10 +609,8 @@ class SettingsSearch extends StatelessWidget {
[ [
'header', 'header',
'footer', 'footer',
if (isSelfHosted(context)) ...[ 'custom_css',
'custom_css', if (isSelfHosted(context)) 'custom_javascript',
'custom_javascript',
],
], ],
], ],
kSettingsEmailSettings: [ kSettingsEmailSettings: [