External Login form. Print

  • 0

If you would like a external login form for your website you need to go to /config/blesta.php and find: Configure::set("Blesta.csrf_bypass", array());

Edit that Configure::set("Blesta.csrf_bypass", array('client_login::index'));

On your website you need to use one of the following forms and change the URL to your own:

HTML:

<form method="post" action="http://yourdomain.com/blesta_folder/clients/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:

<!-- 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://yourdomain.com/blesta_folder/clients/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>

Was this answer helpful?

« Back