Disabled auto-correction in login from, fixed Offline Copy in IE11
This commit is contained in:
parent
dead6b40e3
commit
86580d8cfa
@ -125,6 +125,21 @@ MochiKit.Base.update(Clipperz.PM.PIN, {
|
|||||||
localStorage.removeItem(this.FAILURE_COUNT);
|
localStorage.removeItem(this.FAILURE_COUNT);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
'isLocalStorageSupported': function() {
|
||||||
|
var result;
|
||||||
|
|
||||||
|
var test = 'test';
|
||||||
|
try {
|
||||||
|
localStorage.setItem(test, test);
|
||||||
|
localStorage.removeItem(test);
|
||||||
|
result = true;
|
||||||
|
} catch(e) {
|
||||||
|
result = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
},
|
||||||
|
|
||||||
//-------------------------------------------------------------------------
|
//-------------------------------------------------------------------------
|
||||||
__syntaxFix__: "syntax fix"
|
__syntaxFix__: "syntax fix"
|
||||||
|
|
||||||
|
@ -110,10 +110,10 @@ Clipperz.PM.UI.Components.Pages.LoginPageClass = React.createClass({
|
|||||||
},
|
},
|
||||||
|
|
||||||
loginForm: function () {
|
loginForm: function () {
|
||||||
return React.DOM.form({'key':'form', 'className':'loginForm credentials', 'autoComplete':'off', 'onChange':this.handleChange, 'onSubmit':this.handleCredentialSubmit}, [
|
return React.DOM.form({'key':'form', 'className':'loginForm credentials', 'autoComplete':'off', 'autoCorrect':'off', 'autoCapitalize':'off', 'onChange':this.handleChange, 'onSubmit':this.handleCredentialSubmit}, [
|
||||||
React.DOM.div({'key':'fields'},[
|
React.DOM.div({'key':'fields'},[
|
||||||
React.DOM.label({'key':'username-label', 'htmlFor' :'name'}, "username"),
|
React.DOM.label({'key':'username-label', 'htmlFor' :'name'}, "username"),
|
||||||
React.DOM.input({'key':'username', 'type':'text', 'name':'name', 'ref':'username', 'placeholder':"username", 'autoCapitalize':'none'}),
|
React.DOM.input({'key':'username', 'type':'text', 'name':'name', 'ref':'username', 'placeholder':"username", 'autoComplete':'off', 'autoCorrect':'off', 'autoCapitalize':'off', 'spellCheck': false}),
|
||||||
React.DOM.label({'key':'passphrase-label', 'htmlFor' :'passphrase'}, "passphrase"),
|
React.DOM.label({'key':'passphrase-label', 'htmlFor' :'passphrase'}, "passphrase"),
|
||||||
React.DOM.input({'key':'passphrase', 'type':'password', 'name':'passphrase', 'ref':'passphrase', 'placeholder':"passphrase"})
|
React.DOM.input({'key':'passphrase', 'type':'password', 'name':'passphrase', 'ref':'passphrase', 'placeholder':"passphrase"})
|
||||||
]),
|
]),
|
||||||
|
@ -154,7 +154,7 @@ MochiKit.Base.update(Clipperz.PM.UI.MainController.prototype, {
|
|||||||
// PIN is set using this command:
|
// PIN is set using this command:
|
||||||
// Clipperz.PM.PIN.setCredentialsWithPIN('1234', {'username':'joe', 'passphrase':'clipperz'});
|
// Clipperz.PM.PIN.setCredentialsWithPIN('1234', {'username':'joe', 'passphrase':'clipperz'});
|
||||||
|
|
||||||
return Clipperz.PM.PIN.isSet() ? 'PIN' : 'CREDENTIALS';
|
return (Clipperz.PM.PIN.isLocalStorageSupported() && Clipperz.PM.PIN.isSet()) ? 'PIN' : 'CREDENTIALS';
|
||||||
},
|
},
|
||||||
|
|
||||||
//=========================================================================
|
//=========================================================================
|
||||||
@ -351,7 +351,9 @@ console.log("THE BROWSER IS OFFLINE");
|
|||||||
deferredResult.addCallback(MochiKit.Async.wait, 0.1);
|
deferredResult.addCallback(MochiKit.Async.wait, 0.1);
|
||||||
deferredResult.addMethod(Clipperz.Crypto.PRNG.defaultRandomGenerator(), 'deferredEntropyCollection');
|
deferredResult.addMethod(Clipperz.Crypto.PRNG.defaultRandomGenerator(), 'deferredEntropyCollection');
|
||||||
deferredResult.addMethod(user, 'login');
|
deferredResult.addMethod(user, 'login');
|
||||||
deferredResult.addMethod(Clipperz.PM.PIN, 'resetFailedAttemptCount');
|
if (Clipperz.PM.PIN.isLocalStorageSupported()) {
|
||||||
|
deferredResult.addMethod(Clipperz.PM.PIN, 'resetFailedAttemptCount');
|
||||||
|
}
|
||||||
deferredResult.addMethod(this, 'setUser', user);
|
deferredResult.addMethod(this, 'setUser', user);
|
||||||
deferredResult.addMethod(this, 'runApplication');
|
deferredResult.addMethod(this, 'runApplication');
|
||||||
deferredResult.addMethod(this.overlay(), 'done', "", 1);
|
deferredResult.addMethod(this.overlay(), 'done', "", 1);
|
||||||
|
Loading…
Reference in New Issue
Block a user