mirror of
https://github.com/Doodle3D/doodle3d-client.git
synced 2024-11-22 17:27:57 +01:00
Ignore settings form fields with empty name attr on save
This commit is contained in:
parent
d50a42ef09
commit
1f1b6c89dd
@ -321,7 +321,8 @@ function SettingsWindow() {
|
|||||||
var selects = self.form.find("select");
|
var selects = self.form.find("select");
|
||||||
selects.each( function(index,element) {
|
selects.each( function(index,element) {
|
||||||
var element = $(element);
|
var element = $(element);
|
||||||
if(element.attr('name') != "network.client.network") {
|
var fieldName = element.attr('name');
|
||||||
|
if(element.attr('name') != "") {
|
||||||
settings[element.attr('name')] = element.val();
|
settings[element.attr('name')] = element.val();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -329,6 +330,7 @@ function SettingsWindow() {
|
|||||||
var inputs = self.form.find("input");
|
var inputs = self.form.find("input");
|
||||||
inputs.each( function(index,element) {
|
inputs.each( function(index,element) {
|
||||||
var element = $(element);
|
var element = $(element);
|
||||||
|
if(element.attr('name') != "") {
|
||||||
switch(element.attr("type")) {
|
switch(element.attr("type")) {
|
||||||
case "text":
|
case "text":
|
||||||
case "number":
|
case "number":
|
||||||
@ -338,6 +340,7 @@ function SettingsWindow() {
|
|||||||
settings[element.attr('name')] = element.prop('checked')
|
settings[element.attr('name')] = element.prop('checked')
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
var textareas = self.form.find("textarea");
|
var textareas = self.form.find("textarea");
|
||||||
|
@ -150,7 +150,7 @@
|
|||||||
The text <em>%%MAC_ADDR_TAIL%%</em> will be replaced by the last 6 digits of your Doodle3D Wi-Fi box's MAC address.</small>
|
The text <em>%%MAC_ADDR_TAIL%%</em> will be replaced by the last 6 digits of your Doodle3D Wi-Fi box's MAC address.</small>
|
||||||
<br>
|
<br>
|
||||||
<label for="network">Network:</label>
|
<label for="network">Network:</label>
|
||||||
<select id="network" name="network.client.network"></select>
|
<select id="network" name=""></select>
|
||||||
<input type="button" name="refresh" value="Refresh" class="button" id="refreshNetworks"/><br>
|
<input type="button" name="refresh" value="Refresh" class="button" id="refreshNetworks"/><br>
|
||||||
<label for="password" id="passwordLabel">Password:</label><input type="password" name="network.client.password" id="password"><br>
|
<label for="password" id="passwordLabel">Password:</label><input type="password" name="network.client.password" id="password"><br>
|
||||||
<input type="button" name="connect" value="Connect" class="button" id="connectToNetwork"/>
|
<input type="button" name="connect" value="Connect" class="button" id="connectToNetwork"/>
|
||||||
|
Loading…
Reference in New Issue
Block a user