Update for smarty
authorSteve Sutton <steve@gaslightmedia.com>
Tue, 12 Feb 2019 14:25:41 +0000 (09:25 -0500)
committerSteve Sutton <steve@gaslightmedia.com>
Tue, 12 Feb 2019 14:25:41 +0000 (09:25 -0500)
Replacing the php tags

views/admin/jobs/edit.html
views/admin/settings/emailJobsNotifications.html

index 5446ca4..8548701 100644 (file)
@@ -7,7 +7,7 @@
         <a id="deleteJobButton" class="button button-secondary glm-button glm-right">Delete this Job</a>
         <h2>Edit Job Posting
     {else}
-        <h2>Add New Job Posting 
+        <h2>Add New Job Posting
     {/if}
             &nbsp;&nbsp;&nbsp;
             {if $jobUpdated}<span class="glm-notice glm-flash-updated">Job Updated</span>{/if}
@@ -63,7 +63,7 @@
                     <select id="job_title" data-id="title" name="title">
                         <option value="">Select a Job Title</option>
                         {foreach from=$jobTitles item=j}
-                            <option value="{$j.id}" {if $job.fieldData.title.name == {$j.job_title}} selected="selected"{/if}>   
+                            <option value="{$j.id}" {if $job.fieldData.title.name == {$j.job_title}} selected="selected"{/if}>
                                 {$j.job_title}
                             </option>
                         {/foreach}
                         Member
                 </div>
                 <div class="glm-small-12 glm-medium-5 glm-columns admin-job-input">
-  
+
                     <select id="member" data-id="member" name="member">
                         <option value="">Select a Member</option>
                         {foreach from=$memberList item=m}
-              
+
                             {if 'fieldData'|array_key_exists:$job}
                                 <option value="{$m.id}" {if $job.fieldData.member.value == $m.id} selected="selected"{/if}>
                             {else if}
@@ -98,7 +98,7 @@
                 </div>
             </div>
             {else}
-        
+
             <input type="hidden" name="member" value="{$memberID}">
             {/if}
 
                 <div class="glm-small-12 glm-medium-2 glm-columns admin-job-label">
                         Facility Operation
                 </div>
-                
+
                 <div class="glm-small-12 glm-medium-5 glm-columns admin-job-input">
-                    {php}
-                        wp_editor(
-                
-                            '{$job.fieldData.facility_operation|escape:quotes}', 
-    
-                
-                        'facility_operation', array(
-                            'media_buttons' => false,
-                            'tinymce'      => true,
-                            // 'quicktags' => false,
-                            // 'wpautop' => false,  NOTE: Dont's use. Problem when numerous spaces before text.
-                            'textarea_name' => 'facility_operation',
-                            'editor_height' => 200,     // Height in px, overrides editor_rows
-                                // 'textarea_rows' => 8
-                        ));
-                    {/php}
+                    {wp_editor(
+                        $job.fieldData.facility_operation|escape:quotes,
+                        'facility_operation',
+                        json_decode('{
+                            "media_buttons":    false,
+                            "quicktags":        false,
+                            "textarea_name":    "facility_operation",
+                            "editor_height":    200
+                        }', true)
+                    )}
                 </div>
             </div>
             <!-- DESCRIPTION -->
                     Description
                 </div>
                 <div class="glm-small-12 glm-medium-5 glm-columns admin-job-input">
-                    {php}
-                        wp_editor(
-                    
-                            '{$job.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(
+                        $job.fieldData.descr|escape:quotes,
+                        'descr',
+                        json_decode('{
+                            "media_buttons":    false,
+                            "quicktags":        false,
+                            "textarea_name":    "descr",
+                            "editor_height":    200
+                        }', true)
+                    )}
                 </div>
             </div>
             <!-- JOB REQUIREMENTS -->
             <div class="glm-job-row glm-row">
                 <div class="glm-small-12 glm-medium-2 glm-columns admin-job-label">
-                    Job Requirements   
+                    Job Requirements
                 </div>
                 <div class="glm-small-12 glm-medium-5 glm-columns admin-job-input">
-                    {php}
-                        wp_editor(
-                
-                            '{$job.fieldData.requirements|escape:quotes}', 
-        
-                        'requirements', array(
-                            'media_buttons' => false,
-                            'tinymce'      => true,
-                            // 'quicktags' => false,
-                            // 'wpautop' => false,  NOTE: Dont's use. Problem when numerous spaces before text.
-                            'textarea_name' => 'requirements',
-                            'editor_height' => 200,     // Height in px, overrides editor_rows
-                                // 'textarea_rows' => 8
-                        ));
-                    {/php}
+                    {wp_editor(
+                        $job.fieldData.requirements|escape:quotes,
+                        'requirements',
+                        json_decode('{
+                            "media_buttons":    false,
+                            "quicktags":        false,
+                            "textarea_name":    "requirements",
+                            "editor_height":    200
+                        }', true)
+                    )}
                 </div>
             </div>
             <!-- BENEFITS -->
             <div class="glm-job-row glm-row">
                 <div class="glm-small-12 glm-medium-2 glm-columns admin-job-label">
-                    Job Benefits 
+                    Job Benefits
                 </div>
                 <div class="glm-small-12 glm-medium-5 glm-columns admin-job-input">
-                    {php}
-                        wp_editor(
-                    
-                            '{$job.fieldData.benefits|escape:quotes}', 
-            
-    
-                        'benefits', array(
-                            'media_buttons' => false,
-                            'tinymce'      => true,
-                            // 'quicktags' => false,
-                            // 'wpautop' => false,  NOTE: Dont's use. Problem when numerous spaces before text.
-                            'textarea_name' => 'benefits',
-                            'editor_height' => 200,     // Height in px, overrides editor_rows
-                                // 'textarea_rows' => 8
-                        ));
-                    {/php}
+                    {wp_editor(
+                        $job.fieldData.benefits|escape:quotes,
+                        'benefits',
+                        json_decode('{
+                            "media_buttons":    false,
+                            "quicktags":        false,
+                            "textarea_name":    "benefits",
+                            "editor_height":    200
+                        }', true)
+                    )}
                 </div>
             </div>
             <!-- SALARY -->
             <div class="glm-job-row glm-row">
                 <div class="glm-small-12 glm-medium-2 glm-columns admin-job-label">
-                    Salary 
+                    Salary
                 </div>
                 <div class="glm-small-12 glm-medium-5 glm-columns admin-job-input">
                     <input type="text" name="salary" {if $job.fieldData.salary} value='{$job.fieldData.salary}' {/if}>
         <!-- DURATION -->
             <div class="glm-job-row glm-row">
                 <div class="glm-small-12 glm-medium-2 glm-columns admin-job-label">
-                    Job Duration    
+                    Job Duration
                 </div>
                 <div class="glm-small-12 glm-medium-5 glm-columns admin-job-input">
                     <input type="text" name="duration" {if $job.fieldData.duration} value='{$job.fieldData.duration}' {/if}>
         <!-- DEADLINE -->
             <div class="glm-job-row glm-row">
                 <div class="glm-small-12 glm-medium-2 glm-columns admin-job-label">
-                    Deadline    
+                    Deadline
                 </div>
                 <div class="glm-small-12 glm-medium-5 glm-columns admin-job-input">
                     <input type="text" name="deadline" {if $job.fieldData.deadline} value='{$job.fieldData.deadline}' {/if}>
         <!-- JOB LOCATION -->
             <div class="glm-job-row glm-row">
                 <div class="glm-small-12 glm-medium-2 glm-columns admin-job-label">
-                    Job Location    
+                    Job Location
                 </div>
                 <div class="glm-small-12 glm-medium-5 glm-columns admin-job-input">
-                    {php}
-                        wp_editor(
-            
-                            '{$job.fieldData.job_location|escape:quotes}', 
-        
-                        'job_location', array(
-                            'media_buttons' => false,
-                            'tinymce'      => true,
-                            // 'quicktags' => false,
-                            // 'wpautop' => false,  NOTE: Dont's use. Problem when numerous spaces before text.
-                            'textarea_name' => 'job_location',
-                            'editor_height' => 200,     // Height in px, overrides editor_rows
-                                // 'textarea_rows' => 8
-                        ));
-                    {/php}
+                    {wp_editor(
+                        $job.fieldData.job_location|escape:quotes,
+                        'job_location',
+                        json_decode('{
+                            "media_buttons":    false,
+                            "quicktags":        false,
+                            "textarea_name":    "job_location",
+                            "editor_height":    200
+                        }', true)
+                    )}
                 </div>
             </div>
             <!-- SEND RESUME TO  -->
                         Send Resume To
                 </div>
                 <div class="glm-small-12 glm-medium-5 glm-columns admin-job-input">
-                    {php}
-                    wp_editor(
-        
-                        '{$job.fieldData.resume_location|escape:quotes}', 
-    
-                    'resume_location', array(
-                        'media_buttons' => false,
-                        'tinymce'      => true,
-                        // 'quicktags' => false,
-                        // 'wpautop' => false,  NOTE: Dont's use. Problem when numerous spaces before text.
-                        'textarea_name' => 'resume_location',
-                        'editor_height' => 200,     // Height in px, overrides editor_rows
-                            // 'textarea_rows' => 8
-                    ));
-                {/php}
+                    {wp_editor(
+                        $job.fieldData.resume_location|escape:quotes,
+                        'resume_location',
+                        json_decode('{
+                            "media_buttons":    false,
+                            "quicktags":        false,
+                            "textarea_name":    "resume_location",
+                            "editor_height":    200
+                        }', true)
+                    )}
                 </div>
             </div>
         <!-- CONTACT NAME -->
                     <input type="text" name="contact_phone" {if $job.fieldData.contact_phone} value='{$job.fieldData.contact_phone}' {/if}>
                 </div>
             </div>
-        
+
             <!-- JOB EXPIRATION-->
             <div class="glm-job-row glm-row">
                 <div class="glm-small-12 glm-medium-2 glm-columns admin-job-label">
-                    Job Expiration    
+                    Job Expiration
                 </div>
                 <div class="glm-small-12 glm-medium-5 glm-columns admin-job-input">
                     <select id="job_expiration" data-id="job_expiration" name="job_expiration">
                     </select>
                 </div>
             </div>
-            
-            
+
+
             <input id="updateJob" type="submit" value="{if $haveJob}Update Job{else}Save New Job{/if}">
         </form>
 
                 window.location.replace("{$thisUrl}?page={$thisPage}&glm_action=index&option=delete&job={$job.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 eb3d2a9..34c3773 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.job_email_notification|escape:quotes} {/if}', 'glm_job_notification', array(
-                            'media_buttons' => false,
-                            // 'quicktags' => false,
-                            // 'wpautop' => false,  NOTE: Dont's use. Problem when numerous spaces before text.
-                            'textarea_name' => 'job_email_notification',
-                            'editor_height' => 300,     // Height in px, overrides editor_rows
-                                // 'textarea_rows' => 8
-                        ));
-                    {/php}
+                {wp_editor(
+                    $email_settings.job_email_notification|escape:quotes,
+                    'glm_job_notification',
+                    json_decode('{
+                        "media_buttons":    false,
+                        "quicktags":        false,
+                        "textarea_name":    "job_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.job_declined_message|escape:quotes} {/if}', 'glm_job_declined', array(
-                            'media_buttons' => false,
-                            // 'quicktags' => false,
-                            // 'wpautop' => false,  NOTE: Dont's use. Problem when numerous spaces before text.
-                            'textarea_name' => 'job_declined_message',
-                            'editor_height' => 300,     // Height in px, overrides editor_rows
-                                // 'textarea_rows' => 8
-                        ));
-                    {/php}
+                {wp_editor(
+                    $email_settings.job_declined_message|escape:quotes,
+                    'glm_job_declined',
+                    json_decode('{
+                        "media_buttons":    false,
+                        "quicktags":        false,
+                        "textarea_name":    "job_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.job_approved_message|escape:quotes} {/if}', 'glm_job_approved', array(
-                            'media_buttons' => false,
-                            // 'quicktags' => false,
-                            // 'wpautop' => false,  NOTE: Dont's use. Problem when numerous spaces before text.
-                            'textarea_name' => 'job_approved_message',
-                            'editor_height' => 300,     // Height in px, overrides editor_rows
-                                // 'textarea_rows' => 8
-                        ));
-                    {/php}
+                {wp_editor(
+                    $email_settings.job_approved_message|escape:quotes,
+                    'glm_job_approved',
+                    json_decode('{
+                        "media_buttons":    false,
+                        "quicktags":        false,
+                        "textarea_name":    "job_approved_message",
+                        "editor_height":    300
+                    }', true)
+                )}
             </div>
         </div>
          <input type="submit" value="Update Settings" class="button-primary">