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'),
|
||||
relowner = this.get('relowner');
|
||||
|
||||
this.errorModel.clear();
|
||||
|
||||
// If nothing to validate or VacuumSetting keys then
|
||||
// return from here
|
||||
if ( keys && (keys.length == 0
|
||||
|
@ -744,6 +742,9 @@ function($, _, S, pgAdmin, pgBrowser, alertify) {
|
|||
return null;
|
||||
}
|
||||
|
||||
// Have to clear existing validation before initiating current state validation only
|
||||
this.errorModel.clear();
|
||||
|
||||
if (_.isUndefined(name) || _.isNull(name) ||
|
||||
String(name).replace(/^\s+|\s+$/g, '') == '') {
|
||||
msg = '{{ _('Table name cannot be empty.') }}';
|
||||
|
|
Loading…
Reference in New Issue