How to get a login form for my website? Print

  • 0

Go to: /config/blesta.php

Find: Configure::set("Blesta.csrf_bypass", array()); replace it with: Configure::set("Blesta.csrf_bypass", array('client_login::index'));

Change http://licensecart.com/billing/customers/login/ to your own Blesta installation url.

Simple login form:

<form method="post" action="http://licensecart.com/billing/customers/login/">
Username: <input type="text" name="username" value="" id="login_username" /><br />
Password: <input type="password" name="password" value="" id="login_password" /><br />
<input type="submit" name="login" value="Login" class="btn hide_submit" hidefocus="true" />
</form>

Bootstrap Modal triggered login.

  <!-- Button to trigger modal -->
  <li><a href="#login"role="button" data-toggle="modal">Login</a>
<!-- Modal -->
<div id="login" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true"><i class="icon-remove text-error"></i></button>
    <h3 id="myModalLabel">Billing Area Login</h3>
  </div>
  <div class="modal-body">
    <p><form method="post" action="http://licensecart.com/billing/customers/login/" target="_blank" style="width: 200px;margin: 0 auto 0 auto;">
Username: <input type="text" name="username" value="" id="login_username" /><br />
Password: <input type="password" name="password" value="" id="login_password" /><br />
<input type="submit" name="login" value="Login" class="btn hide_submit" hidefocus="true" />
</form></p>
  </div>
  <div class="modal-footer">
    <button class="btn btn-danger" data-dismiss="modal" aria-hidden="true">Close</button>
  </div>
</div>

Thanks to Scott Horsley, MemoryX2 and Paul for the help when making the tutorial on the Blesta forums: http://www.blesta.com/forums/index.php?/topic/510-login-form-outside-blesta/


Was this answer helpful?

« Back