Skip to content

Commit

Permalink
fix: add unique-ish class to the chat ask button instead of ID to avo…
Browse files Browse the repository at this point in the history
…id breaking ajax

Refs: RW-1134
  • Loading branch information
orakili committed Dec 4, 2024
1 parent 62297c7 commit 495b293
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions html/modules/custom/reliefweb_ai/reliefweb_ai.module
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ function reliefweb_ai_form_ocha_ai_chat_chat_form_alter(array &$form, FormStateI
'config:reliefweb_ai.settings',
]);

// Add a more unique ID ot the chat submit button.
// Add a more unique class to the chat submit button.
if (isset($form['actions']['submit'])) {
$form['actions']['submit']['#attributes']['id'] = 'ocha-ai-chat-ask';
$form['actions']['submit']['#attributes']['class'][] = 'ocha-ai-chat-ask';
}

// Message to display if the form is disabled for any reason.
Expand Down

0 comments on commit 495b293

Please sign in to comment.