* adjust code for manageMembers in project, if the same account has been selected unset it.
This commit is contained in:
@@ -791,6 +791,7 @@ class projectModel extends model
|
||||
{
|
||||
extract($_POST);
|
||||
|
||||
$accounts = array_unique($accounts);
|
||||
foreach($accounts as $key => $account)
|
||||
{
|
||||
if(empty($account)) continue;
|
||||
|
||||
@@ -236,17 +236,13 @@ class story extends control
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function edit($storyID, $comment = false)
|
||||
public function edit($storyID)
|
||||
{
|
||||
$this->loadModel('action');
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$changes = array();
|
||||
if($comment == false)
|
||||
{
|
||||
$changes = $this->story->update($storyID);
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
}
|
||||
$changes = $this->story->update($storyID);
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
if($this->post->comment != '' or !empty($changes))
|
||||
{
|
||||
$action = !empty($changes) ? 'Edited' : 'Commented';
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
<div id='comment' class='hidden'>
|
||||
<fieldset>
|
||||
<legend><?php echo $lang->comment;?></legend>
|
||||
<form method='post' action='<?php echo inlink('edit', "storyID=$story->id&comment=true")?>'>
|
||||
<form method='post' action='<?php echo inlink('edit', "storyID=$story->id")?>'>
|
||||
<table align='center' class='table-1'>
|
||||
<tr><td><?php echo html::textarea('comment', '',"rows='5' class='w-p100'");?></td></tr>
|
||||
<tr><td><?php echo html::submitButton() . html::resetButton();?></td></tr>
|
||||
|
||||
@@ -340,20 +340,15 @@ class testcase extends control
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function edit($caseID, $comment = false)
|
||||
public function edit($caseID)
|
||||
{
|
||||
$this->loadModel('story');
|
||||
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$changes = array();
|
||||
$files = array();
|
||||
if($comment == false)
|
||||
{
|
||||
$changes = $this->testcase->update($caseID);
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
$files = $this->loadModel('file')->saveUpload('testcase', $caseID);
|
||||
}
|
||||
$changes = $this->testcase->update($caseID);
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
$files = $this->loadModel('file')->saveUpload('testcase', $caseID);
|
||||
if($this->post->comment != '' or !empty($changes) or !empty($files))
|
||||
{
|
||||
$this->loadModel('action');
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
<div id='comment' class='hidden'>
|
||||
<fieldset>
|
||||
<legend><?php echo $lang->comment;?></legend>
|
||||
<form method='post' action='<?php echo inlink('edit', "caseID=$case->id&comment=true")?>'>
|
||||
<form method='post' action='<?php echo inlink('edit', "caseID=$case->id")?>'>
|
||||
<table align='center' class='table-1'>
|
||||
<tr><td><?php echo html::textarea('comment', '',"rows='5' class='w-p100'");?></td></tr>
|
||||
<tr><td><?php echo html::submitButton() . html::resetButton();?></td></tr>
|
||||
|
||||
Reference in New Issue
Block a user