Changeset 1691792
- Timestamp:
- 07/06/2017 11:17:35 AM (9 years ago)
- Location:
- contractor-contact-form-website-to-workflow-tool
- Files:
-
- 46 added
- 10 edited
-
tags/1.0.2 (added)
-
tags/1.0.2/assets (added)
-
tags/1.0.2/assets/banner-1544x500.jpg (added)
-
tags/1.0.2/assets/banner-772x250.jpg (added)
-
tags/1.0.2/captcha_image (added)
-
tags/1.0.2/captcha_image/button.png (added)
-
tags/1.0.2/captcha_image/image.php (added)
-
tags/1.0.2/class.customer-data-map.php (added)
-
tags/1.0.2/class.customer-form.php (added)
-
tags/1.0.2/class.customer-validator.php (added)
-
tags/1.0.2/class.customer.php (added)
-
tags/1.0.2/class.jobprogress.php (added)
-
tags/1.0.2/class.jp-request.php (added)
-
tags/1.0.2/class.scheduler.php (added)
-
tags/1.0.2/connect-form.php (added)
-
tags/1.0.2/css (added)
-
tags/1.0.2/css/admin-style.css (added)
-
tags/1.0.2/css/images (added)
-
tags/1.0.2/css/images/ui-icons_444444_256x240.png (added)
-
tags/1.0.2/css/images/ui-icons_555555_256x240.png (added)
-
tags/1.0.2/css/images/ui-icons_777620_256x240.png (added)
-
tags/1.0.2/css/images/ui-icons_777777_256x240.png (added)
-
tags/1.0.2/css/images/ui-icons_cc0000_256x240.png (added)
-
tags/1.0.2/css/images/ui-icons_ffffff_256x240.png (added)
-
tags/1.0.2/css/select2.min.css (added)
-
tags/1.0.2/css/style.css (added)
-
tags/1.0.2/customer-form-page.php (added)
-
tags/1.0.2/customer-index-page.php (added)
-
tags/1.0.2/customer-template.php (added)
-
tags/1.0.2/disconnect-form.php (added)
-
tags/1.0.2/fonts (added)
-
tags/1.0.2/fonts/Anorexia.ttf (added)
-
tags/1.0.2/image_req.php (added)
-
tags/1.0.2/img (added)
-
tags/1.0.2/img/checkbox.png (added)
-
tags/1.0.2/jobprogress.php (added)
-
tags/1.0.2/js (added)
-
tags/1.0.2/js/custom-admin-side.js (added)
-
tags/1.0.2/js/custom.js (added)
-
tags/1.0.2/js/jquery.mask.min.js (added)
-
tags/1.0.2/js/jquery.validate.js (added)
-
tags/1.0.2/js/select2.min.js (added)
-
tags/1.0.2/newsession.php (added)
-
tags/1.0.2/process.php (added)
-
tags/1.0.2/rand.php (added)
-
tags/1.0.2/readme.txt (added)
-
trunk/class.customer-data-map.php (modified) (1 diff)
-
trunk/class.customer-validator.php (modified) (3 diffs)
-
trunk/class.jp-request.php (modified) (1 diff)
-
trunk/class.scheduler.php (modified) (1 diff)
-
trunk/css/style.css (modified) (1 diff)
-
trunk/customer-form-page.php (modified) (6 diffs)
-
trunk/customer-template.php (modified) (1 diff)
-
trunk/jobprogress.php (modified) (1 diff)
-
trunk/js/custom.js (modified) (5 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
contractor-contact-form-website-to-workflow-tool/trunk/class.customer-data-map.php
r1502815 r1691792 43 43 $job = $this->map_job_input(); 44 44 $data['job'] = json_encode($job, true); 45 45 46 if($this->input['referred_by_id'] === 'other') { 46 47 $data['referred_by_note'] = $this->input['referred_by_note']; 47 48 $data['referred_by_type'] = 'other'; 48 } else { 49 50 } else if(!empty($this->input['referred_by_id']) 51 && $this->input['referred_by_id'] != 'other' 52 && $this->input['referred_by_id'] > 0) { 49 53 $data['referred_by_type'] = 'referral'; 50 54 $data['referred_by_id'] = $this->input['referred_by_id']; 51 55 } 56 52 57 return $data; 53 58 } -
contractor-contact-form-website-to-workflow-tool/trunk/class.customer-validator.php
r1502815 r1691792 41 41 } 42 42 43 if(!ine($_POST, 'email')) {44 $error->add('email', 'Please enter the email');45 $has_error = true;46 }43 // if(!ine($_POST, 'email')) { 44 // $error->add('email', 'Please enter the email'); 45 // $has_error = true; 46 // } 47 47 48 48 if(ine($_POST, 'email') && ! filter_var(sanitize_text_field($_POST['email']), FILTER_VALIDATE_EMAIL)){ … … 61 61 } 62 62 63 if(ine($_POST, 'address')) {64 $address = $_POST['address'];65 if(!ine($address, 'address')) {66 $error->add('address', 'Please enter the address.');67 $has_error = true;68 }69 if(!ine($address, 'city')) {70 $error->add('city', 'Please enter the city.');71 $has_error = true;72 }73 if(!ine($address, 'zip')) {74 $error->add('zip', 'Please enter the zip code.');75 $has_error = true;76 }77 if(!ine($address, 'country_id')) {78 $error->add('country_id', 'Please select the country.');79 $has_error = true;80 }81 if(!ine($address, 'state_id')) {82 $error->add('state_id', 'Please select the state.');83 $has_error = true;84 }85 } else {86 $error->add('address', 'Please enter the address.');87 $error->add('city', 'Please enter the city.');88 $error->add('zip', 'Please enter the zip code.');89 $error->add('country_id', 'Please select the country.');90 $error->add('state_id', 'Please select the state.');91 $has_error = true;92 }63 // if(ine($_POST, 'address')) { 64 // $address = $_POST['address']; 65 // if(!ine($address, 'address')) { 66 // $error->add('address', 'Please enter the address.'); 67 // $has_error = true; 68 // } 69 // if(!ine($address, 'city')) { 70 // $error->add('city', 'Please enter the city.'); 71 // $has_error = true; 72 // } 73 // if(!ine($address, 'zip')) { 74 // $error->add('zip', 'Please enter the zip code.'); 75 // $has_error = true; 76 // } 77 // if(!ine($address, 'country_id')) { 78 // $error->add('country_id', 'Please select the country.'); 79 // $has_error = true; 80 // } 81 // if(!ine($address, 'state_id')) { 82 // $error->add('state_id', 'Please select the state.'); 83 // $has_error = true; 84 // } 85 // } else { 86 // $error->add('address', 'Please enter the address.'); 87 // $error->add('city', 'Please enter the city.'); 88 // $error->add('zip', 'Please enter the zip code.'); 89 // $error->add('country_id', 'Please select the country.'); 90 // $error->add('state_id', 'Please select the state.'); 91 // $has_error = true; 92 // } 93 93 94 94 if(ine($_POST, 'job')) { … … 112 112 } 113 113 114 if(!ine($_POST, 'referred_by_id')) {115 $error->add('referred_by_id', 'Please select the referred by.');116 $has_error = true;117 }114 // if(!ine($_POST, 'referred_by_id')) { 115 // $error->add('referred_by_id', 'Please select the referred by.'); 116 // $has_error = true; 117 // } 118 118 119 119 if(ine($_POST, 'referred_by_id') -
contractor-contact-form-website-to-workflow-tool/trunk/class.jp-request.php
r1448321 r1691792 32 32 'body' => $body, 33 33 ); 34 34 35 $response = wp_remote_post($url, $args); 35 36 $response_body = wp_remote_retrieve_body($response); -
contractor-contact-form-website-to-workflow-tool/trunk/class.scheduler.php
r1502815 r1691792 126 126 $input['referred_by_type'] = $customer->referred_by_type; 127 127 $input['referred_by_note'] = $customer->referred_by_note; 128 if(!empty($customer->contact)) { 129 $input['customer_contacts'] = json_decode($customer->contact, true); 130 } 128 if(!empty($customer->contact) && ($customer->is_commercial) ) { 129 $contacts = json_decode($customer->contact, true); 130 foreach ($contacts as $contact) { 131 if(ine($contact, 'first_name') && ine($contact, 'last_name')) { 132 $input['customer_contacts'][0]['first_name'] = $contact['first_name']; 133 $input['customer_contacts'][0]['last_name'] = $contact['last_name']; 134 } 135 } 136 } 137 131 138 return $input; 132 139 } -
contractor-contact-form-website-to-workflow-tool/trunk/css/style.css
r1502815 r1691792 380 380 } 381 381 } 382 .customer-page .additional-val{ 383 position: absolute; 384 right: 0; 385 top: 0; 386 } -
contractor-contact-form-website-to-workflow-tool/trunk/customer-form-page.php
r1502815 r1691792 83 83 </select> 84 84 <input type="text" class="phones mask-select phone-number-field" name="phones[0][number]" placeholder="Phone" required/> 85 <input type="text" maxlength= " 8" class="extension-field number" name="phones[0][ext]" placeholder="Extension"/>85 <input type="text" maxlength= "12" class="extension-field" name="phones[0][ext]" placeholder="Extension"/> 86 86 </div> 87 87 <?php … … 92 92 93 93 <div class="form-group additional-emails"> 94 <label>Email < span class="required-sign">*</span></label>95 <span> 96 <input type="text" placeholder="Email" name="email" required/>94 <label>Email <!-- <span class="required-sign">*</span> --></label> 95 <span> 96 <input type="text" placeholder="Email" name="email"/> 97 97 <?php echo $this->get_error_wrapper('email'); ?> 98 98 </span> … … 104 104 105 105 <div class="form-group"> 106 <label>Address < span class="required-sign">*</span></label>107 <span> 108 <input type="text" placeholder="Address" name="address[address]" required/>106 <label>Address <!-- <span class="required-sign">*</span> --></label> 107 <span> 108 <input type="text" placeholder="Address" name="address[address]" /> 109 109 <?php echo $this->get_error_wrapper('address'); ?> 110 110 </span> … … 117 117 </div> 118 118 <div class="form-group col-5 address-field-col"> 119 <label>City < span class="required-sign">*</span></label>120 <span> 121 <input type="text" placeholder="city" name="address[city]" required/>119 <label>City <!-- <span class="required-sign">*</span> --></label> 120 <span> 121 <input type="text" placeholder="city" name="address[city]" /> 122 122 <?php echo $this->get_error_wrapper('city'); ?> 123 123 </span> 124 124 </div> 125 125 <div class="form-group col-5"> 126 <label class="state">State < span class="required-sign">*</span></label>126 <label class="state">State <!-- <span class="required-sign">*</span> --></label> 127 127 <span> 128 128 <select 129 129 placeholder="Select States" 130 name="address[state_id]" id="address-state" class="select2" required>130 name="address[state_id]" id="address-state" class="select2"> 131 131 <?php foreach ($states as $key => $state) : ?> 132 132 <option value="<?php echo $state['id'] .'_'.$state['name']; ?>"><?php echo $state['name']; ?></option> … … 137 137 </div> 138 138 <div class="form-group col-5 address-field-col"> 139 <label>zip < span class="required-sign">*</span></label>140 <span> 141 <input type="text" class="number" placeholder="zip" name="address[zip]" maxLength="5" required/>139 <label>zip <!-- <span class="required-sign">*</span> --></label> 140 <span> 141 <input type="text" class="number" placeholder="zip" name="address[zip]" maxLength="5" /> 142 142 <?php echo $this->get_error_wrapper('zip'); ?> 143 143 </span> 144 144 </div> 145 145 <div class="form-group col-5"> 146 <label class="country">Country < span class="required-sign">*</span></label>147 <span> 148 <select name="address[country_id]" id="address-country" class="select2" required>146 <label class="country">Country <!-- <span class="required-sign">*</span> --></label> 147 <span> 148 <select name="address[country_id]" id="address-country" class="select2" > 149 149 <?php foreach ($countries as $key => $country) : ?> 150 150 <option value="<?php echo $country['id'] .'_'.$country['name']; ?>"><?php echo $country['name']; ?></option> … … 210 210 </div> 211 211 <div class="form-group"> 212 <label>Referred By < span class="required-sign">*</span></label>213 <span> 214 <select name="referred_by_id" class="jp-referral" required>212 <label>Referred By </label> 213 <span> 214 <select name="referred_by_id" class="jp-referral"> 215 215 <option></option> 216 216 <?php if($referrals): ?> -
contractor-contact-form-website-to-workflow-tool/trunk/customer-template.php
r1448321 r1691792 31 31 </span> --> 32 32 <input type="text" placeholder="(xxx) xxx-xxxx" name="phones[{{ index }}][number]" class="phones mask-select phone-number-field" aria-required="true" required /> 33 <input type="text" placeholder="Extension" name="phones[{{ index }}][ext]" class="extension-field number" maxlength="8" aria-required="true">33 <input type="text" placeholder="Extension" name="phones[{{ index }}][ext]" class="extension-field" maxlength="12" aria-required="true"> 34 34 </div> 35 35 <?php echo $this->get_error_wrapper('phones.{{ index }}.number'); ?> -
contractor-contact-form-website-to-workflow-tool/trunk/jobprogress.php
r1635945 r1691792 4 4 Description: This useful plugin is a website to workflow tool that allows contractors to drive leads directly from their own website form inquiries directly into their JobProgress workcenters. JobProgress is a Cloud based Business Management Platform for Home Improvement Contractors. With this useful plugin, you can drive customers directly from your website into your JobProgress workflow stages and begin to populate both customer and job related leads and prospects for immediate and mistake free follow-up. This is an automated Customer Relationship Management tool which will save you time and minimize mistakes. For more information about JobProgress, please visit our website. 5 5 Plugin URI: http://example.com 6 Version: 1.0 .26 Version: 1.0 7 7 Author: JobProgress 8 8 Author URI: http://www.jobprogress.com/ -
contractor-contact-form-website-to-workflow-tool/trunk/js/custom.js
r1502815 r1691792 4 4 setTimeout(function() { 5 5 $('#jp-message').slideUp(800); 6 console.log('Work');7 6 }, 4000); 8 7 }); … … 23 22 'required': true 24 23 }, 25 'email':{ 26 email: true 27 }, 24 'contact[0][last_name]': { 25 required: function(element){ 26 return $("input[name='contact[0][first_name]']").val()!="" && $('input[name="jp_customer_type2"]').is(':checked'); 27 } 28 }, 29 'contact[0][first_name]': { 30 required: function(element){ 31 return $("input[name='contact[0][last_name]']").val()!="" && $('input[name="jp_customer_type2"]').is(':checked') ; 32 } 33 }, 34 // 'email':{ 35 // email: true 36 // }, 28 37 'captcha': { 29 38 required: true, 30 39 remote: plugin_dir_url+"process.php" 31 40 }, 32 'address[country_id]': {33 required: true34 }41 // 'address[country_id]': { 42 // required: true 43 // } 35 44 }, 36 45 messages: { … … 73 82 }).on('change', function (e) { 74 83 var input = $(this).parent().find('.extension-field'); 75 if (e.currentTarget.value == "cell") {76 input.val(null);77 input.attr('disabled', true);78 } else {79 input.attr('disabled', false);80 }84 // if (e.currentTarget.value == "cell") { 85 // input.val(null); 86 // input.attr('disabled', true); 87 // } else { 88 // input.attr('disabled', false); 89 // } 81 90 }); 82 91 … … 85 94 }).on('change', function (e) { 86 95 var input = $(this).parent().find('.extension-field'); 87 if (e.currentTarget.value == "cell") {88 input.attr('disabled', true);89 } else {90 input.attr('disabled', false);91 }96 // if (e.currentTarget.value == "cell") { 97 // input.attr('disabled', true); 98 // } else { 99 // input.attr('disabled', false); 100 // } 92 101 93 102 if($.inArray('24', $(this).val()) > -1 ) { … … 169 178 }).on('change', function (e) { 170 179 var input = $(this).parent().find('.extension-field'); 171 if (e.currentTarget.value == "cell") {172 input.val(null);173 input.attr('disabled', true);174 } else {175 input.attr('disabled', false); 176 }180 // if (e.currentTarget.value == "cell") { 181 // input.val(null); 182 // input.attr('disabled', true); 183 // } else { 184 // input.attr('disabled', false); 185 // } 177 186 }); 178 187 -
contractor-contact-form-website-to-workflow-tool/trunk/readme.txt
r1502819 r1691792 4 4 Requires at least: 3.0.1 5 5 Tested up to: 4.5.3 6 Stable tag: 1.0. 26 Stable tag: 1.0.3 7 7 Tags: customer-manager 8 8 License: GPLv2 or later … … 20 20 21 21 22 22 23 == Changelog == 24 = 1.0.3 = 25 1. Change Fields validation as Web APP 26 23 27 = 1.0.2 = 24 1. Made Email Mandatory25 2. Add New Field Refferd By26 3. Add Captcha For Security Reason27 4. Made Address Mandatory28 1. Made Email Mandatory 29 2. Add New Field Refferd By 30 3. Add Captcha For Security Reason 31 4. Made Address Mandatory 28 32 29 33 = 1.0.1 =
Note: See TracChangeset
for help on using the changeset viewer.