Changing Font Color of Mailto email template link
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-26-2015 10:31 PM
Hi,
Was wondering if someone can assist.
On approval request notifications where there is an Approve or Reject Mailto Email Template links, they come up in the approval notification that looks like hyperlinks.
Is it possible to change the font color?
I have tried with plain HTML but it seems that it does not work.
<font size="3" style="color:green"> ${mailto:mailto.approval} </font>
<font size="3" style="color:red"> ${mailto:mailto.reject} </font>
Has anyone come across this requirement or something similar?
thanks!
Carlito
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-27-2015 03:33 PM
Thanks Benny, I have used that html tag on our email notifications so many times and it has always worked when I am tryong to change the font color of a text or string.
It seems that the tag does not work if used on a Mailto link.
Attached is a sample result of what I am trying to change the font color.
Here is the code that generated it:
<table width="75%" style='display:block; background-color:#CCECFF;border-width:1px;border-style:solid;border-color:<mail_script>template.print(gs.getProperty('css.base.color'));</mail_script>'>
<tr><td>
<b>${sysapproval} requires your Authorisation. </b>
<mail_script>
if (!current.current.u_reason.nil())
template.print("Approval Reason: " + current.u_reason);
</mail_script>
<hr/>
1. Click approve or decline
<blockquote><font style="background-color: palegreen;" color='palegreen'>aa<font size='5' color='green'>✓</font><font size='3' style="color:green"> ${mailto:mailto.approval} </font>aa</font></blockquote>
<blockquote><font style="background-color: pink;" color='pink'>aa<font size='5' color='red'>✗</font><font size='3' style="color:red"> ${mailto:mailto.rejection}</font>aaa</font></blockquote>
2. Enter comments if desired
</td></tr>
</table>
I was hoping that tags
<font size='3' style="color:green"> ${mailto:mailto.approval} </font>
or
<font size='3' style="color:red"> ${mailto:mailto.rejection}</font>
would change the font color of the Mailto links APPROVE or DECLINE but unfortunately they still come up as blue font hyperlinks.
cheers!
Carlito
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-27-2015 04:50 PM
Hi Carlito,
I think this may be down to the software that the user is viewing the email message in... Outlook can be a bit difficult with styles on links, so can gmail.
This thread may provide some assitance:
Cheers
RM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-27-2015 05:01 PM
Hi Carlito, that's because the style of the link <a> takes precedence over the font tag.
Since the <a> tags are auto-generated and do not have an id, I believe that the best way to reach to those elements could be through jQuery where you update the style of an element based on its inner text.
Thanks,
Berny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-27-2015 05:34 PM
Thanks Benny and Russell.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-27-2015 05:39 PM
Here goes your script my friend Carlito
<html>
<script>https://code.jquery.com/jquery-1.10.2.js"></script>
<a href="www.example.com">Red: This is the red link</a>
<a href="www.example.com">Green: This is the green link</a>
<script>
$( "a:contains('Red')" ).css( "color", "red" );
$( "a:contains('Green')" ).css( "color", "green" );
</script>
</html>
Thanks,
Berny