]>
git.proxmox.com Git - proxmox-backup.git/blob - www/LoginView.js
1 Ext
.define('PBS.LoginView', {
2 extend
: 'Ext.container.Container',
6 xclass
: 'Ext.app.ViewController',
8 submitForm: function() {
10 var view
= me
.getView();
11 var loginForm
= me
.lookupReference('loginForm');
13 if (loginForm
.isValid()) {
14 if (loginForm
.isVisible()) {
15 loginForm
.mask(gettext('Please wait...'), 'x-mask-loading');
18 success: function(form
, action
) {
19 // save login data and create cookie
20 PBS
.Utils
.updateLoginData(action
.result
.data
);
21 PBS
.app
.changeView('mainview');
23 failure: function(form
, action
) {
27 gettext('Login failed. Please try again')
35 'button[reference=loginButton]': {
74 reference
: 'loginwindow',
78 defaultFocus
: 'usernameField',
84 title
: gettext('Proxmox Backup Server Login'),
92 defaultButton
: 'loginButton',
93 url
: '/api2/extjs/access/ticket',
94 reference
: 'loginForm',
104 fieldLabel
: gettext('User name'),
106 itemId
: 'usernameField',
107 reference
: 'usernameField'
111 inputType
: 'password',
112 fieldLabel
: gettext('Password'),
114 reference
: 'passwordField'
119 text
: gettext('Login'),
120 reference
: 'loginButton',