Setup a simple JS shortcut to insert todays date for the due date
This commit is contained in:
parent
c2d61083a7
commit
0e52a2e673
@ -668,6 +668,7 @@ class IDF_Views_Issue
|
|||||||
'previous_issue_id' => $previous_issue_id,
|
'previous_issue_id' => $previous_issue_id,
|
||||||
'next_issue_id' => $next_issue_id,
|
'next_issue_id' => $next_issue_id,
|
||||||
'related_issues' => $related_issues,
|
'related_issues' => $related_issues,
|
||||||
|
'date_today' => date('Y-m-d 23:59'),
|
||||||
),
|
),
|
||||||
$arrays),
|
$arrays),
|
||||||
$request);
|
$request);
|
||||||
|
@ -131,6 +131,7 @@
|
|||||||
<th>{$form.f.due_dtime.labelTag}:</th>
|
<th>{$form.f.due_dtime.labelTag}:</th>
|
||||||
<td>{if $form.f.due_dtime.errors}{$form.f.due_dtime.fieldErrors}{/if}
|
<td>{if $form.f.due_dtime.errors}{$form.f.due_dtime.fieldErrors}{/if}
|
||||||
{$form.f.due_dtime|unsafe}
|
{$form.f.due_dtime|unsafe}
|
||||||
|
<a href="#" rel="{$date_today}" id="due_dtime_today">Today</a>
|
||||||
</td>
|
</td>
|
||||||
<tr>
|
<tr>
|
||||||
<tr>
|
<tr>
|
||||||
@ -214,7 +215,10 @@
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
{literal}
|
{literal}
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
|
$("#due_dtime_today").click(function(){
|
||||||
|
$('#id_due_dtime').val($(this).attr('rel'));
|
||||||
|
return false;
|
||||||
|
});
|
||||||
// Hide the upload forms, we insert before the first attach file
|
// Hide the upload forms, we insert before the first attach file
|
||||||
// row an "Attach File" little link.
|
// row an "Attach File" little link.
|
||||||
// We hide all the rows.
|
// We hide all the rows.
|
||||||
|
Loading…
Reference in New Issue
Block a user