AC-198 Fixed the login page so that passwords and usernames are not remembered. The issue is scope variable name overlap. If scope.username or scope.password gets defined along the way, the value gets pushed into the login form.

This commit is contained in:
chouseknecht 2013-07-12 10:30:38 -04:00
parent 01e1edfe1b
commit 613fafff05
2 changed files with 8 additions and 11 deletions

View File

@ -4,7 +4,7 @@
*
* awx-min.js
*
* master-f2e5182, Thu Jul 11 23:28:39 2013 -0400
* master-b32c0dc, Thu Jul 11 23:36:14 2013 -0400
*
*/
var urlPrefix="/static/";

View File

@ -11,29 +11,26 @@
<div class="control-group">
<label class="control-label">Username:</label>
<div class="controls">
<input type="text" name="username" ng-model="username" id="login-username" autocomplete="off" required><br />
<span class="error" ng-show="loginForm.username.$dirty && loginForm.username.$error.required">A value is required!</span>
<span class="errora api-error" ng-bind="usernameError"></span>
<input type="text" name="login_username" ng-model="login_username" id="login-username" autocomplete="off" required><br />
<span class="error" ng-show="loginForm.login_username.$dirty && loginForm.login_username.$error.required">A value is required!</span>
<span class="error api-error" ng-bind="usernameError"></span>
</div>
</div>
<div class="control-group">
<label class="control-label">Password:</label>
<div class="controls">
<input type="password" name="password" id="login-password" ng-model="password" autocomplete="off"><br />
<span class="error" ng-show="loginForm.password.$dirty && loginForm.password.$error.required">A value is required!</span>
<input type="password" name="login_password" id="login-password" ng-model="login_password" required autocomplete="off"><br />
<span class="error" ng-show="loginForm.login_password.$dirty && loginForm.login_password.$error.required">A value is required!</span>
<span class="error api-error" ng-bind="passwordError"></span>
</div>
</div>
</form>
</div>
<div class="modal-footer">
<button ng-click="systemLogin(loginForm.username.$modelValue,loginForm.password.$modelValue)"
ng-disabled="loginForm.$invalid || $loginForm.$pristine"
<button ng-click="systemLogin(login_username, login_password)"
id="login-button" class="btn btn-primary">Sign In</button>
</div>
</div><!-- modal -->
</div><!-- span -->
</div><!-- row -->
</div><!-- row -->