Browse Source

Merge pull request #986 from rosiel/coi

Add COI integration to islandora settings form.
pull/983/merge 2.10.0
Annie Oelschlager 1 year ago committed by GitHub
parent
commit
4630439760
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      composer.json
  2. 3
      modules/islandora_iiif/src/Form/IslandoraIIIFConfigForm.php
  3. 16
      src/Form/IslandoraSettingsForm.php

3
composer.json

@ -39,7 +39,8 @@
"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",
"authors": [

3
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'] = [

16
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,10 @@ class IslandoraSettingsForm extends ConfigFormBase {
$state_selector => ['checked' => TRUE],
],
],
'#config' => [
'key' => 'islandora.settings:' . self::BROKER_PASSWORD,
'secret' => TRUE,
],
];
$form[self::JWT_EXPIRY] = [
'#type' => 'textfield',
@ -221,7 +231,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,
];

Loading…
Cancel
Save