From: <gem...@li...> - 2011-10-26 11:22:53
|
Revision: 142 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=142&view=rev Author: mennodekker Date: 2011-10-26 11:22:46 +0000 (Wed, 26 Oct 2011) Log Message: ----------- cleanup of action buttons to only include the ones we need Modified Paths: -------------- trunk/library/classes/Gems/Default/ConsentAction.php trunk/library/classes/Gems/Default/ReceptionAction.php Modified: trunk/library/classes/Gems/Default/ConsentAction.php =================================================================== --- trunk/library/classes/Gems/Default/ConsentAction.php 2011-10-25 16:59:48 UTC (rev 141) +++ trunk/library/classes/Gems/Default/ConsentAction.php 2011-10-26 11:22:46 UTC (rev 142) @@ -1,35 +1,35 @@ <?php - -/** - * Copyright (c) 2011, Erasmus MC - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of Erasmus MC nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - + /** - * + * Copyright (c) 2011, Erasmus MC + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Erasmus MC nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * * @author Matijs de Jong * @since 1.0 * @version 1.1 @@ -38,22 +38,24 @@ */ /** - * + * * @author Matijs de Jong * @package Gems * @subpackage Default */ class Gems_Default_ConsentAction extends Gems_Controller_BrowseEditAction { + public $menuIndexIncludeLevel = 1; + public $sortKey = array('gco_order' => SORT_ASC); - /** - * Creates a model for getModel(). Called only for each new $action. - * - * The parameters allow you to easily adapt the model to the current action. The $detailed - * parameter was added, because the most common use of action is a split between detailed + /** + * Creates a model for getModel(). Called only for each new $action. + * + * The parameters allow you to easily adapt the model to the current action. The $detailed + * parameter was added, because the most common use of action is a split between detailed * and summarized actions. - * + * * @param boolean $detailed True when the current action is not in $summarizedActions. * @param string $action The current action. * @return MUtil_Model_ModelAbstract Modified: trunk/library/classes/Gems/Default/ReceptionAction.php =================================================================== --- trunk/library/classes/Gems/Default/ReceptionAction.php 2011-10-25 16:59:48 UTC (rev 141) +++ trunk/library/classes/Gems/Default/ReceptionAction.php 2011-10-26 11:22:46 UTC (rev 142) @@ -46,6 +46,8 @@ */ class Gems_Default_ReceptionAction extends Gems_Controller_BrowseEditAction { + public $menuIndexIncludeLevel = 1; + public $sortKey = array('grc_id_reception_code' => SORT_ASC); public function addFormElements(MUtil_Model_FormBridge $bridge, MUtil_Model_ModelAbstract $model, array $data, $new = false) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2011-11-04 09:59:37
|
Revision: 180 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=180&view=rev Author: matijsdejong Date: 2011-11-04 09:59:31 +0000 (Fri, 04 Nov 2011) Log Message: ----------- Implementation of #39: the user should return to the screen from which he or she started filling in the survey. Modified Paths: -------------- trunk/library/classes/Gems/Default/AskAction.php trunk/library/classes/Gems/Default/RespondentAction.php trunk/library/classes/Gems/Default/StaffAction.php trunk/library/classes/Gems/Default/TrackActionAbstract.php Modified: trunk/library/classes/Gems/Default/AskAction.php =================================================================== --- trunk/library/classes/Gems/Default/AskAction.php 2011-11-04 09:31:20 UTC (rev 179) +++ trunk/library/classes/Gems/Default/AskAction.php 2011-11-04 09:59:31 UTC (rev 180) @@ -186,6 +186,9 @@ public function indexAction() { + // Make sure to return to ask screen + $this->session->return_controller = $this->getRequest()->getControllerName(); + $tracker = $this->loader->getTracker(); $max_length = $tracker->getTokenLibrary()->getLength(); @@ -242,11 +245,40 @@ public function returnAction() { - if (isset($this->session->user_id)) { + if (isset($this->session->user_id) && $this->session->user_id) { $tracker = $this->loader->getTracker(); $token = $tracker->getToken($tracker->filterToken($this->_getParam(MUtil_Model::REQUEST_ID))); - $this->_reroute(array('controller' => 'respondent', 'action' => 'show', MUtil_Model::REQUEST_ID => $token->getPatientNumber()), true); + // Check for completed tokens + $this->loader->getTracker()->processCompletedTokens($token->getRespondentId(), $this->session->user_id); + + if (isset($this->session->return_controller) && $this->session->return_controller) { + $return = $this->session->return_controller; + } else { + $return = 'respondent'; + } + + $parameters['controller'] = $return; + $parameters['action'] = 'show'; + $parameters[MUtil_Model::REQUEST_ID] = $token->getPatientNumber(); + switch ($return) { + case 'track': + $parameters['action'] = 'show-track'; + $parameters[Gems_Model::RESPONDENT_TRACK] = $token->getRespondentTrackId(); + break; + + case 'survey': + $parameters[MUtil_Model::REQUEST_ID] = $token->getTokenId(); + break; + + case 'ask': + $this->_forward('forward'); + return; + + default: + $parameters['controller'] = 'respondent'; + } + $this->_reroute($parameters, true); } else { $this->_forward('forward'); } Modified: trunk/library/classes/Gems/Default/RespondentAction.php =================================================================== --- trunk/library/classes/Gems/Default/RespondentAction.php 2011-11-04 09:31:20 UTC (rev 179) +++ trunk/library/classes/Gems/Default/RespondentAction.php 2011-11-04 09:59:31 UTC (rev 180) @@ -360,6 +360,20 @@ return $this->_('Respondents'); } + /** + * Initialize translate and html objects + * + * Called from {@link __construct()} as final step of object instantiation. + * + * @return void + */ + public function init() + { + parent::init(); + + $this->session->return_controller = $this->getRequest()->getControllerName(); + } + protected function openedRespondent($patientId, $orgId = null, $userId = null) { if ($patientId) { @@ -387,12 +401,6 @@ // Log $this->openedRespondent($data['gr2o_patient_nr'], $data['gr2o_id_organization'], $data['grs_id_user']); - // Check for completed tokens - if ($this->loader->getTracker()->processCompletedTokens($data['grs_id_user'], $this->session->user_id)) { - //As data might have changed due to token events... reload - $data = $model->applyRequest($this->getRequest(), true)->loadFirst(); - } - if ($data['gr2o_consent'] == $model->get('gr2o_consent', 'default')) { $url = $this->view->url(array('controller' => 'respondent', 'action' => 'edit', 'id' => $data['gr2o_patient_nr'])) . '#tabContainer-frag-3'; $this->addMessage(MUtil_Html::create()->a($url, $this->_('Please settle the informed consent form for this respondent.'))); Modified: trunk/library/classes/Gems/Default/StaffAction.php =================================================================== --- trunk/library/classes/Gems/Default/StaffAction.php 2011-11-04 09:31:20 UTC (rev 179) +++ trunk/library/classes/Gems/Default/StaffAction.php 2011-11-04 09:59:31 UTC (rev 180) @@ -107,7 +107,7 @@ $bridge->addHidden( 'gsf_id_user'); // Needed for e-mail validation $bridge->addHidden( 'gsu_user_class'); $bridge->addText( 'gsu_login', 'size', 15, 'minlength', 4, - 'validator', $model->createUniqueValidator('gsu_login')); + 'validator', $model->createUniqueValidator('gsu_login', array('gsu_id_user'))); // Can the organization be changed? if ($this->escort->hasPrivilege('pr.staff.edit.all')) { Modified: trunk/library/classes/Gems/Default/TrackActionAbstract.php =================================================================== --- trunk/library/classes/Gems/Default/TrackActionAbstract.php 2011-11-04 09:31:20 UTC (rev 179) +++ trunk/library/classes/Gems/Default/TrackActionAbstract.php 2011-11-04 09:59:31 UTC (rev 180) @@ -352,6 +352,20 @@ parent::indexAction(); } + /** + * Initialize translate and html objects + * + * Called from {@link __construct()} as final step of object instantiation. + * + * @return void + */ + public function init() + { + parent::init(); + + $this->session->return_controller = $this->getRequest()->getControllerName(); + } + public function initFilter() { // FROM REQUEST This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2011-11-08 15:10:48
|
Revision: 195 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=195&view=rev Author: mennodekker Date: 2011-11-08 15:10:39 +0000 (Tue, 08 Nov 2011) Log Message: ----------- Updated buttons in DatabaseAction -> patchAction, updated buttons for UpgradeAction Modified Paths: -------------- trunk/library/classes/Gems/Default/DatabaseAction.php trunk/library/classes/Gems/Default/UpgradeAction.php Modified: trunk/library/classes/Gems/Default/DatabaseAction.php =================================================================== --- trunk/library/classes/Gems/Default/DatabaseAction.php 2011-11-08 13:31:35 UTC (rev 194) +++ trunk/library/classes/Gems/Default/DatabaseAction.php 2011-11-08 15:10:39 UTC (rev 195) @@ -382,7 +382,7 @@ $table->setAsFormLayout($form, true, true); $table['tbody'][0][0]->class = 'label'; // Is only one row with formLayout, so all in output fields get class. - if ($links = $this->createMenuLinks(10)) { + if ($links = $this->createMenuLinks(1)) { $table->tf(); // Add empty cell, no label $linksCell = $table->tf($links); } Modified: trunk/library/classes/Gems/Default/UpgradeAction.php =================================================================== --- trunk/library/classes/Gems/Default/UpgradeAction.php 2011-11-08 13:31:35 UTC (rev 194) +++ trunk/library/classes/Gems/Default/UpgradeAction.php 2011-11-08 15:10:39 UTC (rev 195) @@ -92,7 +92,7 @@ if ($menuItem = $this->menu->find(array('controller' => $this->_getParam('controller'), 'action' => 'show', 'allowed' => true))) { $this->html->br(); - $this->html[] = $menuItem->toActionLinkLower($this->getRequest(), array('id'=>$context)); + $this->html[] = $menuItem->toActionLinkLower($this->getRequest(), array('id'=>$context), $this->_('Back')); } } @@ -181,6 +181,10 @@ } else { $this->html[] = sprintf($this->_('Context %s not found!'), $context); } + + if ($parentItem = $this->menu->getCurrent()->getParent()) { + $this->html[] = $parentItem->toActionLink($this->getRequest(), $this->_('Cancel')); + } } public function getTopicTitle() { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2012-04-01 23:54:15
|
Revision: 590 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=590&view=rev Author: matijsdejong Date: 2012-04-01 23:54:09 +0000 (Sun, 01 Apr 2012) Log Message: ----------- By matijsdejong on account michiel - quick fixes for reset password key procedure Modified Paths: -------------- trunk/library/classes/Gems/Default/IndexAction.php trunk/library/classes/Gems/Default/OptionAction.php Modified: trunk/library/classes/Gems/Default/IndexAction.php =================================================================== --- trunk/library/classes/Gems/Default/IndexAction.php 2012-03-30 21:03:38 UTC (rev 589) +++ trunk/library/classes/Gems/Default/IndexAction.php 2012-04-01 23:54:09 UTC (rev 590) @@ -260,8 +260,7 @@ // Veld inlognaam $element = new Zend_Form_Element_Text('userlogin'); $element->setLabel($this->_('Username')); - $element->setAttrib('size', 10); - $element->setAttrib('maxlength', 20); + $element->setAttrib('size', 40); $element->setRequired(true); return $element; Modified: trunk/library/classes/Gems/Default/OptionAction.php =================================================================== --- trunk/library/classes/Gems/Default/OptionAction.php 2012-03-30 21:03:38 UTC (rev 589) +++ trunk/library/classes/Gems/Default/OptionAction.php 2012-04-01 23:54:09 UTC (rev 590) @@ -92,6 +92,7 @@ ****************/ if ($this->_request->isPost() && $form->isValid($_POST, false)) { $this->addMessage($this->_('New password is active.')); + $user->gotoStartPage($this->menu, $this->getRequest()); $this->_reroute(array($this->getRequest()->getActionKey() => 'edit')); } else { $this->addMessage($form->getErrorMessages()); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |