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