Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow using classes in {mauticform element=button-selector} #7510

Closed
wants to merge 3 commits into from

Conversation

karser
Copy link

@karser karser commented May 10, 2019

Q A
Bug fix? Yes
New feature?
MauticBox url https://mautibox.com/7510/page/preview/4#
Related user documentation PR URL mautic/documentation#305
Related developer documentation PR URL
Issues addressed (#s or URLs)
BC breaks?
Deprecations?

Description:

This PR allowed using selectors which point to multiple elements in {mauticform} token.

Before (supported only single element link):
<a class="btn btn-default" href="#" id="call-to-action-one">Click me</a> <!-- trigger button -->
{mauticform id=2 style=modal element=#call-to-action-one} <!-- setup modal form -->

<a class="btn btn-default" href="#" id="call-to-action-two">Click me</a> <!-- trigger button -->
{mauticform id=2 style=modal element=#call-to-action-two} <!-- setup modal form -->
After (classes along with multiple elements can be used):
<a class="btn btn-default call-to-action-btn" href="#">Click me</a> <!-- trigger button -->
<a class="btn btn-default call-to-action-btn" href="#">Click me</a> <!-- trigger button -->

{mauticform id=2 style=modal element=.call-to-action-btn} <!-- setup modal form -->

Steps to test this PR:

  1. Load up this PR
  2. Put a form snippet on a Landing Page, e.g {form=2}
  3. Make sure that Before(selecting one button by id) and After (selecting multiple buttons by classes) cases work.

@npracht npracht added bug Issues or PR's relating to bugs code-review-needed PR's that require a code review before merging ready-to-test PR's that are ready to test labels May 16, 2019
@npracht npracht modified the milestones: 2.15.2, 2.16.0 May 16, 2019
@karser
Copy link
Author

karser commented May 17, 2019

I added the same changes to getFormLink (as in #7534) and reproduced environment in MauticBox https://mautibox.com/7510/page/preview/4 - everything works as expected
@npracht @kuzmany is there a change to merge this PR to 2.15.2 along with #7534?

@npracht npracht added this to Ready to Test (first time) in Mautic 2 Aug 15, 2019
@npracht npracht modified the milestone: 2.16.0 Jan 23, 2020
@RCheesley RCheesley added this to the 2.16.1 milestone Mar 9, 2020
@npracht npracht added this to Ready to test in Mautic 2 Mar 10, 2020
@RCheesley RCheesley added pending-test-confirmation PR's that require one test before they can be merged and removed ready-to-test PR's that are ready to test labels Mar 17, 2020
@RCheesley RCheesley moved this from Ready to test to Needs a second test/review in Mautic 2 Mar 17, 2020
@RCheesley
Copy link
Sponsor Member

Trying to test this in Mautibox but I am not able to get the forms to display as modal.

Using the following code, as the examples above are using incorrect form shortcode for landing page builder:

<h2>Before</h2><a class="btn btn-default" href="#" id="call-to-action-one">Click me</a>
<!-- trigger button -->{form=2 style=modal element=#call-to-action-one}
<!-- setup modal form -->
<a class="btn btn-default" href="#" id="call-to-action-two">Click me</a>
<!-- trigger button -->{form=2 style=modal element=#call-to-action-two}
<!-- setup modal form -->

<h2>After</h2><a class="btn btn-default call-to-action-btn" href="#">Click me</a>
<!-- trigger button -->{form=2 style=modal element=.call-to-action-btn}
<!-- setup modal form -->

Result:

https://mautibox.com/7510/testing-7510

screenshot-mautibox com-2020 03 18-12_40_49

Not sure if maybe something has changed re. forcing a form to open in modal or if I'm missing some important part in the test instructions.

@RCheesley RCheesley added the pending-feedback PR's and issues that are awaiting feedback from the author label Mar 18, 2020
@RCheesley
Copy link
Sponsor Member

As this is the same issue as the other PR we closed, I'm going to close this one down as well (given that it does not work in modal-mode).

@RCheesley RCheesley closed this Mar 19, 2020
Mautic 2 automation moved this from Needs a second test/review to Merged Mar 19, 2020
@mautibot
Copy link

This pull request has been mentioned on Mautic Community Forums. There might be relevant details there:

https://forum.mautic.org/t/announcing-mautic-2-16-1-beta/13438/1

@escopecz escopecz removed this from Merged in Mautic 2 May 12, 2020
@escopecz escopecz removed this from the 2.16.1 milestone May 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues or PR's relating to bugs code-review-needed PR's that require a code review before merging pending-feedback PR's and issues that are awaiting feedback from the author pending-test-confirmation PR's that require one test before they can be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants