Updates to the Travel leads from last meeting.
authorSteve Sutton <steve@gaslightmedia.com>
Thu, 7 Jun 2018 19:38:03 +0000 (15:38 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Thu, 7 Jun 2018 19:38:03 +0000 (15:38 -0400)
Adding title to lead table and the lead_contact table.
Adding code to the data classes and the forms to save the data.
Moving the fields in the main screen for lead edit.
Working on the pdf output.

Restrict them so they can only edit one note at a time.

Have the referred by grouped.

15 files changed:
assets/user_edit.png [new file with mode: 0755]
classes/data/dataContacts.php
classes/data/dataLeads.php
css/admin.css
index.php
models/admin/ajax/leadPdfExport.php
models/admin/ajax/travelContacts.php
models/admin/ajax/travelReferredby.php
setup/databaseScripts/create_database_V0.0.3.sql
setup/databaseScripts/dbVersions.php
setup/databaseScripts/update_database_V0.0.4.sql [new file with mode: 0644]
views/admin/ajax/contacts/list.html
views/admin/ajax/notes/list.html
views/admin/ajax/referredby/list.html
views/admin/travel/edit.html

diff --git a/assets/user_edit.png b/assets/user_edit.png
new file mode 100755 (executable)
index 0000000..c1974cd
Binary files /dev/null and b/assets/user_edit.png differ
index 13d99fe..f421f07 100644 (file)
@@ -133,6 +133,13 @@ class GlmDataTravelContacts extends GlmDataAbstract
                 'use'       => 'a',
             ),
 
+            'title' => array(
+                'field'     => 'title',
+                'type'      => 'text',
+                'required'  => false,
+                'use'       => 'a',
+            ),
+
             'name' => array(
                 'field'     => 'name',
                 'type'      => 'text',
index 585e5dc..819e7ab 100644 (file)
@@ -153,6 +153,13 @@ class GlmDataTravelLeads extends GlmDataAbstract
                 'use'       => 'a'
             ),
 
+            'title' => array(
+                'field'     => 'title',
+                'type'      => 'text',
+                'required'  => false,
+                'use'       => 'a',
+            ),
+
             'fname' => array(
                 'field'     => 'fname',
                 'type'      => 'text',
index 1001f96..88d089c 100644 (file)
     text-indent: -9000px;
     margin: 10px;
 }
+.glm-travel-edit .tlEdit {
+    display: inline-block;
+    width: 16px;
+    height: 16px;
+    background: url(../assets/user_edit.png) no-repeat;
+    margin: 10px;
+}
+.edit-log {
+    width: 100%;
+}
 
 #addLog textarea {
     width: 100%;
@@ -290,23 +300,6 @@ div.webform td {
 div.webform table, div.webform td {
     border: 1px solid #aaa !important;
     }
-/* Overriding JqueryUI */
-/* #travel-admin .ui-state-highlight { */
-/*  margin-bottom: .5em; */
-/*  padding: 15px; */
-/*  } */
-/* #travel-admin .ui-state-highlight p { */
-/*  margin: 0; */
-/*  } */
-/* #travel-admin .ui-icon { */
-/*  float: left; */
-/*  margin-right: .3em; */
-/*  display: block; */
-/*  } */
-/* #tabs li a { */
-/*  font-size: 13px; */
-/*  font-size: 1.3rem; */
-/*  } */
 #travel-admin .tsLog {
     margin: 10px 0;
     border-top: 1px dotted #369;
@@ -341,12 +334,6 @@ div.webform table, div.webform td {
 
 /* Member travel leads */
 #file_export fieldset {
-    /* border-width: 2px; */
-    /* border-style: groove; */
-    /* border-color: grey; */
-    /* position: relative; */
-    /* width: 90%; */
-    /* padding: 30px; */
 }
 .clearfix {
     display: inline-block;
@@ -379,7 +366,6 @@ div.webform table, div.webform td {
     display: inline-block;
 }
 
-
 /* Members Travel Leads */
 
 #intTogParent, #disTogParent, #intTogParent2, #intTogParent1, #locTogParent {
index b827350..9f14c7a 100644 (file)
--- a/index.php
+++ b/index.php
@@ -44,7 +44,7 @@ if (!defined('ABSPATH')) {
  *  version from this plugin.
  */
 define('GLM_MEMBERS_TRAVEL_PLUGIN_VERSION', '0.0.1');
-define('GLM_MEMBERS_TRAVEL_PLUGIN_DB_VERSION', '0.0.3');
+define('GLM_MEMBERS_TRAVEL_PLUGIN_DB_VERSION', '0.0.4');
 
 // This is the minimum version of the GLM Members DB plugin require for this plugin.
 define('GLM_MEMBERS_TRAVEL_PLUGIN_MIN_MEMBERS_REQUIRED_VERSION', '2.8.0');
index 484fa43..cf89f04 100644 (file)
@@ -212,31 +212,86 @@ class GlmMembersAdmin_ajax_leadPdfExport extends GlmDataTravelLeads
                 $contacts    = $this->formatContacts( $lead['contacts'] );
                 $referred_by = $this->formatReferredBy( $lead['refs'] );
 
-                $pdf->ezText( $lead['company'], $size );
+                $curY = $pdf->ezText( $lead['company'], $size );
+                $saveY = $curY;
                 $pdf->selectFont( $mainFont );
-                $pdf->ezText( $lead['address'], $size );
-                $pdf->ezText( $lead['city'] . ', ' . $lead['state']['value'] . ' ' . $lead['zip'], $size );
-                $pdf->ezText( $lead['website'], $size );
-                $pdf->ezText( "\n", $size );
+                $curY = $pdf->ezText( $lead['address'], $size );
+                $curY = $pdf->ezText( $lead['city'] . ', ' . $lead['state']['value'] . ' ' . $lead['zip'], $size );
+                if ( $lead['website'] ) {
+                    $curY = $pdf->ezText( $lead['website'], $size );
+                }
+                if ( $lead['phone'] ) {
+                    $pdf->ezText( '<b>Phone:</b> ' . $lead['phone'], $size, $option );
+                }
+                if ( $lead['fax'] ) {
+                    $pdf->ezText( '<b>Fax:</b> ' . $lead['fax'], $size, $option );
+                }
+                $curY = $pdf->ezText( "\n", $size );
+                $endMainY = $curY;
+
+                // Main contact
+                $pdf->ezSetY( $saveY + 10 );
+                $option = array(
+                    'left' => 310
+                );
+                $lead_contact = '';
+                if ( $lead['fname'] ) {
+                    $lead_contact .= $lead['fname'] . ' ' . $lead['lname'];
+                }
+                if ( $lead['title'] ) {
+                    $lead_contact .= ', ' . $lead['title'];
+                }
+                $pdf->ezText( $lead_contact, $size, $option );
+                if ( $lead['email'] ) {
+                    $pdf->ezText( $lead['email'], $size, $option );
+                }
+                $curY = $pdf->ezText( "\n", $size );
+
                 // Contacts
                 if ( $lead['contacts'] ) {
+                    $pdf->ezSetY( $endMainY );
+                    $curY = $pdf->ezText( '<b>Additional Contacts</b>', $size );
+                    $column = 1;
+                    $saveY = $curY;
+                    $contact_string = '';
                     foreach ( $lead['contacts'] as $contact ) {
-                        $pdf->ezText( $contact['name'], $size );
-                        $pdf->ezText( $contact['email'], $size );
-                        $pdf->ezText( $contact['phone'], $size );
-                        $pdf->ezText( "\n", $size );
-                    }
-                }
-                // Notes
-                if ( $lead['notes'] ) {
-                    foreach ( $lead['notes'] as $note ) {
-                        $pdf->selectFont( $mainFontBold );
-                        $pdf->ezText( $note['updated']['datetime'], $size );
-                        $pdf->selectFont( $mainFont );
-                        $pdf->ezText( $note['notes'], $size );
-                        $pdf->ezText( "\n", $size );
+                        if ( $column > 3 ) {
+                            $column = 1;
+                            $saveY = $curY;
+                        }
+                        if ( $column > 1 ) {
+                            $pdf->ezSetY( $saveY );
+                        }
+                        switch ( $column ) {
+                        case 1:
+                            $options = array( 'left' => 0 );
+                            break;
+                        case 2:
+                            $options = array( 'left' => 160 );
+                            break;
+                        case 3:
+                            $options = array( 'left' => 310 );
+                            break;
+                        }
+                        $contact_name = '';
+                        if ( $contact['name'] ) {
+                            $contact_name .= $contact['name'];
+                        }
+                        if ( $contact['title'] ) {
+                            $contact_name .= ', ' . $contact['title'];
+                        }
+                        $pdf->ezText( $contact_name, $size, $options );
+                        if ( $contact['email'] ) {
+                            $pdf->ezText( $contact['email'], $size, $options );
+                        }
+                        if ( $contact['phone'] ) {
+                            $pdf->ezText( $contact['phone'], $size, $options );
+                        }
+                        $curY = $pdf->ezText( "\n", $size );
+                        $column++;
                     }
                 }
+
                 // Referred By
                 if ( $lead['refs'] ) {
                     $pdf->selectFont( $mainFontBold );
@@ -247,6 +302,16 @@ class GlmMembersAdmin_ajax_leadPdfExport extends GlmDataTravelLeads
                     }
                     $pdf->ezText( "\n", $size );
                 }
+                // Notes
+                if ( $lead['notes'] ) {
+                    foreach ( $lead['notes'] as $note ) {
+                        $pdf->selectFont( $mainFontBold );
+                        $pdf->ezText( $note['updated']['datetime'], $size );
+                        $pdf->selectFont( $mainFont );
+                        $pdf->ezText( $note['notes'], $size );
+                        $pdf->ezText( "\n", $size );
+                    }
+                }
                 $lead_count++;
             }
 
index 419a7c2..5888f48 100644 (file)
@@ -106,6 +106,7 @@ class GlmMembersAdmin_ajax_travelContacts extends GlmDataTravelContacts
                     'updated' => date( 'Y-m-d H:i:s' ),
                     'lead'    => $lead_id,
                     'name'    => filter_var( $_REQUEST['name'] ),
+                    'title'   => filter_var( $_REQUEST['title'] ),
                     'email'   => filter_var( $_REQUEST['email'] ),
                     'phone'   => filter_var( $_REQUEST['phone'] ),
 
@@ -113,6 +114,7 @@ class GlmMembersAdmin_ajax_travelContacts extends GlmDataTravelContacts
                 array(
                     '%s', // updated
                     '%d', // lead
+                    '%s', // title
                     '%s', // name
                     '%s', // email
                     '%s', // phone
index 7700459..5f2ac0d 100644 (file)
@@ -133,7 +133,6 @@ class GlmMembersAdmin_ajax_travelReferredBy extends GlmDataReferredBy
         default:
             $lead_id        = filter_var( $_REQUEST['lead_id'], FILTER_VALIDATE_INT );
             $allReferredBy  = $this->getList();
-            // echo '<pre>$allReferredBy: ' . print_r( $allReferredBy, true ) . '</pre>';
             $LeadReferredBy     = new GlmDataTravelLeadsReferredBy( $this->wpdb, $this->config );
             $leadReferredByData = $LeadReferredBy->getList( "T.lead = $lead_id" );
             if ( $leadReferredByData ) {
@@ -142,6 +141,10 @@ class GlmMembersAdmin_ajax_travelReferredBy extends GlmDataReferredBy
                 }
             }
 
+            // Sort results by hierarchy (Parent/Child and Alpha)
+            $allReferredBy = $this->sortParentChild($allReferredBy);
+            // echo '<pre>$allReferredBy: ' . print_r( $allReferredBy, true ) . '</pre>';
+
             $view = 'list.html';
             break;
         }
index ac012da..ac3c647 100644 (file)
@@ -15,6 +15,7 @@ CREATE TABLE {prefix}leads (
     status INT NOT NULL DEFAULT 0,      -- Lead Status (active, inactive)
     create_date DATE NOT NULL,          -- Date contact was created
     updated DATETIME NOT NULL,          -- Updated Timestamp
+    title TEXT NULL,                    -- Title of Lead
     fname TEXT NULL,                    -- First Name
     lname TEXT NULL,                    -- Last Name
     email TINYTEXT NULL,                -- Email
@@ -78,6 +79,7 @@ CREATE TABLE {prefix}lead_contacts (
     id INT NOT NULL AUTO_INCREMENT,
     lead INT NOT NULL,                  -- Reference to lead table
     updated DATETIME NOT NULL,          -- Updated Timestamp
+    title TINYTEXT NULL,                    -- Title of Contact
     name TINYTEXT,                      -- Name of Contact
     email TINYTEXT,                     -- Email of Contact
     phone TINYTEXT,                     -- Phone of Contact
index 078f484..afded64 100644 (file)
@@ -29,5 +29,6 @@ $glmMembersTravelDbVersions = array(
     '0.0.1' => array('version' => '0.0.1', 'tables' => 4, 'date' => '05/18/18'),
     '0.0.2' => array('version' => '0.0.2', 'tables' => 5, 'date' => '05/23/18'),
     '0.0.3' => array('version' => '0.0.3', 'tables' => 6, 'date' => '05/31/18'),
+    '0.0.4' => array('version' => '0.0.4', 'tables' => 6, 'date' => '06/07/18'),
 );
 
diff --git a/setup/databaseScripts/update_database_V0.0.4.sql b/setup/databaseScripts/update_database_V0.0.4.sql
new file mode 100644 (file)
index 0000000..90e837b
--- /dev/null
@@ -0,0 +1,15 @@
+-- Gaslight Media Members Database  - Events Add-On
+-- File Created: 05/31/2018
+-- Database Version: 0.0.3
+-- Database Update From Previous Version Script
+--
+-- To permit each query below to be executed separately,
+-- all queries must be separated by a line with four dashes
+
+-- Add Title to lead
+ALTER TABLE {prefix}leads ADD title TEXT NULL;            -- Title for lead
+
+----
+
+-- Add Title to lead_contacts
+ALTER TABLE {prefix}leads_contacts ADD TINYTEXT NULL;   -- Title for Contact
index 44a2f85..aa09613 100644 (file)
@@ -7,17 +7,21 @@
         <fieldset>
             <legend>Add New Contact</legend>
             <table>
+                <tr>
+                    <td><label for="new_name">Title</label></td>
+                    <td><input id="new_title" type="text" name="title" class="glm-form-text-input-medium" /></td>
+                </tr>
                 <tr>
                     <td><label for="new_name">Name</label></td>
-                    <td><input id="new_name" type="text" name="name" /></td>
+                    <td><input id="new_name" type="text" name="name" class="glm-form-text-input-medium" /></td>
                 </tr>
                 <tr>
                     <td><label for="new_email">Email</label></td>
-                    <td><input id="new_email" type="email" name="email" /></td>
+                    <td><input id="new_email" type="email" name="email" class="glm-form-text-input-medium" /></td>
                 </tr>
                 <tr>
                     <td><label for="new_phone">Phone</label></td>
-                    <td><input id="new_phone" type="tel" name="phone" /></td>
+                    <td><input id="new_phone" type="tel" name="phone" class="glm-form-text-input-medium" /></td>
                 </tr>
                 <tr>
                     <td colspan="2">
@@ -31,6 +35,7 @@
     {* List of contacts *}
     <table width="100%" class="wp-list-table striped glm-admin-table-single">
         <thead>
+            <th> Title </th>
             <th> Name </th>
             <th> Phone </th>
             <th> Email </th>
@@ -40,6 +45,7 @@
         {if $contacts}
             {foreach $contacts as $c}
                 <tr {if $c@iteration is div by 2}class="alternate"{/if}>
+                    <td>{$c.title}</td>
                     <td>{$c.name}</td>
                     <td>{$c.phone}</td>
                     <td>{$c.email}</td>
index d7a2e3e..bc6791c 100644 (file)
@@ -11,7 +11,7 @@
     {if $notes}
         {foreach $notes as $n}
             <div id="show-log-{$n.id}" class="tsLog">
-                <h2>{$n.updated.datetime}</h2>
+                <h2>{$n.updated.datetime}<span class="tlEdit" data-id="{$n.id}">&nbsp;</span></h2>
                 <p class="tsNote" data-id="{$n.id}">{$n.notes|nl2br}</p>
                 <a
                     class="tlDelete"
@@ -27,6 +27,7 @@
                 <div id="edit-log-{$n.id}" class="tsEditLog" style="display: none;">
                     <textarea class="edit-log" name="note_entry" cols="30" rows="5">{$n.notes}</textarea>
                     <input type="submit" class="button" value="Save" />
+                    <button class="cancel-edit" data-id="{$n.id}">Cancel</button>
                 </div>
             </form>
         {/foreach}
 
 <script>
 jQuery(function($){
-    $('.tsNote').click(function(){
+
+    var editMode = false;
+
+    // Function for the click event of tsNote
+    $('.tsNote, .tlEdit').click(function(){
+        if ( editMode ) {
+            alert( 'Please finish your current edit first!' );
+            return false;
+        }
+        editMode = true;
         var dataId = $(this).data('id');
+
         // Show the edit form
         $('#edit-log-' + dataId).show();
+
         // Hide the tsLog output
         $('#show-log-' + dataId).hide();
     });
+
+    $('.cancel-edit').click(function(e){
+        e.preventDefault();
+        var dataId = $(this).data('id');
+        editMode = false;
+
+        // Hide the edit form
+        $('#edit-log-' + dataId).hide();
+
+        // Show the tsLog output
+        $('#show-log-' + dataId).show();
+    });
+
     $('.tlDelete').click(function(){
         return confirm('This will delete this note entry! Are you sure?');
     });
+
 });
 </script>
index 5e41481..e5ed861 100644 (file)
         </div>
 
         <table>
-            <tr>
-                <td>Referred By</td>
-            </tr>
             <tr>
                 <td>
                 {foreach $referredby as $r}
-                    <label class="glmCheckBox">
-                        <input
-                            type="checkbox"
-                            name="referredby[{$r.id}]"
-                            value="1"
-                            {if isset($refs[$r.id]) && $refs[$r.id]}checked{/if} />
-                        {$r.name}
-                    </label>
+                    {if $r.parent.value == 0}
+                        <h3>{$r.name}</h3>
+                    {else}
+                        <label class="glmCheckBox">
+                            <input
+                                type="checkbox"
+                                name="referredby[{$r.id}]"
+                                value="1"
+                                {if isset($refs[$r.id]) && $refs[$r.id]}checked{/if} />
+                            {$r.name}
+                        </label>
+                    {/if}
                 {/foreach}
                 </td>
             </tr>
index 1c32393..76bc458 100644 (file)
                 <tr>
                     <td {if $lead.fieldRequired.company}class="glm-required"{/if}>Company:</td>
                     <td {if $lead.fieldFail.company}class="glm-form-bad-input" data-tabid="glm-travel-company"{/if}>
-                        <input type="text" name="company" value="{$lead.fieldData.company}" class="glm-form-text-input">
+                        <input type="text" name="company" value="{$lead.fieldData.company}" class="glm-form-text-input-medium">
                         {if $lead.fieldFail.company}<p>{$lead.fieldFail.company}</p>{/if}
                     </td>
                 </tr>
 
-                <tr>
-                    <td {if $lead.fieldRequired.fname}class="glm-required"{/if}>First Name:</td>
-                    <td {if $lead.fieldFail.fname}class="glm-form-bad-input" data-tabid="glm-travel-fname"{/if}>
-                        <input type="text" name="fname" value="{$lead.fieldData.fname}" class="glm-form-text-input">
-                        {if $lead.fieldFail.fname}<p>{$lead.fieldFail.fname}</p>{/if}
-                    </td>
-                </tr>
-
-                <tr>
-                    <td {if $lead.fieldRequired.lname}class="glm-required"{/if}>Last Name:</td>
-                    <td {if $lead.fieldFail.lname}class="glm-form-bad-input" data-tabid="glm-travel-lname"{/if}>
-                        <input type="text" name="lname" value="{$lead.fieldData.lname}" class="glm-form-text-input">
-                        {if $lead.fieldFail.lname}<p>{$lead.fieldFail.lname}</p>{/if}
-                    </td>
-                </tr>
-
                 <tr>
                     <td {if $lead.fieldRequired.address}class="glm-required"{/if}>Address:</td>
                     <td {if $lead.fieldFail.address}class="glm-form-bad-input" data-tabid="glm-travel-address"{/if}>
-                        <input type="text" name="address" value="{$lead.fieldData.address}" class="glm-form-text-input">
+                        <input type="text" name="address" value="{$lead.fieldData.address}" class="glm-form-text-input-medium">
                         {if $lead.fieldFail.address}<p>{$lead.fieldFail.address}</p>{/if}
                     </td>
                 </tr>
@@ -95,7 +79,7 @@
                 <tr>
                     <td {if $lead.fieldRequired.address2}class="glm-required"{/if}>Address 2:</td>
                     <td {if $lead.fieldFail.address2}class="glm-form-bad-input" data-tabid="glm-travel-address2"{/if}>
-                        <input type="text" name="address2" value="{$lead.fieldData.address2}" class="glm-form-text-input">
+                        <input type="text" name="address2" value="{$lead.fieldData.address2}" class="glm-form-text-input-medium">
                         {if $lead.fieldFail.address2}<p>{$lead.fieldFail.address2}</p>{/if}
                     </td>
                 </tr>
                 <tr>
                     <td {if $lead.fieldRequired.city}class="glm-required"{/if}>City:</td>
                     <td {if $lead.fieldFail.city}class="glm-form-bad-input" data-tabid="glm-travel-city"{/if}>
-                        <input type="text" name="city" value="{$lead.fieldData.city}" class="glm-form-text-input">
+                        <input type="text" name="city" value="{$lead.fieldData.city}" class="glm-form-text-input-medium">
                         {if $lead.fieldFail.city}<p>{$lead.fieldFail.city}</p>{/if}
                     </td>
                 </tr>
                 <tr>
                     <td {if $lead.fieldRequired.zip}class="glm-required"{/if}>ZIP/Postal Code:</td>
                     <td {if $lead.fieldFail.zip}class="glm-form-bad-input" data-tabid="glm-travel-zip"{/if}>
-                        <input type="text" name="zip" value="{$lead.fieldData.zip}" class="glm-form-text-input">
+                        <input type="text" name="zip" value="{$lead.fieldData.zip}" class="glm-form-text-input-medium">
                         {if $lead.fieldFail.zip}<p>{$lead.fieldFail.zip}</p>{/if}
                     </td>
                 </tr>
 
+                <tr>
+                    <td {if $lead.fieldRequired.title}class="glm-required"{/if}>Title:</td>
+                    <td {if $lead.fieldFail.title}class="glm-form-bad-input" data-tabid="glm-travel-title"{/if}>
+                        <input type="text" name="title" value="{$lead.fieldData.title}" class="glm-form-text-input-medium">
+                        {if $lead.fieldFail.title}<p>{$lead.fieldFail.title}</p>{/if}
+                    </td>
+                </tr>
+
+                <tr>
+                    <td {if $lead.fieldRequired.fname}class="glm-required"{/if}>First Name:</td>
+                    <td {if $lead.fieldFail.fname}class="glm-form-bad-input" data-tabid="glm-travel-fname"{/if}>
+                        <input type="text" name="fname" value="{$lead.fieldData.fname}" class="glm-form-text-input-medium">
+                        {if $lead.fieldFail.fname}<p>{$lead.fieldFail.fname}</p>{/if}
+                    </td>
+                </tr>
+
+                <tr>
+                    <td {if $lead.fieldRequired.lname}class="glm-required"{/if}>Last Name:</td>
+                    <td {if $lead.fieldFail.lname}class="glm-form-bad-input" data-tabid="glm-travel-lname"{/if}>
+                        <input type="text" name="lname" value="{$lead.fieldData.lname}" class="glm-form-text-input-medium">
+                        {if $lead.fieldFail.lname}<p>{$lead.fieldFail.lname}</p>{/if}
+                    </td>
+                </tr>
+
                 <tr>
                     <td {if $lead.fieldRequired.email}class="glm-required"{/if}>Email:</td>
                     <td {if $lead.fieldFail.email}class="glm-form-bad-input" data-tabid="glm-travel-email"{/if}>
-                        <input type="text" name="email" value="{$lead.fieldData.email}" class="glm-form-text-input">
+                        <input type="text" name="email" value="{$lead.fieldData.email}" class="glm-form-text-input-medium">
                         {if $lead.fieldFail.email}<p>{$lead.fieldFail.email}</p>{/if}
                     </td>
                 </tr>
                 <tr>
                     <td {if $lead.fieldRequired.phone}class="glm-required"{/if}>Phone:</td>
                     <td {if $lead.fieldFail.phone}class="glm-form-bad-input" data-tabid="glm-travel-phone"{/if}>
-                        <input type="text" name="phone" value="{$lead.fieldData.phone}" class="glm-form-text-input">
+                        <input type="text" name="phone" value="{$lead.fieldData.phone}" class="glm-form-text-input-medium">
                         {if $lead.fieldFail.phone}<p>{$lead.fieldFail.phone}</p>{/if}
                     </td>
                 </tr>
                 <tr>
                     <td {if $lead.fieldRequired.fax}class="glm-required"{/if}>Fax:</td>
                     <td {if $lead.fieldFail.fax}class="glm-form-bad-input" data-tabid="glm-travel-fax"{/if}>
-                        <input type="text" name="fax" value="{$lead.fieldData.fax}" class="glm-form-text-input">
+                        <input type="text" name="fax" value="{$lead.fieldData.fax}" class="glm-form-text-input-medium">
                         {if $lead.fieldFail.fax}<p>{$lead.fieldFail.fax}</p>{/if}
                     </td>
                 </tr>
                 <tr>
                     <td {if $lead.fieldRequired.website}class="glm-required"{/if}>Website:</td>
                     <td {if $lead.fieldFail.website}class="glm-form-bad-input" data-tabid="glm-travel-website"{/if}>
-                        <input type="text" name="website" value="{$lead.fieldData.website}" class="glm-form-text-input">
+                        <input type="text" name="website" value="{$lead.fieldData.website}" class="glm-form-text-input-medium">
                         {if $lead.fieldFail.website}<p>{$lead.fieldFail.website}</p>{/if}
                     </td>
                 </tr>