Merge pull request #377 from mozilla/issue-363-no-save-password-for-sync
Issue 363 no save password for sync
This commit is contained in:
Коммит
0e89701989
|
@ -9,7 +9,7 @@
|
|||
|
||||
<form>
|
||||
<div class="input-row password-row">
|
||||
<input type="password" class="password" id="old_password" placeholder="{{#t}}Old password{{/t}}" pattern=".{8,}" autofocus required>
|
||||
<input type="password" class="password" id="old_password" placeholder="{{#t}}Old password{{/t}}" pattern=".{8,}" autofocus required {{#isSync}}autocomplete="off"{{/isSync}} />
|
||||
|
||||
<label for="show-old-password" class="show-password-label">
|
||||
<div class="show-password-label-text">{{#t}}Show{{/t}}</div>
|
||||
|
@ -19,7 +19,7 @@
|
|||
</div>
|
||||
|
||||
<div class="input-row password-row">
|
||||
<input type="password" class="password" id="new_password" placeholder="{{#t}}New password{{/t}}" pattern=".{8,}" required>
|
||||
<input type="password" class="password" id="new_password" placeholder="{{#t}}New password{{/t}}" pattern=".{8,}" required {{#isSync}}autocomplete="off"{{/isSync}} />
|
||||
|
||||
<label for="show-new-password" class="show-password-label">
|
||||
<div class="show-password-label-text">{{#t}}Show{{/t}}</div>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
<form>
|
||||
<div class="input-row password-row">
|
||||
<input type="password" class="password" id="password" placeholder="{{#t}}Password{{/t}}" pattern=".{8,}" autofocus required>
|
||||
<input type="password" class="password" id="password" placeholder="{{#t}}Password{{/t}}" pattern=".{8,}" autofocus required {{#isSync}}autocomplete="off"{{/isSync}} />
|
||||
|
||||
<label for="show-password" class="show-password-label">
|
||||
<div class="show-password-label-text">{{#t}}Show{{/t}}</div>
|
||||
|
@ -18,7 +18,7 @@
|
|||
</div>
|
||||
|
||||
<div class="input-row password-row">
|
||||
<input type="password" class="password" id="vpassword" placeholder="{{#t}}Repeat Password{{/t}}" pattern=".{8,}" required>
|
||||
<input type="password" class="password" id="vpassword" placeholder="{{#t}}Repeat Password{{/t}}" pattern=".{8,}" required {{#isSync}}autocomplete="off"{{/isSync}} />
|
||||
|
||||
<label for="show-vpassword" class="show-password-label">
|
||||
<div class="show-password-label-text">{{#t}}Show{{/t}}</div>
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
</div>
|
||||
|
||||
<div class="input-row password-row">
|
||||
<input type="password" class="password" placeholder="{{#t}}Password{{/t}}" pattern=".{8,}" required>
|
||||
<input type="password" class="password" placeholder="{{#t}}Password{{/t}}" pattern=".{8,}" required {{#isSync}}autocomplete="off"{{/isSync}} />
|
||||
|
||||
<label for="show-password" class="show-password-label">
|
||||
<div class="show-password-label-text">{{#t}}Show{{/t}}</div>
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
{{/forceAuth}}
|
||||
|
||||
<div class="input-row password-row">
|
||||
<input type="password" class="password" placeholder="{{#t}}Password{{/t}}" pattern=".{8,}" required {{#forceAuth}}autofocus{{/forceAuth}}>
|
||||
<input type="password" class="password" placeholder="{{#t}}Password{{/t}}" pattern=".{8,}" required {{#forceAuth}}autofocus{{/forceAuth}} {{#isSync}}autocomplete="off"{{/isSync}} />
|
||||
|
||||
<label for="show-password" class="show-password-label">
|
||||
<div class="show-password-label-text">{{#t}}Show{{/t}}</div>
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
</div>
|
||||
|
||||
<div class="input-row password-row">
|
||||
<input type="password" class="password" placeholder="{{#t}}Password{{/t}}" pattern=".{8,}" required>
|
||||
<input type="password" class="password" placeholder="{{#t}}Password{{/t}}" pattern=".{8,}" required {{#isSync}}autocomplete="off"{{/isSync}} />
|
||||
<label for="show-password" class="show-password-label">
|
||||
<div class="show-password-label-text">{{#t}}Show{{/t}}</div>
|
||||
<input id="show-password" type="checkbox" class="show-password">
|
||||
|
|
|
@ -10,9 +10,10 @@ define([
|
|||
'stache!templates/change_password',
|
||||
'lib/fxa-client',
|
||||
'lib/session',
|
||||
'lib/password-mixin'
|
||||
'lib/password-mixin',
|
||||
'lib/url'
|
||||
],
|
||||
function (_, BaseView, Template, FxaClient, Session, PasswordMixin) {
|
||||
function (_, BaseView, Template, FxaClient, Session, PasswordMixin, Url) {
|
||||
var View = BaseView.extend({
|
||||
// user must be authenticated to change password
|
||||
mustAuth: true,
|
||||
|
@ -29,6 +30,12 @@ function (_, BaseView, Template, FxaClient, Session, PasswordMixin) {
|
|||
'change .show-password': 'onPasswordVisibilityChange'
|
||||
},
|
||||
|
||||
context: function () {
|
||||
return {
|
||||
isSync: Url.searchParam('service') === 'sync'
|
||||
};
|
||||
},
|
||||
|
||||
isValid: function () {
|
||||
return this.isElementValid('#old_password') &&
|
||||
this.isElementValid('#new_password');
|
||||
|
|
|
@ -25,6 +25,12 @@ function (_, BaseView, Template, FxaClient, Session, Url, PasswordMixin) {
|
|||
'change .show-password': 'onPasswordVisibilityChange'
|
||||
},
|
||||
|
||||
context: function () {
|
||||
return {
|
||||
isSync: Url.searchParam('service') === 'sync'
|
||||
};
|
||||
},
|
||||
|
||||
afterRender: function () {
|
||||
this.token = Url.searchParam('token');
|
||||
if (! this.token) {
|
||||
|
|
|
@ -10,9 +10,10 @@ define([
|
|||
'stache!templates/delete_account',
|
||||
'lib/session',
|
||||
'lib/fxa-client',
|
||||
'lib/password-mixin'
|
||||
'lib/password-mixin',
|
||||
'lib/url'
|
||||
],
|
||||
function (_, BaseView, Template, Session, FxaClient, PasswordMixin) {
|
||||
function (_, BaseView, Template, Session, FxaClient, PasswordMixin, Url) {
|
||||
var View = BaseView.extend({
|
||||
// user must be authenticated to delete their account
|
||||
mustAuth: true,
|
||||
|
@ -29,6 +30,12 @@ function (_, BaseView, Template, Session, FxaClient, PasswordMixin) {
|
|||
'change .show-password': 'onPasswordVisibilityChange'
|
||||
},
|
||||
|
||||
context: function () {
|
||||
return {
|
||||
isSync: Url.searchParam('service') === 'sync'
|
||||
};
|
||||
},
|
||||
|
||||
deleteAccount: function (event) {
|
||||
if (event) {
|
||||
event.preventDefault();
|
||||
|
|
|
@ -9,9 +9,10 @@ define([
|
|||
'views/base',
|
||||
'stache!templates/reset_password_complete',
|
||||
'lib/session',
|
||||
'lib/xss'
|
||||
'lib/xss',
|
||||
'lib/url'
|
||||
],
|
||||
function (_, BaseView, Template, Session, Xss) {
|
||||
function (_, BaseView, Template, Session, Xss, Url) {
|
||||
var View = BaseView.extend({
|
||||
template: Template,
|
||||
className: 'reset_password_complete',
|
||||
|
@ -19,7 +20,8 @@ function (_, BaseView, Template, Session, Xss) {
|
|||
context: function () {
|
||||
return {
|
||||
email: Session.email,
|
||||
service: Session.service,
|
||||
service: Url.searchParam('service'),
|
||||
isSync: Url.searchParam('service') === 'sync',
|
||||
redirectTo: Xss.href(Session.redirectTo)
|
||||
};
|
||||
}
|
||||
|
|
|
@ -49,7 +49,8 @@ function (_, BaseView, SignInTemplate, Session, FxaClient, PasswordMixin, Url) {
|
|||
return {
|
||||
email: Session.email,
|
||||
forceAuth: Session.forceAuth,
|
||||
error: error
|
||||
error: error,
|
||||
isSync: Url.searchParam('service') === 'sync'
|
||||
};
|
||||
},
|
||||
|
||||
|
|
|
@ -33,8 +33,6 @@ function (_, BaseView, Template, Session, FxaClient, PasswordMixin, Url) {
|
|||
initialize: function (options) {
|
||||
options = options || {};
|
||||
|
||||
this.service = Url.searchParam('service');
|
||||
|
||||
// Reset forceAuth flag so users who visit the reset_password screen
|
||||
// see the correct links.
|
||||
Session.set('forceAuth', false);
|
||||
|
@ -58,8 +56,8 @@ function (_, BaseView, Template, Session, FxaClient, PasswordMixin, Url) {
|
|||
|
||||
context: function () {
|
||||
return {
|
||||
service: this.service,
|
||||
isSync: this.service === 'sync'
|
||||
service: Url.searchParam('session'),
|
||||
isSync: Url.searchParam('service') === 'sync'
|
||||
};
|
||||
},
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче