diff --git a/src/admin/components/lists/filters-list.vue b/src/admin/components/lists/filters-list.vue index 68b7bb395..d116ada5d 100644 --- a/src/admin/components/lists/filters-list.vue +++ b/src/admin/components/lists/filters-list.vue @@ -481,9 +481,9 @@ export default { // Removes element from filters list this.activeFilterList.splice(this.newFilterIndex, 1); }, - handleChangeOnMetadata($event) { + handleChangeOnMetadata($event) { if ($event.removed) { - this.oldMetadatumIndex = $event.removed.oldIndex; + this.oldMetadatumIndex = $event.removed.oldIndex; } }, updateFiltersOrder() { @@ -527,7 +527,7 @@ export default { collectionId: this.collectionId, metadatumId: this.choosenMetadatum.id, name: this.choosenMetadatum.name, - filterType: this.selectedFilterType.name, + filterType: this.selectedFilterType.filter_type, status: 'auto-draft', isRepositoryLevel: this.isRepositoryLevel, newIndex: this.newFilterIndex diff --git a/src/api/endpoints/class-tainacan-rest-filter-types-controller.php b/src/api/endpoints/class-tainacan-rest-filter-types-controller.php index c0fb0fffc..65f2826ca 100644 --- a/src/api/endpoints/class-tainacan-rest-filter-types-controller.php +++ b/src/api/endpoints/class-tainacan-rest-filter-types-controller.php @@ -59,7 +59,6 @@ class REST_Filter_Types_Controller extends REST_Controller { $filter_type = new $name(); $filter_arr = $filter_type->_toArray(); - $filter_arr['name'] = $item; return $filter_arr; } diff --git a/src/classes/filter-types/autocomplete/class-tainacan-autocomplete.php b/src/classes/filter-types/autocomplete/class-tainacan-autocomplete.php index b5d249c00..13db2a442 100644 --- a/src/classes/filter-types/autocomplete/class-tainacan-autocomplete.php +++ b/src/classes/filter-types/autocomplete/class-tainacan-autocomplete.php @@ -9,7 +9,7 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' ); class Autocomplete extends Filter_Type { function __construct(){ - $this->set_name('Autocomplete'); + $this->set_name( __('Autocomplete', 'tainacan') ); $this->set_supported_types(['string','long_string','item']); $this->set_component('tainacan-filter-autocomplete'); $this->set_use_max_options(false); diff --git a/src/classes/filter-types/checkbox/class-tainacan-checkbox.php b/src/classes/filter-types/checkbox/class-tainacan-checkbox.php index c5acf4a58..ebad4f1d4 100644 --- a/src/classes/filter-types/checkbox/class-tainacan-checkbox.php +++ b/src/classes/filter-types/checkbox/class-tainacan-checkbox.php @@ -9,7 +9,7 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' ); class Checkbox extends Filter_Type { function __construct(){ - $this->set_name('Checkbox List'); + $this->set_name( __('Checkbox List', 'tainacan') ); $this->set_supported_types(['string','long_string','item']); $this->set_component('tainacan-filter-checkbox'); $this->set_preview_template(' diff --git a/src/classes/filter-types/custom-interval/class-tainacan-custom-interval.php b/src/classes/filter-types/custom-interval/class-tainacan-custom-interval.php index 7efb4e78c..94e79a4d0 100644 --- a/src/classes/filter-types/custom-interval/class-tainacan-custom-interval.php +++ b/src/classes/filter-types/custom-interval/class-tainacan-custom-interval.php @@ -10,7 +10,7 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' ); class Custom_Interval extends Filter_Type { function __construct(){ - $this->set_name('Custom Interval'); + $this->set_name( __('Custom Interval', 'tainacan')); $this->set_supported_types(['float','date']); $this->set_component('tainacan-filter-custom-interval'); $this->set_use_max_options(false); diff --git a/src/classes/filter-types/date-interval/class-tainacan-date-interval.php b/src/classes/filter-types/date-interval/class-tainacan-date-interval.php index 228b90236..d9d8716ca 100644 --- a/src/classes/filter-types/date-interval/class-tainacan-date-interval.php +++ b/src/classes/filter-types/date-interval/class-tainacan-date-interval.php @@ -10,7 +10,7 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' ); class Date_Interval extends Filter_Type { function __construct(){ - $this->set_name('Date Interval'); + $this->set_name( __('Date Interval', 'tainacan') ); $this->set_supported_types(['date']); $this->set_component('tainacan-filter-date-interval'); $this->set_use_max_options(false); diff --git a/src/classes/filter-types/date/class-tainacan-date.php b/src/classes/filter-types/date/class-tainacan-date.php index 9b0bfe773..eec010199 100644 --- a/src/classes/filter-types/date/class-tainacan-date.php +++ b/src/classes/filter-types/date/class-tainacan-date.php @@ -10,7 +10,7 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' ); class Date extends Filter_Type { function __construct(){ - $this->set_name('Date'); + $this->set_name( __('Date', 'tainacan') ); $this->set_supported_types(['date']); $this->set_component('tainacan-filter-date'); // $this->set_form_component('tainacan-filter-form-date'); diff --git a/src/classes/filter-types/numeric-interval/class-tainacan-numeric-interval.php b/src/classes/filter-types/numeric-interval/class-tainacan-numeric-interval.php index e0f39751e..ff17a4c9e 100644 --- a/src/classes/filter-types/numeric-interval/class-tainacan-numeric-interval.php +++ b/src/classes/filter-types/numeric-interval/class-tainacan-numeric-interval.php @@ -10,7 +10,7 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' ); class Numeric_Interval extends Filter_Type { function __construct(){ - $this->set_name('Numeric Interval'); + $this->set_name( __('Numeric Interval', 'tainacan') ); $this->set_supported_types(['float']); $this->set_component('tainacan-filter-numeric-interval'); $this->set_form_component('tainacan-filter-form-numeric-interval'); diff --git a/src/classes/filter-types/numeric-list-interval/class-tainacan-numeric-list-interval.php b/src/classes/filter-types/numeric-list-interval/class-tainacan-numeric-list-interval.php index 836e05fe7..c4ee5943c 100644 --- a/src/classes/filter-types/numeric-list-interval/class-tainacan-numeric-list-interval.php +++ b/src/classes/filter-types/numeric-list-interval/class-tainacan-numeric-list-interval.php @@ -10,7 +10,7 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' ); class Numeric_List_Interval extends Filter_Type { function __construct(){ - $this->set_name('Numeric Interval List'); + $this->set_name( __('Numeric Interval List', 'tainacan') ); $this->set_supported_types(['float']); $this->set_component('tainacan-filter-numeric-list-interval'); $this->set_form_component('tainacan-filter-form-numeric-list-interval'); diff --git a/src/classes/filter-types/numeric/class-tainacan-numeric.php b/src/classes/filter-types/numeric/class-tainacan-numeric.php index 19d11f1b8..4860b7804 100644 --- a/src/classes/filter-types/numeric/class-tainacan-numeric.php +++ b/src/classes/filter-types/numeric/class-tainacan-numeric.php @@ -10,7 +10,7 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' ); class Numeric extends Filter_Type { function __construct(){ - $this->set_name('Numeric'); + $this->set_name( __('Numeric', 'tainacan') ); $this->set_supported_types(['float']); $this->set_component('tainacan-filter-numeric'); $this->set_form_component('tainacan-filter-form-numeric'); diff --git a/src/classes/filter-types/selectbox/class-tainacan-selectbox.php b/src/classes/filter-types/selectbox/class-tainacan-selectbox.php index 4f0413767..57cf4002b 100644 --- a/src/classes/filter-types/selectbox/class-tainacan-selectbox.php +++ b/src/classes/filter-types/selectbox/class-tainacan-selectbox.php @@ -9,7 +9,7 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' ); class Selectbox extends Filter_Type { function __construct(){ - $this->set_name('Select Box'); + $this->set_name( __('Select Box', 'tainacan') ); $this->set_supported_types(['string', 'long_string']); $this->set_component('tainacan-filter-selectbox'); $this->set_use_max_options(false); diff --git a/src/classes/filter-types/taginput/class-tainacan-taginput.php b/src/classes/filter-types/taginput/class-tainacan-taginput.php index 4ef26211d..086a3b5ea 100644 --- a/src/classes/filter-types/taginput/class-tainacan-taginput.php +++ b/src/classes/filter-types/taginput/class-tainacan-taginput.php @@ -9,7 +9,7 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' ); class Taginput extends Filter_Type { function __construct(){ - $this->set_name('Tag Input'); + $this->set_name( __('Tag Input', 'tainacan') ); $this->set_supported_types(['string','long_string','item']); $this->set_component('tainacan-filter-taginput'); $this->set_use_max_options(false); diff --git a/src/classes/filter-types/taxonomy/class-tainacan-taxonomycheckbox.php b/src/classes/filter-types/taxonomy/class-tainacan-taxonomycheckbox.php index 580d1bc3e..b327ca54a 100644 --- a/src/classes/filter-types/taxonomy/class-tainacan-taxonomycheckbox.php +++ b/src/classes/filter-types/taxonomy/class-tainacan-taxonomycheckbox.php @@ -9,7 +9,7 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' ); class TaxonomyCheckbox extends Filter_Type { function __construct(){ - $this->set_name('Taxonomy Checkbox List'); + $this->set_name( __('Taxonomy Checkbox List', 'tainacan') ); $this->set_supported_types(['term']); $this->set_component('tainacan-filter-taxonomy-checkbox'); $this->set_preview_template(' diff --git a/src/classes/filter-types/taxonomy/class-tainacan-taxonomytaginput.php b/src/classes/filter-types/taxonomy/class-tainacan-taxonomytaginput.php index aba6e8eef..0be31c430 100644 --- a/src/classes/filter-types/taxonomy/class-tainacan-taxonomytaginput.php +++ b/src/classes/filter-types/taxonomy/class-tainacan-taxonomytaginput.php @@ -9,7 +9,7 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' ); class TaxonomyTaginput extends Filter_Type { function __construct(){ - $this->set_name('Taxonomy Tag Input'); + $this->set_name( __('Taxonomy Tag Input', 'tainacan') ); $this->set_supported_types(['term']); $this->set_component('tainacan-filter-taxonomy-taginput'); $this->set_use_max_options(false);