Author: allyb
Date: 2010-03-01 21:37:45 +0100 (Mon, 01 Mar 2010)
New Revision: 28333
Added:
plugins/sfEasyAuthPlugin/branches/2010-02-18_integration-of-doctrine/modules/sfEasyAuth/actions/components.class.php
plugins/sfEasyAuthPlugin/branches/2010-02-18_integration-of-doctrine/modules/sfEasyAuth/config/view.yml
plugins/sfEasyAuthPlugin/branches/2010-02-18_integration-of-doctrine/modules/sfEasyAuth/templates/_compactLogIn.php
plugins/sfEasyAuthPlugin/branches/2010-02-18_integration-of-doctrine/modules/sfEasyAuth/templates/passwordForgottenSuccess.php
Modified:
plugins/sfEasyAuthPlugin/branches/2010-02-18_integration-of-doctrine/config/app.yml
plugins/sfEasyAuthPlugin/branches/2010-02-18_integration-of-doctrine/lib/form/sfEasyAuthPasswordResetForm.class.php
plugins/sfEasyAuthPlugin/branches/2010-02-18_integration-of-doctrine/lib/sfEasyAuthRouting.class.php
plugins/sfEasyAuthPlugin/branches/2010-02-18_integration-of-doctrine/modules/sfEasyAuth/lib/BasesfEasyAuthActions.class.php
plugins/sfEasyAuthPlugin/branches/2010-02-18_integration-of-doctrine/modules/sfEasyAuth/templates/loginSuccess.php
plugins/sfEasyAuthPlugin/branches/2010-02-18_integration-of-doctrine/modules/sfEasyAuth/templates/passwordResetFailedSuccess.php
plugins/sfEasyAuthPlugin/branches/2010-02-18_integration-of-doctrine/modules/sfEasyAuth/templates/passwordResetPasswordUpdatedSuccess.php
plugins/sfEasyAuthPlugin/branches/2010-02-18_integration-of-doctrine/modules/sfEasyAuth/templates/passwordResetSendEmailSuccess.php
plugins/sfEasyAuthPlugin/branches/2010-02-18_integration-of-doctrine/modules/sfEasyAuth/templates/passwordResetSetPasswordSuccess.php
plugins/sfEasyAuthPlugin/branches/2010-02-18_integration-of-doctrine/modules/sfEasyAuth/templates/secureSuccess.php
plugins/sfEasyAuthPlugin/branches/2010-02-18_integration-of-doctrine/web/css/auth.css
Log:
Created a compact log in form for sidebars
Modified:
plugins/sfEasyAuthPlugin/branches/2010-02-18_integration-of-doctrine/config/app.yml
===================================================================
---
plugins/sfEasyAuthPlugin/branches/2010-02-18_integration-of-doctrine/config/app.yml
2010-03-01 12:41:52 UTC (rev 28332)
+++
plugins/sfEasyAuthPlugin/branches/2010-02-18_integration-of-doctrine/config/app.yml
2010-03-01 20:37:45 UTC (rev 28333)
@@ -69,6 +69,8 @@
username_required_message: Please enter your user name # displayed if
users don't
password_required_message: Please enter your password # enter
required fields
+ invalid_email_message: Please a valid email address #
shown on the password reset form
+ no_user_for_email: No user is registered with that email address #
shown on the password reset form
password_min_length: 4 # the minimum length passwords are
allowed to be
reset_user_not_found: We couldn't find a user with that email address #
displayed when we
Modified:
plugins/sfEasyAuthPlugin/branches/2010-02-18_integration-of-doctrine/lib/form/sfEasyAuthPasswordResetForm.class.php
===================================================================
---
plugins/sfEasyAuthPlugin/branches/2010-02-18_integration-of-doctrine/lib/form/sfEasyAuthPasswordResetForm.class.php
2010-03-01 12:41:52 UTC (rev 28332)
+++
plugins/sfEasyAuthPlugin/branches/2010-02-18_integration-of-doctrine/lib/form/sfEasyAuthPasswordResetForm.class.php
2010-03-01 20:37:45 UTC (rev 28333)
@@ -15,11 +15,6 @@
$this->setWidgets(array(
'email' => new sfWidgetFormInput(),
));
-
- // use a better formatter than the default on provided by symfony
- $oDecorator = new
sfEasyAuthWidgetFormSchemaFormatterDiv($this->getWidgetSchema());
- $this->getWidgetSchema()->addFormFormatter('div', $oDecorator);
- $this->getWidgetSchema()->setFormFormatterName('div');
$this->widgetSchema->setLabels(array(
'email' => 'Please enter your email address'
@@ -33,12 +28,18 @@
array(
new sfValidatorEmail(
array('required' => true),
- array('required' =>
sfConfig::get('app_sf_easy_auth_username_required_message'))
+ array(
+ 'required' =>
sfConfig::get('app_sf_easy_auth_username_required_message'),
+ 'invalid' =>
sfConfig::get('app_sf_easy_auth_invalid_email_message')
+ )
),
new
sfValidatorDoctrineChoice/*&sfValidatorPropelChoice###sfValidatorDoctrineChoice&*/(
array(
'model' => 'sfEasyAuthUser',
'column' => 'email'
+ ),
+ array(
+ 'invalid' =>
sfConfig::get('app_sf_easy_auth_no_user_for_email')
)
)
)
Modified:
plugins/sfEasyAuthPlugin/branches/2010-02-18_integration-of-doctrine/lib/sfEasyAuthRouting.class.php
===================================================================
---
plugins/sfEasyAuthPlugin/branches/2010-02-18_integration-of-doctrine/lib/sfEasyAuthRouting.class.php
2010-03-01 12:41:52 UTC (rev 28332)
+++
plugins/sfEasyAuthPlugin/branches/2010-02-18_integration-of-doctrine/lib/sfEasyAuthRouting.class.php
2010-03-01 20:37:45 UTC (rev 28333)
@@ -47,6 +47,14 @@
)
)
);
+ $r->prependRoute('sf_easy_auth_password_forgotten',
+ new sfRoute('/pw-forgotten',
+ array(
+ 'module' => 'sfEasyAuth',
+ 'action' => 'passwordForgotten'
+ )
+ )
+ );
$r->prependRoute('sf_easy_auth_password_reset_send_email',
new sfRoute('/pw-reset',
array(
Added:
plugins/sfEasyAuthPlugin/branches/2010-02-18_integration-of-doctrine/modules/sfEasyAuth/actions/components.class.php
===================================================================
---
plugins/sfEasyAuthPlugin/branches/2010-02-18_integration-of-doctrine/modules/sfEasyAuth/actions/components.class.php
(rev 0)
+++
plugins/sfEasyAuthPlugin/branches/2010-02-18_integration-of-doctrine/modules/sfEasyAuth/actions/components.class.php
2010-03-01 20:37:45 UTC (rev 28333)
@@ -0,0 +1,25 @@
+<?php
+
+/**
+ * easy auth components.
+ *
+ * @package .
+ * @subpackage easy auth
+ * @author Your name here
+ * @version SVN: $Id: actions.class.php 12474 2008-10-31 10:41:27Z fabien $
+ */
+class sfEasyAuthComponents extends sfComponents
+{
+ /**
+ * Lets users log in using a compact form
+ */
+ public function executeCompactLogIn(sfWebRequest $request)
+ {
+ $this->form = new sfEasyAuthLoginForm();
+
+ if ($request->isMethod(sfWebRequest::POST))
+ {
+
+ }
+ }
+}
\ No newline at end of file
Added:
plugins/sfEasyAuthPlugin/branches/2010-02-18_integration-of-doctrine/modules/sfEasyAuth/config/view.yml
===================================================================
---
plugins/sfEasyAuthPlugin/branches/2010-02-18_integration-of-doctrine/modules/sfEasyAuth/config/view.yml
(rev 0)
+++
plugins/sfEasyAuthPlugin/branches/2010-02-18_integration-of-doctrine/modules/sfEasyAuth/config/view.yml
2010-03-01 20:37:45 UTC (rev 28333)
@@ -0,0 +1,6 @@
+# You can find more information about this file on the symfony website:
+# http://www.symfony-project.org/reference/1_4/en/13-View
+
+default:
+ stylesheets: [ /sfEasyAuthPlugin/css/auth.css ]
+ javascripts: [ /sfEasyAuthPlugin/js/auth.js ]
Modified:
plugins/sfEasyAuthPlugin/branches/2010-02-18_integration-of-doctrine/modules/sfEasyAuth/lib/BasesfEasyAuthActions.class.php
===================================================================
---
plugins/sfEasyAuthPlugin/branches/2010-02-18_integration-of-doctrine/modules/sfEasyAuth/lib/BasesfEasyAuthActions.class.php
2010-03-01 12:41:52 UTC (rev 28332)
+++
plugins/sfEasyAuthPlugin/branches/2010-02-18_integration-of-doctrine/modules/sfEasyAuth/lib/BasesfEasyAuthActions.class.php
2010-03-01 20:37:45 UTC (rev 28333)
@@ -231,6 +231,27 @@
}
/**
+ * Lets users enter their email address to receive a password
+ * reset email
+ *
+ * @param sfWebRequest $request
+ */
+ public function executePasswordForgotten(sfWebRequest $request)
+ {
+ $this->form = new sfEasyAuthPasswordResetForm();
+
+ if ($request->isMethod('post'))
+ {
+ $this->form->bind($request->getParameter($this->form->getName()));
+
+ if ($this->form->isValid())
+ {
+ return $this->executePasswordResetSendEmail($request);
+ }
+ }
+ }
+
+ /**
* Action that sends users an email to let them reset their password
*
* @param sfRequest $request A request object
Added:
plugins/sfEasyAuthPlugin/branches/2010-02-18_integration-of-doctrine/modules/sfEasyAuth/templates/_compactLogIn.php
===================================================================
---
plugins/sfEasyAuthPlugin/branches/2010-02-18_integration-of-doctrine/modules/sfEasyAuth/templates/_compactLogIn.php
(rev 0)
+++
plugins/sfEasyAuthPlugin/branches/2010-02-18_integration-of-doctrine/modules/sfEasyAuth/templates/_compactLogIn.php
2010-03-01 20:37:45 UTC (rev 28333)
@@ -0,0 +1,7 @@
+<form method="post" action="<?php echo url_for('sf_easy_auth_login') ?>"
id="compactLogIn">
+ <h3>Log in</h3>
+ <?php echo $form->renderHiddenFields() ?>
+ <?php echo $form ?>
+ <input type="submit" value="Log in" />
+ <?php echo link_to('Forgotten password',
url_for('sf_easy_auth_password_forgotten')) ?>
+</form>
\ No newline at end of file
Modified:
plugins/sfEasyAuthPlugin/branches/2010-02-18_integration-of-doctrine/modules/sfEasyAuth/templates/loginSuccess.php
===================================================================
---
plugins/sfEasyAuthPlugin/branches/2010-02-18_integration-of-doctrine/modules/sfEasyAuth/templates/loginSuccess.php
2010-03-01 12:41:52 UTC (rev 28332)
+++
plugins/sfEasyAuthPlugin/branches/2010-02-18_integration-of-doctrine/modules/sfEasyAuth/templates/loginSuccess.php
2010-03-01 20:37:45 UTC (rev 28333)
@@ -1,5 +1,3 @@
-<?php use_stylesheet('/sfEasyAuthPlugin/css/auth.css') ?>
-<?php use_javascript('/sfEasyAuthPlugin/js/auth.js') ?>
<?php use_helper('I18N') ?>
<div id="authContainer">
Added:
plugins/sfEasyAuthPlugin/branches/2010-02-18_integration-of-doctrine/modules/sfEasyAuth/templates/passwordForgottenSuccess.php
===================================================================
---
plugins/sfEasyAuthPlugin/branches/2010-02-18_integration-of-doctrine/modules/sfEasyAuth/templates/passwordForgottenSuccess.php
(rev 0)
+++
plugins/sfEasyAuthPlugin/branches/2010-02-18_integration-of-doctrine/modules/sfEasyAuth/templates/passwordForgottenSuccess.php
2010-03-01 20:37:45 UTC (rev 28333)
@@ -0,0 +1,11 @@
+<?php use_helper('I18N') ?>
+
+<div id="authContainer">
+ <form method="post" action="<?php echo
url_for('sf_easy_auth_password_forgotten') ?>">
+ <h1>Password reset</h1>
+ <?php echo $form->renderHiddenFields() ?>
+ <?php echo $form ?>
+ <p><?php echo __("We'll email a password reset link to the email address
you enter above.") ?></p>
+ <input type="submit" value="<?php echo __('Reset password')?>" />
+ </form>
+</div>
\ No newline at end of file
Modified:
plugins/sfEasyAuthPlugin/branches/2010-02-18_integration-of-doctrine/modules/sfEasyAuth/templates/passwordResetFailedSuccess.php
===================================================================
---
plugins/sfEasyAuthPlugin/branches/2010-02-18_integration-of-doctrine/modules/sfEasyAuth/templates/passwordResetFailedSuccess.php
2010-03-01 12:41:52 UTC (rev 28332)
+++
plugins/sfEasyAuthPlugin/branches/2010-02-18_integration-of-doctrine/modules/sfEasyAuth/templates/passwordResetFailedSuccess.php
2010-03-01 20:37:45 UTC (rev 28333)
@@ -1,4 +1,3 @@
-<?php use_stylesheet('/sfEasyAuthPlugin/css/auth.css') ?>
<?php use_helper('I18N') ?>
<div id="authContainer">
Modified:
plugins/sfEasyAuthPlugin/branches/2010-02-18_integration-of-doctrine/modules/sfEasyAuth/templates/passwordResetPasswordUpdatedSuccess.php
===================================================================
---
plugins/sfEasyAuthPlugin/branches/2010-02-18_integration-of-doctrine/modules/sfEasyAuth/templates/passwordResetPasswordUpdatedSuccess.php
2010-03-01 12:41:52 UTC (rev 28332)
+++
plugins/sfEasyAuthPlugin/branches/2010-02-18_integration-of-doctrine/modules/sfEasyAuth/templates/passwordResetPasswordUpdatedSuccess.php
2010-03-01 20:37:45 UTC (rev 28333)
@@ -1,4 +1,3 @@
-<?php use_stylesheet('/sfEasyAuthPlugin/css/auth.css') ?>
<?php use_helper('I18N') ?>
<div id="authContainer">
Modified:
plugins/sfEasyAuthPlugin/branches/2010-02-18_integration-of-doctrine/modules/sfEasyAuth/templates/passwordResetSendEmailSuccess.php
===================================================================
---
plugins/sfEasyAuthPlugin/branches/2010-02-18_integration-of-doctrine/modules/sfEasyAuth/templates/passwordResetSendEmailSuccess.php
2010-03-01 12:41:52 UTC (rev 28332)
+++
plugins/sfEasyAuthPlugin/branches/2010-02-18_integration-of-doctrine/modules/sfEasyAuth/templates/passwordResetSendEmailSuccess.php
2010-03-01 20:37:45 UTC (rev 28333)
@@ -1,4 +1,3 @@
-<?php use_stylesheet('/sfEasyAuthPlugin/css/auth.css') ?>
<?php use_helper('I18N') ?>
<div id="authContainer">
Modified:
plugins/sfEasyAuthPlugin/branches/2010-02-18_integration-of-doctrine/modules/sfEasyAuth/templates/passwordResetSetPasswordSuccess.php
===================================================================
---
plugins/sfEasyAuthPlugin/branches/2010-02-18_integration-of-doctrine/modules/sfEasyAuth/templates/passwordResetSetPasswordSuccess.php
2010-03-01 12:41:52 UTC (rev 28332)
+++
plugins/sfEasyAuthPlugin/branches/2010-02-18_integration-of-doctrine/modules/sfEasyAuth/templates/passwordResetSetPasswordSuccess.php
2010-03-01 20:37:45 UTC (rev 28333)
@@ -1,4 +1,3 @@
-<?php use_stylesheet('/sfEasyAuthPlugin/css/auth.css') ?>
<?php use_helper('I18N') ?>
<div id="authContainer">
Modified:
plugins/sfEasyAuthPlugin/branches/2010-02-18_integration-of-doctrine/modules/sfEasyAuth/templates/secureSuccess.php
===================================================================
---
plugins/sfEasyAuthPlugin/branches/2010-02-18_integration-of-doctrine/modules/sfEasyAuth/templates/secureSuccess.php
2010-03-01 12:41:52 UTC (rev 28332)
+++
plugins/sfEasyAuthPlugin/branches/2010-02-18_integration-of-doctrine/modules/sfEasyAuth/templates/secureSuccess.php
2010-03-01 20:37:45 UTC (rev 28333)
@@ -1,4 +1,3 @@
-<?php use_stylesheet('/sfEasyAuthPlugin/css/auth.css') ?>
<?php use_helper('I18N') ?>
<h1><?php echo __("Additional privileges required") ?></h1>
Modified:
plugins/sfEasyAuthPlugin/branches/2010-02-18_integration-of-doctrine/web/css/auth.css
===================================================================
---
plugins/sfEasyAuthPlugin/branches/2010-02-18_integration-of-doctrine/web/css/auth.css
2010-03-01 12:41:52 UTC (rev 28332)
+++
plugins/sfEasyAuthPlugin/branches/2010-02-18_integration-of-doctrine/web/css/auth.css
2010-03-01 20:37:45 UTC (rev 28333)
@@ -47,12 +47,9 @@
position: relative;
}
-#authContainer .error, .formError
+#authContainer .error_list
{
color: #f00;
- position: absolute;
- right: 0;
- top: 0;
}
#authContainer .notice
--
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.