Problem/Motivation

Current logic adds extensions when the list is empty, leading to a weird looking UI:

Formatter configuration form

Steps to reproduce

  1. Create a download option with extensions list empty
  2. Select File Downloader field formatter
  3. Click the gear (or cog) icon to change settings and observe download option label created in the first step with empty parenthesis as on screenshot above
  4. Edit download option and add some extensions
  5. Now field formatter settings form show nothing next to the download option label

Proposed resolution

Invert extensions check login in field formatter.

Remaining tasks

  • Patch - done
  • Review
  • Commit

User interface changes

None

API changes

None

Data model changes

None

CommentFileSizeAuthor
#2 file_downloader-3343592-2.patch798 bytesrosk0
Selection_096.png13.55 KBrosk0
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:

Comments

RoSk0 created an issue. See original summary.

rosk0’s picture

Assigned: rosk0 » Unassigned
Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new798 bytes
klidifia’s picture

Status: Needs review » Reviewed & tested by the community

Only appends extensions if set -- good.

urvashi_vora made their first commit to this issue’s fork.

  • sjerdo committed 241dc401 on 3.0.x
    [#3343592] feat: Invert extensions check login in field formatter
    
    By:...

sjerdo’s picture

Version: 2.0.1 » 3.0.x-dev
Status: Reviewed & tested by the community » Fixed

Now that this issue is closed, please review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, please credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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