Change Flags to Options

Change Flags to Options and enforce Activate for already active template (#5256)
This commit is contained in:
Theo Arends 2019-02-18 13:10:10 +01:00
parent 8d2b9e4734
commit 483eb4dd44
21 changed files with 22 additions and 21 deletions

View File

@ -302,7 +302,7 @@
#define D_TEMPLATE_PARAMETERS "Template parameters" #define D_TEMPLATE_PARAMETERS "Template parameters"
#define D_TEMPLATE_NAME "Name" #define D_TEMPLATE_NAME "Name"
#define D_BASE_TYPE "Based on" #define D_BASE_TYPE "Based on"
#define D_TEMPLATE_FLAGS "Flags" #define D_TEMPLATE_FLAGS "Options"
#define D_ALLOW_ADC0 "ADC0 input" #define D_ALLOW_ADC0 "ADC0 input"
#define D_ALLOW_PULLUP "User pull-up selection" #define D_ALLOW_PULLUP "User pull-up selection"

View File

@ -302,7 +302,7 @@
#define D_TEMPLATE_PARAMETERS "Vorlage Parameter" #define D_TEMPLATE_PARAMETERS "Vorlage Parameter"
#define D_TEMPLATE_NAME "Name" #define D_TEMPLATE_NAME "Name"
#define D_BASE_TYPE "basiert auf" #define D_BASE_TYPE "basiert auf"
#define D_TEMPLATE_FLAGS "Flags" #define D_TEMPLATE_FLAGS "Options"
#define D_ALLOW_ADC0 "ADC0 input" #define D_ALLOW_ADC0 "ADC0 input"
#define D_ALLOW_PULLUP "Nutzer pull-up Auswahl" #define D_ALLOW_PULLUP "Nutzer pull-up Auswahl"

View File

@ -302,7 +302,7 @@
#define D_TEMPLATE_PARAMETERS "Template parameters" #define D_TEMPLATE_PARAMETERS "Template parameters"
#define D_TEMPLATE_NAME "Name" #define D_TEMPLATE_NAME "Name"
#define D_BASE_TYPE "Based on" #define D_BASE_TYPE "Based on"
#define D_TEMPLATE_FLAGS "Flags" #define D_TEMPLATE_FLAGS "Options"
#define D_ALLOW_ADC0 "ADC0 input" #define D_ALLOW_ADC0 "ADC0 input"
#define D_ALLOW_PULLUP "User pull-up selection" #define D_ALLOW_PULLUP "User pull-up selection"

View File

@ -302,7 +302,7 @@
#define D_TEMPLATE_PARAMETERS "Template parameters" #define D_TEMPLATE_PARAMETERS "Template parameters"
#define D_TEMPLATE_NAME "Name" #define D_TEMPLATE_NAME "Name"
#define D_BASE_TYPE "Based on" #define D_BASE_TYPE "Based on"
#define D_TEMPLATE_FLAGS "Flags" #define D_TEMPLATE_FLAGS "Options"
#define D_ALLOW_ADC0 "ADC0 input" #define D_ALLOW_ADC0 "ADC0 input"
#define D_ALLOW_PULLUP "User pull-up selection" #define D_ALLOW_PULLUP "User pull-up selection"

View File

@ -302,7 +302,7 @@
#define D_TEMPLATE_PARAMETERS "Template parameters" #define D_TEMPLATE_PARAMETERS "Template parameters"
#define D_TEMPLATE_NAME "Name" #define D_TEMPLATE_NAME "Name"
#define D_BASE_TYPE "Based on" #define D_BASE_TYPE "Based on"
#define D_TEMPLATE_FLAGS "Flags" #define D_TEMPLATE_FLAGS "Options"
#define D_ALLOW_ADC0 "ADC0 input" #define D_ALLOW_ADC0 "ADC0 input"
#define D_ALLOW_PULLUP "User pull-up selection" #define D_ALLOW_PULLUP "User pull-up selection"

View File

@ -302,7 +302,7 @@
#define D_TEMPLATE_PARAMETERS "Paramètres du modèle" #define D_TEMPLATE_PARAMETERS "Paramètres du modèle"
#define D_TEMPLATE_NAME "Nom" #define D_TEMPLATE_NAME "Nom"
#define D_BASE_TYPE "Basé sur" #define D_BASE_TYPE "Basé sur"
#define D_TEMPLATE_FLAGS "Flags" #define D_TEMPLATE_FLAGS "Options"
#define D_ALLOW_ADC0 "Entrée ADC0" #define D_ALLOW_ADC0 "Entrée ADC0"
#define D_ALLOW_PULLUP "Choix de pull-up utilisateur" #define D_ALLOW_PULLUP "Choix de pull-up utilisateur"

View File

@ -302,7 +302,7 @@
#define D_TEMPLATE_PARAMETERS "Template parameters" #define D_TEMPLATE_PARAMETERS "Template parameters"
#define D_TEMPLATE_NAME "Name" #define D_TEMPLATE_NAME "Name"
#define D_BASE_TYPE "Based on" #define D_BASE_TYPE "Based on"
#define D_TEMPLATE_FLAGS "Flags" #define D_TEMPLATE_FLAGS "Options"
#define D_ALLOW_ADC0 "ADC0 input" #define D_ALLOW_ADC0 "ADC0 input"
#define D_ALLOW_PULLUP "User pull-up selection" #define D_ALLOW_PULLUP "User pull-up selection"

View File

@ -302,7 +302,7 @@
#define D_TEMPLATE_PARAMETERS "Template parameters" #define D_TEMPLATE_PARAMETERS "Template parameters"
#define D_TEMPLATE_NAME "Name" #define D_TEMPLATE_NAME "Name"
#define D_BASE_TYPE "Based on" #define D_BASE_TYPE "Based on"
#define D_TEMPLATE_FLAGS "Flags" #define D_TEMPLATE_FLAGS "Options"
#define D_ALLOW_ADC0 "ADC0 input" #define D_ALLOW_ADC0 "ADC0 input"
#define D_ALLOW_PULLUP "User pull-up selection" #define D_ALLOW_PULLUP "User pull-up selection"

View File

@ -302,7 +302,7 @@
#define D_TEMPLATE_PARAMETERS "Template parameters" #define D_TEMPLATE_PARAMETERS "Template parameters"
#define D_TEMPLATE_NAME "Name" #define D_TEMPLATE_NAME "Name"
#define D_BASE_TYPE "Based on" #define D_BASE_TYPE "Based on"
#define D_TEMPLATE_FLAGS "Flags" #define D_TEMPLATE_FLAGS "Options"
#define D_ALLOW_ADC0 "ADC0 input" #define D_ALLOW_ADC0 "ADC0 input"
#define D_ALLOW_PULLUP "User pull-up selection" #define D_ALLOW_PULLUP "User pull-up selection"

View File

@ -302,7 +302,7 @@
#define D_TEMPLATE_PARAMETERS "Template parameters" #define D_TEMPLATE_PARAMETERS "Template parameters"
#define D_TEMPLATE_NAME "Name" #define D_TEMPLATE_NAME "Name"
#define D_BASE_TYPE "Based on" #define D_BASE_TYPE "Based on"
#define D_TEMPLATE_FLAGS "Flags" #define D_TEMPLATE_FLAGS "Options"
#define D_ALLOW_ADC0 "ADC0 input" #define D_ALLOW_ADC0 "ADC0 input"
#define D_ALLOW_PULLUP "User pull-up selection" #define D_ALLOW_PULLUP "User pull-up selection"

View File

@ -302,7 +302,7 @@
#define D_TEMPLATE_PARAMETERS "Template parameters" #define D_TEMPLATE_PARAMETERS "Template parameters"
#define D_TEMPLATE_NAME "Name" #define D_TEMPLATE_NAME "Name"
#define D_BASE_TYPE "Based on" #define D_BASE_TYPE "Based on"
#define D_TEMPLATE_FLAGS "Flags" #define D_TEMPLATE_FLAGS "Options"
#define D_ALLOW_ADC0 "ADC0 input" #define D_ALLOW_ADC0 "ADC0 input"
#define D_ALLOW_PULLUP "User pull-up selection" #define D_ALLOW_PULLUP "User pull-up selection"

View File

@ -302,7 +302,7 @@
#define D_TEMPLATE_PARAMETERS "Template parameters" #define D_TEMPLATE_PARAMETERS "Template parameters"
#define D_TEMPLATE_NAME "Name" #define D_TEMPLATE_NAME "Name"
#define D_BASE_TYPE "Based on" #define D_BASE_TYPE "Based on"
#define D_TEMPLATE_FLAGS "Flags" #define D_TEMPLATE_FLAGS "Options"
#define D_ALLOW_ADC0 "ADC0 input" #define D_ALLOW_ADC0 "ADC0 input"
#define D_ALLOW_PULLUP "User pull-up selection" #define D_ALLOW_PULLUP "User pull-up selection"

View File

@ -302,7 +302,7 @@
#define D_TEMPLATE_PARAMETERS "Template parameters" #define D_TEMPLATE_PARAMETERS "Template parameters"
#define D_TEMPLATE_NAME "Name" #define D_TEMPLATE_NAME "Name"
#define D_BASE_TYPE "Based on" #define D_BASE_TYPE "Based on"
#define D_TEMPLATE_FLAGS "Flags" #define D_TEMPLATE_FLAGS "Options"
#define D_ALLOW_ADC0 "ADC0 input" #define D_ALLOW_ADC0 "ADC0 input"
#define D_ALLOW_PULLUP "User pull-up selection" #define D_ALLOW_PULLUP "User pull-up selection"

View File

@ -302,7 +302,7 @@
#define D_TEMPLATE_PARAMETERS "Template parameters" #define D_TEMPLATE_PARAMETERS "Template parameters"
#define D_TEMPLATE_NAME "Name" #define D_TEMPLATE_NAME "Name"
#define D_BASE_TYPE "Based on" #define D_BASE_TYPE "Based on"
#define D_TEMPLATE_FLAGS "Flags" #define D_TEMPLATE_FLAGS "Options"
#define D_ALLOW_ADC0 "ADC0 input" #define D_ALLOW_ADC0 "ADC0 input"
#define D_ALLOW_PULLUP "User pull-up selection" #define D_ALLOW_PULLUP "User pull-up selection"

View File

@ -302,7 +302,7 @@
#define D_TEMPLATE_PARAMETERS "Template parameters" #define D_TEMPLATE_PARAMETERS "Template parameters"
#define D_TEMPLATE_NAME "Name" #define D_TEMPLATE_NAME "Name"
#define D_BASE_TYPE "Based on" #define D_BASE_TYPE "Based on"
#define D_TEMPLATE_FLAGS "Flags" #define D_TEMPLATE_FLAGS "Options"
#define D_ALLOW_ADC0 "ADC0 input" #define D_ALLOW_ADC0 "ADC0 input"
#define D_ALLOW_PULLUP "User pull-up selection" #define D_ALLOW_PULLUP "User pull-up selection"

View File

@ -302,7 +302,7 @@
#define D_TEMPLATE_PARAMETERS "Template parameters" #define D_TEMPLATE_PARAMETERS "Template parameters"
#define D_TEMPLATE_NAME "Name" #define D_TEMPLATE_NAME "Name"
#define D_BASE_TYPE "Based on" #define D_BASE_TYPE "Based on"
#define D_TEMPLATE_FLAGS "Flags" #define D_TEMPLATE_FLAGS "Options"
#define D_ALLOW_ADC0 "ADC0 input" #define D_ALLOW_ADC0 "ADC0 input"
#define D_ALLOW_PULLUP "User pull-up selection" #define D_ALLOW_PULLUP "User pull-up selection"

View File

@ -302,7 +302,7 @@
#define D_TEMPLATE_PARAMETERS "Template parameters" #define D_TEMPLATE_PARAMETERS "Template parameters"
#define D_TEMPLATE_NAME "Name" #define D_TEMPLATE_NAME "Name"
#define D_BASE_TYPE "Based on" #define D_BASE_TYPE "Based on"
#define D_TEMPLATE_FLAGS "Flags" #define D_TEMPLATE_FLAGS "Options"
#define D_ALLOW_ADC0 "ADC0 input" #define D_ALLOW_ADC0 "ADC0 input"
#define D_ALLOW_PULLUP "User pull-up selection" #define D_ALLOW_PULLUP "User pull-up selection"

View File

@ -302,7 +302,7 @@
#define D_TEMPLATE_PARAMETERS "Template parameters" #define D_TEMPLATE_PARAMETERS "Template parameters"
#define D_TEMPLATE_NAME "Name" #define D_TEMPLATE_NAME "Name"
#define D_BASE_TYPE "Based on" #define D_BASE_TYPE "Based on"
#define D_TEMPLATE_FLAGS "Flags" #define D_TEMPLATE_FLAGS "Options"
#define D_ALLOW_ADC0 "ADC0 input" #define D_ALLOW_ADC0 "ADC0 input"
#define D_ALLOW_PULLUP "User pull-up selection" #define D_ALLOW_PULLUP "User pull-up selection"

View File

@ -302,7 +302,7 @@
#define D_TEMPLATE_PARAMETERS "Template parameters" #define D_TEMPLATE_PARAMETERS "Template parameters"
#define D_TEMPLATE_NAME "Name" #define D_TEMPLATE_NAME "Name"
#define D_BASE_TYPE "Based on" #define D_BASE_TYPE "Based on"
#define D_TEMPLATE_FLAGS "Flags" #define D_TEMPLATE_FLAGS "Options"
#define D_ALLOW_ADC0 "ADC0 input" #define D_ALLOW_ADC0 "ADC0 input"
#define D_ALLOW_PULLUP "User pull-up selection" #define D_ALLOW_PULLUP "User pull-up selection"

View File

@ -302,7 +302,7 @@
#define D_TEMPLATE_PARAMETERS "Template parameters" #define D_TEMPLATE_PARAMETERS "Template parameters"
#define D_TEMPLATE_NAME "Name" #define D_TEMPLATE_NAME "Name"
#define D_BASE_TYPE "Based on" #define D_BASE_TYPE "Based on"
#define D_TEMPLATE_FLAGS "Flags" #define D_TEMPLATE_FLAGS "Options"
#define D_ALLOW_ADC0 "ADC0 input" #define D_ALLOW_ADC0 "ADC0 input"
#define D_ALLOW_PULLUP "User pull-up selection" #define D_ALLOW_PULLUP "User pull-up selection"

View File

@ -368,7 +368,7 @@ const char HTTP_FORM_OTHER[] PROGMEM =
"<p></p>" "<p></p>"
"<fieldset><legend><b>&nbsp;" D_TEMPLATE "&nbsp;</b></legend>" "<fieldset><legend><b>&nbsp;" D_TEMPLATE "&nbsp;</b></legend>"
"<p><input id='t1' name='t1' placeholder='" D_TEMPLATE "' value='{t1'></p>" "<p><input id='t1' name='t1' placeholder='" D_TEMPLATE "' value='{t1'></p>"
"<p><input id='t2' name='t2' type='checkbox'><b>" D_ACTIVATE "</b></p>" "<p><input id='t2' name='t2' type='checkbox'{t2><b>" D_ACTIVATE "</b></p>"
"</fieldset>" "</fieldset>"
"<br/>" "<br/>"
"<b>" D_WEB_ADMIN_PASSWORD "</b><br/><input id='p1' name='p1' type='password' placeholder='" D_WEB_ADMIN_PASSWORD "' value='" D_ASTERIX "'><br/>" "<b>" D_WEB_ADMIN_PASSWORD "</b><br/><input id='p1' name='p1' type='password' placeholder='" D_WEB_ADMIN_PASSWORD "' value='" D_ASTERIX "'><br/>"
@ -1352,6 +1352,7 @@ void HandleOtherConfiguration(void)
page += FPSTR(HTTP_FORM_OTHER); page += FPSTR(HTTP_FORM_OTHER);
TemplateJson(); TemplateJson();
page.replace(F("{t1"), mqtt_data); page.replace(F("{t1"), mqtt_data);
page.replace(F("{t2"), (USER_MODULE == Settings.module) ? F(" checked disabled") : F(""));
page.replace(F("{r1"), (Settings.flag.mqtt_enabled) ? F(" checked") : F("")); page.replace(F("{r1"), (Settings.flag.mqtt_enabled) ? F(" checked") : F(""));
uint8_t maxfn = (devices_present > MAX_FRIENDLYNAMES) ? MAX_FRIENDLYNAMES : (!devices_present) ? 1 : devices_present; uint8_t maxfn = (devices_present > MAX_FRIENDLYNAMES) ? MAX_FRIENDLYNAMES : (!devices_present) ? 1 : devices_present;