CalcBuilder Forum

Input form layout problem

User moon_740 2012-10-18 21:06:19

I have several problems with calcbuilder form layout at bottom right of this page http://www.solidarcity.com/index.php?lang=fr :
- I would like to hide title of calcbuilder. How to do that ?
- reset button has not the same layout as calculate button (see "réinitialiser" ),
- Yes/No button appears on 2 lines (when you clic on "impots sur le revenu" in the drop list).

Could you help me to solve this problem ?

Form layout code :
<div style="margin-bottom: 20px;">
<div>
<div style="vertical-align: top; border: 0px; text-align: left;">Calculez l'économie d'impôts que vous pouvez réaliser avec vos dons</div>
<div style="vertical-align: top; border: 0px; text-align: left; width: 100px; padding-top: 10px; float: left;">Votre don (€) :</div>
<div style="vertical-align: top; border: 0px; text-align: left; padding-top: 10px;">##don##</div>
<div style="vertical-align: top; border: 0px; padding-top: 10px; padding-bottom: 20px;">##impot##</div>
</div>
<div id="opt1" style="display: none;">
<div style="vertical-align: top; border: 0px; text-align: left; display: inline;">##select_opt1##  Le bénéficiaire est un "organisme d’aide aux personnes en difficulté"</div>
<div style="vertical-align: top; border: 0px; text-align: left; display: inline;">Le bénéficiaire est un "organisme d’aide aux personnes en difficulté"</div>
</div>
</div>

Moonsoft support 2012-10-19 02:00:58

Hello,


we've checked your page and found the style sheet of calcbuilder is not loading ok. Seems you have named a new style sheet as _border2. Please remove the initial underscore at the parameter and the file to get border2.css.

- In order to hide title, add to your css file the property

display:none;

to the cb_name class.

What you're seeing with calculate and reset button are the styles directly inherited from your template (which doesn't define style for reset buttons). Once the calcbuilder css is loaded, you should see both buttons sharing style (cb_button)
If yes/no button still breaks line, let us know and we'll guide you to the property to change on your template or the CB css.

Regards

User moon_740 2012-10-19 07:48:58

Concerning Title :
It works. Thanks. An option within calcbuilder module should be nice (for next release maybe) :-)

Concerning the stylesheet problem :
I checked "Module Class Suffix" of calcbuilder module : I have " border2" and not "_border2". You can see that the main div class is <div class="box border2" /> and not <div class="box_border2" />. So I cannot understand why calcbuilder style sheets doesn't load at all. You can see on the above box (<div class="box border1" />) that it works for other modules on this homepage. This should be a problem within calcbuilder...

NB : When I completely remove "Module Class Suffix" in the calcbuilder module, reset button works well but Yes/No button doesn't work. So style sheet problem should correct reset button but not Yes/No problem.

Moonsoft support 2012-10-19 15:05:48

Hello,
you're right, it is not an underscore, but the space, that is making the css load fail. We have double checked how it's working the custom css, and although for the first versions it was built to work as a suffix (exactly how you are expecting to be shown), it's not working that way anymore, the word 'suffix' remained at the description inherited from previous releases. We received a lot of feedback about the custom css asking to work as explained:

Copy the default css and name it as you need, for ex. mycustom.css .Place at the parameter the name of the css you want to use, without spaces, and with the extension as well.

mycustom.css

So you can edit the CB styles inside your copy of the css. The div you are refering which is applying the prefix is outside the CB, that's why you see the box border2 styles class.

Once you have your customized css loading, let us know and we'll look for the class to be changed for the yes/no field.

regards

User moon_740 2012-10-19 18:19:10

When you say "for the first versions it was built to work as a suffix", do you mean the first version of Joomla or the first version of CalcBuilder ?

If I understand well, I should :
1. put in my joomla module, in the field "Module Class Suffix", the value "mycustom.css"
2. create a mycustom.css file and put css details in it.
Is that right ?

Questions :
1. what do I have to put into thie mycustom.css file ? Do I have to copy paste the whole content of calcbuilder css file ?
2. How to customize the module layout (I mean the elements that are "around" calcbuilder : title, border of the module, background, etc.) ? In the other modules, I put " border2" in "Module Class Suffix" and it works. With you method, I cannot do that because "Module Class Suffix" contains "mycustom.css" value. Should I copy paste "border2" CSS class into mycustom.css file as well?

Moonsoft support 2012-10-20 02:18:59

Hello,
ok, if you need to use the suffix the standard way, and also ensure the cb css loads with the proper path, then you can try this:

Enter the ' border2' suffix at the parameter, as you actually have.
Edit the file

joomla\modules\mod_calcbuilder\tmpl\user.phpuser.php
and at line 32 you will find:

if ($suffix!=null && count($suffix)>0)
$document->addStyleSheet(JURI::base().'modules/mod_calcbuilder/assets/css/'.$suffix,'text/css','screen');
else
$document->addStyleSheet(JURI::base().'modules/mod_calcbuilder/assets/css/default.css','text/css','screen');



Delete or comment the 3 first lines, leaving only this one:

$document->addStyleSheet(JURI::base().'modules/mod_calcbuilder/assets/css/default.css','text/css','screen');

This way you will have the suffix to style the surroundings of the module, and the cb css (default.css) to style the inside.

Hope this helps, regards

User moon_740 2012-10-20 08:31:06

It works well with this hack. Thanks for your help !

Edited by moon_740 - 20.10.2012 08:31

...
Support/development 40 hours

With the peace of mind of having a professional team at your service (20% discount)

Buy now!
...
CalcBuilder

Create dynamic calculators

Buy now!