Browse Source

Work on #1491 (coding standards).

pull/777/head
Mark Jordan 6 years ago
parent
commit
1a574dfa00
  1. 7
      islandora.module

7
islandora.module

@ -322,7 +322,8 @@ function islandora_preprocess_node(&$variables) {
function islandora_form_alter(&$form, FormStateInterface $form_state, $form_id) {
$media_add_forms = ['media_audio_add_form', 'media_document_add_form',
'media_extracted_text_add_form', 'media_file_add_form', 'media_image_add_form',
'media_fits_technical_metadata_add_form', 'media_video_add_form'];
'media_fits_technical_metadata_add_form', 'media_video_add_form',
];
if (in_array($form['#form_id'], $media_add_forms)) {
$params = \Drupal::request()->query->all();
@ -492,8 +493,8 @@ function islandora_preprocess_views_view_table(&$variables) {
function islandora_page_attachments(array &$attachments) {
$current_path = \Drupal::service('path.current')->getPath();
$path_args = explode('/', ltrim($current_path, '/'));
// Need to populate the "Alt text" field using JavaScript since it is not part of
// the rendered form, it is added via Ajax on file upload.
// Need to populate the "Alt text" field using JavaScript since it is
// not part of the rendered form, it is added via Ajax on file upload.
if (count($path_args) >= 3 && $path_args[0] == 'media' && $path_args[1] == 'add' && $path_args[2] == 'image') {
$attachments['#attached']['library'][] = 'islandora/image_media_form_defaults';
}

Loading…
Cancel
Save