Skip to content

Commit

Permalink
Merge pull request #986 from rosiel/coi
Browse files Browse the repository at this point in the history
Add COI integration to islandora settings form.
  • Loading branch information
aOelschlager authored Nov 17, 2023
2 parents 056695c + 2c91dc6 commit 4630439
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down
3 changes: 3 additions & 0 deletions modules/islandora_iiif/src/Form/IslandoraIIIFConfigForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ public function buildForm(array $form, FormStateInterface $form_state) {
'#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'] = [
Expand Down
16 changes: 15 additions & 1 deletion src/Form/IslandoraSettingsForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@ public function buildForm(array $form, FormStateInterface $form_state) {
'#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'] = [
Expand All @@ -149,6 +152,9 @@ public function buildForm(array $form, FormStateInterface $form_state) {
$state_selector => ['checked' => TRUE],
],
],
'#config' => [
'key' => 'islandora.settings:' . self::BROKER_USER,
],
];
$form['broker_info'][self::BROKER_PASSWORD] = [
'#type' => 'password',
Expand All @@ -159,6 +165,10 @@ public function buildForm(array $form, FormStateInterface $form_state) {
$state_selector => ['checked' => TRUE],
],
],
'#config' => [
'key' => 'islandora.settings:' . self::BROKER_PASSWORD,
'secret' => TRUE,
],
];
$form[self::JWT_EXPIRY] = [
'#type' => 'textfield',
Expand Down Expand Up @@ -221,7 +231,11 @@ public function buildForm(array $form, FormStateInterface $form_state) {
$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,
];

Expand Down

0 comments on commit 4630439

Please sign in to comment.