Fossil

View Ticket
Login

View Ticket

2024-01-29
06:50 Closed ticket [c90916433b]: form fields sharing names for different purposes make it difficult to use javalscript library plus 2 other changes ... (artifact: 09eea9fca6 user: stephan)
2011-02-02
16:51 New ticket [c90916433b]. ... (artifact: 0e7c09bca5 user: anonymous)

Ticket Hash: c90916433bd952d9dde4eb94445c0cb6b7729e79
Title: form fields sharing names for different purposes make it difficult to use javalscript library
Status: Closed Type: Code_Defect
Severity: Minor Priority:
Subsystem: Resolution: Wont_Fix
Last Modified: 2024-01-29 06:50:28
Version Found In: 2011-02-02
Description:
'Event edit' (/eventedit) uses name='t' to identify the 'time' field in form. 'Edit Report Format' (/rptedit?rn=10) uses name='t' to identify the 'title' field in form.

The simplest was to resolve this is to change t to time or title respectively

Note: I added the following to the header to allow the use of a date picker for the 'Event edit' and the new and edit ticket screens. :

<link rel="stylesheet" href="$baseurl/doc/tip/jquery/jquery-ui-1.8.9.custom.css" type="text/css" media="screen">

<script src="$baseurl/doc/tip/jquery/jquery-1.4.4.min.js" type="text/javascript"></script> <script src="$baseurl/doc/tip/jquery/jquery-ui-1.8.9.custom.min.js" type="text/javascript"></script>

<script type="text/javascript"> // always use datepicker for this field $(function() { $( "input[name='t']" ).datepicker({ numberOfMonths: 2, showButtonPanel: true, dateFormat: 'yy-mm-dd' }); }); </script>

<script type="text/javascript"> var datefield=document.createElement("input") datefield.setAttribute("type", "date") if (datefield.type!="date"){ //if browser doesn't support input type="date", initialize date picker widget: jQuery(function($){ //on document.ready $( "input[name='last_useful_date']" ).datepicker({dateFormat: 'yy-mm-dd'}); $( "input[name='date_closed']" ).datepicker({dateFormat: 'yy-mm-dd'}); }) } </script>

User Comments:
added on 2024-01-29 06:50:28:
Closing as part of periodic cleanup.