From f077af677bc6cf6282b2604f80c83d7fb74d3bcc Mon Sep 17 00:00:00 2001 From: Rosie Le Faive Date: Mon, 23 Oct 2023 13:50:10 -0300 Subject: [PATCH 1/5] Add COI integration to islandora settings form. --- src/Form/IslandoraSettingsForm.php | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/Form/IslandoraSettingsForm.php b/src/Form/IslandoraSettingsForm.php index 6a2662f9..33b1a87c 100644 --- a/src/Form/IslandoraSettingsForm.php +++ b/src/Form/IslandoraSettingsForm.php @@ -129,6 +129,9 @@ class IslandoraSettingsForm extends ConfigFormBase { '#type' => 'textfield', '#title' => $this->t('URL'), '#default_value' => $config->get(self::BROKER_URL), + '#config' => [ + 'key' => 'islandora.settings:' . self::BROKER_URL, + ], ]; $broker_user = $config->get(self::BROKER_USER); $form['broker_info']['provide_user_creds'] = [ @@ -149,6 +152,9 @@ class IslandoraSettingsForm extends ConfigFormBase { $state_selector => ['checked' => TRUE], ], ], + '#config' => [ + 'key' => 'islandora.settings:' . self::BROKER_USER, + ], ]; $form['broker_info'][self::BROKER_PASSWORD] = [ '#type' => 'password', @@ -159,6 +165,9 @@ class IslandoraSettingsForm extends ConfigFormBase { $state_selector => ['checked' => TRUE], ], ], + '#config' => [ + 'key' => 'islandora.settings:' . self::BROKER_PASSWORD, + ], ]; $form[self::JWT_EXPIRY] = [ '#type' => 'textfield', @@ -221,7 +230,11 @@ class IslandoraSettingsForm extends ConfigFormBase { $form[self::FEDORA_URL] = [ '#type' => 'textfield', '#title' => $this->t('Fedora URL'), - '#attributes' => ['readonly' => 'readonly'], + '#description' => $this->t('Read-only. This value is set in settings.php as the URL for the Fedora flysystem.'), + '#attributes' => [ + 'readonly' => 'readonly', + 'disabled' => 'disabled', + ], '#default_value' => $fedora_url, ]; From 6cfaca36e7e27b1be71939db831a11b961844eb9 Mon Sep 17 00:00:00 2001 From: Rosie Le Faive Date: Mon, 23 Oct 2023 16:28:39 -0300 Subject: [PATCH 2/5] Update src/Form/IslandoraSettingsForm.php Co-authored-by: Adam --- src/Form/IslandoraSettingsForm.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Form/IslandoraSettingsForm.php b/src/Form/IslandoraSettingsForm.php index 33b1a87c..ad4c83b3 100644 --- a/src/Form/IslandoraSettingsForm.php +++ b/src/Form/IslandoraSettingsForm.php @@ -167,6 +167,7 @@ class IslandoraSettingsForm extends ConfigFormBase { ], '#config' => [ 'key' => 'islandora.settings:' . self::BROKER_PASSWORD, + 'secret' => TRUE, ], ]; $form[self::JWT_EXPIRY] = [ From c05236ac8c49b9fcbc77893b9bb837703be99de2 Mon Sep 17 00:00:00 2001 From: Rosie Le Faive Date: Tue, 24 Oct 2023 09:27:50 -0300 Subject: [PATCH 3/5] Add COI integration to IIIF module. --- modules/islandora_iiif/src/Form/IslandoraIIIFConfigForm.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/islandora_iiif/src/Form/IslandoraIIIFConfigForm.php b/modules/islandora_iiif/src/Form/IslandoraIIIFConfigForm.php index f09a0143..a99539a3 100644 --- a/modules/islandora_iiif/src/Form/IslandoraIIIFConfigForm.php +++ b/modules/islandora_iiif/src/Form/IslandoraIIIFConfigForm.php @@ -72,6 +72,9 @@ class IslandoraIIIFConfigForm extends ConfigFormBase { '#title' => $this->t('IIIF Image server location'), '#description' => $this->t('Please enter the image server location without trailing slash. e.g. http://www.example.org/iiif/2.'), '#default_value' => $config->get('iiif_server'), + '#config' => [ + 'key' => 'islandora_iiif.settings:iiif_server', + ], ]; $form['use_relative_paths'] = [ From 16617a9dd7d78b4e6fd3592e87a3ce59cb400dcc Mon Sep 17 00:00:00 2001 From: Rosie Le Faive Date: Thu, 26 Oct 2023 13:02:18 -0300 Subject: [PATCH 4/5] Composer suggest COI. --- composer.json | 1 + 1 file changed, 1 insertion(+) diff --git a/composer.json b/composer.json index 7706ec74..1c649667 100644 --- a/composer.json +++ b/composer.json @@ -40,6 +40,7 @@ }, "suggest": { "drupal/transliterate_filenames": "Sanitizes filenames when they are uploaded so they don't break your repository." + "drupal/coi": "Some configuration fields work with Config Override Inspector." }, "license": "GPL-2.0-or-later", "authors": [ From 2c91dc6f589b4d36aeb8fb3af086e2672d53346c Mon Sep 17 00:00:00 2001 From: Rosie Le Faive Date: Thu, 26 Oct 2023 13:08:01 -0300 Subject: [PATCH 5/5] syntax. --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 1c649667..34107d37 100644 --- a/composer.json +++ b/composer.json @@ -39,7 +39,7 @@ "sebastian/phpcpd": "*" }, "suggest": { - "drupal/transliterate_filenames": "Sanitizes filenames when they are uploaded so they don't break your repository." + "drupal/transliterate_filenames": "Sanitizes filenames when they are uploaded so they don't break your repository.", "drupal/coi": "Some configuration fields work with Config Override Inspector." }, "license": "GPL-2.0-or-later",