Update main member info form
authorSteve Sutton <steve@gaslightmedia.com>
Wed, 25 Feb 2015 14:01:40 +0000 (09:01 -0500)
committerSteve Sutton <steve@gaslightmedia.com>
Wed, 25 Feb 2015 14:01:40 +0000 (09:01 -0500)
Make it so the member_golf section is not over writing the defaults for
the main info description.

Toolkit/Members/EditMemberInfo.php

index defce70..3d85f16 100644 (file)
@@ -717,7 +717,6 @@ class Toolkit_Members_EditMemberInfo
 
                 $moduleTables = array(
                     'member_accommodations',
-                    'member_golf',
                     'member_restaurants',
                 );
                 foreach ($moduleTables as $table) {
@@ -1386,72 +1385,72 @@ class Toolkit_Members_EditMemberInfo
         //  }}}
         //    {{{ Golf Information
 
-        if ($this->golf) {
-            $e[] = array(
-                'type' => 'header',
-                'req' => false,
-                'name' => 'GolfingHdr',
-                'display' => 'Golf Course Information',
-                'col2' => true
-            );
-            $e[] = array(
-                'type'    => 'text',
-                'req'     => false,
-                'name'    => 'res_url',
-                'display' => 'TeeTime URL',
-                'opts'    => array('class' => 'text'),
-                'noCharLimit' => true
-            );
-            $e[] = array(
-                'type'    => 'text',
-                'req'     => false,
-                'name'    => 'par',
-                'display' => 'Par',
-                'opts'    => array('class' => 'text')
-            );
-            $e[] = array(
-                'type'    => 'text',
-                'req'     => false,
-                'name'    => 'yardage',
-                'display' => 'Yardage',
-                'opts'    => array('class' => 'text')
-            );
-            $e[] = array(
-                'type'    => 'text',
-                'req'     => false,
-                'name'    => 'course_rating',
-                'display' => 'Course Rating',
-                'opts'    => array('class' => 'text')
-            );
-            $e[] = array(
-                'type'    => 'text',
-                'req'     => false,
-                'name'    => 'slope_rating',
-                'display' => 'Slope Rating',
-                'opts'    => array('class' => 'text')
-            );
-            $e[] = array(
-                'type'    => 'advcheckbox',
-                'req'     => false,
-                'name'    => 'walking_course',
-                'display' => 'Walking Course',
-                'val'     => array(0, 1)
-            );
-            $e[] = array(
-                'type'    => 'text',
-                'req'     => false,
-                'name'    => 'holes18',
-                'display' => '18 Holes',
-                'opts'    => array('class' => 'text')
-            );
-            $e[] = array(
-                'type'    => 'text',
-                'req'     => false,
-                'name'    => 'holes9',
-                'display' => '9 Holes',
-                'opts'    => array('class' => 'text')
-            );
-        }
+        //if ($this->golf) {
+            //$e[] = array(
+                //'type' => 'header',
+                //'req' => false,
+                //'name' => 'GolfingHdr',
+                //'display' => 'Golf Course Information',
+                //'col2' => true
+            //);
+            //$e[] = array(
+                //'type'    => 'text',
+                //'req'     => false,
+                //'name'    => 'res_url',
+                //'display' => 'TeeTime URL',
+                //'opts'    => array('class' => 'text'),
+                //'noCharLimit' => true
+            //);
+            //$e[] = array(
+                //'type'    => 'text',
+                //'req'     => false,
+                //'name'    => 'par',
+                //'display' => 'Par',
+                //'opts'    => array('class' => 'text')
+            //);
+            //$e[] = array(
+                //'type'    => 'text',
+                //'req'     => false,
+                //'name'    => 'yardage',
+                //'display' => 'Yardage',
+                //'opts'    => array('class' => 'text')
+            //);
+            //$e[] = array(
+                //'type'    => 'text',
+                //'req'     => false,
+                //'name'    => 'course_rating',
+                //'display' => 'Course Rating',
+                //'opts'    => array('class' => 'text')
+            //);
+            //$e[] = array(
+                //'type'    => 'text',
+                //'req'     => false,
+                //'name'    => 'slope_rating',
+                //'display' => 'Slope Rating',
+                //'opts'    => array('class' => 'text')
+            //);
+            //$e[] = array(
+                //'type'    => 'advcheckbox',
+                //'req'     => false,
+                //'name'    => 'walking_course',
+                //'display' => 'Walking Course',
+                //'val'     => array(0, 1)
+            //);
+            //$e[] = array(
+                //'type'    => 'text',
+                //'req'     => false,
+                //'name'    => 'holes18',
+                //'display' => '18 Holes',
+                //'opts'    => array('class' => 'text')
+            //);
+            //$e[] = array(
+                //'type'    => 'text',
+                //'req'     => false,
+                //'name'    => 'holes9',
+                //'display' => '9 Holes',
+                //'opts'    => array('class' => 'text')
+            //);
+        //}
 
         //  }}}
         //  {{{ Social Media Links
@@ -2508,10 +2507,6 @@ class Toolkit_Members_EditMemberInfo
                     }
                 }
             }
-            $this->clearModule('member_golf');
-            if ($golf) {
-                $this->updateModuleFields($golfFields, 'member_golf', $mid);
-            }
             $this->clearModule('member_accommodations');
             if ($accommodations) {
                 $this->updateModuleFields($accommodationFields, 'member_accommodations', $mid);
@@ -3406,10 +3401,6 @@ class Toolkit_Members_EditMemberInfo
                     }
                 }
             }
-            $this->clearModule('member_golf');
-            if ($golf) {
-                $this->updateModuleFields($golfFields, 'member_golf');
-            }
             $this->clearModule('member_accommodations');
             if ($accommodations) {
                 $this->updateModuleFields($accommodationFields, 'member_accommodations');