added default behavior for checkboxes and added tooltip description
authorAnthony Talarico <talarico@gaslightmedia.com>
Wed, 25 May 2016 19:10:28 +0000 (15:10 -0400)
committerAnthony Talarico <talarico@gaslightmedia.com>
Wed, 25 May 2016 19:10:28 +0000 (15:10 -0400)
class-streamsendfeedaddon.php

index 4520933..75adfc6 100644 (file)
@@ -110,14 +110,6 @@ class GFStreamSendAddOn extends GFFeedAddOn
         $getList = $ss->listList();
         $listData = $getList->responseData;
         $lists = array();
-        ?>
-         <script type="text/javascript">
-            document.addEventListener("DOMContentLoaded", function(event) { 
-                document.getElementsByName('_gaddon_setting_opt-in')[0].value = 1;
-                document.getElementById('opt-in').checked = true;
-        });
-        </script>
-        <?php
         for($i = 0; $i < count($listData->list[$i]); $i++){
             $lists[] =array('label'=>$listData->list[$i]->name,'value'=>$listData->list[$i]->id);
         }
@@ -147,11 +139,12 @@ class GFStreamSendAddOn extends GFFeedAddOn
                          'label'   => 'Enable Opt-In',
                          'type'    => 'checkbox',
                          'name'    => 'opt-in',
-                         'tooltip' => 'Enable Opt-In',
+                         'tooltip' => 'Added contacts are "pending" if the checkbox is selected, and "active" if the checkbox is empty',
                          'choices' => array(
                                           array(
                                               'label' => '',
-                                              'name'  => 'opt-in'
+                                              'name'  => 'opt-in',
+                                              'default_value' => 1
                                           ),
                              )
                         ),