Merge branch 'feature.issue-due-date' of github.com:treffynnon/Indefero into feature.issue-due-date
Conflicts: src/IDF/Form/IssueUpdate.php
This commit is contained in:
commit
7207cdcd46
@ -104,9 +104,10 @@ class IDF_Form_IssueUpdate extends IDF_Form_IssueCreate
|
||||
),
|
||||
));
|
||||
$this->fields['due_dtime'] = new Pluf_Form_Field_Date(
|
||||
$due_dtime = substr($this->issue->due_dtime, 0, 10);
|
||||
array('required' => false,
|
||||
'label' => __('Due date'),
|
||||
'initial' => $this->issue->due_dtime,
|
||||
'initial' => $due_dtime,
|
||||
'widget_attrs' => array('size' => 15,),
|
||||
));
|
||||
|
||||
|
@ -156,17 +156,16 @@ class IDF_Issue extends Pluf_Model
|
||||
IDF_Search::remove($this);
|
||||
}
|
||||
|
||||
function restore() {
|
||||
$this->due_dtime = substr($this->due_dtime, 0, 10);
|
||||
}
|
||||
|
||||
function preSave($create=false)
|
||||
{
|
||||
if ($this->id == '') {
|
||||
$this->creation_dtime = gmdate('Y-m-d H:i:s');
|
||||
}
|
||||
if($this->due_dtime) {
|
||||
$this->due_dtime .= ' 23:59:59';
|
||||
if($this->due_dtime and !empty($this->due_dtime)) {
|
||||
$datetime = $this->due_dtime . ' 23:59:59';
|
||||
if(date('Y-m-d', strtotime($datetime)) === $this->due_dtime) {
|
||||
$this->due_dtime = $datetime;
|
||||
}
|
||||
}
|
||||
$this->modif_dtime = gmdate('Y-m-d H:i:s');
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user