我向客户端发送了忘记密码的链接。我想在客户端点击链接时显示一个用于更改密码的引导程序JS模式。 显示我的方法的代码如下:
account.html
<template name="ResetPassword">
<div class="modal fade" id="myModal-9" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<span class="f-s-20 text-blue">ŞİFRE DEĞİŞTİRME EKRANI </span>
</div>
<div class="modal-body">
{{#if resetPassword}}
<form action="/reset-password" 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" id="resetpasswordbtn" type="submit" value="Reset">
</form>
{{/if}}
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Kapat</button>
</div>
</div>
</div>
</div>
</template>
account.js
Accounts.onResetPasswordLink(function (token, done) {
Session.set('resetPasswordToken', token);
$($(this).data("#myModal-9")).show();
done();
});
答案 0 :(得分:0)
使用以下代码。
$("#myModal-9").modal('show');