Update for the leads plugin to add new lead.
authorSteve Sutton <steve@gaslightmedia.com>
Wed, 17 Oct 2018 17:55:53 +0000 (13:55 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Wed, 17 Oct 2018 17:55:53 +0000 (13:55 -0400)
Testing adding lead without any leads for some reason wasn't showing
form. When creating the newEntry status wasn't being set. Looking for
status or adding new lead to show the form.

models/admin/leads/index.php
views/admin/leads/edit.html

index 9ce4e5f..6b32a12 100644 (file)
@@ -751,6 +751,7 @@ class GlmMembersAdmin_leads_index extends GlmDataLeadEntry
                 break;
             }
             $entry = $this->newEntry();
+            // echo '<pre>$entry: ' . print_r( $entry, true ) . '</pre>';
             $addingLead = true;
 
             $lead_interests = array();
index 4bb15bd..adac773 100644 (file)
@@ -7,7 +7,7 @@
 
 <a href="{$thisUrl}?back=1&page={$thisPage}&prevStart={$smarty.request.prevStart}&nextStart={$smarty.request.nextStart}&pageSelect={$smarty.request.pageSelect}">Back To Search</a>
 
-{if $entry.status}
+{if $entry.status || $addingLead}
 <form action="{$thisUrl}?page={$thisPage}" method="post">
     <input type="hidden" name="glm_action" value="{$thisAction}" />
     {if !$addingLead}