fixed conditionals for page title and page ID error handling
authorAnthony Talarico <talarico@gaslightmedia.com>
Tue, 24 May 2016 15:34:39 +0000 (11:34 -0400)
committerAnthony Talarico <talarico@gaslightmedia.com>
Tue, 24 May 2016 15:34:39 +0000 (11:34 -0400)
models/admin/management/index.php
views/admin/management/index.html

index 597f8cb..8cfb535 100644 (file)
@@ -162,10 +162,9 @@ class GlmMembersAdmin_management_index extends GlmDataSettingsGeneral
                             'post_title' => $postValueTitle
                         );
                         wp_update_post($args);
-                        echo $pageTitle;
-                    } else if($pageTitle == $postValueTitle && !empty($postValueTitle)) { 
-                        
-                    } else{
+                    } else if($pageTitle == $postValueTitle) { 
+  
+                    } else if(empty($postValueTitle)){
                         $settingsUpdateError = true;
                         $settingsUpdated = false;
                         $titleError = true;
index 98dbc87..a0ff121 100644 (file)
@@ -19,8 +19,8 @@
         <!-- Required Pages -->
         
         <table id="glm-table-required-page" class="glm-admin-table glm-settings-table">
-            {if $idError}<span class="glm-error">Page ID should be a number, may not be blank and should be associated with an existing page</span>{/if}
-            {if $titleError}<span class="glm-error">Page name should not be empty</span>{/if}
+            {if $idError}<span class="glm-error">Page ID should be numerical and should not be empty</span>{/if}
+            {if $titleError}<span class="glm-error">Page Title should not be blank</span>{/if}
             {foreach from=$requiredPages key=addon item=requiredPage}
             <tr><td colspan="2"><h2>Plugin: {$addon}</h2></td></tr>
                 {foreach from=$requiredPage key=requiredPageName item=requiredPageData}