Wizard: Add input placeholder (M3U, XMLTV)
Wizard: Alert by empty value (M3U, XMLTV)
This commit is contained in:
1 parent
5fc5f773d3
commit
4dc9dfabf2
4 files changed
+53
-37
No files matched your search
@@ -62,6 +62,7 @@ class WizardItem extends WizardCategory {
|
||||
|
||||
case "m3u":
|
||||
var input = content.createInput("text", key, "")
|
||||
input.setAttribute("placeholder", "{{.wizard.m3u.placeholder}}")
|
||||
input.setAttribute("class", "wizard")
|
||||
input.id = key
|
||||
doc.appendChild(input)
|
||||
@@ -72,6 +73,7 @@ class WizardItem extends WizardCategory {
|
||||
|
||||
case "xmltv":
|
||||
var input = content.createInput("text", key, "")
|
||||
input.setAttribute("placeholder", "{{.wizard.xmltv.placeholder}}")
|
||||
input.setAttribute("class", "wizard")
|
||||
input.id = key
|
||||
doc.appendChild(input)
|
||||
@@ -140,6 +142,12 @@ function saveWizard() {
|
||||
name = (config[i] as HTMLInputElement).name
|
||||
value = (config[i] as HTMLInputElement).value
|
||||
|
||||
if (value.length == 0) {
|
||||
var msg = name.toUpperCase() + ": " + "{{.alert.missingInput}}"
|
||||
alert(msg)
|
||||
return
|
||||
}
|
||||
|
||||
wizard[name] = value
|
||||
break
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user