* Fix bug #12828.
This commit is contained in:
@@ -37,6 +37,7 @@ function loadList(type, id)
|
||||
if(data.length != 0)
|
||||
{
|
||||
$(divClass).html(data).find('select').chosen();
|
||||
if(config.currentMethod == 'edit') $(divClass).html(data).find('select').val(idvalue).trigger('chosen:updated');
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -206,7 +206,6 @@ class todoModel extends model
|
||||
public function update($todoID)
|
||||
{
|
||||
$oldTodo = $this->dao->findById((int)$todoID)->from(TABLE_TODO)->fetch();
|
||||
if(in_array($oldTodo->type, $this->config->todo->moduleList)) $oldTodo->name = '';
|
||||
|
||||
$objectType = $this->post->type;
|
||||
$hasObject = in_array($objectType, $this->config->todo->moduleList);
|
||||
@@ -224,6 +223,14 @@ class todoModel extends model
|
||||
->remove(implode(',', $this->config->todo->moduleList) . ',uid')
|
||||
->get();
|
||||
|
||||
if($todo->type != 'custom')
|
||||
{
|
||||
$type = $todo->type;
|
||||
$object = $this->loadModel($type)->getByID($objectType);
|
||||
if(isset($object->name)) $todo->name = $object->name;
|
||||
if(isset($object->title)) $todo->name = $object->title;
|
||||
}
|
||||
|
||||
if($todo->end < $todo->begin)
|
||||
{
|
||||
dao::$errors[] = sprintf($this->lang->error->gt, $this->lang->todo->end, $this->lang->todo->begin);
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
<?php include '../../common/view/kindeditor.html.php';?>
|
||||
<?php js::set('moduleList', $config->todo->moduleList)?>
|
||||
<?php js::set('objectsMethod', $config->todo->getUserObjectsMethod)?>
|
||||
<?php js::set('idvalue', $todo->idvalue);?>
|
||||
<?php if(common::checkNotCN()):?>
|
||||
<style> label.col-sm-1{width:100px;} </style>
|
||||
<?php endif;?>
|
||||
|
||||
Reference in New Issue
Block a user