Suggestion - Pre-defined amounts explanation

  • Daniel Hansen
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
9 years 7 months ago #49280 by Daniel Hansen
Suggestion - Pre-defined amounts explanation was created by Daniel Hansen
Would it be possible to remove the square brackets ( "[ ... ]" ) around "Pre-defined amounts explanation" items and have these not be bolded? The square brackets are a little distracting, and I think the bolding is unnecessary.

Just a thought.

Thank you. And thanks for the quick responses to my other questions and concerns.


Attachments:

Please Log in or Create an account to join the conversation.

  • safeworld4women
  • Offline
  • Premium Member
  • Premium Member
More
9 years 7 months ago - 9 years 7 months ago #49299 by safeworld4women
Replied by safeworld4women on topic Suggestion - Pre-defined amounts explanation
Hi Daniel
I was wondering this myself
I just looked at the coding of the file concerned and worked it out....
The relevant file default.php is found in components/com_jdonation/views/donation/tmpl/
Around line 388 you will find...
Code:
<?php if (isset($explanations[$i]) && $explanations[$i]) { echo ' <span class="amount_explaination">[ '.$explanations[$i].' ]</span> ' ; } ?>
The brackets you mention [ ] are here inside the span class after the "> and before </span>
Code:
echo ' <span class="amount_explaination">[ '.$explanations[$i].' ]</span> ' ;

I suggest doing an override so you don't lose the changes!

The css selector to change the font from being bold is ' .amount_explaination'

(not my spelling!)

Andrew

I am the Operations Director and lead Developer for The Safeworld International Foundation - an award winning international Non-profit working for women's empowerment.
I also design websites for non-profit organisations and small ethical businesses.
Last edit: 9 years 7 months ago by safeworld4women.
The following user(s) said Thank You: Daniel Hansen

Please Log in or Create an account to join the conversation.

  • Daniel Hansen
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
9 years 7 months ago - 9 years 7 months ago #49302 by Daniel Hansen
Replied by Daniel Hansen on topic Suggestion - Pre-defined amounts explanation
Thanks! Worked like a charm! I still think, though, that this would be better addressed as an enhancement to the component itself since (IMHO) the brackets and bolding look rather out of place and awkward.

Here is the result:

Attachments:
Last edit: 9 years 7 months ago by Daniel Hansen. Reason: Added screenshot

Please Log in or Create an account to join the conversation.

More
9 years 7 months ago #49309 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Suggestion - Pre-defined amounts explanation
That's simple modification as you see. Not sure it is good for other customers need, so I think I will leave it as how it is at the moment.

If it is possible, could you please upload the modified files here so that if someone has the same need, they can simply use it ?

Regards,

Tuan

Please Log in or Create an account to join the conversation.

More
9 years 7 months ago #49310 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Suggestion - Pre-defined amounts explanation
FYI, the code for donation form contains many changes in the new version which I am working on right now, so template override might not work with the next version.

So in case I release new version on tomorrow and you want to upgrade, maybe you will need to re-do the modification on the new version.

Tuan

Please Log in or Create an account to join the conversation.

  • Daniel Hansen
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
9 years 7 months ago - 9 years 7 months ago #49313 by Daniel Hansen
Replied by Daniel Hansen on topic Suggestion - Pre-defined amounts explanation
Here is the file (rename default.txt to default.php - the modification is on line 394):
Attachments:
Last edit: 9 years 7 months ago by Daniel Hansen. Reason: Noted line of code containing change.

Please Log in or Create an account to join the conversation.

  • safeworld4women
  • Offline
  • Premium Member
  • Premium Member
More
9 years 7 months ago #49317 by safeworld4women
Replied by safeworld4women on topic Suggestion - Pre-defined amounts explanation
Glad to help!

And Tuan!
I always get excited when I hear you are modifying the component!
:)

Andrew

I am the Operations Director and lead Developer for The Safeworld International Foundation - an award winning international Non-profit working for women's empowerment.
I also design websites for non-profit organisations and small ethical businesses.

Please Log in or Create an account to join the conversation.

Moderators: Mr. DamDũng Nguyễn Việt