Version Description
/ 08.04.2021 = * Fix for file_upload
Download this release
Release Info
Developer | supsystic.com |
Plugin | Contact Form by Supsystic |
Version | 1.7.15 |
Comparing to | |
See all releases |
Code changes from version 1.7.14 to 1.7.15
- cfs.php +1 -1
- config.php +1 -1
- modules/forms/controller.php +50 -2
- modules/forms/js/admin.forms.contacts.list.js +11 -11
- modules/forms/models/forms.php +27 -7
- modules/forms/views/forms.php +2 -3
- modules/options/mod.php +7 -8
- readme.txt +3 -1
cfs.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Plugin Name: Contact Form by Supsystic
|
4 |
* Description: Contact Form Builder with drag-and-drop editor to create responsive, mobile ready contact forms in a second. Custom fields and contact form templates
|
5 |
-
* Version: 1.7.
|
6 |
* Author: supsystic.com
|
7 |
* Author URI: https://supsystic.com
|
8 |
* Text Domain: contact-form-by-supsystic
|
2 |
/**
|
3 |
* Plugin Name: Contact Form by Supsystic
|
4 |
* Description: Contact Form Builder with drag-and-drop editor to create responsive, mobile ready contact forms in a second. Custom fields and contact form templates
|
5 |
+
* Version: 1.7.15
|
6 |
* Author: supsystic.com
|
7 |
* Author URI: https://supsystic.com
|
8 |
* Text Domain: contact-form-by-supsystic
|
config.php
CHANGED
@@ -49,7 +49,7 @@
|
|
49 |
define('CFS_EOL', "\n");
|
50 |
|
51 |
define('CFS_PLUGIN_INSTALLED', true);
|
52 |
-
define('CFS_VERSION', '1.7.
|
53 |
define('CFS_USER', 'user');
|
54 |
|
55 |
define('CFS_CLASS_PREFIX', 'cfsc');
|
49 |
define('CFS_EOL', "\n");
|
50 |
|
51 |
define('CFS_PLUGIN_INSTALLED', true);
|
52 |
+
define('CFS_VERSION', '1.7.15');
|
53 |
define('CFS_USER', 'user');
|
54 |
|
55 |
define('CFS_CLASS_PREFIX', 'cfsc');
|
modules/forms/controller.php
CHANGED
@@ -12,6 +12,52 @@ class formsControllerCfs extends controllerCfs {
|
|
12 |
$res->pushError ($this->getModel()->getErrors());
|
13 |
return $res->ajaxExec();
|
14 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
protected function _prepareListForTbl($data) {
|
16 |
if(!empty($data)) {
|
17 |
if($this->_forceModelName == 'contacts') {
|
@@ -421,7 +467,9 @@ class formsControllerCfs extends controllerCfs {
|
|
421 |
$page = (int) sanitize_text_field(reqCfs::getVar('page'));
|
422 |
$rowsLimit = (int) sanitize_text_field(reqCfs::getVar('rows'));
|
423 |
$search = reqCfs::getVar('search');
|
|
|
424 |
$search = !empty($search['text_like']) ? sanitize_text_field($search['text_like']) : '';
|
|
|
425 |
// Get total pages count for current request
|
426 |
$totalCount = $model->getContactsTotalCountBySearch($search);
|
427 |
$totalPages = 0;
|
@@ -435,9 +483,9 @@ class formsControllerCfs extends controllerCfs {
|
|
435 |
$limitStart = $rowsLimit * $page - $rowsLimit; // do not put $limit*($page - 1)
|
436 |
if($limitStart < 0) $limitStart = 0;
|
437 |
|
438 |
-
$data = $model->getContactsListForTblBySearch($search, $limitStart, $rowsLimit);
|
439 |
|
440 |
-
$data = $this->
|
441 |
$res->addData('page', $page);
|
442 |
$res->addData('total', $totalPages);
|
443 |
$res->addData('rows', $data);
|
12 |
$res->pushError ($this->getModel()->getErrors());
|
13 |
return $res->ajaxExec();
|
14 |
}
|
15 |
+
protected function _prepareListForTblContacts($data) {
|
16 |
+
if(!empty($data)) {
|
17 |
+
$fieldsHtml = reqCfs::getVar('contact_fields_to_html');
|
18 |
+
foreach($data as $i => $v) {
|
19 |
+
$viewLinkSet = false;
|
20 |
+
if (!empty($data[ $i ]['fields']) && !is_array($data[ $i ]['fields'])) {
|
21 |
+
$data[ $i ]['fields'] = unserialize(base64_decode($data[ $i ]['fields']));
|
22 |
+
}
|
23 |
+
if(isset($data[ $i ]['fields']) && !empty($data[ $i ]['fields'])) {
|
24 |
+
foreach($data[ $i ]['fields'] as $fK => $fV) {
|
25 |
+
$fieldVal = $fV;
|
26 |
+
if(!empty($fieldVal) && is_array($fieldVal)) {
|
27 |
+
$fieldVal = implode(', ', $fieldVal);
|
28 |
+
}
|
29 |
+
if(!empty($fieldVal) && !$viewLinkSet) {
|
30 |
+
$data[ $i ][ 'user_field_'. $fK ] = '<a href="'. $data[ $i ]['id']. '" class="cfsFormContactPrevLnk">'. $fieldVal. ' <i class="fa fa-search"></i></a>';
|
31 |
+
$viewLinkSet = true;
|
32 |
+
} else {
|
33 |
+
$html = !empty($fieldsHtml) && isset($fieldsHtml[ $fK ]) ? $fieldsHtml[ $fK ] : false;
|
34 |
+
switch($html) {
|
35 |
+
case 'file':
|
36 |
+
if(frameCfs::_()->getModule('add_fields')) {
|
37 |
+
$idPubHash = explode('|', $fieldVal);
|
38 |
+
$id = is_numeric($idPubHash[ 0 ]) ? (int) $idPubHash[ 0 ] : false;
|
39 |
+
if($id) {
|
40 |
+
global $wpdb;
|
41 |
+
$file = $wpdb->get_row($wpdb->prepare("SELECT * FROM {$wpdb->prefix}cfs_files WHERE id = %s", $id), ARRAY_A);
|
42 |
+
if(!empty($file)) {
|
43 |
+
$data[ $i ][ 'user_field_'. $fK ] = '<a href="'. frameCfs::_()->getModule('add_fields')->getFileUrl($file).'"><i class="fa fa-cloud-download"></i> '. __('Download', CFS_LANG_CODE). '</a>';
|
44 |
+
}
|
45 |
+
}
|
46 |
+
}
|
47 |
+
break;
|
48 |
+
default:
|
49 |
+
$data[ $i ][ 'user_field_'. $fK ] = $fieldVal;
|
50 |
+
break;
|
51 |
+
}
|
52 |
+
|
53 |
+
}
|
54 |
+
}
|
55 |
+
unset( $data[ $i ]['fields'] );
|
56 |
+
}
|
57 |
+
}
|
58 |
+
}
|
59 |
+
return $data;
|
60 |
+
}
|
61 |
protected function _prepareListForTbl($data) {
|
62 |
if(!empty($data)) {
|
63 |
if($this->_forceModelName == 'contacts') {
|
467 |
$page = (int) sanitize_text_field(reqCfs::getVar('page'));
|
468 |
$rowsLimit = (int) sanitize_text_field(reqCfs::getVar('rows'));
|
469 |
$search = reqCfs::getVar('search');
|
470 |
+
$formId = !empty($search['form_id']) ? sanitize_text_field($search['form_id']) : '';
|
471 |
$search = !empty($search['text_like']) ? sanitize_text_field($search['text_like']) : '';
|
472 |
+
|
473 |
// Get total pages count for current request
|
474 |
$totalCount = $model->getContactsTotalCountBySearch($search);
|
475 |
$totalPages = 0;
|
483 |
$limitStart = $rowsLimit * $page - $rowsLimit; // do not put $limit*($page - 1)
|
484 |
if($limitStart < 0) $limitStart = 0;
|
485 |
|
486 |
+
$data = $model->getContactsListForTblBySearch($search, $limitStart, $rowsLimit, $formId);
|
487 |
|
488 |
+
$data = $this->_prepareListForTblContacts( $data );
|
489 |
$res->addData('page', $page);
|
490 |
$res->addData('total', $totalPages);
|
491 |
$res->addData('rows', $data);
|
modules/forms/js/admin.forms.contacts.list.js
CHANGED
@@ -11,12 +11,12 @@ jQuery(document).ready(function(){
|
|
11 |
contactFieldsToHtml[ key ] = cfsFormFields[ key ].html;
|
12 |
}
|
13 |
}
|
14 |
-
jQuery('#'+ tblId).jqGrid({
|
15 |
url: cfsTblDataUrl
|
16 |
, datatype: 'json'
|
17 |
, autowidth: true
|
18 |
, shrinkToFit: true
|
19 |
-
, colNames: colNames
|
20 |
, colModel: colModel
|
21 |
, postData: {
|
22 |
search: {
|
@@ -33,7 +33,7 @@ jQuery(document).ready(function(){
|
|
33 |
, sortorder: 'desc'
|
34 |
, jsonReader: { repeatitems : false, id: '0' }
|
35 |
, caption: toeLangCfs('Current Form Contacts')
|
36 |
-
, height: '100%'
|
37 |
, emptyrecords: toeLangCfs('You have no Form Contactss for now.')
|
38 |
, multiselect: true
|
39 |
, onSelectRow: function(rowid, e, event) {
|
@@ -56,8 +56,8 @@ jQuery(document).ready(function(){
|
|
56 |
}
|
57 |
cfsCheckUpdate(jQuery(this).find('tr:eq('+rowid+')').find('input[type=checkbox].cbox'));
|
58 |
cfsCheckUpdate('#cb_'+ tblId);
|
59 |
-
if(selectedRowIds
|
60 |
-
&& selectedRowIds.length == 1
|
61 |
&& jQuery(event.target).attr('aria-describedby') != tblId+ '_cb'
|
62 |
) { // It was simple click on the row, not on checkbox
|
63 |
var contactId = parseInt( jQuery('#'+ tblId).jqGrid ('getCell', selectedRowIds[ 0 ], 'id') );
|
@@ -117,17 +117,17 @@ jQuery(document).ready(function(){
|
|
117 |
// Fallback for case if library was not loaded
|
118 |
if(!jQuery.fn.chosen) {
|
119 |
jQuery.fn.chosen = function() {
|
120 |
-
|
121 |
};
|
122 |
}
|
123 |
jQuery('.chosen').chosen({
|
124 |
disable_search_threshold: 10
|
125 |
});
|
126 |
-
|
127 |
jQuery('#'+ tblId+ 'EmptyMsg').insertAfter(jQuery('#'+ tblId+ '').parent());
|
128 |
jQuery('#'+ tblId+ '').jqGrid('navGrid', '#'+ tblId+ 'Nav', {edit: false, add: false, del: false});
|
129 |
jQuery('#cb_'+ tblId+ '').change(function(){
|
130 |
-
jQuery(this).attr('checked')
|
131 |
? jQuery('#cfsFormContactsRemoveGroupBtn').removeAttr('disabled')
|
132 |
: jQuery('#cfsFormContactsRemoveGroupBtn').attr('disabled', 'disabled');
|
133 |
});
|
@@ -172,14 +172,14 @@ function cfsFormContactPrev( id, lnk ) {
|
|
172 |
|
173 |
if(typeof(res.data.contact.fields[ fieldName ]) !== 'undefined') {
|
174 |
var $newRow = $rowEx.clone().removeAttr('id').appendTo( $shell )
|
175 |
-
, fieldLabel = res.data.form_fields[ i ].label
|
176 |
? res.data.form_fields[ i ].label
|
177 |
: res.data.form_fields[ i ].placeholder
|
178 |
, fieldVal = res.data.contact.fields[ fieldName ];
|
179 |
if(typeof(fieldVal) !== 'string' && fieldVal.join) {
|
180 |
fieldVal = fieldVal.join(', ');
|
181 |
}
|
182 |
-
console.log(fieldVal, typeof(fieldVal));
|
183 |
$newRow.find('.cfsFieldLabel').html( fieldLabel );
|
184 |
$newRow.find('.cfsFieldValue').html( fieldVal );
|
185 |
}
|
@@ -213,7 +213,7 @@ function _cfsGetContactDetailsWnd() {
|
|
213 |
, width: 540
|
214 |
, height: 200
|
215 |
, open: function() {
|
216 |
-
|
217 |
}
|
218 |
});
|
219 |
}
|
11 |
contactFieldsToHtml[ key ] = cfsFormFields[ key ].html;
|
12 |
}
|
13 |
}
|
14 |
+
jQuery('#'+ tblId).jqGrid({
|
15 |
url: cfsTblDataUrl
|
16 |
, datatype: 'json'
|
17 |
, autowidth: true
|
18 |
, shrinkToFit: true
|
19 |
+
, colNames: colNames
|
20 |
, colModel: colModel
|
21 |
, postData: {
|
22 |
search: {
|
33 |
, sortorder: 'desc'
|
34 |
, jsonReader: { repeatitems : false, id: '0' }
|
35 |
, caption: toeLangCfs('Current Form Contacts')
|
36 |
+
, height: '100%'
|
37 |
, emptyrecords: toeLangCfs('You have no Form Contactss for now.')
|
38 |
, multiselect: true
|
39 |
, onSelectRow: function(rowid, e, event) {
|
56 |
}
|
57 |
cfsCheckUpdate(jQuery(this).find('tr:eq('+rowid+')').find('input[type=checkbox].cbox'));
|
58 |
cfsCheckUpdate('#cb_'+ tblId);
|
59 |
+
if(selectedRowIds
|
60 |
+
&& selectedRowIds.length == 1
|
61 |
&& jQuery(event.target).attr('aria-describedby') != tblId+ '_cb'
|
62 |
) { // It was simple click on the row, not on checkbox
|
63 |
var contactId = parseInt( jQuery('#'+ tblId).jqGrid ('getCell', selectedRowIds[ 0 ], 'id') );
|
117 |
// Fallback for case if library was not loaded
|
118 |
if(!jQuery.fn.chosen) {
|
119 |
jQuery.fn.chosen = function() {
|
120 |
+
|
121 |
};
|
122 |
}
|
123 |
jQuery('.chosen').chosen({
|
124 |
disable_search_threshold: 10
|
125 |
});
|
126 |
+
|
127 |
jQuery('#'+ tblId+ 'EmptyMsg').insertAfter(jQuery('#'+ tblId+ '').parent());
|
128 |
jQuery('#'+ tblId+ '').jqGrid('navGrid', '#'+ tblId+ 'Nav', {edit: false, add: false, del: false});
|
129 |
jQuery('#cb_'+ tblId+ '').change(function(){
|
130 |
+
jQuery(this).attr('checked')
|
131 |
? jQuery('#cfsFormContactsRemoveGroupBtn').removeAttr('disabled')
|
132 |
: jQuery('#cfsFormContactsRemoveGroupBtn').attr('disabled', 'disabled');
|
133 |
});
|
172 |
|
173 |
if(typeof(res.data.contact.fields[ fieldName ]) !== 'undefined') {
|
174 |
var $newRow = $rowEx.clone().removeAttr('id').appendTo( $shell )
|
175 |
+
, fieldLabel = res.data.form_fields[ i ].label
|
176 |
? res.data.form_fields[ i ].label
|
177 |
: res.data.form_fields[ i ].placeholder
|
178 |
, fieldVal = res.data.contact.fields[ fieldName ];
|
179 |
if(typeof(fieldVal) !== 'string' && fieldVal.join) {
|
180 |
fieldVal = fieldVal.join(', ');
|
181 |
}
|
182 |
+
//console.log(fieldVal, typeof(fieldVal));
|
183 |
$newRow.find('.cfsFieldLabel').html( fieldLabel );
|
184 |
$newRow.find('.cfsFieldValue').html( fieldVal );
|
185 |
}
|
213 |
, width: 540
|
214 |
, height: 200
|
215 |
, open: function() {
|
216 |
+
|
217 |
}
|
218 |
});
|
219 |
}
|
modules/forms/models/forms.php
CHANGED
@@ -10,6 +10,14 @@ class formsModelCfs extends modelCfs {
|
|
10 |
public function getLastForm() {
|
11 |
return $this->_lastForm;
|
12 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
// public function getAllForms() {
|
14 |
// return $this->addWhere('original_id != 0 AND ab_id = 0')->getFromTbl();
|
15 |
// }
|
@@ -608,17 +616,29 @@ class formsModelCfs extends modelCfs {
|
|
608 |
);
|
609 |
return $count;
|
610 |
}
|
611 |
-
public function getContactsListForTblBySearch($search, $limitStart, $rowsLimit) {
|
612 |
global $wpdb;
|
613 |
if (!empty($search)) {
|
614 |
-
$
|
615 |
-
|
616 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
617 |
}
|
618 |
if (empty($search)) {
|
619 |
-
$
|
620 |
-
|
621 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
622 |
}
|
623 |
return $data;
|
624 |
}
|
10 |
public function getLastForm() {
|
11 |
return $this->_lastForm;
|
12 |
}
|
13 |
+
public function getAllFromTbl() {
|
14 |
+
global $wpdb;
|
15 |
+
$allForms = $wpdb->get_results("SELECT * FROM {$wpdb->prefix}cfs_forms", ARRAY_A);
|
16 |
+
foreach ($allForms as $key => $forms) {
|
17 |
+
$allForms[$key] = $this->_afterGetFromTbl($forms);
|
18 |
+
}
|
19 |
+
return $allForms;
|
20 |
+
}
|
21 |
// public function getAllForms() {
|
22 |
// return $this->addWhere('original_id != 0 AND ab_id = 0')->getFromTbl();
|
23 |
// }
|
616 |
);
|
617 |
return $count;
|
618 |
}
|
619 |
+
public function getContactsListForTblBySearch($search, $limitStart, $rowsLimit, $formId) {
|
620 |
global $wpdb;
|
621 |
if (!empty($search)) {
|
622 |
+
if (!empty($formId)) {
|
623 |
+
$data = $wpdb->get_results(
|
624 |
+
"SELECT id, form_id, fields, ip, url, date_created FROM {$wpdb->prefix}cfs_contacts WHERE " . $wpdb->prepare("form_id = %s AND id = %s OR ip = %s ORDER BY id ASC LIMIT %1s,%1s", $formId, $search, $search, (int) $limitStart, (int) $rowsLimit), ARRAY_A
|
625 |
+
);
|
626 |
+
} else {
|
627 |
+
$data = $wpdb->get_results(
|
628 |
+
"SELECT id, form_id, fields, ip, url, date_created FROM {$wpdb->prefix}cfs_contacts WHERE form_id != 0 AND " . $wpdb->prepare("id = %s OR ip = %s OR form_id = %s ORDER BY id ASC LIMIT %1s,%1s", $search, $search, $search, (int) $limitStart, (int) $rowsLimit), ARRAY_A
|
629 |
+
);
|
630 |
+
}
|
631 |
}
|
632 |
if (empty($search)) {
|
633 |
+
if (!empty($formId)) {
|
634 |
+
$data = $wpdb->get_results(
|
635 |
+
"SELECT id, form_id, fields, ip, url, date_created FROM {$wpdb->prefix}cfs_contacts WHERE form_id != 0 " . $wpdb->prepare(" AND form_id = %s ORDER BY id ASC LIMIT %1s,%1s", $formId, (int) $limitStart, (int) $rowsLimit), ARRAY_A
|
636 |
+
);
|
637 |
+
} else {
|
638 |
+
$data = $wpdb->get_results(
|
639 |
+
"SELECT id, form_id, fields, ip, url, date_created FROM {$wpdb->prefix}cfs_contacts WHERE form_id != 0 " . $wpdb->prepare("ORDER BY id ASC LIMIT %1s,%1s", (int) $limitStart, (int) $rowsLimit), ARRAY_A
|
640 |
+
);
|
641 |
+
}
|
642 |
}
|
643 |
return $data;
|
644 |
}
|
modules/forms/views/forms.php
CHANGED
@@ -772,8 +772,7 @@ class formsViewCfs extends viewCfs {
|
|
772 |
frameCfs::_()->addScript('admin.forms', $this->getModule()->getModPath(). 'js/admin.forms.js');
|
773 |
frameCfs::_()->addScript('admin.forms.contacts.list', $this->getModule()->getModPath(). 'js/admin.forms.contacts.list.js');
|
774 |
frameCfs::_()->addJSVar('admin.forms.contacts.list', 'cfsTblDataUrl', uriCfs::mod('forms', 'getContactsListForTbl', array('reqType' => 'ajax', 'fid' => $fid)));
|
775 |
-
|
776 |
-
$allForms = $this->getModel()->getFromTbl();
|
777 |
$allFormsForSelect = array();
|
778 |
$formsFields = array();
|
779 |
if(!empty($allForms)) {
|
@@ -798,7 +797,7 @@ class formsViewCfs extends viewCfs {
|
|
798 |
}
|
799 |
}
|
800 |
frameCfs::_()->addJSVar('admin.forms.contacts.list', 'cfsFormFields', $formsFields);
|
801 |
-
|
802 |
$this->assign('addNewLink', frameCfs::_()->getModule('options')->getTabUrl('forms_add_new'));
|
803 |
$this->assign('allFormsForSelect', $allFormsForSelect);
|
804 |
$this->assign('fid', $fid);
|
772 |
frameCfs::_()->addScript('admin.forms', $this->getModule()->getModPath(). 'js/admin.forms.js');
|
773 |
frameCfs::_()->addScript('admin.forms.contacts.list', $this->getModule()->getModPath(). 'js/admin.forms.contacts.list.js');
|
774 |
frameCfs::_()->addJSVar('admin.forms.contacts.list', 'cfsTblDataUrl', uriCfs::mod('forms', 'getContactsListForTbl', array('reqType' => 'ajax', 'fid' => $fid)));
|
775 |
+
$allForms = $this->getModel('forms')->getAllFromTbl();
|
|
|
776 |
$allFormsForSelect = array();
|
777 |
$formsFields = array();
|
778 |
if(!empty($allForms)) {
|
797 |
}
|
798 |
}
|
799 |
frameCfs::_()->addJSVar('admin.forms.contacts.list', 'cfsFormFields', $formsFields);
|
800 |
+
|
801 |
$this->assign('addNewLink', frameCfs::_()->getModule('options')->getTabUrl('forms_add_new'));
|
802 |
$this->assign('allFormsForSelect', $allFormsForSelect);
|
803 |
$this->assign('fid', $fid);
|
modules/options/mod.php
CHANGED
@@ -3,7 +3,7 @@ class optionsCfs extends moduleCfs {
|
|
3 |
private $_tabs = array();
|
4 |
private $_options = array();
|
5 |
private $_optionsToCategoires = array(); // For faster search
|
6 |
-
|
7 |
public function init() {
|
8 |
//dispatcherCfs::addAction('afterModulesInit', array($this, 'initAllOptValues'));
|
9 |
add_action('init', array($this, 'initAllOptValues'), 99); // It should be init after all languages was inited (frame::connectLang)
|
@@ -55,7 +55,7 @@ class optionsCfs extends moduleCfs {
|
|
55 |
public function getTabs() {
|
56 |
if(empty($this->_tabs)) {
|
57 |
$this->_tabs = dispatcherCfs::applyFilters('mainAdminTabs', array(
|
58 |
-
//'main_page' => array('label' => __('Main Page', CFS_LANG_CODE), 'callback' => array($this, 'getTabContent'), 'wp_icon' => 'dashicons-admin-home', 'sort_order' => 0),
|
59 |
));
|
60 |
foreach($this->_tabs as $tabKey => $tab) {
|
61 |
if(!isset($this->_tabs[ $tabKey ]['url'])) {
|
@@ -84,7 +84,7 @@ class optionsCfs extends moduleCfs {
|
|
84 |
}
|
85 |
public function getActiveTab() {
|
86 |
$reqTab = reqCfs::getVar('tab');
|
87 |
-
return empty($reqTab) ? 'forms' : $reqTab;
|
88 |
}
|
89 |
public function getTabUrl($tab = '', $params = array()) {
|
90 |
static $mainUrl;
|
@@ -128,19 +128,19 @@ class optionsCfs extends moduleCfs {
|
|
128 |
'access_roles' => array('label' => __('User role can use plugin', CFS_LANG_CODE), 'desc' => __('User with next roles will have access to whole plugin from admin area.', CFS_LANG_CODE), 'def' => 'administrator', 'html' => 'selectlist', 'options' => array($this, 'getAvailableUserRolesSelect'), 'pro' => ''),
|
129 |
'foot_assets' => array('label' => __('Load Assets in Footer', CFS_LANG_CODE), 'desc' => __('Force load all plugin CSS and JavaScript files in footer - to increase page load speed. Please make sure that you have correct footer.php file in your WordPress theme with wp_footer() function call in it.', CFS_LANG_CODE), 'def' => '0', 'html' => 'checkboxHiddenVal'),
|
130 |
'disable_email_html_type' => array('label' => __('Disable HTML Emails content type', CFS_LANG_CODE), 'desc' => __('Some servers fail send emails with HTML content type: content-type = "text/html", so if you have problems with sending emails from our plugn - try to disable this feature here.', CFS_LANG_CODE), 'def' => '0', 'html' => 'checkboxHiddenVal'),
|
131 |
-
|
132 |
'mail_send_engine' => array('label' => __('Send With', CFS_LANG_CODE), 'desc' => __('You can send your emails with different email sendng engines.', CFS_LANG_CODE), 'def' => 'wp_mail', 'html' => 'selectbox',
|
133 |
'options' => array('wp_mail' => __('WordPress PHP Mail', CFS_LANG_CODE), 'smtp' => __('Third party providers (SMTP)', CFS_LANG_CODE), 'sendmail' => __('Sendmail', CFS_LANG_CODE))),
|
134 |
-
|
135 |
'smtp_host' => array('label' => __('SMTP Hostname', CFS_LANG_CODE), 'desc' => __('e.g. smtp.mydomain.com', CFS_LANG_CODE), 'html' => 'text', 'connect' => 'mail_send_engine:smtp'),
|
136 |
'smtp_login' => array('label' => __('SMTP Login', CFS_LANG_CODE), 'desc' => __('Your email login', CFS_LANG_CODE), 'html' => 'text', 'connect' => 'mail_send_engine:smtp'),
|
137 |
'smtp_pass' => array('label' => __('SMTP Password', CFS_LANG_CODE), 'desc' => __('Your email password', CFS_LANG_CODE), 'html' => 'password', 'connect' => 'mail_send_engine:smtp'),
|
138 |
'smtp_port' => array('label' => __('SMTP Port', CFS_LANG_CODE), 'desc' => __('Port for your SMTP provider', CFS_LANG_CODE), 'html' => 'text', 'connect' => 'mail_send_engine:smtp'),
|
139 |
'smtp_secure' => array('label' => __('SMTP Secure', CFS_LANG_CODE), 'desc' => __('Use secure SMTP connection. If you enable this option - make sure that your server support such secure connections.', CFS_LANG_CODE), 'html' => 'selectbox', 'connect' => 'mail_send_engine:smtp',
|
140 |
'options' => array('' => __('No', CFS_LANG_CODE), 'ssl' => 'SSL', 'tls' => 'TLS'), 'def' => ''),
|
141 |
-
|
142 |
'sendmail_path' => array('label' => __('Sendmail Path', CFS_LANG_CODE), 'desc' => __('You can check it on your server, or ask about it - in your hosting provider.', CFS_LANG_CODE), 'html' => 'text', 'connect' => 'mail_send_engine:sendmail', 'def' => $defSendmailPath),
|
143 |
-
|
144 |
'remove_expire_contacts' => array('label' => __('Remove Contact Forms data after days passed', CFS_LANG_CODE), 'desc' => __('CAUTION: Do Not use this feature if you do not exactly know hat it is doing! It can delete contact form data!<br />You may want not to store all of your contact form data in your database - to make it cleaner, or for example due to some laws (in some countries you can\'t store users data all time, only few days). For this reason you can set here number of days to store users contact forms data. After those days passed (starting from user submit form) - his \ her data will be removed. Leave this field with zero value to disable this functionality.', CFS_LANG_CODE), 'def' => '0', 'html' => 'number'),
|
145 |
'expire_contacts_last_check' => array('label' => 'Internal option', 'desc' => 'Just to not bussy database too much', 'def' => ''),
|
146 |
),
|
@@ -168,4 +168,3 @@ class optionsCfs extends moduleCfs {
|
|
168 |
return $opts ? $opts['opts'] : false;
|
169 |
}
|
170 |
}
|
171 |
-
|
3 |
private $_tabs = array();
|
4 |
private $_options = array();
|
5 |
private $_optionsToCategoires = array(); // For faster search
|
6 |
+
|
7 |
public function init() {
|
8 |
//dispatcherCfs::addAction('afterModulesInit', array($this, 'initAllOptValues'));
|
9 |
add_action('init', array($this, 'initAllOptValues'), 99); // It should be init after all languages was inited (frame::connectLang)
|
55 |
public function getTabs() {
|
56 |
if(empty($this->_tabs)) {
|
57 |
$this->_tabs = dispatcherCfs::applyFilters('mainAdminTabs', array(
|
58 |
+
//'main_page' => array('label' => __('Main Page', CFS_LANG_CODE), 'callback' => array($this, 'getTabContent'), 'wp_icon' => 'dashicons-admin-home', 'sort_order' => 0),
|
59 |
));
|
60 |
foreach($this->_tabs as $tabKey => $tab) {
|
61 |
if(!isset($this->_tabs[ $tabKey ]['url'])) {
|
84 |
}
|
85 |
public function getActiveTab() {
|
86 |
$reqTab = reqCfs::getVar('tab');
|
87 |
+
return empty($reqTab) ? 'forms' : esc_attr($reqTab);
|
88 |
}
|
89 |
public function getTabUrl($tab = '', $params = array()) {
|
90 |
static $mainUrl;
|
128 |
'access_roles' => array('label' => __('User role can use plugin', CFS_LANG_CODE), 'desc' => __('User with next roles will have access to whole plugin from admin area.', CFS_LANG_CODE), 'def' => 'administrator', 'html' => 'selectlist', 'options' => array($this, 'getAvailableUserRolesSelect'), 'pro' => ''),
|
129 |
'foot_assets' => array('label' => __('Load Assets in Footer', CFS_LANG_CODE), 'desc' => __('Force load all plugin CSS and JavaScript files in footer - to increase page load speed. Please make sure that you have correct footer.php file in your WordPress theme with wp_footer() function call in it.', CFS_LANG_CODE), 'def' => '0', 'html' => 'checkboxHiddenVal'),
|
130 |
'disable_email_html_type' => array('label' => __('Disable HTML Emails content type', CFS_LANG_CODE), 'desc' => __('Some servers fail send emails with HTML content type: content-type = "text/html", so if you have problems with sending emails from our plugn - try to disable this feature here.', CFS_LANG_CODE), 'def' => '0', 'html' => 'checkboxHiddenVal'),
|
131 |
+
|
132 |
'mail_send_engine' => array('label' => __('Send With', CFS_LANG_CODE), 'desc' => __('You can send your emails with different email sendng engines.', CFS_LANG_CODE), 'def' => 'wp_mail', 'html' => 'selectbox',
|
133 |
'options' => array('wp_mail' => __('WordPress PHP Mail', CFS_LANG_CODE), 'smtp' => __('Third party providers (SMTP)', CFS_LANG_CODE), 'sendmail' => __('Sendmail', CFS_LANG_CODE))),
|
134 |
+
|
135 |
'smtp_host' => array('label' => __('SMTP Hostname', CFS_LANG_CODE), 'desc' => __('e.g. smtp.mydomain.com', CFS_LANG_CODE), 'html' => 'text', 'connect' => 'mail_send_engine:smtp'),
|
136 |
'smtp_login' => array('label' => __('SMTP Login', CFS_LANG_CODE), 'desc' => __('Your email login', CFS_LANG_CODE), 'html' => 'text', 'connect' => 'mail_send_engine:smtp'),
|
137 |
'smtp_pass' => array('label' => __('SMTP Password', CFS_LANG_CODE), 'desc' => __('Your email password', CFS_LANG_CODE), 'html' => 'password', 'connect' => 'mail_send_engine:smtp'),
|
138 |
'smtp_port' => array('label' => __('SMTP Port', CFS_LANG_CODE), 'desc' => __('Port for your SMTP provider', CFS_LANG_CODE), 'html' => 'text', 'connect' => 'mail_send_engine:smtp'),
|
139 |
'smtp_secure' => array('label' => __('SMTP Secure', CFS_LANG_CODE), 'desc' => __('Use secure SMTP connection. If you enable this option - make sure that your server support such secure connections.', CFS_LANG_CODE), 'html' => 'selectbox', 'connect' => 'mail_send_engine:smtp',
|
140 |
'options' => array('' => __('No', CFS_LANG_CODE), 'ssl' => 'SSL', 'tls' => 'TLS'), 'def' => ''),
|
141 |
+
|
142 |
'sendmail_path' => array('label' => __('Sendmail Path', CFS_LANG_CODE), 'desc' => __('You can check it on your server, or ask about it - in your hosting provider.', CFS_LANG_CODE), 'html' => 'text', 'connect' => 'mail_send_engine:sendmail', 'def' => $defSendmailPath),
|
143 |
+
|
144 |
'remove_expire_contacts' => array('label' => __('Remove Contact Forms data after days passed', CFS_LANG_CODE), 'desc' => __('CAUTION: Do Not use this feature if you do not exactly know hat it is doing! It can delete contact form data!<br />You may want not to store all of your contact form data in your database - to make it cleaner, or for example due to some laws (in some countries you can\'t store users data all time, only few days). For this reason you can set here number of days to store users contact forms data. After those days passed (starting from user submit form) - his \ her data will be removed. Leave this field with zero value to disable this functionality.', CFS_LANG_CODE), 'def' => '0', 'html' => 'number'),
|
145 |
'expire_contacts_last_check' => array('label' => 'Internal option', 'desc' => 'Just to not bussy database too much', 'def' => ''),
|
146 |
),
|
168 |
return $opts ? $opts['opts'] : false;
|
169 |
}
|
170 |
}
|
|
readme.txt
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
Contributors: supsystic.com
|
3 |
Tags: contact, contact form, contact form builder, contact form maker, contact form manager, contact form plugin, contact forms, custom form, feedback form, form, forms, forms creator
|
4 |
Tested up to: 5.7
|
5 |
-
Stable tag: 1.7.
|
6 |
|
7 |
Contact Form Builder with drag-and-drop editor to create responsive, mobile ready contact forms in a second. Custom fields and contact form templates
|
8 |
|
@@ -202,6 +202,8 @@ Using Contact Form plugin on your WordPress site, you start a really responsive
|
|
202 |
|
203 |
Contact Form admin interface
|
204 |
== Changelog ==
|
|
|
|
|
205 |
|
206 |
= 1.7.14 / 26.03.2021 =
|
207 |
* Add support WP 5.7
|
2 |
Contributors: supsystic.com
|
3 |
Tags: contact, contact form, contact form builder, contact form maker, contact form manager, contact form plugin, contact forms, custom form, feedback form, form, forms, forms creator
|
4 |
Tested up to: 5.7
|
5 |
+
Stable tag: 1.7.15
|
6 |
|
7 |
Contact Form Builder with drag-and-drop editor to create responsive, mobile ready contact forms in a second. Custom fields and contact form templates
|
8 |
|
202 |
|
203 |
Contact Form admin interface
|
204 |
== Changelog ==
|
205 |
+
= 1.7.15 / 08.04.2021 =
|
206 |
+
* Fix for file_upload
|
207 |
|
208 |
= 1.7.14 / 26.03.2021 =
|
209 |
* Add support WP 5.7
|