Problem/Motivation

When trying to style the "Forgot Password" link on the Login checkout pane, it cannot be modified since rendered markup is passed to the form.

    $pane_form['returning_customer']['forgot_password'] = [
      '#type' => 'markup',
      '#markup' => Link::createFromRoute($this->t('Forgot password?'), 'user.pass')->toString(),
    ];

Proposed resolution

Use the toRenderable method to populate the forgot_password element.

This makes it alterable and allows to easily add classes to the link.

CommentFileSizeAuthor
#3 commerce-3005203-3.patch780 bytesstijnstroobants

Comments

mglaman created an issue. See original summary.

volkswagenchick’s picture

Issue tags: +badcamp 2018

Tagging "badcamp 2018" .. Thanks!

stijnstroobants’s picture

StatusFileSize
new780 bytes
stijnstroobants’s picture

Status: Active » Needs review

  • bojanz committed e4ab9ab on 8.x-2.x authored by StijnStroobants
    Issue #3005203 by StijnStroobants: "Forgot password?" in the login pane...
bojanz’s picture

Status: Needs review » Fixed

Thanks!

Status: Fixed » Closed (fixed)

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