mirror of
http://git.whoc.org.uk/git/password-manager.git
synced 2024-11-13 07:49:01 +01:00
Disabled ’sign in’ link when the proxy does not support creating new accounts
This commit is contained in:
parent
9d8bdceac4
commit
867666b949
@ -141,16 +141,22 @@ Clipperz.PM.UI.Components.Pages.LoginPage = React.createClass({
|
||||
},
|
||||
|
||||
render: function() {
|
||||
var registrationLink = React.DOM.footer({'key':'registrationLink', 'className':'registrationLink'}, [
|
||||
React.DOM.a({'key':'signup', 'onClick':this.handleRegistrationLinkClick}, "Sign up")
|
||||
]);
|
||||
//console.log("LOGIN PAGE", this.props);
|
||||
// var registrationLink = React.DOM.footer({'key':'registrationLink', 'className':'registrationLink'}, [
|
||||
// React.DOM.a({'key':'signup', 'onClick':this.handleRegistrationLinkClick}, "Sign up")
|
||||
// ]);
|
||||
|
||||
var registrationLink = React.DOM.a({'key':'signup', 'onClick':this.handleRegistrationLinkClick}, "Sign up");
|
||||
|
||||
return React.DOM.div({'className':'loginForm ' + this.props['style']}, [
|
||||
React.DOM.header({'key':'header'}, 'clipperz'),
|
||||
React.DOM.div({'key':'form-wrapper', 'className':'form'}, [
|
||||
this.props.mode == 'PIN' ? this.pinForm() : this.loginForm(),
|
||||
]),
|
||||
this.props.isNewUserRegistrationAvailable ? registrationLink : null
|
||||
React.DOM.footer({'key':'registrationLink', 'className':'registrationLink'}, [
|
||||
this.props['isNewUserRegistrationAvailable'] ? registrationLink : null
|
||||
])
|
||||
// this.props['isNewUserRegistrationAvailable'] ? registrationLink : null
|
||||
]);
|
||||
}
|
||||
});
|
||||
|
@ -237,10 +237,10 @@ console.log("THE BROWSER IS OFFLINE");
|
||||
var canRegisterNewUsers;
|
||||
|
||||
canRegisterNewUsers = Clipperz.PM.Proxy.defaultProxy.canRegisterNewUsers();
|
||||
|
||||
//console.log("CAN REGISTER NEW USERS", canRegisterNewUsers);
|
||||
this.selectInitialProxy();
|
||||
shouldShowRegistrationForm = parameters['shouldShowRegistrationForm'] && canRegisterNewUsers;
|
||||
this.pages()['loginPage'].setProps({'mode':this.loginMode(), 'isNewUserRegistrationAvailable':canRegisterNewUsers});
|
||||
// this.pages()['loginPage'].setProps({'mode':this.loginMode(), 'isNewUserRegistrationAvailable':canRegisterNewUsers});
|
||||
|
||||
this.showLoginForm();
|
||||
if (shouldShowRegistrationForm) {
|
||||
@ -257,7 +257,8 @@ console.log("THE BROWSER IS OFFLINE");
|
||||
var loginFormPage;
|
||||
|
||||
loginFormPage = this.pages()['loginPage'];
|
||||
loginFormPage.setProps({'mode':this.loginMode(), 'isNewUserRegistrationAvailable':Clipperz.PM.Proxy.defaultProxy.canRegisterNewUsers()});
|
||||
// loginFormPage.setProps({'mode':this.loginMode(), 'isNewUserRegistrationAvailable':Clipperz.PM.Proxy.defaultProxy.canRegisterNewUsers()});
|
||||
loginFormPage.setProps({'mode':this.loginMode()});
|
||||
this.moveInPage(this.currentPage(), 'loginPage');
|
||||
MochiKit.Async.callLater(0.5, MochiKit.Base.method(loginFormPage, 'setInitialFocus'));
|
||||
},
|
||||
@ -979,7 +980,7 @@ console.log("THE BROWSER IS OFFLINE");
|
||||
if (aPageName == 'loginPage') {
|
||||
extraProperties = {
|
||||
'mode': 'CREDENTIALS',
|
||||
'isNewUserRegistrationAvailable': true,
|
||||
'isNewUserRegistrationAvailable': Clipperz.PM.Proxy.defaultProxy.canRegisterNewUsers(),
|
||||
'disabled': false,
|
||||
};
|
||||
} else if (aPageName == 'registrationPage') {
|
||||
|
Loading…
Reference in New Issue
Block a user