From: Steve Sutton Date: Mon, 4 Dec 2017 10:33:12 +0000 (-0500) Subject: WIP work on the edit add page for notificationTypes X-Git-Tag: v1.0.0^2~210 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=f625e420c204df2a7228ab994f60757404078a8d;p=WP-Plugins%2Fglm-member-db-billing.git WIP work on the edit add page for notificationTypes Further work on notificaton types for edit and add page. --- diff --git a/models/admin/billing/invoices.php b/models/admin/billing/invoices.php index 6a7a6d5..91d75c7 100644 --- a/models/admin/billing/invoices.php +++ b/models/admin/billing/invoices.php @@ -97,7 +97,7 @@ class GlmMembersAdmin_billing_list // extends GlmDataTransactions $haveTransactions = false; $transactions = false; $haveTransactions = false; - $this->transactionID = false; + $this->transactionID = false; $transactionsUpdated = false; $transactionsUpdateError = false; $transactionsAdded = false; diff --git a/models/admin/settings/notificationTypes.php b/models/admin/settings/notificationTypes.php index 215d2d8..fa07c07 100644 --- a/models/admin/settings/notificationTypes.php +++ b/models/admin/settings/notificationTypes.php @@ -99,6 +99,7 @@ class GlmMembersAdmin_settings_notificationTypes extends GlmDataNotificationType public function modelAction ($actionData = false) { + $id = 0; $option = 'list'; $view = 'notificationTypes'; $success = true; @@ -138,18 +139,20 @@ class GlmMembersAdmin_settings_notificationTypes extends GlmDataNotificationType switch($_REQUEST['option']) { case 'add': - $this->newEntry(); + $notificationTypes = $this->newEntry(); $view = 'editNotificationType'; break; case 'insert': $view = 'editNotificationType'; - $this->insertEntry(); + $test = $this->insertEntry(); + echo '
$test: ' . print_r($test, true) . '
'; $notificationTypes = $this->getList(); break; case 'edit': - $notificationTypes = $this->editEntry( $this->notification_id ); + $notificationTypes = $this->editEntry( $id ); + $view = 'editNotificationType'; break; case 'update': @@ -172,7 +175,7 @@ class GlmMembersAdmin_settings_notificationTypes extends GlmDataNotificationType } - echo '
$notificationTypes: ' . print_r( $notificationTypes, true ) . '
'; + // echo '
$notificationTypes: ' . print_r( $notificationTypes, true ) . '
'; // If we have list entries - even if it's an empty list $success = true; @@ -200,6 +203,7 @@ class GlmMembersAdmin_settings_notificationTypes extends GlmDataNotificationType // Compile template data $templateData = array( + 'notification_id' => $id, 'action' => $_REQUEST['glm_action'], 'enable_members' => $enable_members, 'haveNotificationTypes' => $haveNotificationTypes, diff --git a/views/admin/settings/editNotificationType.html b/views/admin/settings/editNotificationType.html index 722ac6a..77ee708 100644 --- a/views/admin/settings/editNotificationType.html +++ b/views/admin/settings/editNotificationType.html @@ -4,9 +4,10 @@ Show error header here -
- {if $haveNotificationTypes} + + {if $notification_id} + {else} {/if} @@ -17,7 +18,7 @@ Show error header here Name - {if $notificationTypes.fieldFail.name}

{$notificationTypes.fieldFail.name}

{/if}
+ {if $notificationTypes.fieldFail.name}

{$notificationTypes.fieldFail.name}

{/if}
@@ -28,7 +29,7 @@ Show error header here Due Date - + Immediate Action - + + diff --git a/views/admin/settings/notificationTypes.html b/views/admin/settings/notificationTypes.html index bf2d746..38140a6 100644 --- a/views/admin/settings/notificationTypes.html +++ b/views/admin/settings/notificationTypes.html @@ -204,7 +204,8 @@ {$t.id}
-