Rev3609, Don't validate valid pattern in UiConfig if the field is hidden
This commit is contained in:
parent
d04b759913
commit
2a1849d027
3 changed files with 4 additions and 5 deletions
|
@ -59,7 +59,7 @@ class UiConfig extends ZeroFrame
|
|||
if value_same_as_default
|
||||
value = null
|
||||
|
||||
if @config[item.key].item.valid_pattern and value
|
||||
if @config[item.key].item.valid_pattern and not @config[item.key].item.isHidden()
|
||||
match = value.match(@config[item.key].item.valid_pattern)
|
||||
if not match or match[0] != value
|
||||
message = "Invalid value of #{@config[item.key].item.title}: #{value} (does not matches #{@config[item.key].item.valid_pattern})"
|
||||
|
|
|
@ -1450,7 +1450,6 @@
|
|||
}).call(this);
|
||||
|
||||
|
||||
|
||||
/* ---- plugins/UiConfig/media/js/ConfigView.coffee ---- */
|
||||
|
||||
|
||||
|
@ -1774,7 +1773,7 @@
|
|||
if (value_same_as_default) {
|
||||
value = null;
|
||||
}
|
||||
if (this.config[item.key].item.valid_pattern && value) {
|
||||
if (this.config[item.key].item.valid_pattern && !this.config[item.key].item.isHidden()) {
|
||||
match = value.match(this.config[item.key].item.valid_pattern);
|
||||
if (!match || match[0] !== value) {
|
||||
message = "Invalid value of " + this.config[item.key].item.title + ": " + value + " (does not matches " + this.config[item.key].item.valid_pattern + ")";
|
||||
|
@ -1883,4 +1882,4 @@
|
|||
|
||||
window.Page.createProjector();
|
||||
|
||||
}).call(this);
|
||||
}).call(this);
|
||||
|
|
|
@ -10,7 +10,7 @@ class Config(object):
|
|||
|
||||
def __init__(self, argv):
|
||||
self.version = "0.6.3"
|
||||
self.rev = 3608
|
||||
self.rev = 3609
|
||||
self.argv = argv
|
||||
self.action = None
|
||||
self.pending_changes = {}
|
||||
|
|
Loading…
Reference in a new issue