Right now we have:

[ ] Disable the "Remove" button in file listings

It's already confusing that the button in question is a negative, but to have an inverted checkbox makes it worse, especially between checkboxes for "Enable Description field" and "Display a "Show/Hide Hidden Files" toggle in file listings".

Let's invert this to a checkbox that defaults to true, called "Display the "Remove" button when editing files" (more or less).

Comments

jthorson’s picture

Small caveat for consideration ... if the module is enabled after content has been created on the site, then existing file field widgets won't have the setting in question until the field settings are updated. Thus, if we reverse this, simple changing !empty() to empty() when checking the setting will not suffice ... for a default 'checked' state, it will need to also accommodate the !exists() scenario in the logic.

dww’s picture

Ahh, and since we're not defining a separate widget anymore, we can't have the widget's default values handle it for us, either. Good point.

Still think this is relatively easy and worth doing, but obviously not a blocker...

jthorson’s picture

Project: Attached Files Metadata Table » Extended File Field
dww’s picture

dww’s picture

Status: Active » Fixed

Since this was sort of in the way of some other stuff, and it was trivial, I just pushed this to 7.x-1.x:
http://drupalcode.org/project/extended_file_field.git/commit/31d648a

dww’s picture

Status: Fixed » Closed (fixed)

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

  • Commit 31d648a on 7.x-1.x, empty-file-2150029 by dww:
    [#1964630] by dww: Fix the double-negative setting for the remove button...
  • Commit 9fa89a4 on 7.x-1.x, empty-file-2150029 by dww:
    [#1964630] by dww: Follow-up to fix the setting for the remove button....