From 7b5bcd45f81e0819df44757324bcd55238533b37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garc=C3=ADa?= Date: Mon, 18 Feb 2019 19:25:33 +0100 Subject: [PATCH] Show read-only options in the config panel and the env variable names in the tooltips --- src/config.rs | 2 +- src/static/templates/admin/page.hbs | 49 ++++++++++++++++++++++++++++- 2 files changed, 49 insertions(+), 2 deletions(-) diff --git a/src/config.rs b/src/config.rs index 12ae4c0f..a0facd0d 100644 --- a/src/config.rs +++ b/src/config.rs @@ -213,7 +213,7 @@ make_config! { settings { /// Domain URL |> This needs to be set to the URL used to access the server, including 'http[s]://' and port, if it's different than the default. Some server functions don't work correctly without this value domain: String, true, def, "http://localhost".to_string(); - /// PRIVATE |> Domain set + /// Domain Set |> Indicates if the domain is set by the admin. Otherwise the default will be used. domain_set: bool, false, def, false; /// Enable web vault web_vault_enabled: bool, false, def, true; diff --git a/src/static/templates/admin/page.hbs b/src/static/templates/admin/page.hbs index 63916873..fb28181f 100644 --- a/src/static/templates/admin/page.hbs +++ b/src/static/templates/admin/page.hbs @@ -66,7 +66,7 @@
{{#each elements}} {{#if editable}} -
+
{{#case type "text" "number" "password"}}
@@ -100,6 +100,53 @@
{{/if}} {{/each}} + +
+
+
+

+ NOTE: These options can't be modified in the editor because they would require the server + to be restarted. To modify them, you need to set the correct environment variables when + launching the server. You can check the variable names in the tooltips of each option. +

+ + {{#each config}} + {{#each elements}} + {{#unless editable}} +
+ {{#case type "text" "number" "password"}} + +
+ + + {{#case type "password"}} +
+ +
+ {{/case}} +
+ {{/case}} + {{#case type "checkbox"}} +
{{doc.name}}
+
+
+ + + +
+
+ {{/case}} +
+ {{/unless}} + {{/each}} + {{/each}} +
+
+