History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: FMNG-10
Type: New Feature New Feature
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Dan Hardiker
Reporter: Simon Wheatley
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Confluence Extension: Form Mail NG

Image buttons

Created: 09/May/07 01:14 PM   Updated: 28/Jan/08 10:31 AM
Component/s: None
Affects Version/s: None
Fix Version/s: 1.1

Time Tracking:
Not Specified


 Description  « Hide
Currently Form Mail NG doesn't allow for image buttons to submit, can they be added? I can see them being necessary sooner or later.

 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Dan Hardiker - 09/May/07 03:43 PM
Can you give me the macro markup, and html output that you want?

Simon Wheatley - 10/May/07 08:48 AM - edited
Extend mail-submit (which I want you to do anyway... to allow classes )

.

{mail-submit:src=/images/whatever.gif|alt=blah blah|class=thingy}

<input type="image" src="/images/whatever.gif" alt="blah blah" class="thingy" onclick="FormMailNG.getInstance(this).submit();">

{mail-submit:blah blah}

<input type="button" value="blah blah" onclick="FormMailNG.getInstance(this).submit();">

{mail-submit:value=blah blah|class=thingy}

<input type="button" value="blah blah" class="thingy" onclick="FormMailNG.getInstance(this).submit();">

Might be nice to validate for the presence of alt, if src is specified...


Dan Hardiker - 28/Jan/08 10:31 AM
Fixed, but untested.

I've added a new macro {mail-submit-img} which requires src and alt parameters, and can also have cssClass and cssStyle params too. The src must start with either "http" for an absolute URL or "!/" for a relative path (the ! is taken off before output).

A future nicety would be to be able to do src=SPKEY:Page Title^Image Name.png and have it resolve it to a link. As I've not done that in a long time, I'd have to look it up as I would rather not parse it myself.