From fce496ba0aae75efc09bb5f076c99ad37e672d08 Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Fri, 6 Mar 2015 15:44:05 -0500 Subject: [PATCH] adding fields to edit add contact form in admin --- Toolkit/Contacts/Admin/EditContact.php | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/Toolkit/Contacts/Admin/EditContact.php b/Toolkit/Contacts/Admin/EditContact.php index 9ac7a12..f11e72e 100644 --- a/Toolkit/Contacts/Admin/EditContact.php +++ b/Toolkit/Contacts/Admin/EditContact.php @@ -411,6 +411,10 @@ class Toolkit_Contacts_Admin_EditContact public function configureElements() { $e = array(); + $config = parse_ini_file(BASE .'Toolkit/Contacts/config.ini', true); + $referredBy = $config['referred_by']; + $gender = $config['gender']; + $handicap = $config['handicap']; $this->setInterestFields(); // Grouped Elements are defined here. $this->interestsGroups =& $this->getInterestFields(); @@ -548,10 +552,24 @@ class Toolkit_Contacts_Admin_EditContact 'type' => 'advcheckbox', 'req' => false, 'name' => 'golfvacation', - 'display' => '', - 'opts' => 'Golf Vacation Planner', + 'display' => 'Golf Vacation Planner', + 'opts' => 'Yes', 'val' => array(0, 1) ); + $e[] = array( + 'type' => 'select', + 'req' => false, + 'name' => 'gender', + 'display' => 'Gender', + 'opts' => $gender + ); + $e[] = array( + 'type' => 'select', + 'req' => false, + 'name' => 'handicap', + 'display' => 'Do you have a USGA Handicap', + 'opts' => $handicap + ); if (is_array($this->interestsGroups)) { foreach ($this->interestsGroups as $group => $gData) { $this->myGroups[] = $gData; -- 2.17.1