|
From: <gem...@li...> - 2011-12-13 21:00:31
|
Revision: 354
http://gemstracker.svn.sourceforge.net/gemstracker/?rev=354&view=rev
Author: michieltcs
Date: 2011-12-13 21:00:25 +0000 (Tue, 13 Dec 2011)
Log Message:
-----------
Merge r344, r346 from branch 1.5.0-pulse
Revision Links:
--------------
http://gemstracker.svn.sourceforge.net/gemstracker/?rev=344&view=rev
http://gemstracker.svn.sourceforge.net/gemstracker/?rev=346&view=rev
Modified Paths:
--------------
trunk/library/classes/Gems/Default/TrackActionAbstract.php
trunk/library/classes/Gems/Tracker/RespondentTrack.php
trunk/library/classes/Gems/Tracker/Snippets/EditTrackSnippetAbstract.php
trunk/library/configs/db/patches.sql
trunk/library/snippets/DeleteInSourceTrackSnippet.php
Property Changed:
----------------
trunk/
trunk/library/
Property changes on: trunk
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/1.5.0-pulse:306-342
/tags/1.5.0beta1:305
+ /branches/1.5.0-pulse:306-342,344,346
/tags/1.5.0beta1:305
Property changes on: trunk/library
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/1.5.0-pulse/library:306-344
/branches/newUser:113-150
/branches/newUser2:175-207
/branches/userloader:259-324
/tags/1.5.0beta1/library:305
+ /branches/1.5.0-pulse/library:306-344,346
/branches/newUser:113-150
/branches/newUser2:175-207
/branches/userloader:259-324
/tags/1.5.0beta1/library:305
Modified: trunk/library/classes/Gems/Default/TrackActionAbstract.php
===================================================================
--- trunk/library/classes/Gems/Default/TrackActionAbstract.php 2011-12-13 13:32:54 UTC (rev 353)
+++ trunk/library/classes/Gems/Default/TrackActionAbstract.php 2011-12-13 21:00:25 UTC (rev 354)
@@ -211,6 +211,7 @@
'formatFunction', $this->util->getTranslated()->formatDate,
'default', MUtil_Date::format(new Zend_date(), 'dd-MM-yyyy'));
$model->set('gr2t_reception_code');
+ $model->set('gr2t_comment', 'label', $this->_('Comment'));
return $model;
}
Modified: trunk/library/classes/Gems/Tracker/RespondentTrack.php
===================================================================
--- trunk/library/classes/Gems/Tracker/RespondentTrack.php 2011-12-13 13:32:54 UTC (rev 353)
+++ trunk/library/classes/Gems/Tracker/RespondentTrack.php 2011-12-13 21:00:25 UTC (rev 354)
@@ -674,15 +674,17 @@
// be overwritten, e.g. when cooperation is retracted.
if ($code->isForTracks() || $code->isOverwriter()) {
$values['gr2t_reception_code'] = $code->getCode();
+ }
- $changed = $this->_updateTrack($values, $userId);
+ $values['gr2t_comment'] = $comment;
- if ($changed) {
- // Reload reception code values
- $this->_ensureReceptionCode($code->getAllData());
- }
+ $changed = $this->_updateTrack($values, $userId);
+
+ if ($changed) {
+ // Reload reception code values
+ $this->_ensureReceptionCode($code->getAllData());
}
-
+
// Stopcodes have a different logic.
if ($code->isStopCode()) {
// Cascade stop to tokens
Modified: trunk/library/classes/Gems/Tracker/Snippets/EditTrackSnippetAbstract.php
===================================================================
--- trunk/library/classes/Gems/Tracker/Snippets/EditTrackSnippetAbstract.php 2011-12-13 13:32:54 UTC (rev 353)
+++ trunk/library/classes/Gems/Tracker/Snippets/EditTrackSnippetAbstract.php 2011-12-13 21:00:25 UTC (rev 354)
@@ -154,6 +154,7 @@
'formatFunction', $this->loader->getUtil()->getTranslated()->formatDate,
'default', MUtil_Date::format(new Zend_date(), 'dd-MM-yyyy'));
$model->set('gr2t_reception_code');
+ $model->set('gr2t_comment', 'label', $this->_('Comment'));
return $model;
}
Modified: trunk/library/configs/db/patches.sql
===================================================================
--- trunk/library/configs/db/patches.sql 2011-12-13 13:32:54 UTC (rev 353)
+++ trunk/library/configs/db/patches.sql 2011-12-13 21:00:25 UTC (rev 354)
@@ -356,4 +356,8 @@
--PATCH: Remove unique constraint for staff email
ALTER TABLE `gems__staff` DROP INDEX `gsf_email` ,
-ADD INDEX `gsf_email` ( `gsf_email` )
\ No newline at end of file
+ADD INDEX `gsf_email` ( `gsf_email` );
+
+-- GEMS VERSION: 43
+-- PATCH: Add comment field to respondent tracks
+ALTER TABLE `gems__respondent2track` ADD gr2t_comment varchar(250) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' null default null AFTER `gr2t_reception_code`;
Modified: trunk/library/snippets/DeleteInSourceTrackSnippet.php
===================================================================
--- trunk/library/snippets/DeleteInSourceTrackSnippet.php 2011-12-13 13:32:54 UTC (rev 353)
+++ trunk/library/snippets/DeleteInSourceTrackSnippet.php 2011-12-13 21:00:25 UTC (rev 354)
@@ -89,6 +89,9 @@
// The edit element
$bridge->addList('gr2t_reception_code');
+
+ // Comment text
+ $bridge->addTextarea('gr2t_comment', 'rows', 3, 'cols', 50);
// Change the button
$this->saveLabel = $this->getTitle();
@@ -170,7 +173,7 @@
protected function saveData()
{
// Use the repesondent track function as that cascades the consent code
- $changed = $this->respondentTrack->setReceptionCode($this->formData['gr2t_reception_code'], $this->_('Track deleted.'), $this->session->user_id);
+ $changed = $this->respondentTrack->setReceptionCode($this->formData['gr2t_reception_code'], $this->formData['gr2t_comment'], $this->session->user_id);
// Tell the user what happened
$this->afterSave($changed);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|