Updates for smarty
authorSteve Sutton <steve@gaslightmedia.com>
Tue, 12 Feb 2019 14:17:24 +0000 (09:17 -0500)
committerSteve Sutton <steve@gaslightmedia.com>
Tue, 12 Feb 2019 14:17:24 +0000 (09:17 -0500)
not using {php} tags

views/admin/forSale/edit.html
views/admin/settings/emailForSaleNotifications.html

index 3ec4857..a649168 100644 (file)
@@ -56,7 +56,7 @@
             <div class="glm-small-12 glm-medium-2 glm-columns admin-item-label">
                 Topic
             </div>
-         
+
             <div class="glm-small-12 glm-medium-5 glm-columns admin-item-input">
                 <select id="topic" data-id="item-topic" name="topic">
                     <option disabled value="">Topic</option>
                 </select>
             </div>
         </div>
-        
+
         <!-- ITEM TITLE -->
         <div class="glm-item-row glm-row">
             <div class="glm-small-12 glm-medium-2 glm-columns admin-item-label glm-required">
-                Item 
+                Item
             </div>
             <div class="glm-small-12 glm-medium-8 glm-columns admin-item-input">
                 <input required type="text" name="title" {if $item.fieldData.title} value='{$item.fieldData.title}' {/if}>
@@ -80,7 +80,7 @@
         </div>
         <!-- MEMBER for admins only-->
         {if !$lockedToMember && $memberList}
-  
+
         <div class="glm-item-row glm-row">
             <div class="glm-small-12 glm-medium-2 glm-columns admin-item-label">
                     Member
                    Description
             </div>
             <div class="glm-small-12 glm-medium-5 glm-columns admin-item-input">
-                {php}
-                    wp_editor(
-                  
-                        '{$item.fieldData.descr|escape:quotes}', 
-              
-                    'descr', array(
-                        'media_buttons' => false,
-                        'tinymce'      => true,
-                        // 'quicktags' => false,
-                        // 'wpautop' => false,  NOTE: Dont's use. Problem when numerous spaces before text.
-                        'textarea_name' => 'descr',
-                        'editor_height' => 200,     // Height in px, overrides editor_rows
-                            // 'textarea_rows' => 8
-                    ));
-                {/php}
+                {wp_editor(
+                    $item.fieldData.descr|escape:quotes,
+                    'descr',
+                    json_decode('{
+                        "media_buttons":    false,
+                        "quicktags":        false,
+                        "textarea_name":    "descr",
+                        "editor_height":    200
+                    }', true)
+                )}
             </div>
         </div>
         <!-- TERMS -->
                        Terms
                 </div>
                 <div class="glm-small-12 glm-medium-5 glm-columns admin-item-input">
-                    {php}
-                        wp_editor(
-                      
-                            '{$item.fieldData.terms|escape:quotes}', 
-                  
-                        'terms', array(
-                            'media_buttons' => false,
-                            'tinymce'      => true,
-                            // 'quicktags' => false,
-                            // 'wpautop' => false,  NOTE: Dont's use. Problem when numerous spaces before text.
-                            'textarea_name' => 'terms',
-                            'editor_height' => 200,     // Height in px, overrides editor_rows
-                                // 'textarea_rows' => 8
-                        ));
-                    {/php}
+                    {wp_editor(
+                        $item.fieldData.terms|escape:quotes,
+                        'terms',
+                        json_decode('{
+                            "media_buttons":    false,
+                            "quicktags":        false,
+                            "textarea_name":    "terms",
+                            "editor_height":    200
+                        }', true)
+                    )}
                 </div>
             </div>
        <!-- CONTACT NAME -->
         <br>
         {include file='admin/forSale/parts/image_input.html'}
         <br>
-       
+
         <!-- ITEM EXPIRATION-->
         <div class="glm-item-row glm-row">
             <div class="glm-small-12 glm-medium-2 glm-columns admin-item-label">
-                Item Expiration    
+                Item Expiration
             </div>
             <div class="glm-small-12 glm-medium-5 glm-columns admin-item-input">
                 <select id="item_expiration" data-id="item_expiration" name="item_expiration">
                 </select>
             </div>
         </div>
-        
-        
+
+
         <input id="updateItem" type="submit" value="{if $haveItem}Update Item{else}Save New Item{/if}">
     </form>
 
                 window.location.replace("{$thisUrl}?page={$thisPage}&glm_action=index&option=delete&item={$item.fieldData.id}");
             });
         {/if}
-            
+
             // Flash certain elements for a short time after display
             $(".glm-flash-updated").fadeOut(500).fadeIn(500).fadeOut(500).fadeIn(500).fadeOut(500).fadeIn(500).fadeOut(500).fadeIn(500).fadeOut(500);
 
index 5b04a2a..1d2783e 100644 (file)
         <div class="glm-row">
             <div class="glm-small-12 glm-medium-3 glm-column email-notification-label"> Email Notification Message </div>
             <div class="glm-small-12 glm-medium-9 glm-column email-notification-editor">
-                    {php}
-                        wp_editor('{if $email_settings} {$email_settings.forSale_email_notification|escape:quotes} {/if}', 'glm_forSale_notification', array(
-                            'media_buttons' => false,
-                            // 'quicktags' => false,
-                            // 'wpautop' => false,  NOTE: Dont's use. Problem when numerous spaces before text.
-                            'textarea_name' => 'forSale_email_notification',
-                            'editor_height' => 300,     // Height in px, overrides editor_rows
-                                // 'textarea_rows' => 8
-                        ));
-                    {/php}
+                {wp_editor(
+                    $email_settings.forSale_email_notification|escape:quotes,
+                    'glm_forSale_notification',
+                    json_decode('{
+                        "media_buttons":    false,
+                        "quicktags":        false,
+                        "textarea_name":    "forSale_email_notification",
+                        "editor_height":    300
+                    }', true)
+                )}
             </div>
         </div>
         <div class="glm-row">
             <div class="glm-small-12 glm-medium-3 glm-column email-notification-label"> Declined Message </div>
             <div class="glm-small-12 glm-medium-9 glm-column email-notification-editor">
-                    {php}
-                        wp_editor('{if $email_settings} {$email_settings.forSale_declined_message|escape:quotes} {/if}', 'glm_forSale_declined', array(
-                            'media_buttons' => false,
-                            // 'quicktags' => false,
-                            // 'wpautop' => false,  NOTE: Dont's use. Problem when numerous spaces before text.
-                            'textarea_name' => 'forSale_declined_message',
-                            'editor_height' => 300,     // Height in px, overrides editor_rows
-                                // 'textarea_rows' => 8
-                        ));
-                    {/php}
+                {wp_editor(
+                    $email_settings.forSale_declined_message|escape:quotes,
+                    'glm_forSale_declined',
+                    json_decode('{
+                        "media_buttons":    false,
+                        "quicktags":        false,
+                        "textarea_name":    "forSale_declined_message",
+                        "editor_height":    300
+                    }', true)
+                )}
             </div>
         </div>
         <div class="glm-row">
             <div class="glm-small-12 glm-medium-3 glm-columns email-notification-label"> Approved Message </div>
             <div class="glm-small-12 glm-medium-9 glm-columns email-notification-editor">
-                    {php}
-                        wp_editor('{if $email_settings} {$email_settings.forSale_approved_message|escape:quotes} {/if}', 'glm_forSale_approved', array(
-                            'media_buttons' => false,
-                            // 'quicktags' => false,
-                            // 'wpautop' => false,  NOTE: Dont's use. Problem when numerous spaces before text.
-                            'textarea_name' => 'forSale_approved_message',
-                            'editor_height' => 300,     // Height in px, overrides editor_rows
-                                // 'textarea_rows' => 8
-                        ));
-                    {/php}
+                {wp_editor(
+                    $email_settings.forSale_approved_message|escape:quotes,
+                    'glm_forSale_approved',
+                    json_decode('{
+                        "media_buttons":    false,
+                        "quicktags":        false,
+                        "textarea_name":    "forSale_approved_message",
+                        "editor_height":    300
+                    }', true)
+                )}
             </div>
         </div>
          <input type="submit" value="Update Settings" class="button-primary">