[CS-Project-svn_notify] SF.net SVN: cs-project: [701] trunk
Brought to you by:
crazedsanity
From: <cra...@us...> - 2007-12-18 21:44:38
|
Revision: 701 http://cs-project.svn.sourceforge.net/cs-project/?rev=701&view=rev Author: crazedsanity Date: 2007-12-18 13:44:28 -0800 (Tue, 18 Dec 2007) Log Message: ----------- Ability to change helpdesk issue name (issue #70). Modified Paths: -------------- trunk/includes/content/helpdesk.inc trunk/templates/content/helpdesk/view.content.tmpl Modified: trunk/includes/content/helpdesk.inc =================================================================== --- trunk/includes/content/helpdesk.inc 2007-12-18 03:15:44 UTC (rev 700) +++ trunk/includes/content/helpdesk.inc 2007-12-18 21:44:28 UTC (rev 701) @@ -23,13 +23,29 @@ $_POST['updates']['parentRecordId'] = $_POST['updates']['project_id']; unset($_POST['updates']['project_id']); - //that means we've gotta update everything sent... right? + + //if they've changed the name, we gotta log it. + //TODO: probably log this within helpdeskClass::update(). + if(isset($_POST['updates']['name'])) { + //retrieve the old info. + $oldData = $proj->helpdeskObj->get_record($_POST['id']); + + if($oldData['name'] !== $_POST['updates']['name']) { + $addRemark = 'Updated [b]name[/b] from ([b][i]'. $oldData['name'] .'[/i][/b])'; + } + } + $doNotAcceptFields = array("solution", "remark"); foreach($doNotAcceptFields as $unsetThis) { unset($_POST['updates'][$unsetThis]); } $result = $proj->helpdeskObj->update_record($helpdeskId, $_POST['updates']); + if(strlen($addRemark)) { + $proj->helpdeskObj->remark($_POST['id'], $addRemark); + } + + //tell them what happened. if($result == 1) { set_message_wrapper(array( Modified: trunk/templates/content/helpdesk/view.content.tmpl =================================================================== --- trunk/templates/content/helpdesk/view.content.tmpl 2007-12-18 03:15:44 UTC (rev 700) +++ trunk/templates/content/helpdesk/view.content.tmpl 2007-12-18 21:44:28 UTC (rev 701) @@ -109,7 +109,10 @@ <tr> <th align="right">Title: </th> - <td colspan="2">{name}</td> + <td colspan="2"> + <div id="name_text" style="display:inline">{name} [<a href="#" onClick="enableInput('name');">Edit</a>]</div> + <div id="name_inputDiv" style="display:none"><input id="name_input" name="updates[name]" type="text" value="{name}" size="80" disabled></div> + </td> </tr> <tr> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |