Changeset 2984635
- Timestamp:
- 10/26/2023 09:04:31 PM (2 years ago)
- Location:
- codemonkeys-hipaa-forms/trunk
- Files:
-
- 8 edited
-
css/admin-style.css (modified) (1 diff)
-
css/style.css (modified) (1 diff)
-
enqueue.php (modified) (2 diffs)
-
hipaa-forms.php (modified) (1 diff)
-
includes/class-cm-hipaa.php (modified) (22 diffs)
-
js/admin-script.js (modified) (29 diffs)
-
js/script.js (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
codemonkeys-hipaa-forms/trunk/css/admin-style.css
r2958937 r2984635 1 1 /** 2 2 * Created by Spencer on 7/16/2018. 3 * V2.9. 83 * V2.9.9 4 4 */ 5 5 -
codemonkeys-hipaa-forms/trunk/css/style.css
r2958937 r2984635 1 1 /** 2 2 * Created by Spencer on 7/16/2018. 3 * V2.9. 83 * V2.9.9 4 4 */ 5 5 -
codemonkeys-hipaa-forms/trunk/enqueue.php
r2958937 r2984635 41 41 // ENQUEUE SCRIPT 42 42 wp_enqueue_script( 'jquery-form' ); 43 wp_enqueue_script( 'cmHipaaAdminBuggyFill', plugin_dir_url(__FILE__) . 'js/viewport-units-buggyfill.js', array('jquery'), '2.9. 8', true );44 wp_enqueue_script( 'cmHipaaAdminBuggyFillHack', plugin_dir_url(__FILE__) . 'js/viewport-units-buggyfill.hacks.js', array('jquery'), '2.9. 8', true );45 wp_enqueue_script( 'cmHipaaAdminScript', plugin_dir_url(__FILE__) . 'js/admin-script.js', array('jquery'), '2.9. 8', true );46 wp_enqueue_script( 'cm-hipaa-signature', plugin_dir_url(__FILE__) . 'js/jSignature/jSignature.min.noconflict.js', array('jquery'), '2.9. 8', true);47 wp_enqueue_script( 'cm-hipaa-jquery-print', plugin_dir_url(__FILE__) . 'js/printThis.js', array('jquery'), '2.9. 8', true);43 wp_enqueue_script( 'cmHipaaAdminBuggyFill', plugin_dir_url(__FILE__) . 'js/viewport-units-buggyfill.js', array('jquery'), '2.9.9', true ); 44 wp_enqueue_script( 'cmHipaaAdminBuggyFillHack', plugin_dir_url(__FILE__) . 'js/viewport-units-buggyfill.hacks.js', array('jquery'), '2.9.9', true ); 45 wp_enqueue_script( 'cmHipaaAdminScript', plugin_dir_url(__FILE__) . 'js/admin-script.js', array('jquery'), '2.9.9', true ); 46 wp_enqueue_script( 'cm-hipaa-signature', plugin_dir_url(__FILE__) . 'js/jSignature/jSignature.min.noconflict.js', array('jquery'), '2.9.9', true); 47 wp_enqueue_script( 'cm-hipaa-jquery-print', plugin_dir_url(__FILE__) . 'js/printThis.js', array('jquery'), '2.9.9', true); 48 48 }; 49 49 }; … … 74 74 75 75 // ENQUEUE CUSTOM JS 76 wp_enqueue_script( 'cmHipaaBuggyFill', plugin_dir_url(__FILE__) . 'js/viewport-units-buggyfill.js', array('jquery'), '2.9. 8', true );77 wp_enqueue_script( 'cmHipaaBuggyFillHack', plugin_dir_url(__FILE__) . 'js/viewport-units-buggyfill.hacks.js', array('jquery'), '2.9. 8', true );78 wp_enqueue_script('cm-hipaa-script', plugin_dir_url(__FILE__) . 'js/script.js', array('jquery'), '2.9. 8&time=' . time(), true);79 wp_enqueue_script('cm-hipaa-signature', plugin_dir_url(__FILE__) . 'js/jSignature/jSignature.min.noconflict.js', array('jquery'), '2.9. 8', true);76 wp_enqueue_script( 'cmHipaaBuggyFill', plugin_dir_url(__FILE__) . 'js/viewport-units-buggyfill.js', array('jquery'), '2.9.9', true ); 77 wp_enqueue_script( 'cmHipaaBuggyFillHack', plugin_dir_url(__FILE__) . 'js/viewport-units-buggyfill.hacks.js', array('jquery'), '2.9.9', true ); 78 wp_enqueue_script('cm-hipaa-script', plugin_dir_url(__FILE__) . 'js/script.js', array('jquery'), '2.9.9&time=' . time(), true); 79 wp_enqueue_script('cm-hipaa-signature', plugin_dir_url(__FILE__) . 'js/jSignature/jSignature.min.noconflict.js', array('jquery'), '2.9.9', true); 80 80 81 81 // CHECK IF HOMEPAGE -
codemonkeys-hipaa-forms/trunk/hipaa-forms.php
r2958937 r2984635 10 10 * Plugin URI: https://www.hipaaforms.online 11 11 * Description: HIPAA Compliant Forms 12 * Version: 2.9. 812 * Version: 2.9.9 13 13 * Author: Code Monkeys LLC 14 14 * Author URI: https://www.codemonkeysllc.com -
codemonkeys-hipaa-forms/trunk/includes/class-cm-hipaa.php
r2958937 r2984635 6 6 * Date: 10/24/2016 7 7 * Time: 4:24 PM 8 * Updated: 10/2 7/2022by Dan8 * Updated: 10/24/2023 by Dan 9 9 */ 10 10 … … 308 308 } 309 309 } else { 310 $this->error = 'API did not return a success message ';310 $this->error = 'API did not return a success message(1)'; 311 311 } 312 312 } 313 313 } 314 314 } else { 315 $this->error = 'API did not return a success message ';315 $this->error = 'API did not return a success message(2)'; 316 316 } 317 317 … … 366 366 $this->file_key = $data->file_key; 367 367 } else { 368 $this->error = 'API did not return a success message ';368 $this->error = 'API did not return a success message(3)'; 369 369 } 370 370 } 371 371 } 372 372 } else { 373 $this->error = 'API did not return a success message ';373 $this->error = 'API did not return a success message(4)'; 374 374 } 375 375 … … 1773 1773 </td> 1774 1774 <td> 1775 ' . stripslashes($formLocation) . '1775 ' . ((strlen(stripslashes($formLocation)) >= 20 ) ? substr(stripslashes($formLocation), 0, 16).'....' : stripslashes($formLocation) ) . ' 1776 1776 </td> 1777 1777 <td> 1778 ' . $formFirstName. '1778 ' . ((strlen(stripslashes($formFirstName)) >= 20 ) ? substr(stripslashes($formFirstName), 0, 16).'....' : stripslashes($formFirstName) ) . ' 1779 1779 </td> 1780 1780 <td> 1781 ' . $formLastName. '1781 ' . ((strlen(stripslashes($formLastName)) >= 20 ) ? substr(stripslashes($formLastName), 0, 16).'....' : stripslashes($formLastName) ) . ' 1782 1782 </td> 1783 1783 <td> … … 1974 1974 } else { 1975 1975 $results = array( 1976 'error' => 'API did not return a success message ',1977 'content' => 'API did not return a success message '1976 'error' => 'API did not return a success message(7)', 1977 'content' => 'API did not return a success message(8)' 1978 1978 ); 1979 1979 } … … 2253 2253 } else { 2254 2254 $results = array( 2255 'error' => 'API did not return a success message ',2256 'content' => 'API did not return a success message '2255 'error' => 'API did not return a success message(9)', 2256 'content' => 'API did not return a success message(10)' 2257 2257 ); 2258 2258 } … … 3427 3427 } else { 3428 3428 $results = array( 3429 'error' => 'API did not return a success message : ' . $success3429 'error' => 'API did not return a success message(11): ' . $success 3430 3430 ); 3431 3431 … … 4081 4081 } else { 4082 4082 $results = array( 4083 'error' => 'API did not return a success message ',4084 'content' => 'API did not return a success message '4083 'error' => 'API did not return a success message(12)', 4084 'content' => 'API did not return a success message(13)' 4085 4085 ); 4086 4086 } … … 4538 4538 } else { 4539 4539 $results = array( 4540 'error' => 'Support API did not return a success message .'4540 'error' => 'Support API did not return a success message(14).' 4541 4541 ); 4542 4542 } … … 4645 4645 } else { 4646 4646 $results = array( 4647 'error' => 'API Did Not Respond '4647 'error' => 'API Did Not Respond(15)' 4648 4648 ); 4649 4649 } … … 4763 4763 4764 4764 $output = json_decode(curl_exec($curl)); 4765 $http_code = curl_getinfo($curl, CURLINFO_HTTP_CODE); 4766 4767 $curlError = curl_error($curl); 4765 4768 4766 4769 // Close curl resource to free up system resources 4767 4770 curl_close($curl); 4768 4771 4769 if ( $output) {4772 if (is_array($output)) { 4770 4773 foreach ($output as $data) { 4771 4774 $error = ''; … … 4804 4807 } else { 4805 4808 $results = array( 4806 'error' => 'API did not return a success message ',4807 'content' => ''4809 'error' => 'API did not return a success message(16) http_code:'.$http_code, 4810 'content' => $output 4808 4811 ); 4809 4812 } … … 4891 4894 } else { 4892 4895 $results = array( 4893 'error' => 'API did not return a success message ',4896 'error' => 'API did not return a success message(17)', 4894 4897 'content' => '' 4895 4898 ); … … 5020 5023 } else { 5021 5024 $results = array( 5022 'error' => 'API did not return a success message '5025 'error' => 'API did not return a success message(18)' 5023 5026 ); 5024 5027 } … … 5158 5161 } else { 5159 5162 $results = array( 5160 'error' => 'API did not return a success message '5163 'error' => 'API did not return a success message(19)' 5161 5164 ); 5162 5165 } … … 5345 5348 } else { 5346 5349 $results = array( 5347 'error' => 'API did not return a success message '5350 'error' => 'API did not return a success message(20)' 5348 5351 ); 5349 5352 } … … 5416 5419 } else { 5417 5420 $results = array( 5418 'error' => 'API did not return a success message '5421 'error' => 'API did not return a success message(21)' 5419 5422 ); 5420 5423 } … … 5683 5686 } else { 5684 5687 $results = array( 5685 'error' => 'API did not return a success message ',5686 'content' => 'API did not return a success message '5688 'error' => 'API did not return a success message(22)', 5689 'content' => 'API did not return a success message(23)' 5687 5690 ); 5688 5691 } … … 5908 5911 } else { 5909 5912 $results = array( 5910 'error' => 'API did not return a success message ',5911 'content' => 'API did not return a success message '5913 'error' => 'API did not return a success message(24)', 5914 'content' => 'API did not return a success message(25)' 5912 5915 ); 5913 5916 } … … 6080 6083 } else { 6081 6084 $results = array( 6082 'error' => 'API did not return a success message '6085 'error' => 'API did not return a success message(26)' 6083 6086 ); 6084 6087 } … … 6258 6261 } else { 6259 6262 $results = array( 6260 'error' => 'API did not return a success message '6263 'error' => 'API did not return a success message(27)' 6261 6264 ); 6262 6265 } … … 6366 6369 } else { 6367 6370 $results = array( 6368 'error' => 'API did not return a success message '6371 'error' => 'API did not return a success message(28)' 6369 6372 ); 6370 6373 } -
codemonkeys-hipaa-forms/trunk/js/admin-script.js
r2958937 r2984635 1 1 /** 2 2 * Created by Spencer on 7/16/2018. 3 * Updated by Dan on 7/27/2022. 4 * V2.9.8 5 * Updated: 09/09/2022 by Dan 3 * V2.9.9 4 * Updated: 10/24/2023 by Dan 6 5 */ 7 6 … … 258 257 }, 259 258 success: function (data) { 260 var resultData = JSON.parse(data); 259 try{ 260 var resultData = JSON.parse(data); 261 }catch (e) { 262 console.error('JSON.parse ERROR:',e); 263 console.log(data); 264 } 261 265 262 266 if (resultData.success === 'success' && resultData.product === 'basic') { … … 430 434 }, 431 435 success: function (data) { 432 var updateData = JSON.parse(data); 436 try{ 437 var updateData = JSON.parse(data); 438 }catch (e) { 439 console.error('JSON.parse ERROR:',e); 440 console.log(data); 441 } 433 442 var message; 434 443 … … 563 572 }, 564 573 success: function (data) { 565 var pdfData = JSON.parse(data); 574 try{ 575 var pdfData = JSON.parse(data); 576 }catch (e) { 577 console.error('JSON.parse ERROR:',e); 578 console.log(data); 579 } 566 580 567 581 if(pdfData.error) { … … 642 656 }, 643 657 success: function (data) { 644 var returnData = JSON.parse(data); 658 try{ 659 var returnData = JSON.parse(data); 660 }catch (e) { 661 console.error('JSON.parse ERROR:',e); 662 console.log(data); 663 } 645 664 646 665 if(returnData.success === 'success') { … … 678 697 }, 679 698 success: function (data) { 680 var returnData = JSON.parse(data); 699 try{ 700 var returnData = JSON.parse(data); 701 }catch (e) { 702 console.error('JSON.parse ERROR:',e); 703 console.log(data); 704 } 681 705 682 706 if(returnData.success === 'success') { … … 728 752 }, 729 753 success: function (data) { 730 var returnData = JSON.parse(data); 754 try{ 755 var returnData = JSON.parse(data); 756 }catch (e) { 757 console.error('JSON.parse ERROR:',e); 758 console.log(data); 759 } 731 760 732 761 if(returnData.success === 'success') { … … 813 842 }, 814 843 success: function (data) { 815 var resultData = JSON.parse(data); 844 try{ 845 var resultData = JSON.parse(data); 846 }catch (e) { 847 console.error('JSON.parse ERROR:',e); 848 console.log(data); 849 } 816 850 817 851 jQuery('.cm-baa-modal-form').html(resultData.form); … … 950 984 }, 951 985 success: function (data) { 952 var resultData = JSON.parse(data); 986 try{ 987 var resultData = JSON.parse(data); 988 }catch (e) { 989 console.error('JSON.parse ERROR:',e); 990 console.log(data); 991 } 953 992 954 993 if(resultData.error) { … … 1155 1194 }, 1156 1195 success: function (data) { 1157 var returnData = JSON.parse(data); 1196 try{ 1197 var returnData = JSON.parse(data); 1198 }catch (e) { 1199 console.error('JSON.parse ERROR:',e); 1200 console.log(data); 1201 } 1158 1202 1159 1203 if(returnData.success === 'success') { … … 1317 1361 var enabledFormsSettings = enabledFormsSettingsInput.val(); 1318 1362 if(enabledFormsSettings) { 1319 enabledFormsSettings = JSON.parse(enabledFormsSettings); 1363 try{ 1364 enabledFormsSettings = JSON.parse(enabledFormsSettings); 1365 }catch (e) { 1366 console.log(enabledFormsSettings); 1367 console.log('JSON.parse ERROR:',e); 1368 1369 } 1320 1370 } else { 1321 1371 enabledFormsSettings = []; … … 1618 1668 }, 1619 1669 success: function (data) { 1620 var statusData = JSON.parse(data); 1670 try{ 1671 var statusData = JSON.parse(data); 1672 }catch (e) { 1673 console.error('JSON.parse ERROR:',e); 1674 console.log(data); 1675 } 1621 1676 1622 1677 if(statusData.success === 'success') { … … 1653 1708 }, 1654 1709 success: function (data) { 1655 var statusData = JSON.parse(data); 1710 try{ 1711 var statusData = JSON.parse(data); 1712 }catch (e) { 1713 console.error('JSON.parse ERROR:',e); 1714 console.log(data); 1715 } 1656 1716 1657 1717 if(statusData.success === 'success') { … … 1683 1743 resultData = JSON.parse(data); 1684 1744 } catch (e) { 1745 console.error('JSON.parse ERROR:',e); 1685 1746 console.log(data); 1686 1747 noticeEle.append(data); … … 1738 1799 }, 1739 1800 success:function(data) { 1740 var resultData = JSON.parse(data); 1801 try{ 1802 var resultData = JSON.parse(data); 1803 }catch (e) { 1804 console.error('JSON.parse ERROR:',e); 1805 console.log(data); 1806 } 1741 1807 1742 1808 if(resultData.error && resultData.content) { … … 1838 1904 }, 1839 1905 success:function(data) { 1840 var resultData = JSON.parse(data); 1906 try{ 1907 var resultData = JSON.parse(data); 1908 }catch (e) { 1909 console.error('JSON.parse ERROR:',e); 1910 console.log(data); 1911 } 1841 1912 1842 1913 if(resultData.error && resultData.content) { … … 1915 1986 }, 1916 1987 success:function(data) { 1917 var resultData = JSON.parse(data); 1988 try{ 1989 var resultData = JSON.parse(data); 1990 }catch (e) { 1991 console.error('JSON.parse ERROR:',e); 1992 console.log(data); 1993 } 1918 1994 1919 1995 if(resultData.error) { … … 1969 2045 }, 1970 2046 success:function(data) { 1971 var resultData = JSON.parse(data); 2047 try{ 2048 var resultData = JSON.parse(data); 2049 }catch (e) { 2050 console.error('JSON.parse ERROR:',e); 2051 console.log(data); 2052 } 1972 2053 1973 2054 if(resultData.error) { … … 2059 2140 }, 2060 2141 success:function(data) { 2061 var resultData = JSON.parse(data); 2142 try{ 2143 var resultData = JSON.parse(data); 2144 }catch (e) { 2145 console.error('JSON.parse ERROR:',e); 2146 console.log(data); 2147 } 2062 2148 2063 2149 jQuery('.cm-hipaa-forms-progress-wrapper').remove(); … … 2161 2247 }, 2162 2248 success: function (data) { 2163 var resultData = JSON.parse(data); 2249 try{ 2250 var resultData = JSON.parse(data); 2251 }catch (e) { 2252 console.error('JSON.parse ERROR:',e); 2253 console.log(data); 2254 } 2164 2255 2165 2256 if(resultData.error) { … … 2196 2287 }, 2197 2288 success: function (data) { 2198 var ticketsData = JSON.parse(data); 2289 try{ 2290 var ticketsData = JSON.parse(data); 2291 }catch (e) { 2292 console.error('JSON.parse ERROR:',e); 2293 console.log(data); 2294 } 2199 2295 var tickets; 2200 2296 if(ticketsData.success && ticketsData.success === 'success') { … … 2265 2361 }, 2266 2362 success: function (data) { 2267 var noteData = JSON.parse(data); 2363 try{ 2364 var noteData = JSON.parse(data); 2365 }catch (e) { 2366 console.error('JSON.parse ERROR:',e); 2367 console.log(data); 2368 } 2268 2369 2269 2370 if(noteData.success === 'success') { … … 2299 2400 }, 2300 2401 success: function (data) { 2301 var notesData = JSON.parse(data); 2402 try{ 2403 var notesData = JSON.parse(data); 2404 }catch (e) { 2405 console.error('JSON.parse ERROR:',e); 2406 console.log(data); 2407 } 2302 2408 2303 2409 if(notesData) { … … 2329 2435 }, 2330 2436 success: function (data) { 2331 var exportData = JSON.parse(data); 2437 try{ 2438 var exportData = JSON.parse(data); 2439 }catch (e) { 2440 console.error('JSON.parse ERROR:',e); 2441 console.log(data); 2442 } 2332 2443 var dataError = exportData.error; 2333 2444 … … 2454 2565 }, 2455 2566 success: function (data) { 2456 var exportData = JSON.parse(data); 2567 try{ 2568 var exportData = JSON.parse(data); 2569 }catch (e) { 2570 console.error('JSON.parse ERROR:',e); 2571 console.log(data); 2572 } 2457 2573 var formId = exportData.form_id; 2458 2574 var formNotes = exportData.notes; … … 2539 2655 }, 2540 2656 success: function (data) { 2541 var exportData = JSON.parse(data); 2657 try{ 2658 var exportData = JSON.parse(data); 2659 }catch (e) { 2660 console.error('JSON.parse ERROR:',e); 2661 console.log(data); 2662 } 2542 2663 var formId = exportData.form_id; 2543 2664 var formHistory = exportData.history; … … 2650 2771 }, 2651 2772 success: function (data) { 2652 var exportData = JSON.parse(data); 2773 try{ 2774 var exportData = JSON.parse(data); 2775 }catch (e) { 2776 console.error('JSON.parse ERROR:',e); 2777 console.log(data); 2778 } 2653 2779 var formsSet = exportData.forms; 2654 2780 … … 2942 3068 }, 2943 3069 success: function (data) { 2944 const results = JSON.parse(data); 3070 try{ 3071 var results = JSON.parse(data); 3072 }catch (e) { 3073 console.error('JSON.parse ERROR:',e); 3074 console.log(data); 3075 } 2945 3076 2946 3077 if(results.success === 'success') { … … 3005 3136 let resultData; 3006 3137 if(result) { 3007 resultData = JSON.parse(result); 3138 try{ 3139 resultData = JSON.parse(result); 3140 }catch (e) { 3141 console.error('JSON.parse ERROR:',e); 3142 console.log(result); 3143 } 3008 3144 } 3009 3145 -
codemonkeys-hipaa-forms/trunk/js/script.js
r2958937 r2984635 2 2 * Created by Spencer on 7/16/2018. 3 3 * Updated by Dan on 7/14/2023. 4 * V2.9. 84 * V2.9.9 5 5 */ 6 6 -
codemonkeys-hipaa-forms/trunk/readme.txt
r2958937 r2984635 4 4 Requires at least: 5.4 5 5 Tested up to: 6.3.5 6 Stable tag: 2.9. 86 Stable tag: 2.9.9 7 7 License: GPLv2 8 8 … … 186 186 187 187 == Changelog == 188 V2.9.9 189 - Added slashes to API to make admin form filter work 190 - Added numbers to console errors 191 - Wrapped JSON parse in try catch 192 - Truncated location, first and last name 193 188 194 V2.9.8 189 195 - Added fix to rebuild missing export data during export
Note: See TracChangeset
for help on using the changeset viewer.