Changeset 15667
- Timestamp:
- 02/20/09 23:34:26 (4 years ago)
- Files:
-
- plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserAddress/actions/actions.class.php (modified) (1 diff)
- plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserAddress/config/generator.yml (modified) (1 diff)
- plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserAddress/lib (added)
- plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserAddress/lib/sfUserAddressGeneratorConfiguration.class.php (added)
- plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserAddress/lib/sfUserAddressGeneratorHelper.class.php (added)
- plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserAddressType/actions/actions.class.php (modified) (1 diff)
- plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserAddressType/config/generator.yml (modified) (1 diff)
- plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserAddressType/lib (added)
- plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserAddressType/lib/sfUserAddressTypeGeneratorConfiguration.class.php (added)
- plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserAddressType/lib/sfUserAddressTypeGeneratorHelper.class.php (added)
- plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserBilling/actions/actions.class.php (modified) (1 diff)
- plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserBilling/config/generator.yml (modified) (1 diff)
- plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserBilling/lib (added)
- plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserBilling/lib/sfUserBillingGeneratorConfiguration.class.php (added)
- plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserBilling/lib/sfUserBillingGeneratorHelper.class.php (added)
- plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserCountry/actions/actions.class.php (modified) (1 diff)
- plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserCountry/config/generator.yml (modified) (2 diffs)
- plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserCountry/lib/sfUserCountryGeneratorConfiguration.class.php (modified) (1 diff)
- plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserCountry/lib/sfUserCountryGeneratorHelper.class.php (modified) (1 diff)
- plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserCreditCardType/actions/actions.class.php (modified) (1 diff)
- plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserCreditCardType/config/generator.yml (modified) (1 diff)
- plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserCreditCardType/lib (added)
- plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserCreditCardType/lib/sfUserCreditCardTypeGeneratorConfiguration.class.php (added)
- plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserCreditCardType/lib/sfUserCreditCardTypeGeneratorHelper.class.php (added)
- plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserEmailAddress/actions/actions.class.php (modified) (1 diff)
- plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserEmailAddress/config/generator.yml (modified) (1 diff)
- plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserEmailAddress/lib (added)
- plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserEmailAddress/lib/sfUserEmailAddressGeneratorConfiguration.class.php (added)
- plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserEmailAddress/lib/sfUserEmailAddressGeneratorHelper.class.php (added)
- plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserEmailAddressType (added)
- plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserEmailAddressType/actions (added)
- plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserEmailAddressType/actions/actions.class.php (added)
- plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserEmailAddressType/config (added)
- plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserEmailAddressType/config/generator.yml (added)
- plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserEmailAddressType/lib (added)
- plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserEmailAddressType/lib/sfUserEmailAddressTypeGeneratorConfiguration.class.php (added)
- plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserEmailAddressType/lib/sfUserEmailAddressTypeGeneratorHelper.class.php (added)
- plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserEmailAddressType/templates (added)
- plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserImAccount/actions/actions.class.php (modified) (1 diff)
- plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserImAccount/config/generator.yml (modified) (1 diff)
- plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserImAccount/lib (added)
- plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserImAccount/lib/sfUserImAccountGeneratorConfiguration.class.php (added)
- plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserImAccount/lib/sfUserImAccountGeneratorHelper.class.php (added)
- plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserImAccountType/actions/actions.class.php (modified) (1 diff)
- plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserImAccountType/config/generator.yml (modified) (1 diff)
- plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserImAccountType/lib (added)
- plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserImAccountType/lib/sfUserImAccountTypeGeneratorConfiguration.class.php (added)
- plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserImAccountType/lib/sfUserImAccountTypeGeneratorHelper.class.php (added)
- plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserPhone/actions/actions.class.php (modified) (1 diff)
- plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserPhone/config/generator.yml (modified) (1 diff)
- plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserPhone/lib (added)
- plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserPhone/lib/sfUserPhoneGeneratorConfiguration.class.php (added)
- plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserPhone/lib/sfUserPhoneGeneratorHelper.class.php (added)
- plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserPhoneType/actions/actions.class.php (modified) (1 diff)
- plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserPhoneType/config/generator.yml (modified) (1 diff)
- plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserPhoneType/lib (added)
- plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserPhoneType/lib/sfUserPhoneTypeGeneratorConfiguration.class.php (added)
- plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserPhoneType/lib/sfUserPhoneTypeGeneratorHelper.class.php (added)
- plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserState/actions/actions.class.php (modified) (1 diff)
- plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserState/config/generator.yml (modified) (1 diff)
- plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserState/lib (added)
- plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserState/lib/sfUserStateGeneratorConfiguration.class.php (added)
- plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserState/lib/sfUserStateGeneratorHelper.class.php (added)
- plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserUser/actions/actions.class.php (modified) (1 diff)
- plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserUser/config/generator.yml (modified) (1 diff)
- plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserUser/lib (added)
- plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserUser/lib/sfUserUserGeneratorConfiguration.class.php (added)
- plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserUser/lib/sfUserUserGeneratorHelper.class.php (added)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserAddress/actions/actions.class.php
r12393 r15667 1 1 <?php 2 3 require_once dirname(__FILE__).'/../lib/sfUserAddressGeneratorConfiguration.class.php'; 4 require_once dirname(__FILE__).'/../lib/sfUserAddressGeneratorHelper.class.php'; 2 5 3 6 /** 4 7 * sfUserAddress actions. 5 8 * 6 * @package sfDoctrineUserPlugin9 * @package americanhealthplans 7 10 * @subpackage sfUserAddress 8 11 * @author Stephen Ostrow <sostrow@sowebdesigns.com> 9 * @version SVN: $Id: actions.class.php 1 415 2006-06-11 08:33:51Z fabien $12 * @version SVN: $Id: actions.class.php 12474 2008-10-31 10:41:27Z fabien $ 10 13 */ 11 class sfUserAddressActions extends auto sfUserAddressActions14 class sfUserAddressActions extends autoSfUserAddressActions 12 15 { 13 public function executeAjaxSave()14 {15 $this->forward('sfUserAddress', 'ajaxEdit');16 }17 18 public function executeAjaxEdit()19 {20 $this->sf_user_address = $this->getsfUserAddressOrCreate();21 22 if ( !$this->sf_user_address['id'] && $this->hasRequestParameter('sf_user_id') )23 $this->sf_user_address->set('user_id', $this->getRequestParameter('sf_user_id'));24 25 if ( $this->getRequest()->getMethod() == sfRequest::POST)26 {27 $this->updatesfUserAddressFromRequest();28 29 $this->savesfUserAddress($this->sf_user_address);30 31 //$this->setFlash('notice', 'Your modifications have been saved');32 33 $this->sf_user_user = $this->sf_user_address['User'];34 $this->setTemplate('ajaxList');35 return sfView::SUCCESS;36 }37 else38 {39 $this->addJavascriptsForEdit();40 41 $this->labels = $this->getLabels();42 }43 44 // temporary fix to avoid using a distinct editSuccess.php template45 sfLoader::loadHelpers(array('Helper', 'ObjectDoctrineAdmin'));46 }47 48 public function executeAjaxDelete ()49 {50 $this->sf_user_address = Doctrine::getTable('sfUserAddress')->find($this->getRequestParameter('id'));51 $this->sf_user_user = $this->sf_user_address['User'];52 53 $this->forward404Unless($this->sf_user_address);54 55 try56 {57 $this->deletesfUserAddress($this->sf_user_address);58 }59 catch (Doctrine_Exception $e)60 {61 $this->getRequest()->setError('delete', 'Could not delete the selected Sf user address. Make sure it does not have any associated items.');62 return $this->forward('sfUserAddress', 'list');63 }64 65 $this->setTemplate('ajaxList');66 return sfView::SUCCESS;67 }68 16 } plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserAddress/config/generator.yml
r12393 r15667 1 1 generator: 2 class: sfDoctrineAdminGenerator2 class: sfDoctrineGenerator 3 3 param: 4 model_class: sfUserAddress 5 theme: default 6 7 fields: 8 updated_at: { type: plain, params: date_format='MM/dd/yy hh:mm a' } 9 UpdatedBy: { type: plain } 10 created_at: { type: plain, params: date_format='MM/dd/yy hh:mm a' } 11 CreatedBy: { type: plain } 12 13 list: 14 title: Addresses for Users 15 display: [ User, rank, AddressType, address1, city, State ] 16 object_actions: 17 _edit: - 18 _delete: - 19 actions: 20 _create: { name: Add Address } 21 sort_by: [ sfUserUser, asc ] 22 23 edit: 24 title: Editing Address For "%%User%%" 25 display: 26 "Details": [ _User, rank, AddressType, address1, address2, address3, city, State, zip ] 27 "NONE": [ updated_at, UpdatedBy, created_at, CreatedBy ] 28 actions: 29 _save: - 30 _save_and_add: - 31 _save_and_list: - 32 _list: - 33 _delete: - 4 model_class: sfUserAddress 5 theme: admin 6 non_verbose_templates: true 7 with_show: false 8 singular: ~ 9 plural: ~ 10 route_prefix: sf_user_address 11 with_doctrine_route: 1 12 13 config: 14 actions: ~ 15 fields: ~ 16 list: ~ 17 filter: ~ 18 form: ~ 19 edit: ~ 20 new: ~ plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserAddressType/actions/actions.class.php
r12393 r15667 1 1 <?php 2 3 require_once dirname(__FILE__).'/../lib/sfUserAddressTypeGeneratorConfiguration.class.php'; 4 require_once dirname(__FILE__).'/../lib/sfUserAddressTypeGeneratorHelper.class.php'; 2 5 3 6 /** 4 7 * sfUserAddressType actions. 5 8 * 6 * @package sfDoctrineUserPlugin9 * @package americanhealthplans 7 10 * @subpackage sfUserAddressType 8 11 * @author Stephen Ostrow <sostrow@sowebdesigns.com> 9 * @version SVN: $Id: actions.class.php 1 415 2006-06-11 08:33:51Z fabien $12 * @version SVN: $Id: actions.class.php 12474 2008-10-31 10:41:27Z fabien $ 10 13 */ 11 class sfUserAddressTypeActions extends auto sfUserAddressTypeActions14 class sfUserAddressTypeActions extends autoSfUserAddressTypeActions 12 15 { 13 16 } plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserAddressType/config/generator.yml
r12393 r15667 1 1 generator: 2 class: sfDoctrineAdminGenerator2 class: sfDoctrineGenerator 3 3 param: 4 model_class: sfUserAddressType 5 theme: default 4 model_class: sfUserAddressType 5 theme: admin 6 non_verbose_templates: true 7 with_show: false 8 singular: ~ 9 plural: ~ 10 route_prefix: sf_user_address_type 11 with_doctrine_route: 1 12 13 config: 14 actions: ~ 15 fields: ~ 16 list: ~ 17 filter: ~ 18 form: ~ 19 edit: ~ 20 new: ~ plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserBilling/actions/actions.class.php
r12393 r15667 1 1 <?php 2 3 require_once dirname(__FILE__).'/../lib/sfUserBillingGeneratorConfiguration.class.php'; 4 require_once dirname(__FILE__).'/../lib/sfUserBillingGeneratorHelper.class.php'; 2 5 3 6 /** 4 7 * sfUserBilling actions. 5 8 * 6 * @package sfDoctrineUserPlugin9 * @package americanhealthplans 7 10 * @subpackage sfUserBilling 8 11 * @author Stephen Ostrow <sostrow@sowebdesigns.com> 9 * @version SVN: $Id: actions.class.php 1 415 2006-06-11 08:33:51Z fabien $12 * @version SVN: $Id: actions.class.php 12474 2008-10-31 10:41:27Z fabien $ 10 13 */ 11 class sfUserBillingActions extends auto sfUserBillingActions14 class sfUserBillingActions extends autoSfUserBillingActions 12 15 { 13 public function executeAjaxSave()14 {15 $this->forward('sfUserBilling', 'ajaxEdit');16 }17 18 public function executeAjaxEdit ()19 {20 $this->sf_user_billing = $this->getsfUserBillingOrCreate();21 22 if ( !$this->sf_user_billing['id'] && $this->hasRequestParameter('sf_user_id') )23 $this->sf_user_billing->set('user_id', $this->getRequestParameter('sf_user_id'));24 25 if ($this->getRequest()->getMethod() == sfRequest::POST)26 {27 $this->updatesfUserBillingFromRequest();28 29 $this->savesfUserBilling($this->sf_user_billing);30 31 $this->setFlash('notice', 'Your modifications have been saved');32 33 $this->sf_user_user = $this->sf_user_billing['User'];34 $this->setTemplate('ajaxList');35 return sfView::SUCCESS;36 }37 else38 {39 $this->addJavascriptsForEdit();40 41 $this->labels = $this->getLabels();42 }43 44 // temporary fix to avoid using a distinct editSuccess.php template45 sfLoader::loadHelpers(array('Helper', 'ObjectDoctrineAdmin'));46 }47 48 public function executeAjaxDelete ()49 {50 $this->sf_user_billing = Doctrine::getTable('sfUserBilling')->find($this->getRequestParameter('id'));51 $this->sf_user_user = $this->sf_user_billing['User'];52 53 $this->forward404Unless($this->sf_user_billing);54 55 try56 {57 $this->deletesfUserBilling($this->sf_user_billing);58 }59 catch (Doctrine_Exception $e)60 {61 $this->getRequest()->setError('delete', 'Could not delete the selected Sf user billing. Make sure it does not have any associated items.');62 return $this->forward('sfUserBilling', 'list');63 }64 65 $this->setTemplate('ajaxList');66 return sfView::SUCCESS;67 }68 16 } plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserBilling/config/generator.yml
r12393 r15667 1 1 generator: 2 class: sfDoctrineAdminGenerator2 class: sfDoctrineGenerator 3 3 param: 4 model_class: sfUserBilling 5 theme: default 6 7 fields: 8 updated_at: { type: plain, params: date_format='MM/dd/yy hh:mm a' } 9 UpdatedBy: { type: plain } 10 created_at: { type: plain, params: date_format='MM/dd/yy hh:mm a' } 11 CreatedBy: { type: plain } 12 13 list: 14 title: Billings for Users 15 display: [ User, rank, name, address1, city, state, method, CreditCardType.abbreviation, check_type ] 16 object_actions: 17 _edit: - 18 _delete: - 19 actions: 20 _create: { name: Add Address } 21 sort_by: [ sfUserUser, asc ] 22 23 edit: 24 title: Editing Billing For "%%User%%" 25 display: 26 "Details": [ _User, rank, name, address1, address2, city, state, zip, method, rejects ] 27 "Credit Card": [ credit_card_number, credit_card_exp_month, credit_card_exp_year, credit_card_cvm ] 28 "Check": [ check_type, check_number, check_routing_number, check_account_number, check_bank_name, check_branch_state, dl_number, dl_state ] 29 "NONE": [ updated_at, UpdatedBy, created_at, CreatedBy ] 30 fields: 31 check_type: 32 params: 33 disabled=true 34 date_format='MM/dd/yy' 35 include_blank=true 36 include_custom=Choose from the list 37 actions: 38 _save: - 39 _save_and_add: - 40 _save_and_list: - 41 _list: - 42 _delete: - 4 model_class: sfUserBilling 5 theme: admin 6 non_verbose_templates: true 7 with_show: false 8 singular: ~ 9 plural: ~ 10 route_prefix: sf_user_billing 11 with_doctrine_route: 1 12 13 config: 14 actions: ~ 15 fields: ~ 16 list: ~ 17 filter: ~ 18 form: ~ 19 edit: ~ 20 new: ~ plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserCountry/actions/actions.class.php
r15642 r15667 1 1 <?php 2 3 require_once dirname(__FILE__).'/../lib/sfUserCountryGeneratorConfiguration.class.php'; 4 require_once dirname(__FILE__).'/../lib/sfUserCountryGeneratorHelper.class.php'; 2 5 3 6 /** 4 7 * sfUserCountry actions. 5 8 * 6 * @package sfDoctrineUserPlugin9 * @package americanhealthplans 7 10 * @subpackage sfUserCountry 8 11 * @author Stephen Ostrow <sostrow@sowebdesigns.com> 9 * @version SVN: $Id: actions.class.php 1 415 2006-06-11 08:33:51Z fabien $12 * @version SVN: $Id: actions.class.php 12474 2008-10-31 10:41:27Z fabien $ 10 13 */ 11 require_once(dirname(__FILE__).'/../lib/BasesfUserCountryActions.class.php'); 12 require_once dirname(__FILE__).'/../lib/sfUserCountryGeneratorConfiguration.class.php'; 13 require_once dirname(__FILE__).'/../lib/sfUserCountryGeneratorHelper.class.php'; 14 class sfUserCountryActions extends BasesfUserCountryActions 14 class sfUserCountryActions extends autoSfUserCountryActions 15 15 { 16 16 } plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserCountry/config/generator.yml
r15643 r15667 1 1 generator: 2 class: sfDoctrineGenerator2 class: sfDoctrineGenerator 3 3 param: 4 model_class: sfUserCountry5 theme: admin4 model_class: sfUserCountry 5 theme: admin 6 6 non_verbose_templates: true 7 7 with_show: false … … 10 10 route_prefix: sf_user_country 11 11 with_doctrine_route: 1 12 13 config: 14 actions: ~ 15 fields: ~ 16 list: ~ 17 filter: ~ 18 form: ~ 19 edit: ~ 20 new: ~ plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserCountry/lib/sfUserCountryGeneratorConfiguration.class.php
r15642 r15667 2 2 3 3 /** 4 * sf Settingsmodule configuration.4 * sfUserCountry module configuration. 5 5 * 6 * @package sfDoctrineSettingsPlugin7 * @subpackage sf Settings6 * @package americanhealthplans 7 * @subpackage sfUserCountry 8 8 * @author Stephen Ostrow <sostrow@sowebdesigns.com> 9 * @version SVN: $Id $9 * @version SVN: $Id: configuration.php 12474 2008-10-31 10:41:27Z fabien $ 10 10 */ 11 11 class sfUserCountryGeneratorConfiguration extends BaseSfUserCountryGeneratorConfiguration plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserCountry/lib/sfUserCountryGeneratorHelper.class.php
r15642 r15667 2 2 3 3 /** 4 * sf Settingsmodule helper.4 * sfUserCountry module helper. 5 5 * 6 * @package sfDoctrineSettingsPlugin7 * @subpackage sf Settings6 * @package americanhealthplans 7 * @subpackage sfUserCountry 8 8 * @author Stephen Ostrow <sostrow@sowebdesigns.com> 9 * @version SVN: $Id $9 * @version SVN: $Id: helper.php 12474 2008-10-31 10:41:27Z fabien $ 10 10 */ 11 11 class sfUserCountryGeneratorHelper extends BaseSfUserCountryGeneratorHelper plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserCreditCardType/actions/actions.class.php
r12393 r15667 1 1 <?php 2 3 require_once dirname(__FILE__).'/../lib/sfUserCreditCardTypeGeneratorConfiguration.class.php'; 4 require_once dirname(__FILE__).'/../lib/sfUserCreditCardTypeGeneratorHelper.class.php'; 2 5 3 6 /** 4 7 * sfUserCreditCardType actions. 5 8 * 6 * @package sfDoctrineUserPlugin9 * @package americanhealthplans 7 10 * @subpackage sfUserCreditCardType 8 11 * @author Stephen Ostrow <sostrow@sowebdesigns.com> 9 * @version SVN: $Id: actions.class.php 1 415 2006-06-11 08:33:51Z fabien $12 * @version SVN: $Id: actions.class.php 12474 2008-10-31 10:41:27Z fabien $ 10 13 */ 11 class sfUserCreditCardTypeActions extends auto sfUserCreditCardTypeActions14 class sfUserCreditCardTypeActions extends autoSfUserCreditCardTypeActions 12 15 { 13 16 } plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserCreditCardType/config/generator.yml
r12393 r15667 1 1 generator: 2 class: sfDoctrineAdminGenerator2 class: sfDoctrineGenerator 3 3 param: 4 model_class: sfUserCreditCardType 5 theme: default 4 model_class: sfUserCreditCardType 5 theme: admin 6 non_verbose_templates: true 7 with_show: false 8 singular: ~ 9 plural: ~ 10 route_prefix: sf_user_credit_card_type 11 with_doctrine_route: 1 12 13 config: 14 actions: ~ 15 fields: ~ 16 list: ~ 17 filter: ~ 18 form: ~ 19 edit: ~ 20 new: ~ plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserEmailAddress/actions/actions.class.php
r12393 r15667 1 1 <?php 2 3 require_once dirname(__FILE__).'/../lib/sfUserEmailAddressGeneratorConfiguration.class.php'; 4 require_once dirname(__FILE__).'/../lib/sfUserEmailAddressGeneratorHelper.class.php'; 2 5 3 6 /** 4 7 * sfUserEmailAddress actions. 5 8 * 6 * @package sfDoctrineUserPlugin9 * @package americanhealthplans 7 10 * @subpackage sfUserEmailAddress 8 11 * @author Stephen Ostrow <sostrow@sowebdesigns.com> 9 * @version SVN: $Id: actions.class.php 1 415 2006-06-11 08:33:51Z fabien $12 * @version SVN: $Id: actions.class.php 12474 2008-10-31 10:41:27Z fabien $ 10 13 */ 11 class sfUserEmailAddressActions extends auto sfUserEmailAddressActions14 class sfUserEmailAddressActions extends autoSfUserEmailAddressActions 12 15 { 13 public function executeAjaxSave()14 {15 $this->forward('sfUserEmailAddress', 'ajaxEdit');16 }17 18 public function executeAjaxEdit ()19 {20 $this->sf_user_email_address = $this->getsfUserEmailAddressOrCreate();21 22 if ( !$this->sf_user_email_address['id'] && $this->hasRequestParameter('sf_user_id') )23 $this->sf_user_email_address->set('user_id', $this->getRequestParameter('sf_user_id'));24 25 if ($this->getRequest()->getMethod() == sfRequest::POST)26 {27 $this->updatesfUserEmailAddressFromRequest();28 29 $this->savesfUserEmailAddress($this->sf_user_email_address);30 31 $this->sf_user_user = $this->sf_user_email_address['User'];32 $this->setTemplate('ajaxList');33 return sfView::SUCCESS;34 }35 else36 {37 $this->addJavascriptsForEdit();38 39 $this->labels = $this->getLabels();40 }41 42 // temporary fix to avoid using a distinct editSuccess.php template43 sfLoader::loadHelpers(array('Helper', 'ObjectDoctrineAdmin'));44 }45 46 public function executeAjaxDelete ()47 {48 $this->sf_user_email_address = Doctrine::getTable('sfUserEmailAddress')->find($this->getRequestParameter('id'));49 $this->sf_user_user = $this->sf_user_email_address['User'];50 51 $this->forward404Unless($this->sf_user_email_address);52 53 try54 {55 $this->deletesfUserEmailAddress($this->sf_user_email_address);56 }57 catch (Doctrine_Exception $e)58 {59 $this->getRequest()->setError('delete', 'Could not delete the selected Sf user email address. Make sure it does not have any associated items.');60 return $this->forward('sfUserEmailAddress', 'list');61 }62 63 64 $this->setTemplate('ajaxList');65 return sfView::SUCCESS;66 }67 16 } plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserEmailAddress/config/generator.yml
r12393 r15667 1 1 generator: 2 class: sfDoctrineAdminGenerator2 class: sfDoctrineGenerator 3 3 param: 4 model_class: sfUserEmailAddress 5 theme: default 4 model_class: sfUserEmailAddress 5 theme: admin 6 non_verbose_templates: true 7 with_show: false 8 singular: ~ 9 plural: ~ 10 route_prefix: sf_user_email_address 11 with_doctrine_route: 1 6 12 7 fields: 8 updated_at: { type: plain, params: date_format='MM/dd/yy hh:mm a' } 9 UpdatedBy: { type: plain } 10 created_at: { type: plain, params: date_format='MM/dd/yy hh:mm a' } 11 CreatedBy: { type: plain } 12 13 list: 14 title: Email Addresses for Users 15 display: [ User, rank, address ] 16 object_actions: 17 _edit: - 18 _delete: - 19 actions: 20 _create: { name: Add Email Address } 21 sort_by: [ sfUserUser, asc ] 22 23 edit: 24 title: Editing Email Address For "%%User%%" 25 display: 26 "Details": [ _User, rank, address ] 27 "NONE": [ updated_at, UpdatedBy, created_at, CreatedBy ] 28 actions: 29 _save: - 30 _save_and_add: - 31 _save_and_list: - 32 _list: - 33 _delete: - 13 config: 14 actions: ~ 15 fields: ~ 16 list: ~ 17 filter: ~ 18 form: ~ 19 edit: ~ 20 new: ~ plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserImAccount/actions/actions.class.php
r12393 r15667 1 1 <?php 2 3 require_once dirname(__FILE__).'/../lib/sfUserImAccountGeneratorConfiguration.class.php'; 4 require_once dirname(__FILE__).'/../lib/sfUserImAccountGeneratorHelper.class.php'; 2 5 3 6 /** 4 7 * sfUserImAccount actions. 5 8 * 6 * @package sfDoctrineUserPlugin9 * @package americanhealthplans 7 10 * @subpackage sfUserImAccount 8 11 * @author Stephen Ostrow <sostrow@sowebdesigns.com> 9 * @version SVN: $Id: actions.class.php 1 415 2006-06-11 08:33:51Z fabien $12 * @version SVN: $Id: actions.class.php 12474 2008-10-31 10:41:27Z fabien $ 10 13 */ 11 class sfUserImAccountActions extends auto sfUserImAccountActions14 class sfUserImAccountActions extends autoSfUserImAccountActions 12 15 { 13 public function executeAjaxSave()14 {15 $this->forward('sfUserImAccount', 'ajaxEdit');16 }17 18 public function executeAjaxEdit ()19 {20 $this->sf_user_im_account = $this->getsfUserImAccountOrCreate();21 22 if ( !$this->sf_user_im_account['id'] && $this->hasRequestParameter('sf_user_id') )23 $this->sf_user_im_account->set('user_id', $this->getRequestParameter('sf_user_id'));24 25 if ($this->getRequest()->getMethod() == sfRequest::POST)26 {27 $this->updatesfUserImAccountFromRequest();28 29 $this->savesfUserImAccount($this->sf_user_im_account);30 31 // $this->setFlash('notice', 'Your modifications have been saved');32 33 $this->sf_user_user = $this->sf_user_im_account['User'];34 $this->setTemplate('ajaxList');35 return sfView::SUCCESS;36 }37 else38 {39 $this->addJavascriptsForEdit();40 41 $this->labels = $this->getLabels();42 }43 44 // temporary fix to avoid using a distinct editSuccess.php template45 sfLoader::loadHelpers(array('Helper', 'ObjectDoctrineAdmin'));46 }47 48 public function executeAjaxDelete ()49 {50 $this->sf_user_im_account = Doctrine::getTable('sfUserImAccount')->find($this->getRequestParameter('id'));51 $this->sf_user_user = $this->sf_user_im_account['User'];52 53 $this->forward404Unless($this->sf_user_im_account);54 55 try56 {57 $this->deletesfUserImAccount($this->sf_user_im_account);58 }59 catch (Doctrine_Exception $e)60 {61 $this->getRequest()->setError('delete', 'Could not delete the selected Sf user im account. Make sure it does not have any associated items.');62 return $this->forward('sfUserImAccount', 'list');63 }64 65 $this->setTemplate('ajaxList');66 return sfView::SUCCESS;67 }68 16 } plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserImAccount/config/generator.yml
r12393 r15667 1 1 generator: 2 class: sfDoctrineAdminGenerator2 class: sfDoctrineGenerator 3 3 param: 4 model_class: sfUserImAccount 5 theme: default 6 7 fields: 8 updated_at: { type: plain, params: date_format='MM/dd/yy hh:mm a' } 9 UpdatedBy: { type: plain } 10 created_at: { type: plain, params: date_format='MM/dd/yy hh:mm a' } 11 CreatedBy: { type: plain } 12 13 list: 14 title: Instant Messaging Accounts for Users 15 display: [ User, rank, ImAccountType, nickname ] 16 object_actions: 17 _edit: - 18 _delete: - 19 actions: 20 _create: { name: Add Instant Messaging Account } 21 sort_by: [ sfUserUser, asc ] 4 model_class: sfUserImAccount 5 theme: admin 6 non_verbose_templates: true 7 with_show: false 8 singular: ~ 9 plural: ~ 10 route_prefix: sf_user_im_account 11 with_doctrine_route: 1 22 12 23 edit: 24 title: Editing Instant Messaging Account for User "%%User%%" 25 display: 26 "Details": [_User, ImAccountType, rank, nickname ] 27 "NONE": [ updated_at, UpdatedBy, created_at, CreatedBy ] 28 fields: 29 actions: 30 _save: - 31 _save_and_add: - 32 _save_and_list: - 33 _list: - 34 _delete: - 13 config: 14 actions: ~ 15 fields: ~ 16 list: ~ 17 filter: ~ 18 form: ~ 19 edit: ~ 20 new: ~ plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserImAccountType/actions/actions.class.php
r12393 r15667 1 1 <?php 2 3 require_once dirname(__FILE__).'/../lib/sfUserImAccountTypeGeneratorConfiguration.class.php'; 4 require_once dirname(__FILE__).'/../lib/sfUserImAccountTypeGeneratorHelper.class.php'; 2 5 3 6 /** 4 7 * sfUserImAccountType actions. 5 8 * 6 * @package sfDoctrineUserPlugin9 * @package americanhealthplans 7 10 * @subpackage sfUserImAccountType 8 11 * @author Stephen Ostrow <sostrow@sowebdesigns.com> 9 * @version SVN: $Id: actions.class.php 1 415 2006-06-11 08:33:51Z fabien $12 * @version SVN: $Id: actions.class.php 12474 2008-10-31 10:41:27Z fabien $ 10 13 */ 11 class sfUserImAccountTypeActions extends auto sfUserImAccountTypeActions14 class sfUserImAccountTypeActions extends autoSfUserImAccountTypeActions 12 15 { 13 16 } plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserImAccountType/config/generator.yml
r12393 r15667 1 1 generator: 2 class: sfDoctrineAdminGenerator2 class: sfDoctrineGenerator 3 3 param: 4 model_class: sfUserImAccountType 5 theme: default 4 model_class: sfUserImAccountType 5 theme: admin 6 non_verbose_templates: true 7 with_show: false 8 singular: ~ 9 plural: ~ 10 route_prefix: sf_user_im_account_type 11 with_doctrine_route: 1 12 13 config: 14 actions: ~ 15 fields: ~ 16 list: ~ 17 filter: ~ 18 form: ~ 19 edit: ~ 20 new: ~ plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserPhone/actions/actions.class.php
r12393 r15667 1 1 <?php 2 3 require_once dirname(__FILE__).'/../lib/sfUserPhoneGeneratorConfiguration.class.php'; 4 require_once dirname(__FILE__).'/../lib/sfUserPhoneGeneratorHelper.class.php'; 2 5 3 6 /** 4 7 * sfUserPhone actions. 5 8 * 6 * @package sfDoctrineUserPlugin9 * @package americanhealthplans 7 10 * @subpackage sfUserPhone 8 11 * @author Stephen Ostrow <sostrow@sowebdesigns.com> 9 * @version SVN: $Id: actions.class.php 1 415 2006-06-11 08:33:51Z fabien $12 * @version SVN: $Id: actions.class.php 12474 2008-10-31 10:41:27Z fabien $ 10 13 */ 11 class sfUserPhoneActions extends auto sfUserPhoneActions14 class sfUserPhoneActions extends autoSfUserPhoneActions 12 15 { 13 14 public function executeAjaxSave ()15 {16 return $this->forward('sfUserPhone', 'ajaxEdit');17 }18 19 public function executeAjaxEdit ()20 {21 $this->sf_user_phone = $this->getsfUserPhoneOrCreate();22 23 if ( !$this->sf_user_phone['id'] && $this->hasRequestParameter('sf_user_id') )24 $this->sf_user_phone->set('user_id', $this->getRequestParameter('sf_user_id'));25 26 if ($this->getRequest()->getMethod() == sfRequest::POST)27 {28 $this->updatesfUserPhoneFromRequest();29 30 $this->savesfUserPhone($this->sf_user_phone);31 32 $this->setFlash('notice', 'Your modifications have been saved');33 34 $this->sf_user_user = $this->sf_user_phone['User'];35 $this->setTemplate('ajaxList');36 return sfView::SUCCESS;37 }38 else39 {40 $this->addJavascriptsForEdit();41 42 $this->labels = $this->getLabels();43 }44 45 // temporary fix to avoid using a distinct editSuccess.php template46 sfLoader::loadHelpers(array('Helper', 'ObjectDoctrineAdmin'));47 }48 49 public function executeAjaxDelete ()50 {51 $this->sf_user_phone = Doctrine::getTable('sfUserPhone')->find($this->getRequestParameter('id'));52 $this->sf_user_user = $this->sf_user_phone['User'];53 54 $this->forward404Unless($this->sf_user_phone);55 56 try57 {58 $this->deletesfUserPhone($this->sf_user_phone);59 }60 catch (Doctrine_Exception $e)61 {62 $this->getRequest()->setError('delete', 'Could not delete the selected Sf user phone. Make sure it does not have any associated items.');63 return $this->forward('sfUserPhone', 'list');64 }65 66 $this->setTemplate('ajaxList');67 return sfView::SUCCESS;68 }69 70 71 16 } plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserPhone/config/generator.yml
r12393 r15667 1 1 generator: 2 class: sfDoctrineAdminGenerator2 class: sfDoctrineGenerator 3 3 param: 4 model_class: sfUserPhone 5 theme: default 6 7 fields: 8 updated_at: { type: plain, params: date_format='MM/dd/yy hh:mm a' } 9 UpdatedBy: { type: plain } 10 created_at: { type: plain, params: date_format='MM/dd/yy hh:mm a' } 11 CreatedBy: { type: plain } 12 13 list: 14 title: Phones for Users 15 display: [ User, rank, PhoneType, number, extension ] 16 object_actions: 17 _edit: - 18 _delete: - 19 actions: 20 _create: { name: Add Phone } 21 sort_by: [ sfUserUser, asc ] 4 model_class: sfUserPhone 5 theme: admin 6 non_verbose_templates: true 7 with_show: false 8 singular: ~ 9 plural: ~ 10 route_prefix: sf_user_phone 11 with_doctrine_route: 1 22 12 23 edit: 24 title: Editing Phone for User "%%User%%" 25 display: 26 "Details": [_User, PhoneType, rank, number, extension ] 27 "NONE": [ updated_at, UpdatedBy, created_at, CreatedBy ] 28 fields: 29 actions: 30 _save: - 31 _save_and_add: - 32 _save_and_list: - 33 _list: - 34 _delete: - 13 config: 14 actions: ~ 15 fields: ~ 16 list: ~ 17 filter: ~ 18 form: ~ 19 edit: ~ 20 new: ~ plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserPhoneType/actions/actions.class.php
r12393 r15667 1 1 <?php 2 3 require_once dirname(__FILE__).'/../lib/sfUserPhoneTypeGeneratorConfiguration.class.php'; 4 require_once dirname(__FILE__).'/../lib/sfUserPhoneTypeGeneratorHelper.class.php'; 2 5 3 6 /** 4 7 * sfUserPhoneType actions. 5 8 * 6 * @package sfDoctrineUserPlugin9 * @package americanhealthplans 7 10 * @subpackage sfUserPhoneType 8 11 * @author Stephen Ostrow <sostrow@sowebdesigns.com> 9 * @version SVN: $Id: actions.class.php 1 415 2006-06-11 08:33:51Z fabien $12 * @version SVN: $Id: actions.class.php 12474 2008-10-31 10:41:27Z fabien $ 10 13 */ 11 class sfUserPhoneTypeActions extends auto sfUserPhoneTypeActions14 class sfUserPhoneTypeActions extends autoSfUserPhoneTypeActions 12 15 { 13 16 } plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserPhoneType/config/generator.yml
r12393 r15667 1 1 generator: 2 class: sfDoctrineAdminGenerator2 class: sfDoctrineGenerator 3 3 param: 4 model_class: sfUserPhoneType 5 theme: default 4 model_class: sfUserPhoneType 5 theme: admin 6 non_verbose_templates: true 7 with_show: false 8 singular: ~ 9 plural: ~ 10 route_prefix: sf_user_phone_type 11 with_doctrine_route: 1 12 13 config: 14 actions: ~ 15 fields: ~ 16 list: ~ 17 filter: ~ 18 form: ~ 19 edit: ~ 20 new: ~ plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserState/actions/actions.class.php
r12393 r15667 1 1 <?php 2 3 require_once dirname(__FILE__).'/../lib/sfUserStateGeneratorConfiguration.class.php'; 4 require_once dirname(__FILE__).'/../lib/sfUserStateGeneratorHelper.class.php'; 2 5 3 6 /** 4 7 * sfUserState actions. 5 8 * 6 * @package sfDoctrineUserPlugin9 * @package americanhealthplans 7 10 * @subpackage sfUserState 8 11 * @author Stephen Ostrow <sostrow@sowebdesigns.com> 9 * @version SVN: $Id: actions.class.php 1 415 2006-06-11 08:33:51Z fabien $12 * @version SVN: $Id: actions.class.php 12474 2008-10-31 10:41:27Z fabien $ 10 13 */ 11 class sfUserStateActions extends auto sfUserStateActions14 class sfUserStateActions extends autoSfUserStateActions 12 15 { 13 16 } plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserState/config/generator.yml
r12393 r15667 1 1 generator: 2 class: sfDoctrineAdminGenerator2 class: sfDoctrineGenerator 3 3 param: 4 model_class: sfUserState 5 theme: default 4 model_class: sfUserState 5 theme: admin 6 non_verbose_templates: true 7 with_show: false 8 singular: ~ 9 plural: ~ 10 route_prefix: sf_user_state 11 with_doctrine_route: 1 12 13 config: 14 actions: ~ 15 fields: ~ 16 list: ~ 17 filter: ~ 18 form: ~ 19 edit: ~ 20 new: ~ plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserUser/actions/actions.class.php
r12393 r15667 1 1 <?php 2 3 require_once dirname(__FILE__).'/../lib/sfUserUserGeneratorConfiguration.class.php'; 4 require_once dirname(__FILE__).'/../lib/sfUserUserGeneratorHelper.class.php'; 2 5 3 6 /** 4 7 * sfUserUser actions. 5 8 * 6 * @package sfDoctrineUserPlugin9 * @package americanhealthplans 7 10 * @subpackage sfUserUser 8 11 * @author Stephen Ostrow <sostrow@sowebdesigns.com> 9 * @version SVN: $Id: actions.class.php 1 415 2006-06-11 08:33:51Z fabien $12 * @version SVN: $Id: actions.class.php 12474 2008-10-31 10:41:27Z fabien $ 10 13 */ 11 class sfUserUserActions extends auto sfUserUserActions14 class sfUserUserActions extends autoSfUserUserActions 12 15 { 13 public function executeSearch()14 {15 16 $search_string = trim( $this->getRequestParameter('search_string') );17 18 # Check for spaces for first and last names19 $words = explode(" ", str_replace(',', '', $search_string));20 if ( count($words) == 1 )21 {22 $query = 'first_name LIKE ? OR last_name LIKE ?';23 $params = array('%'.$words[0].'%', '%'.$words[0].'%');24 }25 else26 {27 if ( !stristr( $search_string, ',' ) )28 {29 $query = 'first_name LIKE ? AND last_name LIKE ?';30 $params = array('%'.$words[0].'%', '%'.$words[1].'%');31 }32 else33 {34 $query = 'first_name LIKE ? AND last_name LIKE ?';35 $params = array('%'.$words[1].'%', '%'.$words[0].'%');36 }37 }38 39 $users = Doctrine_Query::create()40 ->from('sfUserUser')41 ->addWhere( $query, $params )42 ->execute();43 44 $return ="<ul>";45 $return .= "<li><b>" . count($users). " result(s) for \"$search_string\"</b></li>";46 foreach ( $users as $user )47 {48 $return .= "<li><div style='display: none;'>{$user['id']}</div><div>{$user['last_name']}, {$user['first_name']}</div></li>";49 }50 $return .="</li>";51 52 return $this->renderText($return);53 }54 55 public function executeGuardSearch()56 {57 58 $search_string = trim( $this->getRequestParameter('search_string') );59 60 $guard_users = Doctrine_Query::create()61 ->from('sfGuardUser')62 ->where( 'username LIKE ?', '%'.$search_string.'%' )63 ->execute();64 65 $return ="<ul>";66 $return .= "<li><b>" . count($guard_users). " result(s) for \"$search_string\"</b></li>";67 foreach ( $guard_users as $guard_user )68 {69 $return .= "<li><div style='display: none;'>{$guard_user['id']}</div><div>{$guard_user['username']}</div></li>";70 }71 $return .="</li>";72 73 return $this->renderText($return);74 }75 76 16 } plugins/sfDoctrineUserPlugin/branches/1.2/modules/sfUserUser/config/generator.yml
r12393 r15667 1 1 generator: 2 class: sfDoctrineAdminGenerator2 class: sfDoctrineGenerator 3 3 param: 4 model_class: sfUserUser 5 theme: default 4 model_class: sfUserUser 5 theme: admin 6 non_verbose_templates: true 7 with_show: false 8 singular: ~ 9 plural: ~ 10 route_prefix: sf_user_user 11 with_doctrine_route: 1 6 12 7 fields: 8 updated_at: { type: plain, params: date_format='MM/dd/yy hh:mm a' } 9 UpdatedBy: { type: plain } 10 created_at: { type: plain, params: date_format='MM/dd/yy hh:mm a' } 11 CreatedBy: { type: plain } 12 13 list: 14 title: Users 15 display: [ first_name, middle_name, last_name, company, date_of_birth, created_at, updated_at ] 16 object_actions: 17 _edit: - 18 _delete: - 19 actions: 20 _create: { name: Add User } 21 sort: [ last_name, asc ] 22 filters: [ last_name, first_name, date_of_birth, updated_at, created_at ] 23 fields: 24 sfGuardUser: { type: plain } 25 26 edit: 27 title: Editing User "%%last_name%%, %%first_name%%" 28 display: 29 "Details": [_sfGuardUser, prefix, first_name, middle_name, last_name, suffix, company, date_of_birth ] 30 "NONE": [ updated_at, UpdatedBy, created_at, CreatedBy ] 31 fields: 32 actions: 33 _save: - 34 _save_and_add: - 35 _save_and_list: - 36 _list: - 37 _delete: - 13 config: 14 actions: ~ 15 fields: ~ 16 list: ~ 17 filter: ~ 18 form: ~ 19 edit: ~ 20 new: ~