How To Login from bootstrap modal?
leefish Offline
Hamster
*****
Posts: 1,009
Joined: Apr 2010
Post: #22
RE: How To Login from bootstrap modal?
What you can try - is to load the bootstrap js (the standard js, not custom) in the footer. See link below.

<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>

Then you will have to edit the templates. Try using the template edit I gave you:

Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<div class="modal fade" id="quick_login" style="display: none;"  role="dialog" aria-hidden="true">
<form method="post" action="{$mybb->settings['bburl']}/member.php">
						<input name="action" type="hidden" value="do_login" />
						<input name="url" type="hidden" value="" />
						<input name="quick_login" type="hidden" value="1" />					
 	<div class="modal-dialog">
		<div class="modal-content">

			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
				<span class="modal-title tl" id="loginModal">Log in</span>

			</div> <!-- /.modal-header -->

			<div class="modal-body">
					<div class="form-group">
						<div class="input-group">
							<input type="text" class="form-control" name="quick_username" id="quick_login_username" placeholder="Login"/>
							<label for="quick_login_username"></label>
						</div>
					</div>

					<div class="form-group">
						<div class="input-group">
							<input type="password" class="form-control" placeholder="Password" name="quick_password" id="quick_login_password" value=""  >
							<label for="quick_login_password"></label>
						</div>
					</div>
<div class="checkbox">
						<label>
							<input name="quick_remember" id="quick_login_remember" type="checkbox" value="yes" class="checkbox" checked="checked" /> {$lang->remember_me}
						</label>
					</div>

			</div><!--modal-body -->

			<div class="modal-footer clearfix">

<a href="{$mybb->settings['bburl']}/member.php?action=lostpw" class="lost_password pull-left">{$lang->lost_password}</a>

				<input name="submit" type="submit" value="{$lang->login}" class="btn btn-action"/>

				
			</div> <!--modal-footer -->
			
		</div><!--modal-content -->
	</div><!--modal-dialog -->
</form></div>
       

				<script type="text/javascript">
					$("#quick_login input[name='url']").val($(location).attr('href'));
				</script>


You will have to do this for every mybb modal - reports, reputation, modcp - everywhere.



[Image: leelink.gif]
MYBB1.6 & XThreads
(This post was last modified: 09-23-2015 11:48 PM by leefish.)
09-23-2015 11:47 PM
Visit this user's website Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

Messages In This Thread
RE: How To Login from bootstrap modal? - leefish - 09-23-2015 11:47 PM

 Standard Tools
Forum Jump: