Skip to content

Commit

Permalink
Merge pull request #296 from dof-dss/10.x-dev
Browse files Browse the repository at this point in the history
Release merge
  • Loading branch information
omahm authored Oct 11, 2023
2 parents 1b41d7a + c0416c5 commit 735606e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
17 changes: 17 additions & 0 deletions origins_common/origins_common.module
Original file line number Diff line number Diff line change
Expand Up @@ -162,3 +162,20 @@ function origins_common_form_user_login_form_alter(&$form) {
// Disable inline form errors on the login form (to rectify penetration test issues).
$form['#disable_inline_form_errors'] = TRUE;
}

/**
* Implements hook_preprocess_status_messages().
*/
function origins_common_preprocess_status_messages(&$variables) {
// Add additional explanation to the oEmbed resource not found message.
if (isset($variables['message_list']['error'])) {
$error_messages = $variables['message_list']['error'];

foreach ($error_messages as $index => $message) {
if ($message == 'Could not retrieve the oEmbed resource.') {
$message .= t("This may be due to media being inaccessible or set to private.");
$variables['message_list']['error'][$index] = $message;
}
}
}
}
4 changes: 3 additions & 1 deletion origins_form_descriptions/origins_form_descriptions.module
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,7 @@ function origins_form_descriptions_theme_registry_alter(&$theme_registry) {
function origins_form_descriptions_preprocess_fieldset(&$variables) {
$variables['description_display'] = 'before';
$desc = $variables['description_display'];
$variables['description']['attributes']['class'] = $desc;
if (!empty($variables['description']) && !empty($variables['description']['attributes'])) {
$variables['description']['attributes']->addClass($desc);
}
}

0 comments on commit 735606e

Please sign in to comment.