CalcBuilder Forum

Obtrusive dialog box after send email

Usuario moon_1306 2013-11-04 15:43:30

After results are generated, there is an option to send an email. After entering an email address and clicking send (the envelope button) a styled dialog box is generated. I assume that it is generated by JavaScript.

The issue is that the box has no text, so in some templates it's collapsed, and it has a close "X" button, a resize handle, a title bar, etc. Also it's z-order makes it appear under other elements.

Is there a way that we can use a system "OK" modal dialog box, such as is generated when an invalid email address is entered? For example, in the text field it could say "Email sent" with an OK button. Alternatively, a brief message could be inserted under the email address field, similar to how validation error messages appear.

Many thanks,

Alan

Moonsoft support 2013-11-04 16:12:51

Hi,
that message dialog is a default jquery dialog, and its styled using ui-classes

ui-dialog
ui-widget
ui-widget-content
ui-corner-all
ui-front
ui-dialog-buttons
ui-draggable ui-resizable

that you can find here:

joomla/modules/mod_calcbuilder/assets/css/jquery-ui-1.9.2.custom.css


but if you see the dialog overlapping or with a different look, your template or any other css may be overwritting any property that could be adjusted.

The 'email not valid' message is a plain javascript
alert("message");

box instead. You could discard the function launching the dialog and print and alert message, if you want to give it a try, this is coded at

joomla\modules\mod_calcbuilder\tmpl\user.php
//line 291
if (data=='1') {
//your code here

}

Hope this helps, regards

Moonsoft support 2013-11-04 17:13:08

I saw the same at my site.

It was "fixed" when I disable the button of the joomlashine template jsn-epic

maybe this help to fix it for you

Usuario moon_1306 2013-11-04 17:40:02

Thank you very much. I will give that a try.

Moonsoft support 2013-11-26 04:34:24

I have a similar problem.

After email, the dialog box pops and is empty of dialog and does not close.

I am using A JoomlaArts template that does have a java Back To Top function, but there is no turn off for that function. I was able to comment it to a No Display in the CSS, but that did not help.

Any suggestions?

Here is a link
http://wedobooksforyou.com/index.php/contact-us-page/wedo-calculator

Mike

Moonsoft support 2013-11-26 11:28:53

Hi,
if the dialog is conflicting with your template you can also try to change it for a plain alert message. Edit

joomla\modules\mod_calcbuilder\tmpl\user.php

and search about line 293:


CB(function() { CB( "#cb_error_modal" ).dialog({ modal: true, buttons: {Ok: function() {CB( this ).dialog( "close" );}}});});


replace that line for a simple js alert:

alert('');


You have another dialog (for error), a couple of lines below (296)

CB(function() { CB( "#cb_error_modal" ).dialog({ modal: true, buttons: {Ok: function() {CB( this ).dialog( "close" );}}});});


you can replace as well for:
alert('Your message');


So you won't have dialogs showing that may conflict with other scripts.

Hope this helps, regards

Moonsoft support 2013-11-27 07:13:12

Thank you - I have implemented the Alert and it works well.

Mike

...
CalcBuilder

Create dynamic calculators

Buy now!
...
Support/development

Perfect for small code changes or to correct any bug at your site

Buy now!