View | Details | Raw Unified | Return to bug 26347
Collapse All | Expand All

(-)umc/widgets/LoginDialog.js (-9 / +13 lines)
 Lines 236-253    Link Here 
236
236
237
	_setInitialFocus: function() {
237
	_setInitialFocus: function() {
238
		dojo.withGlobal(this._iframe.contentWindow, dojo.hitch(this, function() {
238
		dojo.withGlobal(this._iframe.contentWindow, dojo.hitch(this, function() {
239
			// initial focus on username input
239
			if (umc.tools.status('username')) {
240
			if (!umc.tools._status.username) {
240
				// username is specified, we need to auto fill
241
				dojo.byId('umc_UsernameInput').focus();
242
				this._setFocus('umc_UsernameContainer', true);
243
			} else {
244
				// user has already logged in before, we need to auto fill
245
				// the username and disable the textbox.
241
				// the username and disable the textbox.
246
				dojo.attr('umc_UsernameInput', 'value', umc.tools._status.username);
242
				dojo.attr('umc_UsernameInput', 'value', umc.tools.status('username'));
247
				dojo.attr('umc_UsernameInput', 'disabled', true);
248
				dojo.addClass('umc_UsernameContainer', 'dijitTextBoxDisabled dijitValidationTextBoxDisabled dijitDisabled');
249
				dojo.byId('umc_PasswordInput').focus();
243
				dojo.byId('umc_PasswordInput').focus();
250
				this._setFocus('umc_PasswordContainer', true);
244
				this._setFocus('umc_PasswordContainer', true);
245
246
				// disable the username field during relogin, i.e., when the GUI has been previously set up
247
				if (umc.tools.status('setupGui')) {
248
					dojo.attr('umc_UsernameInput', 'disabled', true);
249
					dojo.addClass('umc_UsernameContainer', 'dijitTextBoxDisabled dijitValidationTextBoxDisabled dijitDisabled');
250
				}
251
			} else {
252
				// initial focus on username input
253
				dojo.byId('umc_UsernameInput').focus();
254
				this._setFocus('umc_UsernameContainer', true);
251
			}
255
			}
252
		}));
256
		}));
253
	},
257
	},

Return to bug 26347