Hi,
I tried what your suggested, but to no effect.
I believe including the
set date_opened [ string range [ date ] 0 10 ]
sets the $<date_opened>" to the current date in the value field of the
relevant input.
date <input type="date" size="20" name="date_opened"
placeholder="yyyy-mm-dd" value="$<date_opened>" />
View source on the new ticket page shows nothing
date <input type="date" size="20" name="date_opened"
placeholder="yyyy-mm-dd" value="" />
I'm using Fossil version [79b7902cdd] 2011-01-01 03:06:47 - though I
dont believe date is new.
Thanks for helping.
Stephen
--- New ticked template
<th1>
if {[info exists submit]} {
set status New
set date_opened [ string range [ date ] 0 10 ]
submit_ticket
}
</th1>
<h1 style="text-align: center;">Enter a new item</h1>
<fieldset>
<legend>Issue:</legend>
Summary: <input type="text" name="title" size="60" value="$<title>" />
<br/>
Description:<br />
<th1>set nline [linecount $comment 50 7]</th1>
<textarea name="comment" cols="60" rows="$nline" wrap="virtual"
class="wikiedit">$<comment></textarea>
<br />
Type: <th1>combobox type $type_choices 1</th1>
<input type="hidden" name="status" value="Open" />
date <input type="date" size="20" name="date_opened"
placeholder="yyyy-mm-dd" value="$<date_opened>" />
---------------HTML---------------------
<form method="post" action="/tracker/tktnew"><p>
<input type="hidden" name="csrf" value="localhost" />
</p>
<h1 style="text-align: center;">Enter a new item</h1>
<fieldset>
<legend>Issue:</legend>
Summary: <input type="text" name="title" size="60" value="" />
<br/>
Description:<br />
<textarea name="comment" cols="60" rows="7" wrap="virtual"
class="wikiedit"></textarea>
<br />
Type: <select name="type" size="1"><option
value="action">action</option><option
value="issue">issue</option><option
value="risk">risk</option></select>
<input type="hidden" name="status" value="Open" />
date <input type="date" size="20" name="date_opened"
placeholder="yyyy-mm-dd" value="" />
--------------------
On Wed, Feb 16, 2011 at 3:16 PM, Ron Wilson <[email protected]> wrote:
> On Wed, Feb 16, 2011 at 9:18 AM, Stephen De Gabrielle
> <[email protected]> wrote:
>> I'm sorry, I'm not at all familiar with TH1.
>
> It is a varient of TCL that Fossile uses for scripting of user defined
> logic for tickets. (It also works in the header and footer html.)
>
>> What exactly did you put in the form template for the new ticket screen?
>>
>> I'm prety sure this doesn't create a date input field
>> <th1> set d [ string range [ date ] 0 10 ]</th1>
>>
>> But I don't see how it can be included in the submitted ticket?
>
> In the "New Ticket" html, I added a TH1 statment to save the date as
> the opened date of the ticket:
>
> <th1>
> if {[info exists submit]} {
> set status New
> set opened [ string range [ date ] 0 10 ]
> submit_ticket
> }
> </th1>
>
> (I also changed the initial status to "New".)
>
> In this case, "date" is a Fossil specific function that returns the
> current date and time formated as yyyy-mm-dd HH:MM:SS.
> _______________________________________________
> fossil-users mailing list
> [email protected]
> http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
>
_______________________________________________
fossil-users mailing list
[email protected]
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users