* adjust code for manageMembers in project, if the same account has been selected unset it.

This commit is contained in:
shiyangyangwork@yahoo.cn
2012-01-10 01:27:33 +00:00
parent cbaed93538
commit 1b0020ce2d
5 changed files with 10 additions and 18 deletions
+1
View File
@@ -791,6 +791,7 @@ class projectModel extends model
{
extract($_POST);
$accounts = array_unique($accounts);
foreach($accounts as $key => $account)
{
if(empty($account)) continue;
+3 -7
View File
@@ -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';
+1 -1
View File
@@ -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>
+4 -9
View File
@@ -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');
+1 -1
View File
@@ -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>