authentication - Showing errors in modals -
i'm making popup login , registration using modals form twitter bootstrap. want do, when enters wrong input, shouldn't redirect page, show sign_in modal errors.
so have code popup login:
<a class="btn" data-toggle="modal" href="#login"">login</a> <div class="modal hide" id="login"> <%= render :template => "devise/sessions/new" %> </div> can suggest how can ?
you should activate modal when login credentials wrong modal javascript method: $("div.modal").modal(options); options json object this
{ backdrop: true, // includes modal-backdrop element. alternatively, specify static backdrop doesn't close modal on click. keyboard: true, // closes modal when escape key pressed show: true // shows modal when initialized. }
Comments
Post a Comment