Api: Remove disused ajax-select customfield type

This commit is contained in:
nathan 2024-06-25 15:14:32 -06:00
parent 989f974da0
commit 02e35d609f
3 changed files with 4 additions and 19 deletions

View File

@ -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),

View File

@ -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);

View File

@ -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;