Problem/Motivation

The LogForm at log/add/{log type} redirects to the default log view and displays a confirmation message after creating new logs: "Saved the %label log."

If a destination query param is provided when directed to the log form page it overrides the form's behavior of redirecting to the newly created log. This works as expected, but it would be nice to include a link to the log in the confirmation message so that it is easy to navigate back to the newly created log.

Steps to reproduce

N/A

Proposed resolution

Include a link to the log in the "Saved the %label log." confirmation message.

Remaining tasks

Implement change.

User interface changes

Add link to confirmation message.

API changes

None.

Data model changes

None.

CommentFileSizeAuthor
#10 3211985-10.patch568 bytesm.stenta

Issue fork log-3211985

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

paul121 created an issue. See original summary.

paul121’s picture

Status: Active » Needs review
paul121’s picture

This always adds the link to the confirmation message. Maybe we should only add it if there is a destination query param present? Is it confusing to be redirected to the log view page and have a link to the same page displayed above?

m.stenta’s picture

Thanks @paul121 - this is a good addition. :-)

"Saved the %label log."

If it's alright with you, I might modify this slightly to:

"Saved log: %label"

Minor difference, but it puts the link at the end of the string, which feels slightly better. If that's OK with you I'll go ahead and amend your commit and merge this.

(Outside of the scope of this thread, but we should make this same change in farmOS for asset and plan entities for consistency.)

paul121’s picture

Yep that is a good improvement too!

  • m.stenta committed 22cd881 on 2.x authored by paul121
    Issue #3211985 by paul121: Include link to new logs in confirmation...
m.stenta’s picture

Status: Needs review » Fixed
m.stenta’s picture

Status: Fixed » Needs work

Doh! This caused a test to fail.

It says that your merge request passed tests - but I think something was up with our automated tests (see related: #3226354: Actions tests are failing) - maybe they weren't actually running as expected. Not entirely sure, but they appear to be working now - and hence this one is failing. I'll post a patch momentarily...

m.stenta’s picture

Status: Needs work » Needs review
FileSize
568 bytes

Patch attached to update automated test.

m.stenta’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.