1
我要重寫,並用自己的形式重置密碼與賬戶的UI覆蓋重置密碼,安裝
我已經安裝了安裝帳戶-ui包我試着在HTML 以下
Router.route('/reset-password', {
path : '/#/reset-password/:slug',
name : 'forgot-password',
template : 'ResetPassword',
waitOn: function(){
console.log("reset link");
},
controller: MainRouteController
});
{{#if resetPassword}}
<form id="resetPasswordForm" method="post">
<input id="resetPasswordPassword" name="password" placeholder="New Password" type="password" >
<input id="resetPasswordPasswordConfirm" name="password-confirm" placeholder="Confirm" type="password" >
<input class="btn-submit" type="submit" value="Reset">
</form>
{{/if}}
</template>
在.js文件
if (Accounts._resetPasswordToken) {
Session.set('resetPassword', Accounts._resetPasswordToken);
}
Template.ResetPassword.helpers({
resetPassword: function(){
return Session.get('resetPassword');
}
});
但仍顯示出賬戶的UI resetpassword對話框