103 Tickbox for inactive trainers, which then won't show up in training dropdown
This commit is contained in:
		@ -15,6 +15,10 @@ translatable: true
 | 
			
		||||
default_value: {  }
 | 
			
		||||
default_value_callback: ''
 | 
			
		||||
settings:
 | 
			
		||||
  handler: default
 | 
			
		||||
  handler_settings: {  }
 | 
			
		||||
  handler: views
 | 
			
		||||
  handler_settings:
 | 
			
		||||
    view:
 | 
			
		||||
      view_name: case_providers 
 | 
			
		||||
      display_name: entity_reference_1
 | 
			
		||||
      arguments: {  }
 | 
			
		||||
field_type: entity_reference
 | 
			
		||||
 | 
			
		||||
@ -18,8 +18,8 @@ default_value_callback: '\Drupal\opencase_entities\Entity\OCOrganisationRelation
 | 
			
		||||
settings:
 | 
			
		||||
  handler_settings:
 | 
			
		||||
    view:
 | 
			
		||||
      view_name: all_clients
 | 
			
		||||
      display_name: entity_reference_1
 | 
			
		||||
      view_name: 'all_clients'
 | 
			
		||||
      display_name: 'entity_reference_1'
 | 
			
		||||
    target_bundles:
 | 
			
		||||
      - client
 | 
			
		||||
  handler: views
 | 
			
		||||
 | 
			
		||||
@ -4,6 +4,7 @@ status: true
 | 
			
		||||
dependencies:
 | 
			
		||||
  config:
 | 
			
		||||
    - field.field.oc_actor.trainer.feeds_item
 | 
			
		||||
    - field.field.oc_actor.trainer.field_active
 | 
			
		||||
    - field.field.oc_actor.trainer.field_availability
 | 
			
		||||
    - field.field.oc_actor.trainer.field_delivery_partners
 | 
			
		||||
    - field.field.oc_actor.trainer.field_emergency_contact
 | 
			
		||||
@ -31,6 +32,13 @@ content:
 | 
			
		||||
      size: 60
 | 
			
		||||
      placeholder: ''
 | 
			
		||||
    third_party_settings: {  }
 | 
			
		||||
  field_active:
 | 
			
		||||
    weight: 26
 | 
			
		||||
    settings:
 | 
			
		||||
      display_label: true
 | 
			
		||||
    third_party_settings: {  }
 | 
			
		||||
    type: boolean_checkbox
 | 
			
		||||
    region: content
 | 
			
		||||
  field_availability:
 | 
			
		||||
    type: entity_reference_paragraphs
 | 
			
		||||
    weight: 6
 | 
			
		||||
 | 
			
		||||
@ -4,6 +4,7 @@ status: true
 | 
			
		||||
dependencies:
 | 
			
		||||
  config:
 | 
			
		||||
    - field.field.oc_actor.trainer.feeds_item
 | 
			
		||||
    - field.field.oc_actor.trainer.field_active
 | 
			
		||||
    - field.field.oc_actor.trainer.field_availability
 | 
			
		||||
    - field.field.oc_actor.trainer.field_delivery_partners
 | 
			
		||||
    - field.field.oc_actor.trainer.field_emergency_contact
 | 
			
		||||
@ -31,6 +32,16 @@ content:
 | 
			
		||||
    settings:
 | 
			
		||||
      link_to_entity: false
 | 
			
		||||
    third_party_settings: {  }
 | 
			
		||||
  field_active:
 | 
			
		||||
    weight: 13
 | 
			
		||||
    label: above
 | 
			
		||||
    settings:
 | 
			
		||||
      format: default
 | 
			
		||||
      format_custom_false: ''
 | 
			
		||||
      format_custom_true: ''
 | 
			
		||||
    third_party_settings: {  }
 | 
			
		||||
    type: boolean
 | 
			
		||||
    region: content
 | 
			
		||||
  field_availability:
 | 
			
		||||
    type: entity_reference_revisions_entity_view
 | 
			
		||||
    weight: 6
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										23
									
								
								config/field.field.oc_actor.trainer.field_active.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								config/field.field.oc_actor.trainer.field_active.yml
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,23 @@
 | 
			
		||||
uuid: c571d051-afbf-4593-8d8e-436cf655c23d
 | 
			
		||||
langcode: en
 | 
			
		||||
status: true
 | 
			
		||||
dependencies:
 | 
			
		||||
  config:
 | 
			
		||||
    - field.storage.oc_actor.field_active
 | 
			
		||||
    - opencase_entities.oc_actor_type.trainer
 | 
			
		||||
id: oc_actor.trainer.field_active
 | 
			
		||||
field_name: field_active
 | 
			
		||||
entity_type: oc_actor
 | 
			
		||||
bundle: trainer
 | 
			
		||||
label: Active
 | 
			
		||||
description: 'Unticking this box means the trainer is not currently active and will not show up when selecting trainers to add to trainings. '
 | 
			
		||||
required: false
 | 
			
		||||
translatable: false
 | 
			
		||||
default_value:
 | 
			
		||||
  -
 | 
			
		||||
    value: 1
 | 
			
		||||
default_value_callback: ''
 | 
			
		||||
settings:
 | 
			
		||||
  on_label: 'Yes'
 | 
			
		||||
  off_label: 'No'
 | 
			
		||||
field_type: boolean
 | 
			
		||||
							
								
								
									
										22
									
								
								config/field.storage.oc_actor.field_active.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								config/field.storage.oc_actor.field_active.yml
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,22 @@
 | 
			
		||||
uuid: 49feb61b-2e9e-4a4b-8715-a5c66c319161
 | 
			
		||||
langcode: en
 | 
			
		||||
status: true
 | 
			
		||||
dependencies:
 | 
			
		||||
  module:
 | 
			
		||||
    - field_permissions
 | 
			
		||||
    - opencase_entities
 | 
			
		||||
third_party_settings:
 | 
			
		||||
  field_permissions:
 | 
			
		||||
    permission_type: public
 | 
			
		||||
id: oc_actor.field_active
 | 
			
		||||
field_name: field_active
 | 
			
		||||
entity_type: oc_actor
 | 
			
		||||
type: boolean
 | 
			
		||||
settings: {  }
 | 
			
		||||
module: core
 | 
			
		||||
locked: false
 | 
			
		||||
cardinality: 1
 | 
			
		||||
translatable: true
 | 
			
		||||
indexes: {  }
 | 
			
		||||
persist_with_no_fields: false
 | 
			
		||||
custom_storage: false
 | 
			
		||||
@ -264,86 +264,6 @@ display:
 | 
			
		||||
        - url.query_args
 | 
			
		||||
        - user.roles
 | 
			
		||||
      tags: {  }
 | 
			
		||||
  entity_reference_1:
 | 
			
		||||
    display_plugin: entity_reference
 | 
			
		||||
    id: entity_reference_1
 | 
			
		||||
    display_title: 'Entity Reference'
 | 
			
		||||
    position: 2
 | 
			
		||||
    display_options:
 | 
			
		||||
      display_extenders: {  }
 | 
			
		||||
      filters:
 | 
			
		||||
        type:
 | 
			
		||||
          id: type
 | 
			
		||||
          table: oc_actor_field_data
 | 
			
		||||
          field: type
 | 
			
		||||
          value:
 | 
			
		||||
            trainer: trainer
 | 
			
		||||
          entity_type: oc_actor
 | 
			
		||||
          entity_field: type
 | 
			
		||||
          plugin_id: bundle
 | 
			
		||||
          expose:
 | 
			
		||||
            operator_limit_selection: false
 | 
			
		||||
            operator_list: {  }
 | 
			
		||||
        status:
 | 
			
		||||
          id: status
 | 
			
		||||
          table: oc_actor_field_data
 | 
			
		||||
          field: status
 | 
			
		||||
          relationship: none
 | 
			
		||||
          group_type: group
 | 
			
		||||
          admin_label: ''
 | 
			
		||||
          operator: '='
 | 
			
		||||
          value: '1'
 | 
			
		||||
          group: 1
 | 
			
		||||
          exposed: false
 | 
			
		||||
          expose:
 | 
			
		||||
            operator_id: ''
 | 
			
		||||
            label: ''
 | 
			
		||||
            description: ''
 | 
			
		||||
            use_operator: false
 | 
			
		||||
            operator: ''
 | 
			
		||||
            operator_limit_selection: false
 | 
			
		||||
            operator_list: {  }
 | 
			
		||||
            identifier: ''
 | 
			
		||||
            required: false
 | 
			
		||||
            remember: false
 | 
			
		||||
            multiple: false
 | 
			
		||||
            remember_roles:
 | 
			
		||||
              authenticated: authenticated
 | 
			
		||||
          is_grouped: false
 | 
			
		||||
          group_info:
 | 
			
		||||
            label: ''
 | 
			
		||||
            description: ''
 | 
			
		||||
            identifier: ''
 | 
			
		||||
            optional: true
 | 
			
		||||
            widget: select
 | 
			
		||||
            multiple: false
 | 
			
		||||
            remember: false
 | 
			
		||||
            default_group: All
 | 
			
		||||
            default_group_multiple: {  }
 | 
			
		||||
            group_items: {  }
 | 
			
		||||
          entity_type: oc_actor
 | 
			
		||||
          entity_field: status
 | 
			
		||||
          plugin_id: boolean
 | 
			
		||||
      defaults:
 | 
			
		||||
        filters: false
 | 
			
		||||
        filter_groups: false
 | 
			
		||||
      filter_groups:
 | 
			
		||||
        operator: AND
 | 
			
		||||
        groups:
 | 
			
		||||
          1: AND
 | 
			
		||||
      style:
 | 
			
		||||
        type: entity_reference
 | 
			
		||||
        options:
 | 
			
		||||
          search_fields:
 | 
			
		||||
            name: name
 | 
			
		||||
            status: '0'
 | 
			
		||||
    cache_metadata:
 | 
			
		||||
      max-age: -1
 | 
			
		||||
      contexts:
 | 
			
		||||
        - 'languages:language_content'
 | 
			
		||||
        - 'languages:language_interface'
 | 
			
		||||
        - user.roles
 | 
			
		||||
      tags: {  }
 | 
			
		||||
  page_1:
 | 
			
		||||
    display_plugin: page
 | 
			
		||||
    id: page_1
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										259
									
								
								config/views.view.case_providers.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										259
									
								
								config/views.view.case_providers.yml
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,259 @@
 | 
			
		||||
uuid: ad574fd4-03dc-4a3f-b818-2f71d80a929c
 | 
			
		||||
langcode: en
 | 
			
		||||
status: true
 | 
			
		||||
dependencies:
 | 
			
		||||
  config:
 | 
			
		||||
    - user.role.authenticated
 | 
			
		||||
  module:
 | 
			
		||||
    - opencase_entities
 | 
			
		||||
    - user
 | 
			
		||||
id: case_providers
 | 
			
		||||
label: 'Case Providers'
 | 
			
		||||
module: views
 | 
			
		||||
description: ''
 | 
			
		||||
tag: ''
 | 
			
		||||
base_table: oc_actor_field_data
 | 
			
		||||
base_field: id
 | 
			
		||||
display:
 | 
			
		||||
  default:
 | 
			
		||||
    display_plugin: default
 | 
			
		||||
    id: default
 | 
			
		||||
    display_title: Master
 | 
			
		||||
    position: 0
 | 
			
		||||
    display_options:
 | 
			
		||||
      access:
 | 
			
		||||
        type: role
 | 
			
		||||
        options:
 | 
			
		||||
          role:
 | 
			
		||||
            authenticated: authenticated
 | 
			
		||||
      cache:
 | 
			
		||||
        type: tag
 | 
			
		||||
        options: {  }
 | 
			
		||||
      query:
 | 
			
		||||
        type: views_query
 | 
			
		||||
        options:
 | 
			
		||||
          disable_sql_rewrite: false
 | 
			
		||||
          distinct: false
 | 
			
		||||
          replica: false
 | 
			
		||||
          query_comment: ''
 | 
			
		||||
          query_tags: {  }
 | 
			
		||||
      exposed_form:
 | 
			
		||||
        type: basic
 | 
			
		||||
        options:
 | 
			
		||||
          submit_button: Apply
 | 
			
		||||
          reset_button: false
 | 
			
		||||
          reset_button_label: Reset
 | 
			
		||||
          exposed_sorts_label: 'Sort by'
 | 
			
		||||
          expose_sort_order: true
 | 
			
		||||
          sort_asc_label: Asc
 | 
			
		||||
          sort_desc_label: Desc
 | 
			
		||||
      pager:
 | 
			
		||||
        type: mini
 | 
			
		||||
        options:
 | 
			
		||||
          items_per_page: 10
 | 
			
		||||
          offset: 0
 | 
			
		||||
          id: 0
 | 
			
		||||
          total_pages: null
 | 
			
		||||
          expose:
 | 
			
		||||
            items_per_page: false
 | 
			
		||||
            items_per_page_label: 'Items per page'
 | 
			
		||||
            items_per_page_options: '5, 10, 25, 50'
 | 
			
		||||
            items_per_page_options_all: false
 | 
			
		||||
            items_per_page_options_all_label: '- All -'
 | 
			
		||||
            offset: false
 | 
			
		||||
            offset_label: Offset
 | 
			
		||||
          tags:
 | 
			
		||||
            previous: ‹‹
 | 
			
		||||
            next: ››
 | 
			
		||||
      style:
 | 
			
		||||
        type: default
 | 
			
		||||
        options:
 | 
			
		||||
          grouping: {  }
 | 
			
		||||
          row_class: ''
 | 
			
		||||
          default_row_class: true
 | 
			
		||||
          uses_fields: false
 | 
			
		||||
      row:
 | 
			
		||||
        type: fields
 | 
			
		||||
        options:
 | 
			
		||||
          inline: {  }
 | 
			
		||||
          separator: ''
 | 
			
		||||
          hide_empty: false
 | 
			
		||||
          default_field_elements: true
 | 
			
		||||
      fields:
 | 
			
		||||
        name:
 | 
			
		||||
          table: oc_actor_field_data
 | 
			
		||||
          field: name
 | 
			
		||||
          id: name
 | 
			
		||||
          entity_type: null
 | 
			
		||||
          entity_field: name
 | 
			
		||||
          plugin_id: field
 | 
			
		||||
          relationship: none
 | 
			
		||||
          group_type: group
 | 
			
		||||
          admin_label: ''
 | 
			
		||||
          label: ''
 | 
			
		||||
          exclude: false
 | 
			
		||||
          alter:
 | 
			
		||||
            alter_text: false
 | 
			
		||||
            text: ''
 | 
			
		||||
            make_link: false
 | 
			
		||||
            path: ''
 | 
			
		||||
            absolute: false
 | 
			
		||||
            external: false
 | 
			
		||||
            replace_spaces: false
 | 
			
		||||
            path_case: none
 | 
			
		||||
            trim_whitespace: false
 | 
			
		||||
            alt: ''
 | 
			
		||||
            rel: ''
 | 
			
		||||
            link_class: ''
 | 
			
		||||
            prefix: ''
 | 
			
		||||
            suffix: ''
 | 
			
		||||
            target: ''
 | 
			
		||||
            nl2br: false
 | 
			
		||||
            max_length: 0
 | 
			
		||||
            word_boundary: true
 | 
			
		||||
            ellipsis: true
 | 
			
		||||
            more_link: false
 | 
			
		||||
            more_link_text: ''
 | 
			
		||||
            more_link_path: ''
 | 
			
		||||
            strip_tags: false
 | 
			
		||||
            trim: false
 | 
			
		||||
            preserve_tags: ''
 | 
			
		||||
            html: false
 | 
			
		||||
          element_type: ''
 | 
			
		||||
          element_class: ''
 | 
			
		||||
          element_label_type: ''
 | 
			
		||||
          element_label_class: ''
 | 
			
		||||
          element_label_colon: true
 | 
			
		||||
          element_wrapper_type: ''
 | 
			
		||||
          element_wrapper_class: ''
 | 
			
		||||
          element_default_classes: true
 | 
			
		||||
          empty: ''
 | 
			
		||||
          hide_empty: false
 | 
			
		||||
          empty_zero: false
 | 
			
		||||
          hide_alter_empty: true
 | 
			
		||||
          click_sort_column: value
 | 
			
		||||
          type: string
 | 
			
		||||
          settings: {  }
 | 
			
		||||
          group_column: value
 | 
			
		||||
          group_columns: {  }
 | 
			
		||||
          group_rows: true
 | 
			
		||||
          delta_limit: 0
 | 
			
		||||
          delta_offset: 0
 | 
			
		||||
          delta_reversed: false
 | 
			
		||||
          delta_first_last: false
 | 
			
		||||
          multi_type: separator
 | 
			
		||||
          separator: ', '
 | 
			
		||||
          field_api_classes: false
 | 
			
		||||
      filters:
 | 
			
		||||
        field_active_value:
 | 
			
		||||
          id: field_active_value
 | 
			
		||||
          table: oc_actor__field_active
 | 
			
		||||
          field: field_active_value
 | 
			
		||||
          relationship: none
 | 
			
		||||
          group_type: group
 | 
			
		||||
          admin_label: ''
 | 
			
		||||
          operator: '='
 | 
			
		||||
          value: '1'
 | 
			
		||||
          group: 1
 | 
			
		||||
          exposed: false
 | 
			
		||||
          expose:
 | 
			
		||||
            operator_id: ''
 | 
			
		||||
            label: ''
 | 
			
		||||
            description: ''
 | 
			
		||||
            use_operator: false
 | 
			
		||||
            operator: ''
 | 
			
		||||
            operator_limit_selection: false
 | 
			
		||||
            operator_list: {  }
 | 
			
		||||
            identifier: ''
 | 
			
		||||
            required: false
 | 
			
		||||
            remember: false
 | 
			
		||||
            multiple: false
 | 
			
		||||
            remember_roles:
 | 
			
		||||
              authenticated: authenticated
 | 
			
		||||
          is_grouped: false
 | 
			
		||||
          group_info:
 | 
			
		||||
            label: ''
 | 
			
		||||
            description: ''
 | 
			
		||||
            identifier: ''
 | 
			
		||||
            optional: true
 | 
			
		||||
            widget: select
 | 
			
		||||
            multiple: false
 | 
			
		||||
            remember: false
 | 
			
		||||
            default_group: All
 | 
			
		||||
            default_group_multiple: {  }
 | 
			
		||||
            group_items: {  }
 | 
			
		||||
          plugin_id: boolean
 | 
			
		||||
        status:
 | 
			
		||||
          id: status
 | 
			
		||||
          table: oc_actor_field_data
 | 
			
		||||
          field: status
 | 
			
		||||
          relationship: none
 | 
			
		||||
          group_type: group
 | 
			
		||||
          admin_label: ''
 | 
			
		||||
          operator: '='
 | 
			
		||||
          value: '1'
 | 
			
		||||
          group: 1
 | 
			
		||||
          exposed: false
 | 
			
		||||
          expose:
 | 
			
		||||
            operator_id: ''
 | 
			
		||||
            label: ''
 | 
			
		||||
            description: ''
 | 
			
		||||
            use_operator: false
 | 
			
		||||
            operator: ''
 | 
			
		||||
            operator_limit_selection: false
 | 
			
		||||
            operator_list: {  }
 | 
			
		||||
            identifier: ''
 | 
			
		||||
            required: false
 | 
			
		||||
            remember: false
 | 
			
		||||
            multiple: false
 | 
			
		||||
            remember_roles:
 | 
			
		||||
              authenticated: authenticated
 | 
			
		||||
          is_grouped: false
 | 
			
		||||
          group_info:
 | 
			
		||||
            label: ''
 | 
			
		||||
            description: ''
 | 
			
		||||
            identifier: ''
 | 
			
		||||
            optional: true
 | 
			
		||||
            widget: select
 | 
			
		||||
            multiple: false
 | 
			
		||||
            remember: false
 | 
			
		||||
            default_group: All
 | 
			
		||||
            default_group_multiple: {  }
 | 
			
		||||
            group_items: {  }
 | 
			
		||||
          entity_type: oc_actor
 | 
			
		||||
          entity_field: status
 | 
			
		||||
          plugin_id: boolean
 | 
			
		||||
      sorts: {  }
 | 
			
		||||
      header: {  }
 | 
			
		||||
      footer: {  }
 | 
			
		||||
      empty: {  }
 | 
			
		||||
      relationships: {  }
 | 
			
		||||
      arguments: {  }
 | 
			
		||||
      display_extenders: {  }
 | 
			
		||||
    cache_metadata:
 | 
			
		||||
      max-age: -1
 | 
			
		||||
      contexts:
 | 
			
		||||
        - 'languages:language_content'
 | 
			
		||||
        - 'languages:language_interface'
 | 
			
		||||
        - url.query_args
 | 
			
		||||
        - user.roles
 | 
			
		||||
      tags: {  }
 | 
			
		||||
  entity_reference_1:
 | 
			
		||||
    display_plugin: entity_reference
 | 
			
		||||
    id: entity_reference_1
 | 
			
		||||
    display_title: 'Entity Reference'
 | 
			
		||||
    position: 1
 | 
			
		||||
    display_options:
 | 
			
		||||
      display_extenders: {  }
 | 
			
		||||
      style:
 | 
			
		||||
        type: entity_reference
 | 
			
		||||
        options:
 | 
			
		||||
          search_fields:
 | 
			
		||||
            name: name
 | 
			
		||||
    cache_metadata:
 | 
			
		||||
      max-age: -1
 | 
			
		||||
      contexts:
 | 
			
		||||
        - 'languages:language_content'
 | 
			
		||||
        - 'languages:language_interface'
 | 
			
		||||
        - user.roles
 | 
			
		||||
      tags: {  }
 | 
			
		||||
		Reference in New Issue
	
	Block a user