Update member part
authorSteve Sutton <steve@gaslightmedia.com>
Thu, 24 Sep 2015 16:36:14 +0000 (12:36 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Thu, 24 Sep 2015 16:36:14 +0000 (12:36 -0400)
Adding an empty option for the member select in admin side.
Testing to make sure the member plugin can be turned off and coupons
still function properly.

models/coupon.php
views/admin/coupon_meta.php

index 849b0f7..db14ac5 100644 (file)
@@ -216,6 +216,10 @@ class glm_coupons_coupon
         include $this->pluginDirName . 'views/admin/coupon_meta.php';
     }
 
+    /**
+    * Grab the list of members.
+    * If they have the member plugin.
+    */
     private function _getMemberList()
     {
         global $wpdb;
index 998d586..aa2a23d 100644 (file)
@@ -15,6 +15,7 @@
         <li>
             <label>Member: </label>
             <select name="glm_coupons_member">
+                <option value="">-- Select a Member --</option>
                 <?php foreach ($memberList as $memberOption)  :?>
                 <option value="<?php echo $memberOption['id']; ?>" <?php if ($glm_coupons_member == $memberOption['id']) { echo  ' selected'; } ?>><?php echo $memberOption['name']; ?></option>
                 <?php endforeach; ?>