From 02e35d609fd48eab569dc97e25e0cdf367a9377c Mon Sep 17 00:00:00 2001 From: nathan Date: Tue, 25 Jun 2024 15:14:32 -0600 Subject: [PATCH] Api: Remove disused ajax-select customfield type --- admin/inc/class.admin_customfields.inc.php | 1 - api/js/etemplate/et2_extension_customfields.ts | 16 ---------------- api/src/Etemplate/Widget/Customfields.php | 6 ++++-- 3 files changed, 4 insertions(+), 19 deletions(-) diff --git a/admin/inc/class.admin_customfields.inc.php b/admin/inc/class.admin_customfields.inc.php index f4897420bc..40c0f8d525 100644 --- a/admin/inc/class.admin_customfields.inc.php +++ b/admin/inc/class.admin_customfields.inc.php @@ -106,7 +106,6 @@ class admin_customfields 'select-account' => array('cf_len' => false, 'cf_rows' => true), 'htmlarea' => array('cf_len' => true, 'cf_rows' => true), 'button' => array('cf_values' => true), - 'ajax_select' => array('cf_values' => true), 'radio' => array('cf_values' => true), 'checkbox' => array('cf_values' => true), 'filemanager' => array('cf_values' => true), diff --git a/api/js/etemplate/et2_extension_customfields.ts b/api/js/etemplate/et2_extension_customfields.ts index 264a7277c1..7dd25737c3 100644 --- a/api/js/etemplate/et2_extension_customfields.ts +++ b/api/js/etemplate/et2_extension_customfields.ts @@ -663,22 +663,6 @@ export class et2_customfields_list extends et2_valueWidget implements et2_IDetac return true; } - _setup_ajax_select( field_name, field, attrs) - { - const attributes = ['get_rows', 'get_title', 'id_field', 'template']; - if(field.values) - { - for(let i = 0; i < attributes.length; i++) - { - if(typeof field.values[attributes[i]] !== 'undefined') - { - attrs[attributes[i]] = field.values[attributes[i]]; - } - } - } - return true; - } - _setup_serial(field_name, field, attrs) { delete (attrs.label); diff --git a/api/src/Etemplate/Widget/Customfields.php b/api/src/Etemplate/Widget/Customfields.php index 1c4916a352..d0daaddc4f 100644 --- a/api/src/Etemplate/Widget/Customfields.php +++ b/api/src/Etemplate/Widget/Customfields.php @@ -39,7 +39,6 @@ class Customfields extends Transformer 'label' => 'Label', 'header' => 'Header', 'select' => 'Selectbox', - 'ajax_select' => 'Search', 'radio' => 'Radiobutton', 'checkbox' => 'Checkbox', 'date' => 'Date', @@ -379,7 +378,10 @@ class Customfields extends Transformer break; default: - if (substr($type, 0, 7) !== 'select-' && $type != 'ajax_select') break; + if(substr($type, 0, 7) !== 'select-') + { + break; + } // fall-through for all select-* widgets case 'select': $widget->attrs['multiple'] = $field['rows'] > 1;