| @@ -99,8 +99,10 @@ | ||
| 99 | 99 | unset($fieldOptions['prefix']); |
| 100 | 100 | unset($fieldOptions['full_name']); |
| 101 | 101 | unset($fieldOptions['company_id']); |
| 102 | 102 | |
| 103 | + $canCreateTaxonomy = \FluentCrm\App\Services\PermissionManager::currentUserCan('fcrm_manage_contact_cats'); | |
| 104 | + | |
| 103 | 105 | $fields = [ |
| 104 | 106 | [ |
| 105 | 107 | 'key' => 'name', |
| 106 | 108 | 'label' => __('Feed Name', 'fluent-booking'), |
| @@ -143,25 +145,31 @@ | ||
| 143 | 145 | 'field_label_local' => __('Form Field', 'fluent-booking'), |
| 144 | 146 | 'options' => $fieldOptions, |
| 145 | 147 | ], |
| 146 | 148 | [ |
| 147 | - 'key' => 'list_ids', | |
| 148 | - 'label' => __('FluentCRM Lists', 'fluent-booking'), | |
| 149 | - 'placeholder' => __('Select FluentCRM Lists', 'fluent-booking'), | |
| 150 | - 'tips' => __('Select the FluentCRM Lists you would like to add your contacts to.', 'fluent-booking'), | |
| 151 | - 'component' => 'select', | |
| 152 | - 'is_multiple' => true, | |
| 153 | - 'required' => false, | |
| 154 | - 'options' => $this->getLists(), | |
| 149 | + 'key' => 'list_ids', | |
| 150 | + 'label' => __('FluentCRM Lists', 'fluent-booking'), | |
| 151 | + 'placeholder' => __('Select FluentCRM Lists', 'fluent-booking'), | |
| 152 | + 'tips' => __('Select the FluentCRM Lists you would like to add your contacts to.', 'fluent-booking'), | |
| 153 | + 'component' => 'select', | |
| 154 | + 'is_multiple' => true, | |
| 155 | + 'required' => false, | |
| 156 | + 'options' => $this->getLists(), | |
| 157 | + 'creatable' => $canCreateTaxonomy, | |
| 158 | + 'taxonomy' => 'lists', | |
| 159 | + 'create_placeholder' => __('New list name', 'fluent-booking'), | |
| 155 | 160 | ], |
| 156 | 161 | [ |
| 157 | - 'key' => 'tag_ids', | |
| 158 | - 'require_list' => false, | |
| 159 | - 'label' => __('Contact Tags', 'fluent-booking'), | |
| 160 | - 'placeholder' => __('Select Tags', 'fluent-booking'), | |
| 161 | - 'component' => 'select', | |
| 162 | - 'is_multiple' => true, | |
| 163 | - 'options' => $this->getTags(), | |
| 162 | + 'key' => 'tag_ids', | |
| 163 | + 'require_list' => false, | |
| 164 | + 'label' => __('Contact Tags', 'fluent-booking'), | |
| 165 | + 'placeholder' => __('Select Tags', 'fluent-booking'), | |
| 166 | + 'component' => 'select', | |
| 167 | + 'is_multiple' => true, | |
| 168 | + 'options' => $this->getTags(), | |
| 169 | + 'creatable' => $canCreateTaxonomy, | |
| 170 | + 'taxonomy' => 'tags', | |
| 171 | + 'create_placeholder' => __('New tag name', 'fluent-booking'), | |
| 164 | 172 | ], |
| 165 | 173 | [ |
| 166 | 174 | 'key' => 'skip_if_exists', |
| 167 | 175 | 'require_list' => false, |