Fix validation on the table dialogue so the Save button isn't enabled if the name is removed and autovac custom settings are enabled. Fixes #2105
parent
c758920890
commit
3880bc7eb8
|
@ -734,8 +734,6 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
|
||||||
schema = this.get('schema'),
|
schema = this.get('schema'),
|
||||||
relowner = this.get('relowner');
|
relowner = this.get('relowner');
|
||||||
|
|
||||||
this.errorModel.clear();
|
|
||||||
|
|
||||||
// If nothing to validate or VacuumSetting keys then
|
// If nothing to validate or VacuumSetting keys then
|
||||||
// return from here
|
// return from here
|
||||||
if ( keys && (keys.length == 0
|
if ( keys && (keys.length == 0
|
||||||
|
@ -744,6 +742,9 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Have to clear existing validation before initiating current state validation only
|
||||||
|
this.errorModel.clear();
|
||||||
|
|
||||||
if (_.isUndefined(name) || _.isNull(name) ||
|
if (_.isUndefined(name) || _.isNull(name) ||
|
||||||
String(name).replace(/^\s+|\s+$/g, '') == '') {
|
String(name).replace(/^\s+|\s+$/g, '') == '') {
|
||||||
msg = '{{ _('Table name cannot be empty.') }}';
|
msg = '{{ _('Table name cannot be empty.') }}';
|
||||||
|
|
Loading…
Reference in New Issue