Author: johnnyoffline
Date: 2010-01-15 23:52:07 +0100 (Fri, 15 Jan 2010)
New Revision: 26698
Added:
plugins/pkContextCMSPlugin/trunk/modules/pkContextCMS/templates/_signinForm.php
Modified:
plugins/pkContextCMSPlugin/trunk/modules/pkContextCMS/lib/BasepkContextCMSComponents.class.php
plugins/pkContextCMSPlugin/trunk/modules/pkContextCMS/templates/_login.php
plugins/pkContextCMSPlugin/trunk/web/css/pkContextCMS.css
Log:
enhanced the login experience
Modified:
plugins/pkContextCMSPlugin/trunk/modules/pkContextCMS/lib/BasepkContextCMSComponents.class.php
===================================================================
---
plugins/pkContextCMSPlugin/trunk/modules/pkContextCMS/lib/BasepkContextCMSComponents.class.php
2010-01-15 21:58:50 UTC (rev 26697)
+++
plugins/pkContextCMSPlugin/trunk/modules/pkContextCMS/lib/BasepkContextCMSComponents.class.php
2010-01-15 22:52:07 UTC (rev 26698)
@@ -143,6 +143,7 @@
}
}
}
+
public function executeNavigation(sfRequest $request)
{
// What page are we starting from?
@@ -193,4 +194,16 @@
}
}
+
+ /**
+ * Executes signinForm action
+ *
+ * @param sfRequest $request A request object
+ */
+ public function executeSigninForm(sfWebRequest $request)
+ {
+ $class = sfConfig::get('app_sf_guard_plugin_signin_form',
'sfGuardFormSignin');
+ $this->form = new $class();
+ }
+
}
Modified:
plugins/pkContextCMSPlugin/trunk/modules/pkContextCMS/templates/_login.php
===================================================================
--- plugins/pkContextCMSPlugin/trunk/modules/pkContextCMS/templates/_login.php
2010-01-15 21:58:50 UTC (rev 26697)
+++ plugins/pkContextCMSPlugin/trunk/modules/pkContextCMS/templates/_login.php
2010-01-15 22:52:07 UTC (rev 26698)
@@ -20,7 +20,12 @@
<?php else: ?>
<?php // You can easily turn off the 'Log In' link via app.yml ?>
<?php if (sfConfig::get('app_pkContextCMS_login_link', true)): ?>
- <li><?php echo link_to("Log In",
sfConfig::get('app_pkContextCMS_actions_login', 'sfGuardAuth/signin'),
array('class' => 'pk-btn', )) ?></li>
+ <li>
+ <?php echo jq_link_to_function('Login',
"$('#pk-login-form-container').fadeIn(); $('#signin_username').focus();
$('.pk-page-overlay').fadeIn('fast');", array('class' => 'pk-btn','id' =>
'pk-login-button')) ?>
+ <div id="pk-login-form-container">
+ <?php
include_component('pkContextCMS','signinForm') ?>
+ </div>
+ </li>
<?php endif ?>
<?php endif ?>
-</ul>
+</ul>
\ No newline at end of file
Added:
plugins/pkContextCMSPlugin/trunk/modules/pkContextCMS/templates/_signinForm.php
===================================================================
---
plugins/pkContextCMSPlugin/trunk/modules/pkContextCMS/templates/_signinForm.php
(rev 0)
+++
plugins/pkContextCMSPlugin/trunk/modules/pkContextCMS/templates/_signinForm.php
2010-01-15 22:52:07 UTC (rev 26698)
@@ -0,0 +1,28 @@
+<?php use_helper('Jquery') ?>
+
+<div id="pk-signin">
+ <form action="<?php echo url_for('@sf_guard_signin') ?>" method="post"
id="pk-signin-form" <?php echo ($form->hasErrors())? 'class="has-errors"':'';
?>>
+
+ <div class="pk-form-row">
+ <?php echo $form['username']->renderLabel() ?>
+ <?php echo $form['username']->render() ?>
+ <?php echo $form['username']->renderError() ?>
+ </div>
+
+ <div class="pk-form-row">
+ <?php echo $form['password']->renderLabel() ?>
+ <?php echo $form['password']->render() ?>
+ <?php echo $form['password']->renderError() ?>
+ </div>
+
+ <div class="pk-form-row">
+ <?php echo $form['remember']->renderRow() ?>
+ </div>
+
+ <ul class="pk-form-row submit">
+ <li><input type="submit" value="<?php echo __('sign in') ?>"
class="pk-submit" /></li>
+ <li><?php echo jq_link_to_function('Cancel',
"$('#pk-login-form-container').fadeOut('fast');
$('.pk-page-overlay').fadeOut('fast');", array('class' => 'pk-cancel', ))
?></li>
+ </ul>
+
+ </form>
+</div>
Modified: plugins/pkContextCMSPlugin/trunk/web/css/pkContextCMS.css
===================================================================
--- plugins/pkContextCMSPlugin/trunk/web/css/pkContextCMS.css 2010-01-15
21:58:50 UTC (rev 26697)
+++ plugins/pkContextCMSPlugin/trunk/web/css/pkContextCMS.css 2010-01-15
22:52:07 UTC (rev 26698)
@@ -1419,4 +1419,56 @@
.pk-default #pk-area-body
{
width: 480px;
+}
+
+#pk-login-form-container
+{
+ position: absolute;
+ top: 5px;
+ right: 5px;
+ padding: 0;
+ background: #fff;
+ border: 1px solid #999;
+ z-index:999;
+ display: none;
+ -moz-box-shadow:rgba(0,0,0,0.25) 0px 0px 10px;
+ -webkit-box-shadow:rgba(0,0,0,0.25) 0px 0px 10px;
+ -opera-box-shadow:rgba(0,0,0,0.25) 0px 0px 10px;
+ -khtml-box-shadow:rgba(0,0,0,0.25) 0px 0px 10px;
+ box-shadow:rgba(0,0,0,0.25) 0px 0px 10px;
+}
+
+#pk-signin-form .pk-form-row
+{
+ float: left;
+ width: 100%;
+ clear: both;
+ position: relative;
+ margin: 10px;
+}
+
+#pk-signin-form .pk-form-row.submit li
+{
+ float: left;
+ display: inline;
+ width: auto;
+ clear:none;
+ position: relative;
+ margin-right: 5px;
+}
+
+#pk-signin-form input.pk-submit {
+border:none;
+color:#fff;
+font-family:Arial,Sans-serif;
+font-size:12px;
+padding:0;
+margin: 0;
+text-transform: capitalize;
+width: auto;
+}
+
+#pk-signin-form .pk-form-row.submit .pk-cancel
+{
+ margin-left: 5px;
}
\ No newline at end of file
--
You received this message because you are subscribed to the Google Groups
"symfony SVN" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/symfony-svn?hl=en.