Merge branch 'master' of https://gitlab.zcorp.cc/easycorp/zentaopms
This commit is contained in:
+112
-68
@@ -1831,88 +1831,100 @@ class baseRouter
|
||||
*/
|
||||
public function loadModule()
|
||||
{
|
||||
$appName = $this->appName;
|
||||
$moduleName = $this->moduleName;
|
||||
$methodName = $this->methodName;
|
||||
try {
|
||||
$appName = $this->appName;
|
||||
$moduleName = $this->moduleName;
|
||||
$methodName = $this->methodName;
|
||||
|
||||
/*
|
||||
* 引入该模块的control文件。
|
||||
* Include the control file of the module.
|
||||
**/
|
||||
$file2Included = $this->setActionExtFile() ? $this->extActionFile : $this->controlFile;
|
||||
chdir(dirname($file2Included));
|
||||
helper::import($file2Included);
|
||||
/*
|
||||
* 引入该模块的control文件。
|
||||
* Include the control file of the module.
|
||||
**/
|
||||
$file2Included = $this->setActionExtFile() ? $this->extActionFile : $this->controlFile;
|
||||
chdir(dirname($file2Included));
|
||||
helper::import($file2Included);
|
||||
|
||||
/*
|
||||
* 设置control的类名。
|
||||
* Set the class name of the control.
|
||||
**/
|
||||
$className = class_exists("my$moduleName") ? "my$moduleName" : $moduleName;
|
||||
if(!class_exists($className)) $this->triggerError("the control $className not found", __FILE__, __LINE__, $exit = true);
|
||||
/*
|
||||
* 设置control的类名。
|
||||
* Set the class name of the control.
|
||||
**/
|
||||
$className = class_exists("my$moduleName") ? "my$moduleName" : $moduleName;
|
||||
if(!class_exists($className)) $this->triggerError("the control $className not found", __FILE__, __LINE__, $exit = true);
|
||||
|
||||
/*
|
||||
* 创建control类的实例。
|
||||
* Create a instance of the control.
|
||||
**/
|
||||
$module = new $className();
|
||||
if(!method_exists($module, $methodName)) $this->triggerError("the module $moduleName has no $methodName method", __FILE__, __LINE__, $exit = true);
|
||||
$this->control = $module;
|
||||
/*
|
||||
* 创建control类的实例。
|
||||
* Create a instance of the control.
|
||||
**/
|
||||
$module = new $className();
|
||||
if(!method_exists($module, $methodName)) $this->triggerError("the module $moduleName has no $methodName method", __FILE__, __LINE__, $exit = true);
|
||||
$this->control = $module;
|
||||
|
||||
/* include default value for module*/
|
||||
$defaultValueFiles = glob($this->getTmpRoot() . "defaultvalue/*.php");
|
||||
if($defaultValueFiles) foreach($defaultValueFiles as $file) include $file;
|
||||
/* include default value for module*/
|
||||
$defaultValueFiles = glob($this->getTmpRoot() . "defaultvalue/*.php");
|
||||
if($defaultValueFiles) foreach($defaultValueFiles as $file) include $file;
|
||||
|
||||
/*
|
||||
* 使用反射机制获取函数参数的默认值。
|
||||
* Get the default settings of the method to be called using the reflecting.
|
||||
*
|
||||
* */
|
||||
$defaultParams = array();
|
||||
$methodReflect = new reflectionMethod($className, $methodName);
|
||||
foreach($methodReflect->getParameters() as $param)
|
||||
{
|
||||
$name = $param->getName();
|
||||
|
||||
$default = '_NOT_SET';
|
||||
if(isset($paramDefaultValue[$appName][$className][$methodName][$name]))
|
||||
/*
|
||||
* 使用反射机制获取函数参数的默认值。
|
||||
* Get the default settings of the method to be called using the reflecting.
|
||||
*
|
||||
* */
|
||||
$defaultParams = array();
|
||||
$methodReflect = new reflectionMethod($className, $methodName);
|
||||
foreach($methodReflect->getParameters() as $param)
|
||||
{
|
||||
$default = $paramDefaultValue[$appName][$className][$methodName][$name];
|
||||
}
|
||||
elseif(isset($paramDefaultValue[$className][$methodName][$name]))
|
||||
{
|
||||
$default = $paramDefaultValue[$className][$methodName][$name];
|
||||
}
|
||||
elseif($param->isDefaultValueAvailable())
|
||||
{
|
||||
$default = $param->getDefaultValue();
|
||||
$name = $param->getName();
|
||||
|
||||
$default = '_NOT_SET';
|
||||
if(isset($paramDefaultValue[$appName][$className][$methodName][$name]))
|
||||
{
|
||||
$default = $paramDefaultValue[$appName][$className][$methodName][$name];
|
||||
}
|
||||
elseif(isset($paramDefaultValue[$className][$methodName][$name]))
|
||||
{
|
||||
$default = $paramDefaultValue[$className][$methodName][$name];
|
||||
}
|
||||
elseif($param->isDefaultValueAvailable())
|
||||
{
|
||||
$default = $param->getDefaultValue();
|
||||
}
|
||||
|
||||
$defaultParams[$name] = $default;
|
||||
}
|
||||
|
||||
$defaultParams[$name] = $default;
|
||||
/**
|
||||
* 根据PATH_INFO或者GET方式设置请求的参数。
|
||||
* Set params according PATH_INFO or GET.
|
||||
*/
|
||||
if($this->config->requestType != 'GET')
|
||||
{
|
||||
$this->setParamsByPathInfo($defaultParams);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->setParamsByGET($defaultParams);
|
||||
}
|
||||
|
||||
if($this->config->framework->filterParam == 2)
|
||||
{
|
||||
$_GET = validater::filterParam($_GET, 'get');
|
||||
$_COOKIE = validater::filterParam($_COOKIE, 'cookie');
|
||||
}
|
||||
|
||||
/* 调用该方法 Call the method. */
|
||||
call_user_func_array(array($module, $methodName), $this->params);
|
||||
$this->checkAPIFile();
|
||||
return $module;
|
||||
} catch (EndResponseException $endResponseException) {
|
||||
echo $endResponseException->getContent();
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据PATH_INFO或者GET方式设置请求的参数。
|
||||
* Set params according PATH_INFO or GET.
|
||||
*/
|
||||
if($this->config->requestType != 'GET')
|
||||
if (isset($module))
|
||||
{
|
||||
$this->setParamsByPathInfo($defaultParams);
|
||||
return $module;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->setParamsByGET($defaultParams);
|
||||
return false;
|
||||
}
|
||||
|
||||
if($this->config->framework->filterParam == 2)
|
||||
{
|
||||
$_GET = validater::filterParam($_GET, 'get');
|
||||
$_COOKIE = validater::filterParam($_COOKIE, 'cookie');
|
||||
}
|
||||
|
||||
/* 调用该方法 Call the method. */
|
||||
call_user_func_array(array($module, $methodName), $this->params);
|
||||
$this->checkAPIFile();
|
||||
return $module;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2768,3 +2780,35 @@ class super
|
||||
if($this->scope == 'global') a($GLOBALS);
|
||||
}
|
||||
}
|
||||
|
||||
class EndResponseException extends \Exception
|
||||
{
|
||||
/**
|
||||
* 响应内容
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $content;
|
||||
|
||||
/**
|
||||
* @param string $content
|
||||
*
|
||||
* @return sellf
|
||||
*/
|
||||
public static function create($content = '')
|
||||
{
|
||||
$exception = new self;
|
||||
$exception->content = $content;
|
||||
return $exception;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get 响应内容
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getContent()
|
||||
{
|
||||
return $this->content;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -248,6 +248,17 @@ class helper extends baseHelper
|
||||
if(empty($jsonDecode)) return $response;
|
||||
return $jsonDecode;
|
||||
}
|
||||
|
||||
/**
|
||||
* 代替 die、exit 函数终止并输出
|
||||
*
|
||||
* @param string $content
|
||||
* @return void
|
||||
*/
|
||||
public static function die($content)
|
||||
{
|
||||
throw EndResponseException::create($content);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -183,6 +183,7 @@ $lang->action->desc->syncprogram = '$date, started by <strong>$actor</stron
|
||||
$lang->action->desc->syncproject = '$date, starting the execution sets the project status as Ongoing.' . "\n";
|
||||
$lang->action->desc->syncexecution = '$date, starting the task sets the execution status as Ongoing.' . "\n";
|
||||
$lang->action->desc->importfromgitlab = '$date, Issue associate created from gitlab by <strong>$actor</strong>.' . "\n";
|
||||
$lang->action->desc->archived = '$date, archived by <strong>$actor</strong>.' . "\n";
|
||||
|
||||
/* Used to describe the history of operations related to parent-child tasks. */
|
||||
$lang->action->desc->createchildren = '$date, <strong>$actor</strong> created a child task <strong>$extra</strong>。' . "\n";
|
||||
@@ -313,6 +314,7 @@ $lang->action->label->reopen = 'Reopen';
|
||||
$lang->action->label->approve = 'Passed';
|
||||
$lang->action->label->reject = 'Rejected';
|
||||
$lang->action->label->importfromgitlab = 'Issue associate created';
|
||||
$lang->action->label->archived = 'Archived';
|
||||
|
||||
/* Dynamic information is grouped by object. */
|
||||
$lang->action->dynamicAction = new stdclass;
|
||||
|
||||
@@ -183,6 +183,7 @@ $lang->action->desc->syncprogram = '$date, 由 <strong>$actor</strong> 启
|
||||
$lang->action->desc->syncproject = '$date, 系统判断由于执行开始,将项目状态置为进行中。' . "\n";
|
||||
$lang->action->desc->syncexecution = '$date, 系统判断由于任务开始,将执行状态置为进行中。' . "\n";
|
||||
$lang->action->desc->importfromgitlab = '$date, 由 <strong>$actor</strong> 从Gitlab的Issue关联创建。' . "\n";
|
||||
$lang->action->desc->archived = '$date, 由 <strong>$actor</strong> 归档。' . "\n";
|
||||
|
||||
/* 用来描述和父子任务相关的操作历史记录。*/
|
||||
$lang->action->desc->createchildren = '$date, 由 <strong>$actor</strong> 创建子任务 <strong>$extra</strong>。' . "\n";
|
||||
@@ -313,6 +314,7 @@ $lang->action->label->reopen = '重新打开';
|
||||
$lang->action->label->approve = '通过了';
|
||||
$lang->action->label->reject = '拒绝了';
|
||||
$lang->action->label->importfromgitlab = '从Gitlab关联创建了';
|
||||
$lang->action->label->archived = '归档了';
|
||||
|
||||
/* 动态信息按照对象分组 */
|
||||
$lang->action->dynamicAction = new stdclass();
|
||||
|
||||
@@ -169,7 +169,7 @@ $lang->createIcons['execution'] = 'run';
|
||||
$lang->createIcons['project'] = 'project';
|
||||
$lang->createIcons['product'] = 'product';
|
||||
$lang->createIcons['program'] = 'program';
|
||||
$lang->createIcons['kanbanspace'] = 'zone';
|
||||
$lang->createIcons['kanbanspace'] = 'cube';
|
||||
$lang->createIcons['kanban'] = 'kanban';
|
||||
|
||||
|
||||
|
||||
@@ -505,6 +505,33 @@ class kanban extends control
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Archive a column.
|
||||
*
|
||||
* @param int $columnID
|
||||
* @param string $confirm no|yes
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function archiveColumn($columnID, $confirm = 'no')
|
||||
{
|
||||
if($confirm == 'no')
|
||||
{
|
||||
die(js::confirm($this->lang->kanbancolumn->confirmArchive, $this->createLink('kanban', 'archiveColumn', "columnID=$columnID&confirm=yes")));
|
||||
}
|
||||
else
|
||||
{
|
||||
$changes = $this->kanban->archiveColumn($columnID);
|
||||
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
|
||||
$actionID = $this->loadModel('action')->create('kanbancolumn', $columnID, 'archived');
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
|
||||
if(isonlybody()) die(js::reload('parent.parent'));
|
||||
die(js::reload('parent'));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a column.
|
||||
*
|
||||
@@ -641,6 +668,33 @@ class kanban extends control
|
||||
die(json_encode($kanbanGroup));
|
||||
}
|
||||
|
||||
/**
|
||||
* Archive a card.
|
||||
*
|
||||
* @param int $cardID
|
||||
* @param string $confirm no|yes
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function archiveCard($cardID, $confirm = 'no')
|
||||
{
|
||||
if($confirm == 'no')
|
||||
{
|
||||
die(js::confirm($this->lang->kanbancard->confirmArchive, $this->createLink('kanban', 'archiveCard', "cardID=$cardID&confirm=yes")));
|
||||
}
|
||||
else
|
||||
{
|
||||
$changes = $this->kanban->archiveCard($cardID);
|
||||
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
|
||||
$actionID = $this->loadModel('action')->create('kanbancard', $cardID, 'archived');
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
|
||||
if(isonlybody()) die(js::reload('parent.parent'));
|
||||
die(js::reload('parent'));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a card.
|
||||
*
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
.radio-inline {margin-left: 10px !important;}
|
||||
@@ -92,6 +92,9 @@ body {background-color: #fff}
|
||||
.kanban-card > .actions > a {display: block; float: left; width: 20px; height: 20px; line-height: 20px; text-align: center; border-radius: 4px; opacity: .7;}
|
||||
.kanban-card > .actions > a:hover {background-color: rgba(0,0,0,.075); opacity: 1;}
|
||||
|
||||
.cardcolor {width:40px; height: 14px; float: left; margin-left: 5px; margin-right: 5px; margin-top: 2px; border-radius: 2px;}
|
||||
#cardcolormenu {padding:2px 2px; width: 100px;}
|
||||
|
||||
.kanban-col[data-type=ADD] {display: none;}
|
||||
.kanban-col[data-type=EMPTY] {display: none;}
|
||||
.kanban-item:hover .title {padding-right: 10px;}
|
||||
|
||||
@@ -722,7 +722,7 @@ function createCardMenu(options)
|
||||
var moveCardItems = [];
|
||||
var moveColumns = regions[options.$trigger.closest('.region').data('id')].groups[0].columns;
|
||||
var parentColumns = [];
|
||||
for(let i = moveColumns.length-1 ; i >= 0 ; i -- )
|
||||
for(var i = moveColumns.length-1 ; i >= 0 ; i -- )
|
||||
{
|
||||
if(moveColumns[i].id == card.column || $.inArray(moveColumns[i].id, parentColumns) >= 0) continue;
|
||||
if(moveColumns[i].parent > 0) parentColumns.push(moveColumns[i].parent);
|
||||
@@ -735,12 +735,13 @@ function createCardMenu(options)
|
||||
{
|
||||
var cardColoritems = [];
|
||||
if(!card.color) color = "#fff";
|
||||
colorList.forEach(function(color)
|
||||
for(var i = 0 ; i < colorList.length ; i ++ )
|
||||
{
|
||||
attr = card.color == color ? '<i class="icon icon-check" style="margin-left: 10px"></i>' : '';
|
||||
cardColoritems.push({label: "<div class='cardcolor' style='background:" + color + "; width:40px; height: 14px; float: left; margin-left: 5px; margin-right: 5px; margin-top: 2px;'></div>" + colorListLang[color] + attr ,
|
||||
onClick: function(){setCardColor(card.id, color, card.kanban, card.region);}, html: true, attrs: {'style' : 'padding:2px 2px; width: 100px;'}});
|
||||
});
|
||||
var attr = card.color == colorList[i] ? '<i class="icon icon-check" style="margin-left: 10px"></i>' : '';
|
||||
var border = i == 0 ? 'border:1px solid #b0b0b0;' : '';
|
||||
cardColoritems.push({label: "<div class='cardcolor' style='background:" + colorList[i] + ";" + border + "'></div>" + colorListLang[colorList[i]] + attr ,
|
||||
onClick: function(){setCardColor(card.id, colorList[i], card.kanban, card.region);}, html: true, attrs: {id: 'cardcolormenu'}, className: 'color' + i});
|
||||
};
|
||||
items.push({label: kanbanLang.cardColor, icon: 'color', items: cardColoritems});
|
||||
}
|
||||
|
||||
@@ -896,6 +897,18 @@ $(function()
|
||||
return false;
|
||||
});
|
||||
|
||||
/* Mofidy dafault color's border color. */
|
||||
$(document).on('mouseout', '.color0', function()
|
||||
{
|
||||
$('.color0 .cardcolor').css('border', '1px solid #b0b0b0');
|
||||
});
|
||||
|
||||
/* Mofidy dafault color's border color. */
|
||||
$(document).on('mouseover', '.color0', function()
|
||||
{
|
||||
$('.color0 .cardcolor').css('border', '1px solid #fff');
|
||||
});
|
||||
|
||||
/* Init sortable */
|
||||
var sortType = '';
|
||||
var cards = null;
|
||||
|
||||
@@ -214,7 +214,8 @@ $lang->kanbancolumn->color = 'Column Color';
|
||||
$lang->kanbancolumn->childName = 'Name';
|
||||
$lang->kanbancolumn->childColor = 'Color';
|
||||
|
||||
$lang->kanbancolumn->confirmDelete = 'Are you sure to delete this column? After deleting the column, all cards in this column will also be deleted.';
|
||||
$lang->kanbancolumn->confirmArchive = 'Are you sure to archive this column? After archiving the column, the column and all cards in the column will be hidden. You can view the archived columns in the Region - Archived.';
|
||||
$lang->kanbancolumn->confirmDelete = 'Are you sure to delete this column? After deleting the column, all cards in this column will also be deleted.';
|
||||
|
||||
$lang->kanbanlane = new stdclass();
|
||||
$lang->kanbanlane->name = $lang->kanban->laneName;
|
||||
@@ -271,7 +272,8 @@ $lang->kanbancard->deadlineAB = 'DL';
|
||||
$lang->kanbancard->beginAB = 'Begin';
|
||||
$lang->kanbancard->to = 'to';
|
||||
|
||||
$lang->kanbancard->confirmDelete = 'Do you want to delete this card? After deleting the card, it will be deleted from the Kanban. You can only view it in the system recycle bin.';
|
||||
$lang->kanbancard->confirmArchive = 'Are you sure to archive this card? After archiving the card, it will be hidden from the column and you can view it in the Region - Archived.';
|
||||
$lang->kanbancard->confirmDelete = 'Are you sure to delete this card? After deleting the card, it will be deleted from the Kanban. You can only view it in the system recycle bin.';
|
||||
|
||||
$lang->kanbancard->priList[1] = 1;
|
||||
$lang->kanbancard->priList[2] = 2;
|
||||
|
||||
@@ -214,7 +214,8 @@ $lang->kanbancolumn->color = '看板列颜色';
|
||||
$lang->kanbancolumn->childName = '子列名称';
|
||||
$lang->kanbancolumn->childColor = '子状态颜色';
|
||||
|
||||
$lang->kanbancolumn->confirmDelete = '您确认删除该列吗?删除列后,该列中所有卡片也会被删除。';
|
||||
$lang->kanbancolumn->confirmArchive = '您确认归档该列吗?归档列后,该列和列中所有卡片将被隐藏,您可以在区域-已归档中查看已归档的列。';
|
||||
$lang->kanbancolumn->confirmDelete = '您确认删除该列吗?删除列后,该列中所有卡片也会被删除。';
|
||||
|
||||
$lang->kanbanlane = new stdclass();
|
||||
$lang->kanbanlane->name = $lang->kanban->laneName;
|
||||
@@ -271,7 +272,8 @@ $lang->kanbancard->deadlineAB = '截止';
|
||||
$lang->kanbancard->beginAB = '开始';
|
||||
$lang->kanbancard->to = '至';
|
||||
|
||||
$lang->kanbancard->confirmDelete = '您确认删除该卡片吗?删除卡片后,该卡片将从看板中删除,您只能通过系统回收站查看。';
|
||||
$lang->kanbancard->confirmArchive = '您确认归档该卡片吗?归档卡片后,该卡片将从列中隐藏,您可以在区域-已归档中查看。';
|
||||
$lang->kanbancard->confirmDelete = '您确认删除该卡片吗?删除卡片后,该卡片将从看板中删除,您只能通过系统回收站查看。';
|
||||
|
||||
$lang->kanbancard->priList[1] = 1;
|
||||
$lang->kanbancard->priList[2] = 2;
|
||||
|
||||
+46
-2
@@ -225,7 +225,7 @@ class kanbanModel extends model
|
||||
{
|
||||
$column = fixer::input('post')
|
||||
->add('region', $regionID)
|
||||
->add('parent', $parent)
|
||||
->setIF($parent > 0, 'parent', $parent)
|
||||
->setIF($order, 'order', $order)
|
||||
->setDefault('color', '#333')
|
||||
->trim('name')
|
||||
@@ -252,7 +252,7 @@ class kanbanModel extends model
|
||||
$column->limit = (int)$column->limit;
|
||||
|
||||
$limit = $column->limit;
|
||||
if($column->parent > 0)
|
||||
if(isset($column->parent) and $column->parent > 0)
|
||||
{
|
||||
/* Create a child column. */
|
||||
$parentColumn = $this->getColumnByID($column->parent);
|
||||
@@ -1942,6 +1942,50 @@ class kanbanModel extends model
|
||||
if($noExtra) $this->dao->update(TABLE_KANBANLANE)->set('order')->eq($laneOrder)->where('id')->eq($noExtra)->exec();
|
||||
}
|
||||
|
||||
/**
|
||||
* Archive a column.
|
||||
*
|
||||
* @param int $columnID
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function archiveColumn($columnID)
|
||||
{
|
||||
$oldColumn = $this->getColumnByID($columnID);
|
||||
|
||||
$this->dao->update(TABLE_KANBANCOLUMN)
|
||||
->set('archived')->eq(1)
|
||||
->where('id')->eq($columnID)
|
||||
->exec();
|
||||
|
||||
$column = $this->getColumnByID($columnID);
|
||||
|
||||
if(!dao::isError()) return common::createChanges($oldColumn, $column);
|
||||
}
|
||||
|
||||
/**
|
||||
* Archive a card.
|
||||
*
|
||||
* @param int $cardID
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function archiveCard($cardID)
|
||||
{
|
||||
$oldCard = $this->getCardByID($cardID);
|
||||
|
||||
$this->dao->update(TABLE_KANBANCARD)
|
||||
->set('archived')->eq(1)
|
||||
->set('archivedBy')->eq($this->app->user->account)
|
||||
->set('archivedDate')->eq(helper::now())
|
||||
->where('id')->eq($cardID)
|
||||
->exec();
|
||||
|
||||
$card = $this->getCardByID($cardID);
|
||||
|
||||
if(!dao::isError()) return common::createChanges($oldCard, $card);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get space by id.
|
||||
*
|
||||
|
||||
@@ -31,11 +31,11 @@
|
||||
<td>
|
||||
<div class='required required-wrapper'></div>
|
||||
<div class='input-group'>
|
||||
<?php echo html::input('WIPCount', $column->limit != -1 ? $column->limit : '', "class='form-control'" . ($column->limit > 0 ? '' : "disabled"));?>
|
||||
<?php echo html::hidden('limit', $column->limit, "class='form-control'");?>
|
||||
<?php echo html::input('WIPCount', '', "class='form-control' disabled");?>
|
||||
<?php echo html::hidden('limit', -1, "class='form-control'");?>
|
||||
<span class='input-group-addon'>
|
||||
<label class='checkbox-inline'>
|
||||
<input type='checkbox' name='noLimit' id='noLimit' value='-1' <?php if($column->limit == -1) echo "checked";?>/> <?php echo $this->lang->kanban->noLimit;?>
|
||||
<input type='checkbox' name='noLimit' id='noLimit' value='-1' checked/> <?php echo $this->lang->kanban->noLimit;?>
|
||||
</label>
|
||||
</span>
|
||||
</div>
|
||||
@@ -52,7 +52,7 @@
|
||||
<td colspan='2' class='form-actions text-center'>
|
||||
<?php echo html::hidden('color', '#333');?>
|
||||
<?php echo html::hidden('group', $column->group);?>
|
||||
<?php echo html::hidden('parent', $column->parent);?>
|
||||
<?php echo html::hidden('parent', $column->parent > 0 ? $column->parent : 0);?>
|
||||
<?php echo html::submitButton();?>
|
||||
<?php echo html::commonButton($lang->cancel, "data-dismiss='modal'", 'btn btn-wide');?>
|
||||
</td>
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
<div class='space'>
|
||||
<div class='row menu'>
|
||||
<div class='spaceTitle pull-left'>
|
||||
<div><i class='icon-zone'></i></div>
|
||||
<div><i class='icon-cube'></i></div>
|
||||
<div>
|
||||
<h4>
|
||||
<?php if($space->status == 'closed'):?>
|
||||
|
||||
@@ -816,14 +816,19 @@ class my extends control
|
||||
*/
|
||||
public function editProfile()
|
||||
{
|
||||
if($this->app->user->account == 'guest') die(js::alert('guest') . js::locate('back'));
|
||||
if($this->app->user->account == 'guest')
|
||||
{
|
||||
echo js::alert('guest'), js::locate('back');
|
||||
return;
|
||||
}
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$_POST['account'] = $this->app->user->account;
|
||||
$_POST['groups'] = $this->dao->select('`group`')->from(TABLE_USERGROUP)->where('account')->eq($this->post->account)->fetchPairs('group', 'group');
|
||||
$this->user->update($this->app->user->id);
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
die(js::locate($this->createLink('my', 'profile'), 'parent'));
|
||||
if(dao::isError()) helper::die(js::error(dao::getError()));
|
||||
echo js::locate($this->createLink('my', 'profile'), 'parent');
|
||||
return;
|
||||
}
|
||||
|
||||
$this->app->loadConfig('user');
|
||||
|
||||
Reference in New Issue
Block a user