Skip to content
Snippets Groups Projects

Resolve #3408500 "Form attr"

Open Ivan Berdinsky requested to merge issue/navigation-3408500:3408500-form-attr into 1.x
2 unresolved threads

Closes #3408500

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
1 ((Drupal, once) => {
2 Drupal.behaviors.navigationFormActions = {
3 attach: (context) => {
4 // Should be some common attribute.
5 once(
6 'form-actions',
7 '.node-form',
8 context,
9 ).forEach((form) => {
10 const topBar = document.querySelector('.top-bar__content');
11 const action = form.querySelector(
12 '[data-drupal-selector="edit-actions"] [type="submit"]',
13 );
14
15 if (topBar && action) {
16 // https://dev.to/dailydevtips1/submit-button-outside-the-form-2m6f
  • 1 ((Drupal, once) => {
    2 Drupal.behaviors.navigationFormActions = {
    3 attach: (context) => {
    4 // Should be some common attribute.
    5 once(
    6 'form-actions',
    7 '.node-form',
    Please register or sign in to reply
    Loading