Authentication 在情态动词中显示错误

Authentication 在情态动词中显示错误,authentication,twitter-bootstrap,modal-dialog,Authentication,Twitter Bootstrap,Modal Dialog,我正在使用Twitter引导的modals表单进行弹出式登录和注册。所以我想做的是,当有人输入错误的输入时,它不应该重定向到另一个页面,而是在模式中显示带有错误的符号。 我有一个弹出式登录代码: <a class="btn" data-toggle="modal" href="#login"">Login</a> <div class="modal hide" id="login"> <%= render :template => "de

我正在使用Twitter引导的modals表单进行弹出式登录和注册。所以我想做的是,当有人输入错误的输入时,它不应该重定向到另一个页面,而是在模式中显示带有错误的符号。 我有一个弹出式登录代码:

<a class="btn" data-toggle="modal" href="#login"">Login</a>

<div class="modal hide" id="login">   
 <%= render :template => "devise/sessions/new" %>
</div>

“设计/会话/新建”%>

有人能建议我怎么做吗?

当登录凭据与模式JavaScript方法错误时,您应该激活模式:
$(“div.modal”).modal(选项)其中选项是一个JSON对象,如下所示


    {
        backdrop: true,      // Includes a modal-backdrop element. Alternatively, specify static for a backdrop which doesn't close the modal on click.
        keyboard: true,      // Closes the modal when escape key is pressed
        show:     true       // Shows the modal when initialized.
    }