|
57 |
// internal reference to the formular containing all form widgets of an UDM object |
57 |
// internal reference to the formular containing all form widgets of an UDM object |
58 |
_form: null, |
58 |
_form: null, |
59 |
|
59 |
|
60 |
// state of fqdn field |
60 |
// internal flag whether setValues() has been called at least once or not |
61 |
_fqdnTouched: false, |
61 |
_firstSetValues: true, |
62 |
|
62 |
|
63 |
postMixInProperties: function() { |
63 |
postMixInProperties: function() { |
64 |
this.inherited(arguments); |
64 |
this.inherited(arguments); |
|
126 |
this.disconnect(fc); |
126 |
this.disconnect(fc); |
127 |
}); |
127 |
}); |
128 |
|
128 |
|
129 |
if (this.wizard_mode) { |
|
|
130 |
var c = dojo.connect(this._form.getWidget('fqdn'), 'onKeyUp', dojo.hitch(this, function() { |
131 |
this._fqdnTouched = true; |
132 |
dojo.disconnect(c); |
133 |
})); |
134 |
} |
135 |
|
136 |
this.addChild(this._form); |
129 |
this.addChild(this._form); |
137 |
}, |
130 |
}, |
138 |
|
131 |
|
|
160 |
} |
153 |
} |
161 |
}); |
154 |
}); |
162 |
|
155 |
|
163 |
_set('fqdn', !this.wizard_mode && role != 'basesystem', true, this.wizard_mode && !this._fqdnTouched); |
156 |
_set('fqdn', !this.wizard_mode && role != 'basesystem', true, this.wizard_mode && this._firstSetValues); |
164 |
_set('windows/domain', !this.wizard_mode && role != 'basesystem', role != 'basesystem', this.wizard_mode && !this._fqdnTouched); |
157 |
_set('windows/domain', !this.wizard_mode && role != 'basesystem', role != 'basesystem', this.wizard_mode && this._firstSetValues); |
165 |
_set('ldap/base', !this.wizard_mode && role != 'basesystem', role != 'basesystem', this.wizard_mode && !this._fqdnTouched, role == 'domaincontroller_master' || role == 'basesystem'); |
158 |
_set('ldap/base', !this.wizard_mode && role != 'basesystem', role != 'basesystem', this.wizard_mode && this._firstSetValues, role == 'domaincontroller_master' || role == 'basesystem'); |
166 |
_set('root_password', false, this.wizard_mode && !this.local_mode); |
159 |
_set('root_password', false, this.wizard_mode && !this.local_mode); |
167 |
|
160 |
|
168 |
if (role != 'basesystem' && this.wizard_mode) { |
161 |
if (role != 'basesystem' && this.wizard_mode) { |
|
188 |
|
181 |
|
189 |
this._form.setFormValues(vals); |
182 |
this._form.setFormValues(vals); |
190 |
this._form.getWidget('fqdn').set('blockOnChange', false); |
183 |
this._form.getWidget('fqdn').set('blockOnChange', false); |
|
|
184 |
this._firstSetValues = false; |
191 |
}, |
185 |
}, |
192 |
|
186 |
|
193 |
getValues: function() { |
187 |
getValues: function() { |
|
197 |
vals.domainname = parts.slice(1).join('.'); |
191 |
vals.domainname = parts.slice(1).join('.'); |
198 |
delete vals.fqdn; |
192 |
delete vals.fqdn; |
199 |
|
193 |
|
200 |
var role = vals['server/role']; |
|
|
201 |
if (!this._form.getWidget('ldap/base').get('visible')) { |
194 |
if (!this._form.getWidget('ldap/base').get('visible')) { |
202 |
// remove the ldap/base entry |
195 |
// remove the ldap/base entry |
203 |
delete vals['ldap/base']; |
196 |
delete vals['ldap/base']; |