From c1d357631b8e0bd14db4d09327286e33f752385f Mon Sep 17 00:00:00 2001
From: Lily Yan <lily.yan@uwaterloo.ca>
Date: Fri, 15 Jan 2021 10:28:06 -0500
Subject: [PATCH] ISTWCMS-4512 Add first and last name fields to Drupal users
 configuration

---
 ....entity_form_display.user.user.default.yml | 66 +++++++++++++++++++
 ....entity_view_display.user.user.default.yml | 41 ++++++++++++
 ...ld.field.user.user.field_uw_first_name.yml | 19 ++++++
 ...eld.field.user.user.field_uw_last_name.yml | 19 ++++++
 ...field.storage.user.field_uw_first_name.yml | 20 ++++++
 .../field.storage.user.field_uw_last_name.yml | 20 ++++++
 uw_cfg_common.info.yml                        |  2 +-
 7 files changed, 186 insertions(+), 1 deletion(-)
 create mode 100644 config/install/core.entity_form_display.user.user.default.yml
 create mode 100644 config/install/core.entity_view_display.user.user.default.yml
 create mode 100644 config/install/field.field.user.user.field_uw_first_name.yml
 create mode 100644 config/install/field.field.user.user.field_uw_last_name.yml
 create mode 100644 config/install/field.storage.user.field_uw_first_name.yml
 create mode 100644 config/install/field.storage.user.field_uw_last_name.yml

diff --git a/config/install/core.entity_form_display.user.user.default.yml b/config/install/core.entity_form_display.user.user.default.yml
new file mode 100644
index 00000000..8dc67d81
--- /dev/null
+++ b/config/install/core.entity_form_display.user.user.default.yml
@@ -0,0 +1,66 @@
+langcode: en
+status: true
+dependencies:
+  config:
+    - field.field.user.user.field_uw_first_name
+    - field.field.user.user.field_uw_last_name
+  module:
+    - path
+    - user
+id: user.user.default
+targetEntityType: user
+bundle: user
+mode: default
+content:
+  account:
+    weight: 2
+    region: content
+    settings: {  }
+    third_party_settings: {  }
+  contact:
+    weight: 5
+    region: content
+    settings: {  }
+    third_party_settings: {  }
+  field_uw_first_name:
+    weight: 0
+    settings:
+      size: 60
+      placeholder: ''
+    third_party_settings:
+      maxlength:
+        maxlength_js: null
+        maxlength_js_label: 'Content limited to @limit characters, remaining: <strong>@remaining</strong>'
+    type: string_textfield
+    region: content
+  field_uw_last_name:
+    weight: 1
+    settings:
+      size: 60
+      placeholder: ''
+    third_party_settings: {  }
+    type: string_textfield
+    region: content
+  language:
+    weight: 4
+    region: content
+    settings: {  }
+    third_party_settings: {  }
+  path:
+    type: path
+    weight: 7
+    region: content
+    settings: {  }
+    third_party_settings: {  }
+  simplesamlphp_auth_user_enable:
+    weight: 3
+    region: content
+    settings: {  }
+    third_party_settings: {  }
+  timezone:
+    weight: 6
+    region: content
+    settings: {  }
+    third_party_settings: {  }
+hidden:
+  langcode: true
diff --git a/config/install/core.entity_view_display.user.user.default.yml b/config/install/core.entity_view_display.user.user.default.yml
new file mode 100644
index 00000000..17bedd09
--- /dev/null
+++ b/config/install/core.entity_view_display.user.user.default.yml
@@ -0,0 +1,41 @@
+langcode: en
+status: true
+dependencies:
+  config:
+    - field.field.user.user.field_uw_first_name
+    - field.field.user.user.field_uw_last_name
+  module:
+    - user
+id: user.user.default
+targetEntityType: user
+bundle: user
+mode: default
+content:
+  field_uw_first_name:
+    weight: 0
+    label: above
+    settings:
+      link_to_entity: false
+    third_party_settings: {  }
+    type: string
+    region: content
+  field_uw_last_name:
+    weight: 1
+    label: above
+    settings:
+      link_to_entity: false
+    third_party_settings: {  }
+    type: string
+    region: content
+  member_for:
+    weight: 2
+    region: content
+    settings: {  }
+    third_party_settings: {  }
+  role_expire:
+    weight: 3
+    region: content
+    settings: {  }
+    third_party_settings: {  }
+hidden:
+  langcode: true
diff --git a/config/install/field.field.user.user.field_uw_first_name.yml b/config/install/field.field.user.user.field_uw_first_name.yml
new file mode 100644
index 00000000..15573b2d
--- /dev/null
+++ b/config/install/field.field.user.user.field_uw_first_name.yml
@@ -0,0 +1,19 @@
+langcode: en
+status: true
+dependencies:
+  config:
+    - field.storage.user.field_uw_first_name
+  module:
+    - user
+id: user.user.field_uw_first_name
+field_name: field_uw_first_name
+entity_type: user
+bundle: user
+label: 'First name'
+description: ''
+required: true
+translatable: false
+default_value: {  }
+default_value_callback: ''
+settings: {  }
+field_type: string
diff --git a/config/install/field.field.user.user.field_uw_last_name.yml b/config/install/field.field.user.user.field_uw_last_name.yml
new file mode 100644
index 00000000..229d5041
--- /dev/null
+++ b/config/install/field.field.user.user.field_uw_last_name.yml
@@ -0,0 +1,19 @@
+langcode: en
+status: true
+dependencies:
+  config:
+    - field.storage.user.field_uw_last_name
+  module:
+    - user
+id: user.user.field_uw_last_name
+field_name: field_uw_last_name
+entity_type: user
+bundle: user
+label: 'Last name'
+description: ''
+required: true
+translatable: false
+default_value: {  }
+default_value_callback: ''
+settings: {  }
+field_type: string
diff --git a/config/install/field.storage.user.field_uw_first_name.yml b/config/install/field.storage.user.field_uw_first_name.yml
new file mode 100644
index 00000000..7d9e6270
--- /dev/null
+++ b/config/install/field.storage.user.field_uw_first_name.yml
@@ -0,0 +1,20 @@
+langcode: en
+status: true
+dependencies:
+  module:
+    - user
+id: user.field_uw_first_name
+field_name: field_uw_first_name
+entity_type: user
+type: string
+settings:
+  max_length: 255
+  is_ascii: false
+  case_sensitive: false
+module: core
+locked: false
+cardinality: 1
+translatable: true
+indexes: {  }
+persist_with_no_fields: false
+custom_storage: false
diff --git a/config/install/field.storage.user.field_uw_last_name.yml b/config/install/field.storage.user.field_uw_last_name.yml
new file mode 100644
index 00000000..18a97c24
--- /dev/null
+++ b/config/install/field.storage.user.field_uw_last_name.yml
@@ -0,0 +1,20 @@
+langcode: en
+status: true
+dependencies:
+  module:
+    - user
+id: user.field_uw_last_name
+field_name: field_uw_last_name
+entity_type: user
+type: string
+settings:
+  max_length: 255
+  is_ascii: false
+  case_sensitive: false
+module: core
+locked: false
+cardinality: 1
+translatable: true
+indexes: {  }
+persist_with_no_fields: false
+custom_storage: false
diff --git a/uw_cfg_common.info.yml b/uw_cfg_common.info.yml
index c082308d..26968eb1 100644
--- a/uw_cfg_common.info.yml
+++ b/uw_cfg_common.info.yml
@@ -27,10 +27,10 @@ dependencies:
   - media
   - metatag
   - node
+  - path
   - pathauto
   - preprocess_event_dispatcher
   - taxonomy
   - text
   - user
   - views
-
-- 
GitLab