Answer the question
In order to leave comments, you need to log in
How to make a modal login form using the Twitter Bootstrap Modal module?
Drupal 7
Bootstrap 3
How to make modal authorization using the Twitter Bootstrap Modal module?
Answer the question
In order to leave comments, you need to log in
I manage without additional modules
<?php if(user_is_anonymous()): ?>
<ul class="menu">
<li class="menu"><a href="#loginForm" role="button" data-toggle="modal">Войти</a></li>
<li class="menu"><a href="/user/register">Регистрация</a></li>
<li class="menu"><a href="/user/password">Восстановление пароля</a></li>
</ul>
<?php endif; ?>
<?php if(!user_is_logged_in()) : ?>
<div class="modal hide" id="loginForm" tabindex="-1" role="dialog" aria-labelledby="loginFormLabel" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="loginFormLabel">Авторизация</h3>
</div>
<div class="modal-body">
<?php print drupal_render(drupal_get_form('user_login')); ?>
</div>
</div>
<?php endif; ?>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question