0

TwitterBootstrapからモーダルを使用してポップアップログインと登録を行っています。だから私はやりたいのですが、誰かが間違った入力を入力した場合、それは別のページにリダイレクトされるべきではありませんが、このsign_inモーダルをエラーで表示します。

だから私はポップアップログイン用のこのコードを持っています:

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

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

誰かが私がそれを行う方法を提案できますか?

4

1 に答える 1

0

モーダル JavaScript メソッドでログイン資格情報が間違っている場合は、モーダルを有効にする必要が$("div.modal").modal(options);あります。 options は、次のような 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.
    }
于 2012-06-05T19:28:15.053 に答える