Modalise Login

This commit is contained in:
Deon George 2013-05-16 21:50:44 +10:00
parent 41e777bd9d
commit c06068fc90
4 changed files with 22 additions and 17 deletions

View File

@ -145,25 +145,18 @@ abstract class lnApp_Controller_TemplateDefault extends Kohana_Controller_Templa
$this->meta->description = sprintf('%s::%s',$this->request->controller(),$this->request->action()); $this->meta->description = sprintf('%s::%s',$this->request->controller(),$this->request->action());
// In case we have some scripting/styling, we need to get that out too // In case we have some scripting/styling, we need to get that out too
// @todo Do we come here for ajax?
} elseif ($this->request->is_ajax() AND $this->response->body()) { } elseif ($this->request->is_ajax() AND $this->response->body()) {
$this->response->bodyadd(Script::factory()->render_all()); $this->response->bodyadd(Script::factory()->render_all());
$this->response->bodyadd(Style::factory()->render_all()); $this->response->bodyadd(Style::factory()->render_all());
// For any ajax rendered actions, we'll need to capture the content and put it in the response // For any ajax rendered actions, we'll need to capture the content and put it in the response
// @todo Do we come here for ajax?
} elseif ($this->request->is_ajax() && isset($this->template->content) && ! $this->response->body()) { } elseif ($this->request->is_ajax() && isset($this->template->content) && ! $this->response->body()) {
// In case there any style sheets for this render. $output = Style::factory()->render_all();
$this->response->bodyadd(Style::factory()); $output .= Script::factory()->render_all();
$output .= $this->template->content;
// Since we are ajax, we should re-render the breadcrumb $this->response->body($output);
Session::instance()->set('breadcrumb',(string)BreadCrumb::factory());
$this->response->bodyadd(Script::add(array('type'=>'stdin','data'=>'$().ready($("#ajCONTROL").load("'.URL::site('welcome/breadcrumb').'",null,function(x,s,r) {}));')));
// In case there any javascript for this render.
$this->response->bodyadd(Script::factory());
// Get the response body
$this->response->bodyadd(sprintf('<table class="content"><tr><td>%s</td></tr></table>',$this->template->content));
} }
// Used by our javascript to know what the SITE URL is. // Used by our javascript to know what the SITE URL is.

View File

@ -33,7 +33,7 @@ abstract class lnApp_Meta {
public function secure() { public function secure() {
static $secure = NULL; static $secure = NULL;
if (! $secure) if (! $secure AND Request::current())
$secure = Request::current()->secure() ? 'https://' : 'http://'; $secure = Request::current()->secure() ? 'https://' : 'http://';
return $secure; return $secure;

View File

@ -14,7 +14,7 @@
/** Base Body Styles **/ /** Base Body Styles **/
body{ color:#838383; font: 13px/1.7em 'Open Sans';} body{ color:#838383; /*font: 13px/1.7em 'Open Sans';*/}
.account-container { .account-container {
@ -49,7 +49,7 @@ body{ color:#838383; font: 13px/1.7em 'Open Sans';}
} }
.login-fields input { .login-fields input {
font-family: 'Open Sans'; /* font-family: 'Open Sans'; */
font-size: 13px; font-size: 13px;
color: #8e8d8d; color: #8e8d8d;
padding: 11px 15px 10px 50px; padding: 11px 15px 10px 50px;
@ -252,3 +252,12 @@ span.login-checkbox > input[type='checkbox']:checked + label {
} }
} }
.modal-body .account-container {
margin-top: 10px;
}
.modal-body .account-container h1 {
font-weight: normal;
}

View File

@ -1,6 +1,6 @@
<div class="account-container stacked"> <div class="account-container stacked">
<div class="content clearfix"> <div class="content clearfix">
<form method="post"> <form method="post" action="<?php echo URL::site('login'); ?>">
<h1>Sign In</h1> <h1>Sign In</h1>
<div class="login-fields"> <div class="login-fields">
@ -45,5 +45,8 @@
<!-- Text Under Box --> <!-- Text Under Box -->
<div class="login-extra"> <div class="login-extra">
<!-- Don't have an account? <a href="./signup.html">Sign Up</a><br/> --> <!-- Don't have an account? <a href="./signup.html">Sign Up</a><br/> -->
Forgot your <a href="<?php echo URL::site('login/reset'); ?>">Password</a>? Forgot your <a href="<?php echo URL::site('login/reset'); ?>" data-toggle="modal" data-target="#modal-reset">Password</a>?
</div> <!-- /login-extra --> </div> <!-- /login-extra -->
<div class="modal hide fade" id="modal-reset" role="dialog" aria-hidden="true">
<div class="modal-body"></div>
</div>