Changeset 13826
- Timestamp:
- 12/07/08 22:51:43 (4 years ago)
- Files:
-
- plugins/sfApplyPlugin/trunk/README (modified) (9 diffs)
- plugins/sfApplyPlugin/trunk/modules/sfApply/templates/_login-prompt.php (added)
- plugins/sfApplyPlugin/trunk/modules/sfApply/templates/_login.php (added)
- plugins/sfApplyPlugin/trunk/modules/sfApply/templates/_logout-prompt.php (added)
- plugins/sfApplyPlugin/trunk/modules/sfApply/templates/applyAfter.php (modified) (1 diff)
- plugins/sfApplyPlugin/trunk/modules/sfApply/templates/applySuccess.php (modified) (1 diff)
- plugins/sfApplyPlugin/trunk/modules/sfApply/templates/confirmInvalid.php (modified) (1 diff)
- plugins/sfApplyPlugin/trunk/modules/sfApply/templates/confirmSuccess.php (modified) (2 diffs)
- plugins/sfApplyPlugin/trunk/modules/sfApply/templates/resetAfter.php (modified) (1 diff)
- plugins/sfApplyPlugin/trunk/modules/sfApply/templates/resetRequestAfter.php (modified) (1 diff)
- plugins/sfApplyPlugin/trunk/modules/sfApply/templates/resetRequestSuccess.php (modified) (2 diffs)
- plugins/sfApplyPlugin/trunk/modules/sfApply/templates/resetSuccess.php (modified) (2 diffs)
- plugins/sfApplyPlugin/trunk/modules/sfApply/templates/settingsSuccess.php (modified) (2 diffs)
- plugins/sfApplyPlugin/trunk/modules/sfApply/validate/apply.yml (modified) (1 diff)
- plugins/sfApplyPlugin/trunk/modules/sfApply/validate/settings.yml (modified) (1 diff)
- plugins/sfApplyPlugin/trunk/package.xml (modified) (1 diff)
- plugins/sfApplyPlugin/trunk/web (added)
- plugins/sfApplyPlugin/trunk/web/css (added)
- plugins/sfApplyPlugin/trunk/web/css/login-apply.css (added)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
plugins/sfApplyPlugin/trunk/README
r13802 r13826 1 sfApply plugin 2 ============== 1 # sfApply plugin # 3 2 4 3 Most public sites have similar needs where user registration is … … 16 15 taking over the account too easily. 17 16 18 Requirements 19 ============ 17 ## Requirements ## 20 18 21 19 You need: … … 28 26 follow shortly. 29 27 30 Installation 31 ============ 28 ## Installation ## 32 29 33 30 Read the sfGuardPlugin documentation first! Set up that plugin before … … 127 124 in your application. 128 125 129 Customizing Emails 130 ================== 126 ## Customizing Emails ## 131 127 132 128 sfApply sends out email messages inviting users to verify their … … 148 144 looking at alternate solutions for 1.2. 149 145 150 Extending sfApply 151 ================= 146 ## Displaying Login and Logout Prompts on Every Page ## 147 148 You probably have pages on which logging in is optional. It's nice to 149 display a login prompt directly on these pages. If you want to do that, 150 try including my login/logout prompt template from your 151 `apps/frontend/templates/layout.php` file: 152 153 <?php include_partial('sfApply/login') ?> 154 155 If you are using the provided stylesheet, the login prompt will 156 be floated at the far right, so you'll want to emit this code 157 before anything that should appear to the left of the prompt. 158 159 When the user is already logged in, the login prompt is 160 automatically replaced by a logout prompt. 161 162 ## Using the Suggested Stylesheet ## 163 164 sfApply comes with a stylesheet. You don't have to use it. If you do, 165 you'll get reasonable styles for the sfApply pages as well as a 166 reasonably good-looking style for the sfGuardPlugin login page. 167 168 If you wish to use my stylesheet directly, first make sure you have a 169 symbolic link from `web/sfApplyPlugin` to `plugins/sfApplyPlugin/web`. Then add 170 the stylesheet to your view.yml file: 171 172 stylesheets: [main, /sfApplyPlugin/css/login-apply] 173 174 In the long run, you'll probably want to borrow from it rather than 175 using it directly. 176 177 ## Extending sfApply ## 152 178 153 179 "But I need the user's birthdate!" Of course you do. Every application … … 168 194 additional information to the profile when an account 169 195 is first created: 196 170 197 function populateProfileSettings($profile) 171 198 { … … 175 202 return parent::populateProfileSettings($profile); 176 203 } 204 177 205 7. Extend `updateProfileSettings` in exactly the same way. The 178 206 difference is that `updateProfileSettings` is called when the … … 186 214 returns false. 187 215 188 Credits 189 ======= 216 ## Credits ## 190 217 191 218 sfApplyPlugin was written by Tom Boutell. He can be contacted … … 194 221 further information about his work. 195 222 196 Changelog 197 ========= 198 199 Version 0.51 corrects Markdown errors in the documentation. There 200 are no code changes. 201 223 ## Changelog ## 224 225 ### Version 0.6 ### 226 227 Version 0.6 adds the optional sfApply/_login.php template, which provides 228 an easy way to insert a login prompt on every page. I realized I was 229 using this code in two sites and that others would likely want to 230 do the same thing. Just include it in your layout template. 231 232 Version 0.6 also adds a suggested stylesheet. Use it or not as you 233 see fit. In addition to styling the apply and reset pages, it also 234 styles the standard sfGuardUser login page. 235 236 Version 0.6 renames all of the CSS classes and ids emitted by sfApplyPlugin 237 in order to avoid potential conflicts with your own CSS elements. 238 239 ### Version 0.53 ### 240 241 Version 0.53 corrected Markdown errors in the documentation. There 242 were no code changes from version 0.5, which was the first 243 public release. 244 plugins/sfApplyPlugin/trunk/modules/sfApply/templates/applyAfter.php
r13802 r13826 1 <p class="apply_notice"> 1 <div class="sf_apply_notice"> 2 <p> 2 3 Thank you for applying for an account. You will receive a verification 3 4 email shortly. If you do not see that email, please be sure to check 4 5 your "spam" or "bulk" folder. 5 6 </p> 7 <p> 6 8 <?php echo button_to("Continue", "@homepage") ?> 9 </p> 10 </div> plugins/sfApplyPlugin/trunk/modules/sfApply/templates/applySuccess.php
r13802 r13826 1 <?php 2 // Override the login slot so that we don't get a login prompt on the 3 // apply page. The user can cancel if they want to do that, and it 4 // prevents problems with validation and fillin. 0.6 5 ?> 6 <?php slot('login') ?> 7 <?php end_slot() ?> 1 8 <?php use_helper('Validation') ?> 2 <?php echo form_tag('sfApply/apply', array('name' => 'sf ApplyApply', 'id' => 'sfApplyApply')) ?>3 <div class=" apply_row">9 <?php echo form_tag('sfApply/apply', array('name' => 'sf_apply_apply', 'id' => 'sf_apply_apply')) ?> 10 <div class="sf_apply_row"> 4 11 <label for="username">Username: </label> 5 <div class=" apply_row_content">12 <div class="sf_apply_row_content"> 6 13 <?php echo form_error('username') ?> 7 14 <?php echo input_tag('username', '', array("maxlength" => 16)) ?> 8 15 </div> 9 16 </div> 10 <div class=" apply_row">17 <div class="sf_apply_row"> 11 18 <label for="fullname">Full Name: </label> 12 <div class=" apply_row_content">19 <div class="sf_apply_row_content"> 13 20 <?php echo form_error('fullname') ?> 14 21 <?php echo input_tag('fullname') ?> 15 22 </div> 16 23 </div> 17 <div class=" apply_row">24 <div class="sf_apply_row"> 18 25 <label for="email">Email: </label> 19 <div class=" apply_row_content">26 <div class="sf_apply_row_content"> 20 27 <?php echo form_error('email') ?> 21 28 <?php echo input_tag('email') ?> 22 29 </div> 23 30 </div> 24 <div class=" apply_row">31 <div class="sf_apply_row"> 25 32 <label for="email2">Confirm Email: </label> 26 <div class=" apply_row_content">33 <div class="sf_apply_row_content"> 27 34 <?php echo input_tag('email2') ?> 28 35 </div> 29 36 </div> 30 <div class=" apply_row">37 <div class="sf_apply_row"> 31 38 <?php echo form_error('password') ?> 32 39 <label for="password">Desired Password:</label> 33 <div class=" apply_row_content">40 <div class="sf_apply_row_content"> 34 41 <?php echo input_password_tag('password') ?> 35 42 </div> 36 43 </div> 37 <div class=" apply_row">44 <div class="sf_apply_row"> 38 45 <label for="password2">Confirm Password:</label> 39 <div class=" apply_row_content">46 <div class="sf_apply_row_content"> 40 47 <?php echo input_password_tag('password2') ?> 41 48 </div> 42 49 </div> 43 <div class=" apply_submit_row">50 <div class="sf_apply_submit_row"> 44 51 <label></label> 45 52 <?php echo submit_tag('Create My Account') ?> or plugins/sfApplyPlugin/trunk/modules/sfApply/templates/confirmInvalid.php
r13802 r13826 1 <div class=" apply-notice">1 <div class="sf_apply_notice"> 2 2 <p> 3 3 That confirmation code is invalid. plugins/sfApplyPlugin/trunk/modules/sfApply/templates/confirmSuccess.php
r13802 r13826 1 <p class="apply_notice"> 1 <div class="sf_apply_notice"> 2 <p> 2 3 Thank you for confirming your account! You are now logged into the site. 3 4 </p> … … 5 6 <?php echo button_to("Continue", "@homepage") ?> 6 7 </p> 8 </div> plugins/sfApplyPlugin/trunk/modules/sfApply/templates/resetAfter.php
r13802 r13826 1 <div class=" apply-notice">1 <div class="sf_apply_notice"> 2 2 <p> 3 3 Your password has been successfully reset. You are now logged plugins/sfApplyPlugin/trunk/modules/sfApply/templates/resetRequestAfter.php
r13802 r13826 1 <div class=" apply-notice">1 <div class="sf_apply_notice"> 2 2 <p> 3 3 For security reasons, a confirmation message has been sent to plugins/sfApplyPlugin/trunk/modules/sfApply/templates/resetRequestSuccess.php
r13802 r13826 1 <?php slot('login') ?> 2 <?php end_slot() ?> 1 3 <?php use_helper('Validation') ?> 2 <?php echo form_tag('sfApply/resetRequest', array('name' => 'sf ApplyResetRequest', 'id' => 'sfApplyResetRequest')) ?>4 <?php echo form_tag('sfApply/resetRequest', array('name' => 'sf_apply_reset_request', 'id' => 'sf_apply_reset_request')) ?> 3 5 <p> 4 6 Forgot your password? No problem! Just enter your username and … … 7 9 account. 8 10 </p> 9 <div class=" apply_row">11 <div class="sf_apply_row"> 10 12 <label for="username">Username: </label> 11 <div class=" apply_row_content">13 <div class="sf_apply_row_content"> 12 14 <?php echo form_error('username') ?> 13 15 <?php echo input_tag('username') ?> 14 16 </div> 15 17 </div> 16 <div class=" apply_submit_row">18 <div class="sf_apply_submit_row"> 17 19 <label></label> 18 20 <?php echo submit_tag('Reset My Password') ?>, or plugins/sfApplyPlugin/trunk/modules/sfApply/templates/resetSuccess.php
r13802 r13826 1 <?php slot('login') ?> 2 <?php end_slot() ?> 1 3 <?php use_helper('Validation') ?> 2 <?php echo form_tag('sfApply/reset', array('name' => 'sfApplyReset', 'id' => 'sf ApplyReset')) ?>3 <div class=" apply-notice">4 <?php echo form_tag('sfApply/reset', array('name' => 'sfApplyReset', 'id' => 'sf_apply_reset')) ?> 5 <div class="sf_apply_notice"> 4 6 <p> 5 7 Thanks for confirming your email address. You may now change your … … 7 9 </p> 8 10 </div> 9 <div class=" apply_row">11 <div class="sf_apply_row"> 10 12 <?php echo form_error('password') ?> 11 13 <label for="password">Desired New Password:</label> 12 <div class=" apply_row_content">14 <div class="sf_apply_row_content"> 13 15 <?php echo input_password_tag('password') ?> 14 16 </div> 15 17 </div> 16 <div class=" apply_row">18 <div class="sf_apply_row"> 17 19 <label for="password2">Confirm New Password:</label> 18 <div class=" apply_row_content">20 <div class="sf_apply_row_content"> 19 21 <?php echo input_password_tag('password2') ?> 20 22 </div> 21 23 </div> 22 <div class=" apply_submit_row">24 <div class="sf_apply_submit_row"> 23 25 <label></label> 24 26 <?php echo submit_tag('Reset My Password') ?>, or plugins/sfApplyPlugin/trunk/modules/sfApply/templates/settingsSuccess.php
r13802 r13826 1 1 <?php use_helper('Validation') ?> 2 <?php echo form_tag('sfApply/settings', array('name' => 'sfApplySettings', 'id' => 'sfApplySettings')) ?> 3 <div class="apply_row"> 2 <h2 class="sf_apply_heading">Account Settings</h2> 3 <?php echo form_tag('sfApply/settings', array('name' => 'sf_apply_settings', 'id' => 'sf_apply_settings')) ?> 4 <div class="sf_apply_row"> 4 5 <label for="fullname">Full Name: </label> 5 <div class=" apply_row_content">6 <div class="sf_apply_row_content"> 6 7 <?php echo form_error('fullname') ?> 7 8 <?php echo input_tag('fullname', $sf_user->getGuardUser()->getProfile()->getFullname()) ?> … … 11 12 <?php echo button_to('Cancel', '@homepage') ?> 12 13 </form> 13 <?php echo form_tag('sfApply/resetRequest', array('name' => 'sf ApplyResetRequest', 'id' => 'sfApplyResetRequest')) ?>14 <?php echo form_tag('sfApply/resetRequest', array('name' => 'sf_apply_reset_request', 'id' => 'sf_apply_reset_request')) ?> 14 15 <p> 15 16 Click the button below to change your password. For security reasons, you plugins/sfApplyPlugin/trunk/modules/sfApply/validate/apply.yml
r13802 r13826 2 2 enabled: true 3 3 param: 4 name: sf ApplyApply4 name: sf_apply_apply 5 5 6 6 fields: plugins/sfApplyPlugin/trunk/modules/sfApply/validate/settings.yml
r13802 r13826 2 2 enabled: true 3 3 param: 4 name: sf ApplySettings4 name: sf_apply_settings 5 5 6 6 fields: plugins/sfApplyPlugin/trunk/package.xml
r13802 r13826 14 14 <time>16:09:13</time> 15 15 <version> 16 <release>0. 5.1</release>17 <api>0. 5.0</api>16 <release>0.6.0</release> 17 <api>0.6.0</api> 18 18 </version> 19 19 <stability>