|
|
@ -66,6 +66,11 @@ class IslandoraIIIFConfigForm extends ConfigFormBase { |
|
|
|
* {@inheritdoc} |
|
|
|
* {@inheritdoc} |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public function buildForm(array $form, FormStateInterface $form_state) { |
|
|
|
public function buildForm(array $form, FormStateInterface $form_state) { |
|
|
|
|
|
|
|
$options = [ |
|
|
|
|
|
|
|
'none' => $this->t('None'), |
|
|
|
|
|
|
|
'view' => $this->t("From view title"), |
|
|
|
|
|
|
|
'node' => $this->t("From node title"), |
|
|
|
|
|
|
|
]; |
|
|
|
$config = $this->config('islandora_iiif.settings'); |
|
|
|
$config = $this->config('islandora_iiif.settings'); |
|
|
|
$form['iiif_server'] = [ |
|
|
|
$form['iiif_server'] = [ |
|
|
|
'#type' => 'url', |
|
|
|
'#type' => 'url', |
|
|
@ -84,6 +89,14 @@ class IslandoraIIIFConfigForm extends ConfigFormBase { |
|
|
|
'#default_value' => $config->get('use_relative_paths'), |
|
|
|
'#default_value' => $config->get('use_relative_paths'), |
|
|
|
]; |
|
|
|
]; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$form['show_title'] = [ |
|
|
|
|
|
|
|
'#type' => 'select', |
|
|
|
|
|
|
|
'#options' => $options, |
|
|
|
|
|
|
|
'#title' => $this->t("Show title in viewer."), |
|
|
|
|
|
|
|
'#description' => $this->t("Show title on your viewer, if viewer allows"), |
|
|
|
|
|
|
|
'#default_value' => $config->get('show_title'), |
|
|
|
|
|
|
|
]; |
|
|
|
|
|
|
|
|
|
|
|
return parent::buildForm($form, $form_state); |
|
|
|
return parent::buildForm($form, $form_state); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -111,6 +124,7 @@ class IslandoraIIIFConfigForm extends ConfigFormBase { |
|
|
|
$this->config('islandora_iiif.settings') |
|
|
|
$this->config('islandora_iiif.settings') |
|
|
|
->set('iiif_server', $form_state->getValue('iiif_server')) |
|
|
|
->set('iiif_server', $form_state->getValue('iiif_server')) |
|
|
|
->set('use_relative_paths', $form_state->getValue('use_relative_paths')) |
|
|
|
->set('use_relative_paths', $form_state->getValue('use_relative_paths')) |
|
|
|
|
|
|
|
->set('show_title', $form_state->getValue('show_title')) |
|
|
|
->save(); |
|
|
|
->save(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|