Problem/Motivation

#3413052: Hide the "Add existing [label]" button if there are none to reference is adding a nice feature upstream where if there are no existing entities to reference, hide the 'Add existing [label]' button.

For the same to work here, we need to change this widget's plugin code, too.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
#2 3413666-2.patch4.54 KBdww

Comments

dww created an issue. See original summary.

dww’s picture

Status: Active » Needs review
StatusFileSize
new4.54 KB

This doesn't depend on the other issue at all, we could commit this here any time.

I don't love having to add the extra layer of indentation, but the code you inherited was already a bit of a mess, so it's not so easy to do it otherwise without a larger code refactoring.

  • mlncn committed a2cb11e4 on 1.0.x
    Issue #3413666 by dww, mlncn: Hide the 'Add existing [label]' form /...
mlncn’s picture

The patch did not apply, but i think i brought this in faithfully except the ief_items and ief_add_existing_widget properties which did not exist in this module and do not yet exist in Inline Entity Form either. Talking about these lines that existed in the patch both as if already there and only getting indented in for the conditional:

          '#ief_items' => $items,
          '#ief_add_existing_widget' => $this->getSetting('add_existing_widget'),
mlncn’s picture

OK i see those are from #3413340: Support the 'add_existing_widget' setting from #2683125 as i thought and should have already checked. Still willing to adopt everything that is stuck getting into IEF and then, i hope, getting everything into IEF (in particular #2673548: Prioritize 'add existing' in nested entity creation UX to prevent duplication.) and obsoleting this module entirely!

mlncn’s picture

Status: Needs review » Reviewed & tested by the community