If you install this module because you want pop-up warnings, but no icons, it appears to break the module. A note to the user might help.

This is a slightly unusual use case for this module, but:

I actually installed it on a site where I wanted the pop-up warnings, but no icons.

It wasn't immediately obvious to me that, if I deselected both "Add icon" checkboxes, the module basically stops working.

Once I realized that, it was pretty easy to activate "Add icon to external links" and then override the CSS to remove the icon.

Would it be possible to add a note to the Configuration page letting users know that you have to add the icon in order to get the pop-up warnings to work?

Thanks!

Comments

elachlan’s picture

Title: add note that icons are required? » Pop-up warnings don't work with Add Icon disabled
Component: User interface » Code
Category: feature » bug

Changed title to be more relevant. Not sure if this is a bug or not. Marking as bug for now.

We could change the behaviour so that you can enable popups separately from adding the icons.

Maybe wrap the "a" tag in a span, then apply classes depending on settings?

elachlan’s picture

Title: Pop-up warnings don't work with Add Icon disabled » Hide/Disable Options if neither add icon check boxes are checked
Version: 7.x-1.12 » 7.x-1.13
Category: bug » task

I have thought about this quite a bit.

I think it is best to leave the functionality as is and change the interface to make it more obvious that external links will only work when an icon is applied (which is its core function).

I suggest hiding or disabling the check box for popups when both the Add Icon check boxes are unchecked. Similar to the change in #1247644: a few language and UI improvements (patch).

elachlan’s picture

The code I was referring to from #1247644: a few language and UI improvements (patch). We can add this too all the fields.

'#states' => array(
      // Only show this field when user opts to display a pop-up warning.
      'visible' => array(
        ':input[name="extlink_alert"]' => array('checked' => TRUE),
      ),
    ),

https://api.drupal.org/api/drupal/includes%21common.inc/function/drupal_process_states/7

elachlan’s picture

Version: 7.x-1.13 » 7.x-1.x-dev
elachlan’s picture

Status: Active » Postponed (maintainer needs more info)

I am really unsure about this one. I feel like it could be a great addition to allow a warning message without the icon. But I also feel like it is outside the scope of the project.

We can change the design of the administration page to make it more obvious that you must have it enabled for the warnings to work. At the moment is is implied by the project as a whole.

Some more discussion on this is needed.

elachlan’s picture

Issue summary: View changes
Status: Postponed (maintainer needs more info) » Closed (outdated)