When formatter summary is empty user has no ability to change settings for formatter.

So I think we need to display "wheel button" anytime if field formatter has settings.

Follow from #553292-14: Formatter settings lost when saving a field

Comments

yched’s picture

This patch cannot work. A module can implement several formatters, some of them have settings, some of them don't (text.module, for instance). The module does implement hook_field_formatter_settings_form(), yet we still don't want to show the 'edit' button for formatters without settings.

The current logic is :
If there are settings to configure, then hook_field_formatter_settings_summary() should provide a summary of the current settings.
If summary is empty, then we assume there's nothing to configure and we don't show the 'edit' button.

We don't want to call hook_field_formatter_settings_form() just to see if we get a non empty settings form.

So, the current code is OK by me.

yched’s picture

StatusFileSize
new603 bytes

Patch makes this clearer in the doc for hook_field_formatter_settings_summary()

andypost’s picture

Priority: Normal » Major
Status: Needs review » Reviewed & tested by the community

agree with this but still thinking about alterable summary

dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD. Thanks.

eric_a’s picture

Typo...

+ * If an empty result is returned, the formatter is asuumed to have no
eric_a’s picture

Status: Fixed » Needs review
StatusFileSize
new747 bytes
yched’s picture

Status: Needs review » Reviewed & tested by the community

Oops. Thks :-)

dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD.

dave reid’s picture

andypost: I think you need will be filled by http://drupal.org/project/field_formatter_settings in the meantime

Status: Fixed » Closed (fixed)

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