From: <gem...@li...> - 2011-11-23 14:04:10
|
Revision: 275 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=275&view=rev Author: matijsdejong Date: 2011-11-23 14:03:58 +0000 (Wed, 23 Nov 2011) Log Message: ----------- Made Organization display more agreeable (and switched to snippet use. Removed dead code and documented AElement.php Modified Paths: -------------- trunk/library/classes/Gems/Default/OrganizationAction.php trunk/library/classes/Gems/Snippets/ModelTableSnippetAbstract.php trunk/library/classes/MUtil/Html/AElement.php trunk/library/languages/default-en.mo trunk/library/languages/default-en.po trunk/library/languages/default-nl.mo trunk/library/languages/default-nl.po Added Paths: ----------- trunk/library/snippets/Organization/ trunk/library/snippets/Organization/OrganizationEditSnippet.php trunk/library/snippets/Organization/OrganizationTableSnippet.php Modified: trunk/library/classes/Gems/Default/OrganizationAction.php =================================================================== --- trunk/library/classes/Gems/Default/OrganizationAction.php 2011-11-22 17:34:49 UTC (rev 274) +++ trunk/library/classes/Gems/Default/OrganizationAction.php 2011-11-23 14:03:58 UTC (rev 275) @@ -44,21 +44,25 @@ * @license New BSD License * @since Class available since version 1.0 */ -class Gems_Default_OrganizationAction extends Gems_Controller_BrowseEditAction // Gems_Controller_ModelSnippetActionAbstract +class Gems_Default_OrganizationAction extends Gems_Controller_ModelSnippetActionAbstract { - public $autoFilter = false; + /** + * The snippets used for the autofilter action. + * + * @var mixed String or array of snippets name + */ + protected $autofilterSnippets = 'Organization_OrganizationTableSnippet'; - public function afterSave(array $data, $isNew) - { - $org = $this->loader->getOrganization($data['gor_id_organization']); - $org->invalidateCache(); + /** + * The snippets used for the create and edit actions. + * + * @var mixed String or array of snippets name + */ + protected $createEditSnippets = 'Organization_OrganizationEditSnippet'; - // Make sure any changes in the allowed list are reflected. - $this->loader->getCurrentUser()->refreshAllowedOrganizations(); - - return parent::afterSave($data, $isNew); - } - + /** + * Switch the active organization + */ public function changeUiAction() { $request = $this->getRequest(); @@ -112,7 +116,16 @@ throw new Exception($this->_('Invalid organization.')); } + /** + * Action for showing a create new item page + */ + public function createAction() + { + $this->createEditParameters['formTitle'] = $this->_('New organization...'); + parent::createAction(); + } + /** * Creates a model for getModel(). Called only for each new $action. * @@ -128,12 +141,14 @@ { $model = new MUtil_Model_TableModel('gems__organizations'); + $model->setDeleteValues('gor_active', 0, 'gor_add_patients', 0); + $model->set('gor_name', 'label', $this->_('Name'), 'size', 25); $model->set('gor_location', 'label', $this->_('Location'), 'size', 25); $model->set('gor_url', 'label', $this->_('Url'), 'size', 50); $model->set('gor_task', 'label', $this->_('Task'), 'size', 25); $model->set('gor_contact_name', 'label', $this->_('Contact name'), 'size', 25); - $model->set('gor_contact_email', 'label', $this->_('Contact email'), 'size', 50); + $model->set('gor_contact_email', 'label', $this->_('Contact email'), 'size', 50, 'validator', 'SimpleEmail'); if ($this->escort instanceof Gems_Project_Layout_MultiLayoutInterface) { $model->setIfExists( 'gor_style', 'label', $this->_('Style'), @@ -145,10 +160,10 @@ 'multiOptions', $this->util->getLocalized()->getLanguages(), 'default', 'nl' ); $yesNo = $this->util->getTranslated()->getYesNo(); - $model->set('gor_active', 'label', $this->_('Active'), 'elementClass', 'Checkbox', 'multiOptions', $yesNo); - $model->set('gor_add_patients', 'label', $this->_('Allow new respondents'), 'elementClass', 'CheckBox', 'multiOptions', $yesNo); + $model->set('gor_active', 'label', $this->_('Active'), 'description', $this->_('Can the organization be used?'), 'elementClass', 'Checkbox', 'multiOptions', $yesNo); + $model->set('gor_add_patients', 'label', $this->_('Accepting'), 'description', $this->_('Can new respondents be added to the organization?'), 'elementClass', 'CheckBox', 'multiOptions', $yesNo); + $model->set('gor_has_patients', 'label', $this->_('Respondents'), 'description', $this->_('Does the organization have respondents?'), 'elementClass', 'Exhibitor', 'multiOptions', $yesNo); - if ($detailed) { $model->set('gor_name', 'validator', $model->createUniqueValidator('gor_name')); $model->set('gor_welcome', 'label', $this->_('Greeting'), 'description', $this->_('For emails and token forward screen.'), 'elementClass', 'Textarea', 'rows', 5); @@ -166,18 +181,50 @@ $model->set('gor_code', 'label', $this->_('Code name'), 'size', 10, 'description', $this->_('Only for programmers.')); } + $model->addColumn("CASE WHEN gor_active = 1 THEN '' ELSE 'deleted' END", 'row_class'); + Gems_Model::setChangeFieldsByPrefix($model, 'gor'); return $model; } - public function getTopic($count = 1) + /** + * Action for showing a delete item page + */ + public function deleteAction() { - return $this->plural('organization', 'organizations', $count); + $this->html->h3($this->_('Delete organization')); + + parent::deleteAction(); } - public function getTopicTitle() + /** + * Action for showing a edit item page + */ + public function editAction() { - return $this->_('Participating organizations'); + $this->createEditParameters['formTitle'] = $this->_("Edit organization"); + + parent::editAction(); } + + /** + * Action for showing a browse page + */ + public function indexAction() + { + $this->html->h3($this->_('Participating organizations')); + + parent::indexAction(); + } + + /** + * Action for showing an item page + */ + public function showAction() + { + $this->html->h3($this->_('Show organization')); + + parent::showAction(); + } } Modified: trunk/library/classes/Gems/Snippets/ModelTableSnippetAbstract.php =================================================================== --- trunk/library/classes/Gems/Snippets/ModelTableSnippetAbstract.php 2011-11-22 17:34:49 UTC (rev 274) +++ trunk/library/classes/Gems/Snippets/ModelTableSnippetAbstract.php 2011-11-23 14:03:58 UTC (rev 275) @@ -126,7 +126,6 @@ if ($editMenuItem = $this->getEditMenuItem()) { $bridge->addItemLink($editMenuItem->toActionLinkLower($this->request, $bridge)); } - } /** Modified: trunk/library/classes/MUtil/Html/AElement.php =================================================================== --- trunk/library/classes/MUtil/Html/AElement.php 2011-11-22 17:34:49 UTC (rev 274) +++ trunk/library/classes/MUtil/Html/AElement.php 2011-11-23 14:03:58 UTC (rev 275) @@ -1,6 +1,5 @@ <?php - /** * Copyright (c) 2011, Erasmus MC * All rights reserved. @@ -26,14 +25,25 @@ * 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. + * + * + * @package MUtil + * @subpackage Html + * @author Matijs de Jong <mj...@ma...> + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @version $Id$ */ /** - * @author Matijs de Jong - * @since 1.0 - * @version 1.1 - * @package MUtil + * Class for A/link element. Assumes first passed argument is the href attribute, + * unless specified otherwise. + * + * @package MUtil * @subpackage Html + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @since Class available since version 1.0 */ class MUtil_Html_AElement extends MUtil_Html_HtmlElement @@ -54,10 +64,6 @@ } /** - * Overrule the target attribute and provide the same functionality in a W3C compliant way - * - * If a realtarget attribute is specified this functionaluti is skipped (and the realtarget attribute is removed). - * * If the target attribute is specified and no onclick attribute is specified the target is removed and * a compatible javascript onclick attribute is created. * @@ -68,15 +74,7 @@ */ protected function _htmlAttribs($attribs) { - if (isset($attribs['realtarget'])) { - unset($attribs['realtarget']); - - } elseif (isset($attribs['target']) && (! isset($attribs['onclick']))) { - // It was so nice, but IE 9 really needs target - /* - $target = $attribs['target']; - $attribs['onclick'] = "event.cancelBubble = true; window.open(this.href, '$target'); return false;"; - unset($attribs['target']); // */ + if (isset($attribs['target']) && (! isset($attribs['onclick']))) { // Assumption that is not tested, but when clicking on a target link, no further bubble is needed. $attribs['onclick'] = "event.cancelBubble = true;"; } Modified: trunk/library/languages/default-en.mo =================================================================== (Binary files differ) Modified: trunk/library/languages/default-en.po =================================================================== --- trunk/library/languages/default-en.po 2011-11-22 17:34:49 UTC (rev 274) +++ trunk/library/languages/default-en.po 2011-11-23 14:03:58 UTC (rev 275) @@ -2,7 +2,7 @@ msgstr "" "Project-Id-Version: Pulse EN\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-11-22 16:14+0100\n" +"POT-Creation-Date: 2011-11-23 14:53+0100\n" "PO-Revision-Date: \n" "Last-Translator: Matijs de Jong <mj...@ma...>\n" "Language-Team: Erasmus MGZ <mat...@ma...>\n" @@ -23,53 +23,53 @@ msgid "Path %s not writable" msgstr "Path %s not writable" -#: classes/GemsEscort.php:887 +#: classes/GemsEscort.php:888 #, php-format msgid "User: %s" msgstr "User: %s" -#: classes/GemsEscort.php:911 +#: classes/GemsEscort.php:912 msgid "version" msgstr "version" -#: classes/GemsEscort.php:1342 +#: classes/GemsEscort.php:1343 msgid "Take note: your session has expired, your inputs were not saved. Please check the input data and try again" msgstr "Take note: your session has expired, your inputs were not saved. Please check the input data and try again" -#: classes/GemsEscort.php:1466 +#: classes/GemsEscort.php:1467 msgid "Please check back later." msgstr "Please check back later." -#: classes/GemsEscort.php:1468 -#: classes/GemsEscort.php:1472 +#: classes/GemsEscort.php:1469 #: classes/GemsEscort.php:1473 +#: classes/GemsEscort.php:1474 msgid "System is in maintenance mode" msgstr "System is in maintenance mode" -#: classes/GemsEscort.php:1483 +#: classes/GemsEscort.php:1484 msgid "No access to site." msgstr "No access to site." -#: classes/GemsEscort.php:1485 -#: classes/GemsEscort.php:1521 +#: classes/GemsEscort.php:1486 +#: classes/GemsEscort.php:1522 msgid "You have no access to this site." msgstr "You have no access to this site." -#: classes/GemsEscort.php:1501 +#: classes/GemsEscort.php:1502 msgid "No access to page" msgstr "No access to page" -#: classes/GemsEscort.php:1503 +#: classes/GemsEscort.php:1504 #, php-format msgid "Access to this page is not allowed for current role: %s." msgstr "Access to this page is not allowed for current role: %s." -#: classes/GemsEscort.php:1508 -#: classes/GemsEscort.php:1519 +#: classes/GemsEscort.php:1509 +#: classes/GemsEscort.php:1520 msgid "You are no longer logged in." msgstr "You are no longer logged in." -#: classes/GemsEscort.php:1509 +#: classes/GemsEscort.php:1510 msgid "You must login to access this page." msgstr "You must login to access this page." @@ -1484,7 +1484,7 @@ msgstr "Login Name" #: classes/Gems/Default/OptionAction.php:188 -#: classes/Gems/Default/OrganizationAction.php:140 +#: classes/Gems/Default/OrganizationAction.php:158 #: classes/Gems/Default/RespondentAction.php:173 #: classes/Gems/Default/StaffAction.php:224 msgid "Language" @@ -1513,77 +1513,99 @@ msgid "Item" msgstr "Item" -#: classes/Gems/Default/OrganizationAction.php:105 +#: classes/Gems/Default/OrganizationAction.php:114 msgid "Cookies must be enabled." msgstr "Cookies must be enabled." -#: classes/Gems/Default/OrganizationAction.php:108 +#: classes/Gems/Default/OrganizationAction.php:117 msgid "Invalid organization." msgstr "Invalid organization." -#: classes/Gems/Default/OrganizationAction.php:129 +#: classes/Gems/Default/OrganizationAction.php:125 +msgid "New organization..." +msgstr "New organization..." + +#: classes/Gems/Default/OrganizationAction.php:147 msgid "Url" msgstr "Url" -#: classes/Gems/Default/OrganizationAction.php:130 +#: classes/Gems/Default/OrganizationAction.php:148 msgid "Task" msgstr "Task" -#: classes/Gems/Default/OrganizationAction.php:131 +#: classes/Gems/Default/OrganizationAction.php:149 msgid "Contact name" msgstr "Contact name" -#: classes/Gems/Default/OrganizationAction.php:132 +#: classes/Gems/Default/OrganizationAction.php:150 msgid "Contact email" msgstr "Contact email" -#: classes/Gems/Default/OrganizationAction.php:135 +#: classes/Gems/Default/OrganizationAction.php:153 msgid "Style" msgstr "Style" -#: classes/Gems/Default/OrganizationAction.php:145 -msgid "Allow new respondents" -msgstr "Allow new patients" +#: classes/Gems/Default/OrganizationAction.php:162 +msgid "Can the organization be used?" +msgstr "Can the organization be used?" -#: classes/Gems/Default/OrganizationAction.php:150 +#: classes/Gems/Default/OrganizationAction.php:163 +msgid "Accepting" +msgstr "Accepting" + +#: classes/Gems/Default/OrganizationAction.php:163 +msgid "Can new respondents be added to the organization?" +msgstr "Can new patients be added to the organization?" + +#: classes/Gems/Default/OrganizationAction.php:164 +msgid "Does the organization have respondents?" +msgstr "Does the organization have patients?" + +#: classes/Gems/Default/OrganizationAction.php:168 msgid "Greeting" msgstr "Greeting" -#: classes/Gems/Default/OrganizationAction.php:150 -#: classes/Gems/Default/OrganizationAction.php:151 +#: classes/Gems/Default/OrganizationAction.php:168 +#: classes/Gems/Default/OrganizationAction.php:169 msgid "For emails and token forward screen." msgstr "For emails and token forward screen." -#: classes/Gems/Default/OrganizationAction.php:151 +#: classes/Gems/Default/OrganizationAction.php:169 msgid "Signature" msgstr "Signature" -#: classes/Gems/Default/OrganizationAction.php:153 +#: classes/Gems/Default/OrganizationAction.php:171 msgid "Accessible by" msgstr "Accessible by" -#: classes/Gems/Default/OrganizationAction.php:153 +#: classes/Gems/Default/OrganizationAction.php:171 msgid "Checked organizations see this organizations respondents." msgstr "Checked organizations see this organizations patients." -#: classes/Gems/Default/OrganizationAction.php:162 +#: classes/Gems/Default/OrganizationAction.php:180 msgid "Code name" msgstr "Code name" -#: classes/Gems/Default/OrganizationAction.php:162 +#: classes/Gems/Default/OrganizationAction.php:180 msgid "Only for programmers." msgstr "Only for programmers." -#: classes/Gems/Default/OrganizationAction.php:172 -msgid "organization" -msgid_plural "organizations" -msgstr[0] "organization" -msgstr[1] "organizations" +#: classes/Gems/Default/OrganizationAction.php:193 +msgid "Delete organization" +msgstr "Delete organization" -#: classes/Gems/Default/OrganizationAction.php:177 +#: classes/Gems/Default/OrganizationAction.php:203 +msgid "Edit organization" +msgstr "Edit organization" + +#: classes/Gems/Default/OrganizationAction.php:213 msgid "Participating organizations" msgstr "Participating organizations" +#: classes/Gems/Default/OrganizationAction.php:223 +msgid "Show organization" +msgstr "Show organization" + #: classes/Gems/Default/OverviewPlanAction.php:115 #: classes/Gems/Default/ProjectSurveysAction.php:88 #: classes/Gems/Default/SurveyAction.php:203 @@ -3693,6 +3715,10 @@ msgid "Invalid type given. String, integer or float expected" msgstr "Invalid type given. String, integer or float expected" +#: languages/FakeTranslations.php:97 +msgid "One or more IPs are illegal." +msgstr "One or more IPs are illegal." + #: snippets/AddTracksSnippet.php:95 msgid "by Respondents" msgstr "by Patients" @@ -3868,6 +3894,9 @@ msgid "This track can be assigned since %s." msgstr "This track can be assigned since %s." +#~ msgid "Allow new respondents" +#~ msgstr "Allow new patients" + #~ msgid "Please update the database" #~ msgstr "Please update the database" Modified: trunk/library/languages/default-nl.mo =================================================================== (Binary files differ) Modified: trunk/library/languages/default-nl.po =================================================================== --- trunk/library/languages/default-nl.po 2011-11-22 17:34:49 UTC (rev 274) +++ trunk/library/languages/default-nl.po 2011-11-23 14:03:58 UTC (rev 275) @@ -1,4446 +1,4492 @@ -msgid "" -msgstr "" -"Project-Id-Version: Pulse NL\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-11-22 16:58+0100\n" -"PO-Revision-Date: \n" -"Last-Translator: Michiel Rook <in...@to...>\n" -"Language-Team: Erasmus MGZ <mat...@ma...>\n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Poedit-Language: Dutch\n" -"X-Poedit-Country: NETHERLANDS\n" -"X-Poedit-SourceCharset: iso-8859-1\n" -"X-Poedit-Basepath: ../\n" -"X-Poedit-KeywordsList: plural:1,2\n" -"X-Poedit-SearchPath-0: .\n" - -#: classes/GemsEscort.php:207 -#, php-format -msgid "Path %s not writable" -msgstr "Path %s niet schrijfbaar" - -#: classes/GemsEscort.php:887 -#, php-format -msgid "User: %s" -msgstr "Login: %s" - -#: classes/GemsEscort.php:911 -msgid "version" -msgstr "versie" - -#: classes/GemsEscort.php:1342 -msgid "Take note: your session has expired, your inputs were not saved. Please check the input data and try again" -msgstr "Let op: uw sessie is verlopen, uw invoer is niet opgeslagen. Controleer uw gegevens en probeer a.u.b. opnieuw." - -#: classes/GemsEscort.php:1466 -msgid "Please check back later." -msgstr "Probeer het later opnieuw." - -#: classes/GemsEscort.php:1468 -#: classes/GemsEscort.php:1473 -msgid "System is in maintenance mode" -msgstr "Systeem is in onderhoudsmodus" - -#: classes/GemsEscort.php:1483 -msgid "No access to site." -msgstr "Geen toegang tot website." - -#: classes/GemsEscort.php:1485 -msgid "You have no access to this site." -msgstr "U heeft geen toegang tot deze website." - -#: classes/GemsEscort.php:1501 -msgid "No access to page" -msgstr "Geen toegang tot pagina" - -#: classes/GemsEscort.php:1503 -#, php-format -msgid "Access to this page is not allowed for current role: %s." -msgstr "U heeft geen toegang tot deze pagina. Uw huidige rol is: %s." - -#: classes/GemsEscort.php:1508 -msgid "You are no longer logged in." -msgstr "U bent niet meer ingelogd." - -#: classes/GemsEscort.php:1509 -msgid "You must login to access this page." -msgstr "U moet ingelogd zijn voor toegang tot deze pagina." - -#: classes/Gems/Pdf.php:195 -#, php-format -msgid "PDF Source File '%s' not found!" -msgstr "PDF bron bestand %s niet gevonden!" - -#: classes/Gems/Pdf.php:237 -#, php-format -msgid "Could not create '%s' directory." -msgstr "Kon de directory '%s' niet aanmaken." - -#: classes/Gems/Pdf.php:280 -#, php-format -msgid " The error message is: %s" -msgstr "De foutmelding is: %s" - -#: classes/Gems/Tracker.php:732 -msgid "Checks performed" -msgstr "Controle uitgevoerd" - -#: classes/Gems/AccessLog.php:239 -msgid "Database needs to be updated!" -msgstr "Database dient ververst te worden!" - -#: classes/Gems/Html.php:154 -msgid "<< First" -msgstr "<< Eerste" - -#: classes/Gems/Html.php:155 -msgid "< Previous" -msgstr "< Terug" - -#: classes/Gems/Html.php:156 -msgid "Next >" -msgstr "Verder >" - -#: classes/Gems/Html.php:157 -msgid "Last >>" -msgstr "Laatste >>" - -#: classes/Gems/Html.php:158 -msgid " | " -msgstr " | " - -#: classes/Gems/Html.php:162 -msgid "to" -msgstr "tot" - -#: classes/Gems/Html.php:163 -msgid "of" -msgstr "van" - -#: classes/Gems/Menu.php:139 -#, php-format -msgid "About %s" -msgstr "Over %s" - -#: classes/Gems/Menu.php:143 -msgid "Reporting bugs" -msgstr "Meld een bug" - -#: classes/Gems/Menu.php:146 -msgid "Support" -msgstr "Ondersteuning" - -#: classes/Gems/Menu.php:166 -msgid "Project setup" -msgstr "Projectinfo" - -#: classes/Gems/Menu.php:169 -msgid "Database" -msgstr "Database" - -#: classes/Gems/Menu.php:173 -msgid "Content" -msgstr "Inhoud" - -#: classes/Gems/Menu.php:176 -msgid "Execute" -msgstr "Uitvoeren" - -#: classes/Gems/Menu.php:181 -msgid "Patches" -msgstr "Patches" - -#: classes/Gems/Menu.php:182 -msgid "Execute new" -msgstr "Nieuwe aanmaken" - -#: classes/Gems/Menu.php:184 -msgid "Refresh translateables" -msgstr "Ververs vertaalbaren" - -#: classes/Gems/Menu.php:186 -msgid "Run SQL" -msgstr "SQL uitvoeren" - -#: classes/Gems/Menu.php:189 -msgid "Reception codes" -msgstr "Ontvangst codes" - -#: classes/Gems/Menu.php:192 -msgid "Consents" -msgstr "Toestemmingen" - -#: classes/Gems/Menu.php:195 -msgid "Roles" -msgstr "Rollen" - -#: classes/Gems/Menu.php:196 -msgid "Assigned" -msgstr "Toegewezen" - -#: classes/Gems/Menu.php:197 -msgid "Privileges" -msgstr "Priviléges" - -#: classes/Gems/Menu.php:200 -msgid "Groups" -msgstr "Groepen" - -#: classes/Gems/Menu.php:203 -msgid "Organizations" -msgstr "Organisaties" - -#: classes/Gems/Menu.php:206 -msgid "Staff" -msgstr "Medewerkers" - -#: classes/Gems/Menu.php:209 -msgid "Logging" -msgstr "Logboek" - -#: classes/Gems/Menu.php:213 -msgid "Maintenance" -msgstr "Onderhoud" - -#: classes/Gems/Menu.php:218 -msgid "Upgrade" -msgstr "Upgrade" - -#: classes/Gems/Menu.php:219 -msgid "Show" -msgstr "Toon" - -#: classes/Gems/Menu.php:220 -msgid "Execute all" -msgstr "Alles uitvoeren" - -#: classes/Gems/Menu.php:221 -msgid "Execute this" -msgstr "Dit uitvoeren" - -#: classes/Gems/Menu.php:222 -msgid "Execute from here" -msgstr "Uitvoeren vanaf hier" - -#: classes/Gems/Menu.php:223 -msgid "Execute to here" -msgstr "Uitvoeren tot hier" - -#: classes/Gems/Menu.php:235 -#, php-format -msgid "Stand-alone privilige: %s" -msgstr "Zelfstandig privilege: %s" - -#: classes/Gems/Menu.php:242 -msgid "Logon" -msgstr "Login" - -#: classes/Gems/Menu.php:243 -msgid "Lost password" -msgstr "Wachtwoord zoek" - -#: classes/Gems/Menu.php:244 -msgid "Your account" -msgstr "Uw account" - -#: classes/Gems/Menu.php:245 -msgid "Activity overview" -msgstr "Activiteiten overzicht" - -#: classes/Gems/Menu.php:246 -msgid "Change password" -msgstr "Uw wachtwoord" - -#: classes/Gems/Menu.php:247 -#: classes/Gems/Menu.php:322 -msgid "Token" -msgstr "Kenmerk" - -#: classes/Gems/Menu.php:248 -msgid "Logoff" -msgstr "Uitloggen" - -#: classes/Gems/Menu.php:283 -msgid "Track" -msgstr "Traject" - -#: classes/Gems/Menu.php:290 -#: classes/Gems/Menu.php:341 -msgid "Add" -msgstr "Voeg toe" - -#: classes/Gems/Menu.php:294 -msgid "Preview" -msgstr "Preview" - -#: classes/Gems/Menu.php:301 -msgid "Tracks" -msgstr "Trajecten" - -#: classes/Gems/Menu.php:314 -msgid "Assignments" -msgstr "Toewijzingen" - -#: classes/Gems/Menu.php:326 -msgid "Edit" -msgstr "Wijzig" - -#: classes/Gems/Menu.php:330 -msgid "Delete" -msgstr "Verwijder" - -#: classes/Gems/Menu.php:335 -msgid "Surveys" -msgstr "Vragenlijsten" - -#: classes/Gems/Menu.php:367 -msgid "Fill in" -msgstr "Vul in" - -#: classes/Gems/Menu.php:371 -msgid "Print PDF" -msgstr "Print PDF" - -#: classes/Gems/Menu.php:374 -msgid "E-Mail now!" -msgstr "Email nu!" - -#: classes/Gems/Menu.php:380 -msgid "Answers" -msgstr "Antwoorden" - -#: classes/Gems/Menu.php:518 -msgid "Respondents" -msgstr "Patiënten" - -#: classes/Gems/Menu.php:521 -msgid "Overview" -msgstr "Overzicht" - -#: classes/Gems/Menu.php:528 -msgid "Project" -msgstr "Project" - -#: classes/Gems/Menu.php:531 -msgid "Setup" -msgstr "Beheer" - -#: classes/Gems/Menu.php:534 -msgid "Mail" -msgstr "Email" - -#: classes/Gems/Menu.php:537 -msgid "Track Builder" -msgstr "Traject bouwer" - -#: classes/Gems/Menu.php:546 -msgid "Contact" -msgstr "Contact" - -#: classes/Gems/Menu.php:559 -msgid "Changelog" -msgstr "Changelog" - -#: classes/Gems/Model.php:193 -msgid "Respondent nr" -msgstr "Patiënt nr" - -#: classes/Gems/Model.php:194 -msgid "Opened" -msgstr "Bekeken" - -#: classes/Gems/Model.php:195 -msgid "Consent" -msgstr "Toestemming" - -#: classes/Gems/Model.php:197 -msgid "E-Mail" -msgstr "Email" - -#: classes/Gems/Model.php:202 -msgid "Gender" -msgstr "Geslacht" - -#: classes/Gems/Model.php:203 -msgid "First name" -msgstr "Voornaam" - -#: classes/Gems/Model.php:204 -msgid "Surname prefix" -msgstr "Tussenvoegsel" - -#: classes/Gems/Model.php:205 -msgid "Last name" -msgstr "Achternaam" - -#: classes/Gems/Model.php:207 -msgid "Name" -msgstr "Naam" - -#: classes/Gems/Model.php:210 -msgid "Street" -msgstr "Straat" - -#: classes/Gems/Model.php:211 -msgid "Zipcode" -msgstr "Postcode" - -#: classes/Gems/Model.php:212 -msgid "City" -msgstr "Stad" - -#: classes/Gems/Model.php:214 -msgid "Phone" -msgstr "Telefoon" - -#: classes/Gems/Model.php:216 -msgid "Birthday" -msgstr "Geboren op" - -#: classes/Gems/UpgradesAbstract.php:164 -msgid "Already at max. level." -msgstr "Al op het hoogste niveau." - -#: classes/Gems/UpgradesAbstract.php:171 -#, php-format -msgid "Trying upgrade for %s from level %s to level %s" -msgstr "Probeert upgrade voor %s van niveau %s naar niveau %s uit te voeren" - -#: classes/Gems/UpgradesAbstract.php:179 -#, php-format -msgid "Trying upgrade for %s to level %s: %s" -msgstr "Probeert upgrade voor %s naar niveau %s: %s" - -#: classes/Gems/UpgradesAbstract.php:337 -msgid "Cache cleaned" -msgstr "Cache opgeschoond" - -#: classes/Gems/Auth.php:241 -msgid "Combination of organization, username and password not found." -msgstr "Combinatie van organisatie, gebruikersnaam en wachtwoord niet gevonden." - -#: classes/Gems/Export/Spss.php:59 -msgid "Which file" -msgstr "Kies bestand" - -#: classes/Gems/Export/Spss.php:60 -msgid "syntax" -msgstr "syntax" - -#: classes/Gems/Export/Spss.php:61 -msgid "data" -msgstr "data" - -#: classes/Gems/Export/Spss.php:66 -msgid "Some help for this export" -msgstr "Uitleg over deze export mogelijkheid" - -#: classes/Gems/Export/Excel.php:60 -msgid "Excel options" -msgstr "Excel opties" - -#: classes/Gems/Export/Excel.php:62 -msgid "Export questions instead of variable names" -msgstr "Exporteer vragen in plaats van variabele namen" - -#: classes/Gems/Export/Excel.php:63 -msgid "Format answers" -msgstr "Antwoorden opmaken" - -#: classes/Gems/Util/Translated.php:84 -msgid "-" -msgstr "n.v.t." - -#: classes/Gems/Util/Translated.php:99 -msgid "forever" -msgstr "altijd" - -#: classes/Gems/Util/Translated.php:108 -msgid "n/a" -msgstr "n.v.t." - -#: classes/Gems/Util/Translated.php:117 -msgid "never" -msgstr "nooit" - -#: classes/Gems/Util/Translated.php:126 -msgid "unknown" -msgstr "onbekend" - -#: classes/Gems/Util/Translated.php:142 -msgid "2 days ago" -msgstr "Eergisteren" - -#: classes/Gems/Util/Translated.php:145 -msgid "Yesterday" -msgstr "Gisteren" - -#: classes/Gems/Util/Translated.php:148 -msgid "Today" -msgstr "Vandaag" - -#: classes/Gems/Util/Translated.php:151 -msgid "Tomorrow" -msgstr "Morgen" - -#: classes/Gems/Util/Translated.php:154 -msgid "Over 2 days" -msgstr "Overmorgen" - -#: classes/Gems/Util/Translated.php:159 -#, php-format -msgid "Over %d days" -msgstr "Over %d dagen" - -#: classes/Gems/Util/Translated.php:161 -#, php-format -msgid "%d days ago" -msgstr "%d dagen terug" - -#: classes/Gems/Util/Translated.php:180 -msgid "Send multiple mails per respondent, one for each checked token." -msgstr "Verstuur meerdere emails per patiënt, één per gekozen kenmerk." - -#: classes/Gems/Util/Translated.php:181 -msgid "Send one mail per respondent, mark all checked tokens as send." -msgstr "Verstuur één email per patiënt, zet alle gekozen kenmerken op verzonden." - -#: classes/Gems/Util/Translated.php:182 -msgid "Send one mail per respondent, mark only mailed tokens as send." -msgstr "Verstuur één email per patiënt, zet alleen de verzonden kenmerken op verzonden." - -#: classes/Gems/Util/Translated.php:201 -msgid "Male" -msgstr "Man" - -#: classes/Gems/Util/Translated.php:201 -msgid "Female" -msgstr "Vrouw" - -#: classes/Gems/Util/Translated.php:201 -msgid "Unknown" -msgstr "Onbekend" - -#: classes/Gems/Util/Translated.php:206 -msgid "mr." -msgstr "meneer" - -#: classes/Gems/Util/Translated.php:206 -msgid "mrs." -msgstr "mevrouw" - -#: classes/Gems/Util/Translated.php:206 -msgid "mr./mrs." -msgstr "de heer/mevrouw" - -#: classes/Gems/Util/Translated.php:211 -msgid "Mr." -msgstr "De heer" - -#: classes/Gems/Util/Translated.php:211 -msgid "Mrs." -msgstr "Mevrouw" - -#: classes/Gems/Util/Translated.php:211 -msgid "Mr./Mrs." -msgstr "De heer/Mevrouw" - -#: classes/Gems/Util/Translated.php:229 -#: classes/Gems/Controller/BrowseEditAction.php:785 -msgid "No" -msgstr "Nee" - -#: classes/Gems/Util/Translated.php:229 -msgid "Yes (forget answers)" -msgstr "Ja (vergeet antwoorden)" - -#: classes/Gems/Util/Translated.php:229 -msgid "Yes (keep answers)" -msgstr "Ja (met behoud van antwoorden)" - -#: classes/Gems/Util/Translated.php:240 -#: classes/Gems/Controller/BrowseEditAction.php:784 -msgid "Yes" -msgstr "Ja" - -#: classes/Gems/Controller/ModelActionAbstract.php:97 -msgid "Cancel" -msgstr "Annuleren" - -#: classes/Gems/Controller/ModelSnippetActionAbstract.php:181 -msgid "No data found." -msgstr "Geen gegevens gevonden." - -#: classes/Gems/Controller/BrowseEditAction.php:346 -#, php-format -msgid "New %s..." -msgstr "Nieuw %s..." - -#: classes/Gems/Controller/BrowseEditAction.php:378 -#, php-format -msgid "Delete %s" -msgstr "Verwijder %s" - -#: classes/Gems/Controller/BrowseEditAction.php:382 -#, php-format -msgid "%2$u %1$s deleted" -msgstr "%2$u %1$s verwijderd" - -#: classes/Gems/Controller/BrowseEditAction.php:396 -#, php-format -msgid "Edit %s" -msgstr "Bewerk %s" - -#: classes/Gems/Controller/BrowseEditAction.php:493 -msgid "Free search text" -msgstr "Vrije zoek tekst" - -#: classes/Gems/Controller/BrowseEditAction.php:564 -msgid "Search" -msgstr "Zoeken" - -#: classes/Gems/Controller/BrowseEditAction.php:580 -#, php-format -msgid "No %s found" -msgstr "Geen %s gevonden" - -#: classes/Gems/Controller/BrowseEditAction.php:653 -#, php-format -msgid "No %s found." -msgstr "Geen %s gevonden." - -#: classes/Gems/Controller/BrowseEditAction.php:768 -msgid "Are you sure?" -msgstr "Weet u het zeker?" - -#: classes/Gems/Controller/BrowseEditAction.php:838 -#, php-format -msgid "Unknown %s requested" -msgstr "Onjuist %s verzoek" - -#: classes/Gems/Controller/BrowseEditAction.php:861 -#, php-format -msgid "New %1$s..." -msgstr "Nieuwe %1$s..." - -#: classes/Gems/Controller/BrowseEditAction.php:869 -msgid "Save" -msgstr "Opslaan" - -#: classes/Gems/Controller/BrowseEditAction.php:905 -#, php-format -msgid "%2$u %1$s saved" -msgstr "%2$u %1$s opgeslagen" - -#: classes/Gems/Controller/BrowseEditAction.php:908 -msgid "No changes to save." -msgstr "Geen verandering om op te slaan." - -#: classes/Gems/Controller/BrowseEditAction.php:917 -msgid "Input error! No changes saved!" -msgstr "Invoer fout! Veranderingen niet opgeslagen!" - -#: classes/Gems/Controller/BrowseEditAction.php:945 -#, php-format -msgid "Show %s" -msgstr "Toon %s" - -#: classes/Gems/Controller/BrowseEditAction.php:952 -#, php-format -msgid "Unknown %s." -msgstr "%s is onbekend." - -#: classes/Gems/Email/MailTemplateForm.php:56 -msgid "Send (test)" -msgstr "Verstuur (test)" - -#: classes/Gems/Email/MailTemplateForm.php:81 -#: classes/Gems/Email/EmailFormAbstract.php:193 -#: classes/Gems/Email/EmailFormAbstract.php:250 -msgid "From" -msgstr "Van" - -#: classes/Gems/Email/MailTemplateForm.php:95 -msgid "Test using" -msgstr "Test met" - -#: classes/Gems/Email/MailTemplateForm.php:124 -msgid "To (test)" -msgstr "Aan (test)" - -#: classes/Gems/Email/MailTemplateForm.php:168 -msgid "Test mail send, changes not saved!" -msgstr "Test email verstuurd. De veranderingen zijn nog niet opgeslagen!" - -#: classes/Gems/Email/EmailFormAbstract.php:101 -msgid "no email adress" -msgstr "geen email adres" - -#: classes/Gems/Email/EmailFormAbstract.php:145 -msgid "Available fields" -msgstr "Beschikbare velden" - -#: classes/Gems/Email/EmailFormAbstract.php:153 -msgid "BBCode" -msgstr "BBCode" - -#: classes/Gems/Email/EmailFormAbstract.php:168 -msgid "Message" -msgstr "Bericht" - -#: classes/Gems/Email/EmailFormAbstract.php:216 -msgid "Organization does not have an e-mail address." -msgstr "Organisatie heeft geen email adres." - -#: classes/Gems/Email/EmailFormAbstract.php:231 -msgid "You do not have an e-mail address." -msgstr "U heeft geen email adres." - -#: classes/Gems/Email/EmailFormAbstract.php:289 -msgid "Preview HTML" -msgstr "Html voorbeeld" - -#: classes/Gems/Email/EmailFormAbstract.php:298 -msgid "Preview text" -msgstr "Tekstvoorbeeld" - -#: classes/Gems/Email/EmailFormAbstract.php:306 -msgid "Template" -msgstr "Sjabloon" - -#: classes/Gems/Email/EmailFormAbstract.php:330 -msgid "Send" -msgstr "Verstuur" - -#: classes/Gems/Email/EmailFormAbstract.php:347 -msgid "Subject" -msgstr "Onderwerp" - -#: classes/Gems/Email/EmailFormAbstract.php:427 -msgid "Input error! No changes made!" -msgstr "Invoer fout! Veranderingen niet uitgevoerd!" - -#: classes/Gems/Email/EmailFormAbstract.php:444 -msgid "Subject:" -msgstr "Onderwerp:" - -#: classes/Gems/Email/EmailFormAbstract.php:472 -msgid "Field" -msgstr "Veld" - -#: classes/Gems/Email/EmailFormAbstract.php:473 -msgid "Value" -msgstr "waarde" - -#: classes/Gems/Email/EmailFormAbstract.php:476 -msgid "BBCode info page" -msgstr "BBCode info pagina" - -#: classes/Gems/Email/OneMailForm.php:47 -#: classes/Gems/Email/MultiMailForm.php:49 -msgid "On this test system all mail will be delivered to the from address." -msgstr "Op dit test systeem worden alle emails gestuurd naar het \"van\" adres." - -#: classes/Gems/Email/OneMailForm.php:55 -msgid "Round" -msgstr "Ronde" - -#: classes/Gems/Email/OneMailForm.php:57 -#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:705 -msgid "Survey" -msgstr "Vragenlijst" - -#: classes/Gems/Email/OneMailForm.php:58 -msgid "Last contact" -msgstr "Contactdatum" - -#: classes/Gems/Email/OneMailForm.php:87 -#: classes/Gems/Email/MultiMailForm.php:101 -msgid "To" -msgstr "Aan" - -#: classes/Gems/Email/OneMailForm.php:131 -#: classes/Gems/Email/TemplateMailer.php:217 -msgid "The sending of emails was blocked for this installation." -msgstr "Het versturen van emails is geblokkeerd in deze installatie." - -#: classes/Gems/Email/OneMailForm.php:140 -#: classes/Gems/Email/TemplateMailer.php:250 -msgid "Mail failed to send." -msgstr "Mail sturen mislukt." - -#: classes/Gems/Email/OneMailForm.php:144 -#, php-format -msgid "Sent email to %s." -msgstr "Email naar %s verzonden." - -#: classes/Gems/Email/TemplateMailer.php:266 -#, php-format -msgid "Sent %d e-mails, updated %d tokens." -msgstr "%d emails verzonden en %d kenmerken bijgewerkt." - -#: classes/Gems/Email/MultiMailForm.php:75 -msgid "Method" -msgstr "Methode" - -#: classes/Gems/Email/MultiMailForm.php:122 -msgid "Survey has been taken." -msgstr "Vragenlijsten is al afgenomen" - -#: classes/Gems/Email/MultiMailForm.php:125 -msgid "Respondent does not have an e-mail address." -msgstr "Patiënt heeft geen email adres" - -#: classes/Gems/Email/MultiMailForm.php:128 -msgid "Survey cannot be taken by a respondent." -msgstr "Deze vragenlijst kan niet door een patiënt ingevuld worden." - -#: classes/Gems/Email/MultiMailForm.php:130 -msgid "Survey cannot be taken at this moment." -msgstr "Deze vragenlijst kan op dit moment niet afgenomen worden." - -#: classes/Gems/Tracker/ChangeTracker.php:63 -#, php-format -msgid "Checked %d tracks." -msgstr "%d trajecten gecontroleerd." - -#: classes/Gems/Tracker/ChangeTracker.php:66 -#, php-format -msgid "Checked %d tokens." -msgstr "%d kenmerken gecontroleerd." - -#: classes/Gems/Tracker/ChangeTracker.php:71 -#, php-format -msgid "Answers changed by survey completion event for %d tokens." -msgstr "Bij %d kenmerken zijn de antwoorden aangepast door vragenlijst afrondingscode." - -#: classes/Gems/Tracker/ChangeTracker.php:74 -#, php-format -msgid "Results and timing changed for %d tokens." -msgstr "Bij %d kenmerken zijn de resultaten en/of de tijdstippen aangepast." - -#: classes/Gems/Tracker/ChangeTracker.php:77 -#, php-format -msgid "%d token round completion events caused changed to %d tokens." -msgstr "%2$d kenmerken zijn aangepast vanwege %1$d ronde voltooiingen." - -#: classes/Gems/Tracker/ChangeTracker.php:80 -#, php-format -msgid "%2$d token date changes in %1$d tracks." -msgstr "De datum van %2$d kenmerken is aangepast in %1$d trajecten." - -#: classes/Gems/Tracker/ChangeTracker.php:83 -#, php-format -msgid "Round changes propagated to %d tokens." -msgstr "%d kenmerken veranderd door ronde aanpassingen." - -#: classes/Gems/Tracker/ChangeTracker.php:86 -#, php-format -msgid "%d tokens created to by round changes." -msgstr "Vanwege ronde aanpassingen zijn nieuwe %d kenmerken gecreëerd." - -#: classes/Gems/Tracker/ChangeTracker.php:89 -msgid "No tokens were changed." -msgstr "Geen kenmerken veranderd." - -#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:365 -msgid "Track start" -msgstr "Traject start" - -#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:366 -msgid "Track end" -msgstr "Traject einde" - -#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:380 -msgid "Valid from" -msgstr "Geldig vanaf" - -#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:381 -msgid "Valid until" -msgstr "Geldig tot" - -#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:382 -msgid "Start time" -msgstr "Starten tijd" - -#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:383 -msgid "Completion time" -msgstr "Datum invullen" - -#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:398 -msgid "Minutes" -msgstr "Minuten" - -#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:399 -msgid "Hours" -msgstr "Uren" - -#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:400 -msgid "Days" -msgstr "Dagen" - -#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:401 -msgid "Weeks" -msgstr "Weken" - -#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:402 -msgid "Months" -msgstr "Maanden" - -#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:403 -msgid "Quarters" -msgstr "Kwartieren" - -#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:404 -msgid "Years" -msgstr "Jaren" - -#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:438 -msgid "Valid from calculation" -msgstr "Berekening datum geldig vanaf" - -#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:439 -#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:447 -msgid "Date source" -msgstr "Datum bron" - -#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:440 -#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:448 -msgid "Round used" -msgstr "Gebruikte ronde" - -#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:441 -#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:449 -msgid "Date used" -msgstr "Gebruikte datum" - -#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:442 -#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:450 -msgid "Add to date" -msgstr "Optellen bij datum" - -#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:443 -#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:451 -msgid "Add to date unit" -msgstr "Datumoptel eenheid" - -#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:446 -msgid "Valid for calculation" -msgstr "Berekening datum geldig tot" - -#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:480 -msgid "Does not expire" -msgstr "Blijft altijd geldig" - -#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:483 -msgid "Use an answer from a survey." -msgstr "Gebruikt een antwoord uit een vragenlijst." - -#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:484 -msgid "Use a standard token date." -msgstr "Gebruik een datum uit een kenmerk." - -#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:486 -msgid "Use a track level date." -msgstr "Gebruik een op traject niveau ingestelde datum." - -#: classes/Gems/Tracker/Engine/AnyStepEngine.php:95 -msgid "This round" -msgstr "Deze ronde" - -#: classes/Gems/Tracker/Engine/AnyStepEngine.php:106 -msgid "Engine for tracks where a rounds activation can depend on any previous survey." -msgstr "Een traject type waar de activatie van een ronde van elke willekeurige eerdere ronde afhankelijk kan zijn." - -#: classes/Gems/Tracker/Engine/AnyStepEngine.php:116 -msgid "Previous Survey" -msgstr "Eerdere vragenlijst" - -#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:414 -#, php-format -msgid "%s track engines cannot be converted to %s track engines." -msgstr "Traject type %s kan niet geconverteerd worden naar %s." - -#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:657 -#, php-format -msgid "%d: %s - %s" -msgstr "%d: %s - %s" - -#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:660 -#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:663 -#, php-format -msgid "%d: %s" -msgstr "%d: %s" - -#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:666 -#, php-format -msgid "%s - %s" -msgstr "%s - %s" - -#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:706 -msgid "Order" -msgstr "Volgorde" - -#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:707 -msgid "Description" -msgstr "Omschrijving" - -#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:708 -msgid "After change" -msgstr "Ronde veranderingscode" - -#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:709 -msgid "Active" -msgstr "Actief" - -#: classes/Gems/Tracker/Engine/SingleSurveyEngine.php:117 -msgid "Engine for tracks containing a single survey." -msgstr "Een traject type voor trajecten die bestaan uit een enkele vragenlijst." - -#: classes/Gems/Tracker/Engine/SingleSurveyEngine.php:127 -msgid "Single Survey" -msgstr "Losse vragenlijst" - -#: classes/Gems/Tracker/Engine/SingleSurveyEngine.php:149 -msgid "This track type does not allow the creation of new rounds." -msgstr "Dit type traject staat het niet toe dat nieuwe rondes aangemaakt worden." - -#: classes/Gems/Tracker/Engine/NextStepEngine.php:147 -msgid "Engine for tracks where the next round is always dependent on the previous step." -msgstr "Een traject type waar de activatie van een volgende ronde alleen afhangt van de ronde ervoor." - -#: classes/Gems/Tracker/Engine/NextStepEngine.php:158 -msgid "Next Step" -msgstr "Stap voor stap" - -#: classes/Gems/Tracker/Model/StandardTokenModel.php:209 -msgid "Measure(d) on" -msgstr "Afname op" - -#: classes/Gems/Tracker/Model/StandardTokenModel.php:212 -msgid "Completed" -msgstr "Ingevuld" - -#: classes/Gems/Tracker/Model/StandardTokenModel.php:213 -msgid "Duration in seconds" -msgstr "Antwoordtijd (in sec.)" - -#: classes/Gems/Tracker/Model/StandardTokenModel.php:214 -msgid "Score" -msgstr "Score" - -#: classes/Gems/Tracker/Model/StandardTokenModel.php:215 -msgid "Comments" -msgstr "Opmerkingen" - -#: classes/Gems/Tracker/Model/StandardTokenModel.php:216 -msgid "Changed on" -msgstr "Veranderd op" - -#: classes/Gems/Tracker/Model/StandardTokenModel.php:219 -msgid "Assigned by" -msgstr "Toewijzer" - -#: classes/Gems/Tracker/Model/StandardTokenModel.php:220 -msgid "Respondent name" -msgstr "Patiënt naam" - -#: classes/Gems/Tracker/Model/StandardTokenModel.php:223 -msgid "Assigned to" -msgstr "invuller" - -#: classes/Gems/Tracker/Model/StandardTokenModel.php:224 -msgid "Rejection code" -msgstr "Afkeuringscode" - -#: classes/Gems/Tracker/Model/TrackModel.php:107 -msgid "Track Engine" -msgstr "Traject type" - -#: classes/Gems/Tracker/Model/TrackModel.php:112 -msgid "Use until" -msgstr "Geldig tot" - -#: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:149 -msgid "Uncertain" -msgstr "Weet niet" - -#: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:152 -msgid "Increase" -msgstr "Toenemend" - -#: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:153 -msgid "Same" -msgstr "Zelfde" - -#: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:154 -msgid "Decrease" -msgstr "Afnemend" - -#: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:162 -msgid "Checked" -msgstr "Aangevinkt" - -#: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:163 -msgid "Not checked" -msgstr "Niet aangevinkt" - -#: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:258 -#, php-format -msgid "Rank %d" -msgstr "Schaal %d" - -#: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:277 -#: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:300 -msgid "Comment" -msgstr "Opmerkingen" - -#: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:277 -#: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:300 -msgid " (comment)" -msgstr "(opmerkingen)" - -#: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:289 -#: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:338 -msgid "Other" -msgstr "Overige" - -#: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:472 -msgid "Date" -msgstr "Datum" - -#: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:475 -msgid "Free number" -msgstr "Vrij getal" - -#: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:481 -msgid "Free text (long)" -msgstr "Vrije tekst (lang)" - -#: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:484 -msgid "Free text (very long)" -msgstr "Vrije tekst (zeer lang)" - -#: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:487 -msgid "Free text" -msgstr "Vrije tekst" - -#: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:623 -#: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:680 -#: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:735 -#, php-format -msgid "%s: %s" -msgstr "%s: %s" - -#: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:755 -#, php-format -msgid "- %s" -msgstr "- %s" - -#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:507 -msgid "Submitdate" -msgstr "Invoerdatum" - -#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:883 -#, php-format -msgid "Updated %d Gems tokens to new token definition." -msgstr "%d Gems kenmerken zijn aangepast aan de nieuwe kenmerk definitie." - -#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:903 -#, php-format -msgid "The '%s' survey is no longer active. The survey was removed from LimeSurvey!" -msgstr "De vragenlijst '%s' is niet meer actief. De vragenlijst is verwijderd uit LimeSurvey!" - -#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:1020 -#, php-format -msgid "Updated %d token to new token definition in survey '%s'." -msgid_plural "Updated %d tokens to new token definition in survey '%s'." -msgstr[0] "%d kenmerk in de vragenlijst '%s' is aangepast aan de nieuwe kenmerk definitie." -msgstr[1] "%d kenmerken in de vragenlijst '%s' zijn aangepast aan de nieuwe kenmerk definitie." - -#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:1038 -#, php-format -msgid "The status of the '%s' survey has changed." -msgstr "De status van de vragenlijst '%s' is veranderd." - -#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:1044 -#, php-format -msgid "Survey '%s' IS NO LONGER ACTIVE!!!" -msgstr "De vragenlijst '%s' IS NIET MEER ACTIEF!!!" - -#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:1050 -#, php-format -msgid "The status of the '%s' survey has changed to '%s'." -msgstr "De status van de vragenlijst '%s' is veranderd naar '%s'." - -#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:1053 -#, php-format -msgid "The status warning for the '%s' survey was removed." -msgstr "De status waarschuwing voor de vragenlijst '%s' is verdwenen." - -#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:1059 -#, php-format -msgid "The name of the '%s' survey has changed to '%s'." -msgstr "De naam van de vragenlijst '%s' is veranderd in '%s'." - -#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:1069 -#, php-format -msgid "Imported the '%s' survey." -msgstr "De vragenlijst '%s' is geïmporteerd." - -#: classes/Gems/Tracker/Snippets/ShowTokenSnippetAbstract.php:164 -#: classes/Gems/Tracker/Snippets/EditTokenSnippetAbstract.php:124 -#: classes/Gems/Tracker/Snippets/AnswerModelSnippetGeneric.php:223 -#, php-format -msgid "Token %s not found." -msgstr "Kenmerk %s niet gevonden" - -#: classes/Gems/Tracker/Snippets/ShowTokenSnippetAbstract.php:168 -#: classes/Gems/Tracker/Snippets/EditTokenSnippetAbstract.php:128 -#: classes/Gems/Tracker/Snippets/AnswerModelSnippetGeneric.php:227 -msgid "No token specified." -msgstr "Geen kenmerk opgegeven." - -#: classes/Gems/Tracker/Snippets/ShowTrackUsageAbstract.php:149 -msgid "Enter the particulars concerning the assignment to this respondent." -msgstr "Beschrijf de redenen om dit aan deze patiënt toe te wijzen." - -#: classes/Gems/Tracker/Snippets/ShowTrackUsageAbstract.php:151 -#: classes/Gems/Tracker/Snippets/EditTrackSnippetAbstract.php:152 -msgid "Start" -msgstr "Aanvang" - -#: classes/Gems/Tracker/Snippets/ShowRoundSnippetAbstract.php:132 -#, php-format -msgid "%s round" -msgstr "%s ronde" - -#: classes/Gems/Tracker/Snippets/ShowRoundSnippetAbstract.php:144 -msgid "No round specified." -msgstr "Geen ronde opgegeven." - -#: classes/Gems/Tracker/Snippets/ShowRoundSnippetAbstract.php:163 -msgid "< Previous" -msgstr "< Terug" - -#: classes/Gems/Tracker/Snippets/ShowRoundSnippetAbstract.php:168 -msgid "Next >" -msgstr "Verder >" - -#: classes/Gems/Tracker/Snippets/EditTokenSnippetAbstract.php:141 -msgid "token" -msgid_plural "tokens" -msgstr[0] "kenmerk" -msgstr[1] "kenmerken" - -#: classes/Gems/Tracker/Snippets/EditSingleSurveyTokenSnippetAbstract.php:157 -msgid "survey" -msgid_plural "surveys" -msgstr[0] "vragenlijst" -msgstr[1] "vragenlijsten" - -#: classes/Gems/Tracker/Snippets/EditSingleSurveyTokenSnippetAbstract.php:179 -msgid "Add survey" -msgstr "Vragenlijst toevoegen" - -#: classes/Gems/Tracker/Snippets/EditTrackSnippetAbstract.php:169 -msgid "track" -msgid_plural "tracks" -msgstr[0] "traject" -msgstr[1] "trajecten" - -#: classes/Gems/Tracker/Snippets/EditTrackSnippetAbstract.php:179 -#: classes/Gems/Tracker/Snippets/EditTrackSnippetAbstract.php:229 -msgid "Add track" -msgstr "Voeg traject toe" - -#: classes/Gems/Tracker/Snippets/AnswerModelSnippetGeneric.php:134 -msgid "Status" -msgstr "Status" - -#: classes/Gems/Tracker/Snippets/AnswerModelSnippetGeneric.php:135 -msgid "OK" -msgstr "OK" - -#: classes/Gems/Tracker/Snippets/AnswerModelSnippetGeneric.php:138 -msgid "Question" -msgstr "Vraag" - -#: classes/Gems/Tracker/Snippets/AnswerModelSnippetGeneric.php:207 -#, php-format -msgid "%s answers for patient number %s" -msgstr "%s antwoorden voor patientnummer %s" - -#: classes/Gems/Tracker/Snippets/AnswerModelSnippetGeneric.php:210 -#, php-format -msgid "Answers for token %s, patient number %s: %s." -msgstr "Antwoorden voor kenmerk %s, patientnummer %s: %s." - -#: classes/Gems/Tracker/Snippets/AnswerModelSnippetGeneric.php:232 -msgid "Close" -msgstr "Sluiten" - -#: classes/Gems/Tracker/Snippets/AnswerModelSnippetGeneric.php:233 -msgid "Print" -msgstr "Afdrukken" - -#: classes/Gems/Tracker/Snippets/EditRoundSnippetAbstract.php:119 -msgid "round" -msgid_plural "rounds" -msgstr[0] "ronde" -msgstr[1] "rondes" - -#: classes/Gems/Tracker/Snippets/EditRoundSnippetAbstract.php:129 -msgid "Add new round" -msgstr "Nieuwe ronde toevoegen" - -#: classes/Gems/Menu/SubMenuItem.php:396 -msgid "New" -msgstr "Nieuw" - -#: classes/Gems/Menu/SubMenuItem.php:450 -msgid "Export the current data set to Excel" -msgstr "Exporteer de huidige gegevens naar Excel" - -#: classes/Gems/Menu/SubMenuItem.php:454 -msgid "Excel export" -msgstr "Excel export" - -#: classes/Gems/Menu/MenuAbstract.php:243 -msgid "Activity log" -msgstr "Activiteit" - -#: classes/Gems/Menu/MenuAbstract.php:249 -msgid "Automatic mail" -msgstr "Automatische mail" - -#: classes/Gems/Menu/MenuAbstract.php:250 -msgid "Turn Automatic Mail Jobs OFF" -msgstr "Automatische mail opdrachten UITzetten" - -#: classes/Gems/Menu/MenuAbstract.php:251 -msgid "Run" -msgstr "Uitvoeren" - -#: classes/Gems/Menu/MenuAbstract.php:254 -msgid "Servers" -msgstr "Servers" - -#: classes/Gems/Menu/MenuAbstract.php:258 -msgid "Templates" -msgstr "Sjablonen" - -#: classes/Gems/Menu/MenuAbstract.php:290 -msgid "By period" -msgstr "Per periode" - -#: classes/Gems/Menu/MenuAbstract.php:291 -msgid "By token" -msgstr "Per kenmerk" - -#: classes/Gems/Menu/MenuAbstract.php:292 -msgid "By respondent" -msgstr "Per patiënt" - -#: classes/Gems/Menu/MenuAbstract.php:296 -msgid "Bulk mail" -msgstr "Bulk mail" - -#: classes/Gems/Menu/MenuAbstract.php:314 -msgid "Errors" -msgstr "Foutmeldingen" - -#: classes/Gems/Menu/MenuAbstract.php:315 -msgid "PHP" -msgstr "PHP" - -#: classes/Gems/Menu/MenuAbstract.php:317 -msgid "Session" -msgstr "Sessie" - -#: classes/Gems/Menu/MenuAbstract.php:318 -msgid "Maintenance mode" -msgstr "Onderhoudsmodus" - -#: classes/Gems/Menu/MenuAbstract.php:319 -msgid "Clean cache" -msgstr "Cache opruimen" - -#: classes/Gems/Menu/MenuAbstract.php:408 -msgid "Survey Sources" -msgstr "Bronnen" - -#: classes/Gems/Menu/MenuAbstract.php:410 -msgid "Check status" -msgstr "Status controle" - -#: classes/Gems/Menu/MenuAbstract.php:411 -msgid "Synchronize surveys" -msgstr "Synchroniseer vragenlijsten" - -#: classes/Gems/Menu/MenuAbstract.php:412 -#: classes/Gems/Menu/MenuAbstract.php:423 -msgid "Check answers" -msgstr "Antwoord controle" - -#: classes/Gems/Menu/MenuAbstract.php:413 -msgid "Synchronize all surveys" -msgstr "Synchroniseer alle vragenlijsten" - -#: classes/Gems/Menu/MenuAbstract.php:414 -#: classes/Gems/Menu/MenuAbstract.php:424 -msgid "Check all answers" -msgstr "Controleer alle antwoorden" - -#: classes/Gems/Menu/MenuAbstract.php:420 -msgid "PDF" -msgstr "PDF" - -#: classes/Gems/Menu/MenuAbstract.php:432 -msgid "Fields" -msgstr "Velden" - -#: classes/Gems/Menu/MenuAbstract.php:439 -msgid "Rounds" -msgstr "Rondes" - -#: classes/Gems/Menu/MenuAbstract.php:454 -msgid "Check assignments" -msgstr "Controleer toewijzingen" - -#: classes/Gems/Menu/MenuAbstract.php:457 -msgid "Check all assignments" -msgstr "Controleer alle toewijzingen" - -#: classes/Gems/Selector/DateSelectorAbstract.php:309 -msgid "<<" -msgstr "<<" - -#: classes/Gems/Selector/DateSelectorAbstract.php:311 -msgid ">>" -msgstr ">>" - -#: classes/Gems/Selector/DateSelectorAbstract.php:315 -msgid "<" -msgstr "<" - -#: classes/Gems/Selector/DateSelectorAbstract.php:317 -msgid ">" -msgstr ">" - -#: classes/Gems/Selector/DateSelectorAbstract.php:320 -msgid "Now!" -msgstr "Nu!" - -#: classes/Gems/Selector/DateSelectorAbstract.php:360 -msgid "Show by day" -msgstr "Toon per dag" - -#: classes/Gems/Selector/DateSelectorAbstract.php:361 -msgid "Show by week" -msgstr "Toon per weerk" - -#: classes/Gems/Selector/DateSelectorAbstract.php:362 -msgid "Show by month" -msgstr "Toon per maand" - -#: classes/Gems/Selector/DateSelectorAbstract.php:363 -msgid "Show by year" -msgstr "Toon per jaar" - -#: classes/Gems/Selector/DateSelectorAbstract.php:370 -msgid "D" -msgstr "D" - -#: classes/Gems/Selector/DateSelectorAbstract.php:371 -msgid "W" -msgstr "W" - -#: classes/Gems/Selector/DateSelectorAbstract.php:372 -msgid "M" -msgstr "M" - -#: classes/Gems/Selector/DateSelectorAbstract.php:373 -msgid "Y" -msgstr "J" - -#: classes/Gems/Selector/DateSelectorAbstract.php:605 -msgid "Period" -msgstr "Periode" - -#: classes/Gems/Selector/DateSelectorAbstract.php:633 -#, php-format -msgid "week %s" -msgstr "week %s" - -#: classes/Gems/Selector/TokenDateSelector.php:82 -#: classes/Gems/Selector/TokenByGroupDateSelector.php:83 -msgid "for respondents" -msgstr "voor patiënten" - -#: classes/Gems/Selector/TokenDateSelector.php:83 -#: classes/Gems/Selector/TokenByGroupDateSelector.php:84 -msgid "for staff" -msgstr "voor medewerkers" - -#: classes/Gems/Selector/TokenDateSelector.php:86 -msgid "Activated surveys" -msgstr "Geactiveerde vragenlijsten" - -#: classes/Gems/Selector/TokenDateSelector.php:90 -msgid "Unanswered surveys" -msgstr "Onbeantwoorde vragenlijsten" - -#: classes/Gems/Selector/TokenDateSelector.php:94 -#: classes/Gems/Selector/TokenByGroupDateSelector.php:109 -msgid "Partially completed" -msgstr "Gedeeltelijk ingevoerd" - -#: classes/Gems/Selector/TokenDateSelector.php:103 -msgid "Expired surveys" -msgstr "Verlopen vragenlijsten" - -#: classes/Gems/Selector/TokenDateSelector.php:107 -msgid "Answered surveys" -msgstr "Beantwoorde vragenlijsten" - -#: classes/Gems/Selector/TokenByGroupDateSelector.php:87 -msgid "Tokens" -msgstr "Kenmerken" - -#: classes/Gems/Selector/TokenByGroupDateSelector.php:99 -msgid "Todo" -msgstr "Te doen" - -#: classes/Gems/Selector/TokenByGroupDateSelector.php:119 -msgid "Time left in days - average" -msgstr "Tijd over in dagen - gemiddeld" - -#: classes/Gems/Selector/TokenByGroupDateSelector.php:122 -msgid "least time left" -msgstr "de minste tijd over" - -#: classes/Gems/Selector/TokenByGroupDateSelector.php:125 -msgid "most time left" -msgstr "de meeste tijd over" - -#: classes/Gems/Selector/TokenByGroupDateSelector.php:129 -msgid "Missed" -msgstr "Gemist" - -#: classes/Gems/Selector/TokenByGroupDateSelector.php:139 -msgid "Answered" -msgstr "Beantwoord" - -#: classes/Gems/Selector/TokenByGroupDateSelector.php:149 -msgid "Answer time in days - average" -msgstr "Antwoordtijd in dagen - gemiddeld" - -#: classes/Gems/Selector/TokenByGroupDateSelector.php:152 -msgid "fastest answer" -msgstr "snelste antwoord" - -#: classes/Gems/Selector/TokenByGroupDateSelector.php:155 -msgid "slowest answer" -msgstr "meest langzame antwoord" - -#: classes/Gems/User/UserPasswordValidator.php:115 -msgid "Wrong password." -msgstr "Verkeerd wachtwoord." - -#: classes/Gems/User/PasswordChecker.php:95 -#, php-format -msgid "A password should contain at least one uppercase character." -msgid_plural "A password should contain at least %d uppercase characters." -msgstr[0] "Het wachtwoord moet minstens een hoofdletter bevatten." -msgstr[1] "Het wachtwoord moet minstens %d hoofdletters bevatten." - -#: classes/Gems/User/PasswordChecker.php:112 -#, php-format -msgid "A password should contain at least one lowercase character." -msgid_plural "A password should contain at least %d lowercase characters." -msgstr[0] "Het wachtwoord moet minstens een kleine letter bevatten." -msgstr[1] "Het wachtwoord moet minstens %d kleine letters bevatten." - -#: classes/Gems/User/PasswordChecker.php:127 -#, php-format -msgid "A password should be at least %d characters long." -msgstr "Het wachtwoordt moet minstens %d tekens lang zijn." - -#: classes/Gems/User/PasswordChecker.php:145 -#, php-format -msgid "A password should contain at least one not alphabetic character." -msgid_plural "A password should contain at least %d not alphabetic characters." -msgstr[0] "Het wachtwoord moet minstens een niet-alphabetisch teken bevatten." -msgstr[1] "Het wachtwoord moet minstens %d niet-alphabetisch tekens bevatten." - -#: classes/Gems/User/PasswordChecker.php:165 -#, php-format -msgid "A password should contain at least one not alphanumeric character." -msgid_plural "A password should contain at least %d not alphanumeric characters." -msgstr[0] "Het wachtwoord moet minstens een teken anders dan getallen of letters bevatten." -msgstr[1] "Het wachtwoord moet minstens %d tekens anders dan getallen of letters bevatten." - -#: classes/Gems/User/PasswordChecker.php:184 -msgid "A password should not contain the login name." -msgstr "Het wachtwoord mag niet de gebruikersnaam bevatten." - -#: classes/Gems/User/PasswordChecker.php:201 -#, php-format -msgid "A password should contain at least one number." -msgid_plural "A password should contain at least %d numbers." -msgstr[0] "Het wachtwoord moe... [truncated message content] |
From: <gem...@li...> - 2011-11-23 14:20:29
|
Revision: 277 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=277&view=rev Author: matijsdejong Date: 2011-11-23 14:20:20 +0000 (Wed, 23 Nov 2011) Log Message: ----------- Added model 'description' as title to sort fields. Small fixes for organization. Corrected translation Modified Paths: -------------- trunk/library/classes/Gems/Default/OrganizationAction.php trunk/library/classes/MUtil/Model/TableBridge.php trunk/library/languages/default-nl.mo trunk/library/languages/default-nl.po trunk/library/snippets/Organization/OrganizationTableSnippet.php Modified: trunk/library/classes/Gems/Default/OrganizationAction.php =================================================================== --- trunk/library/classes/Gems/Default/OrganizationAction.php 2011-11-23 14:19:16 UTC (rev 276) +++ trunk/library/classes/Gems/Default/OrganizationAction.php 2011-11-23 14:20:20 UTC (rev 277) @@ -174,12 +174,12 @@ $tp = new MUtil_Model_Type_ConcatenatedRow(':', ', '); $tp->apply($model, 'gor_accessible_by'); - if ($this->project->multiLocale) { + if ($detailed && $this->project->multiLocale) { $model->set('gor_name', 'description', 'ENGLISH please! Use translation file to translate.'); $model->set('gor_url', 'description', 'ENGLISH link preferred. Use translation file to translate.'); $model->set('gor_task', 'description', 'ENGLISH please! Use translation file to translate.'); - $model->set('gor_code', 'label', $this->_('Code name'), 'size', 10, 'description', $this->_('Only for programmers.')); } + $model->setIfExists('gor_code', 'label', $this->_('Code name'), 'size', 10, 'description', $this->_('Only for programmers.')); $model->addColumn("CASE WHEN gor_active = 1 THEN '' ELSE 'deleted' END", 'row_class'); Modified: trunk/library/classes/MUtil/Model/TableBridge.php =================================================================== --- trunk/library/classes/MUtil/Model/TableBridge.php 2011-11-23 14:19:16 UTC (rev 276) +++ trunk/library/classes/MUtil/Model/TableBridge.php 2011-11-23 14:20:20 UTC (rev 277) @@ -36,7 +36,7 @@ */ /** - * + * * @package MUtil * @subpackage Model * @copyright Copyright (c) 2011 Erasmus MC @@ -214,7 +214,7 @@ // $sortUrl['RouteReset'] = false; // Prevents tabs from being communicated $sortUrl = $sortUrl + $this->baseUrl; - return MUtil_Html::create()->a($sortUrl, array('class' => $class), $label); + return MUtil_Html::create()->a($sortUrl, array('class' => $class, 'title' => $this->model->get($name, 'description')), $label); } /** Modified: trunk/library/languages/default-nl.mo =================================================================== (Binary files differ) Modified: trunk/library/languages/default-nl.po =================================================================== --- trunk/library/languages/default-nl.po 2011-11-23 14:19:16 UTC (rev 276) +++ trunk/library/languages/default-nl.po 2011-11-23 14:20:20 UTC (rev 277) @@ -1547,7 +1547,7 @@ #: classes/Gems/Default/OrganizationAction.php:162 msgid "Can the organization be used?" -msgstr "Is de organisatie in gebruik" +msgstr "Is de organisatie in gebruik?" #: classes/Gems/Default/OrganizationAction.php:163 msgid "Accepting" Modified: trunk/library/snippets/Organization/OrganizationTableSnippet.php =================================================================== --- trunk/library/snippets/Organization/OrganizationTableSnippet.php 2011-11-23 14:19:16 UTC (rev 276) +++ trunk/library/snippets/Organization/OrganizationTableSnippet.php 2011-11-23 14:20:20 UTC (rev 277) @@ -80,7 +80,7 @@ $BR = $HTML->br(); $orgName[] = MUtil_Lazy::iff($bridge->gor_url, - MUtil_Html_AElement::a($bridge->gor_name, array('href' => $bridge->gor_url, 'target' => '_blank')), + MUtil_Html_AElement::a($bridge->gor_name, array('href' => $bridge->gor_url, 'target' => '_blank', 'class' => 'globe')), $bridge->gor_name); $orgName[] = $bridge->createSortLink('gor_name'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2011-11-25 16:12:51
|
Revision: 289 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=289&view=rev Author: matijsdejong Date: 2011-11-25 16:12:43 +0000 (Fri, 25 Nov 2011) Log Message: ----------- Split StaffUserDefinition into abstract DbUserDefinitionAbstract and made RespondentUserDefinition for completion of #31 respondents login. (Not on by default, but it is possible now.) Fixed bug in role usages with empty sets. Modified Paths: -------------- trunk/library/classes/Gems/Default/OrganizationAction.php trunk/library/classes/Gems/User/OldStaffUserDefinition.php trunk/library/classes/Gems/User/StaffUserDefinition.php trunk/library/classes/Gems/User/User.php trunk/library/classes/Gems/Util/DbLookup.php trunk/library/classes/GemsEscort.php trunk/library/configs/db/patches.sql trunk/library/configs/db/tables/gems__organizations.20.sql trunk/library/configs/db/tables/gems__roles.20.sql trunk/library/languages/default-en.mo trunk/library/languages/default-en.po trunk/library/languages/default-nl.mo trunk/library/languages/default-nl.po Added Paths: ----------- trunk/library/classes/Gems/User/DbUserDefinitionAbstract.php trunk/library/classes/Gems/User/RespondentUserDefinition.php Modified: trunk/library/classes/Gems/Default/OrganizationAction.php =================================================================== --- trunk/library/classes/Gems/Default/OrganizationAction.php 2011-11-25 12:55:53 UTC (rev 288) +++ trunk/library/classes/Gems/Default/OrganizationAction.php 2011-11-25 16:12:43 UTC (rev 289) @@ -138,6 +138,7 @@ $model->set('gor_active', 'label', $this->_('Active'), 'description', $this->_('Can the organization be used?'), 'elementClass', 'Checkbox', 'multiOptions', $yesNo); $model->set('gor_add_respondents', 'label', $this->_('Accepting'), 'description', $this->_('Can new respondents be added to the organization?'), 'elementClass', 'CheckBox', 'multiOptions', $yesNo); $model->set('gor_has_respondents', 'label', $this->_('Respondents'), 'description', $this->_('Does the organization have respondents?'), 'elementClass', 'Exhibitor', 'multiOptions', $yesNo); + $model->set('gor_respondent_group', 'label', $this->_('Respondent group'), 'description', $this->_('Allows respondents to login.'), 'multiOptions', $this->util->getDbLookup()->getAllowedRespondentGroups()); if ($detailed) { $model->set('gor_name', 'validator', $model->createUniqueValidator('gor_name')); Added: trunk/library/classes/Gems/User/DbUserDefinitionAbstract.php =================================================================== --- trunk/library/classes/Gems/User/DbUserDefinitionAbstract.php (rev 0) +++ trunk/library/classes/Gems/User/DbUserDefinitionAbstract.php 2011-11-25 16:12:43 UTC (rev 289) @@ -0,0 +1,234 @@ +<?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. + * + * + * @package Gems + * @subpackage User + * @author Matijs de Jong <mj...@ma...> + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @version $Id: Sample.php 203 2011-07-07 12:51:32Z matijs $ + */ + +/** + * A standard, database stored user as of version 1.5. + * + * @package Gems + * @subpackage User + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @since Class available since version 1.5 + */ +abstract class Gems_User_DbUserDefinitionAbstract extends Gems_User_UserDefinitionAbstract +{ + /** + * + * @var Zend_Db_Adapter_Abstract + */ + protected $db; + + /** + * + * @var Gems_Project_ProjectSettings + */ + protected $project; + + /** + * Return true if a password reset key can be created. + * + * Returns the setting for the definition whan no user is passed, otherwise + * returns the answer for this specific user. + * + * @param Gems_User_User $user Optional, the user whose password might change + * @return boolean + */ + public function canResetPassword(Gems_User_User $user = null) + { + if ($user) { + // Depends on the user. + return $user->hasEmailAddress() && $user->canSetPassword(); + } else { + return true; + } + } + + /** + * Return true if the password can be set. + * + * Returns the setting for the definition whan no user is passed, otherwise + * returns the answer for this specific user. + * + * @param Gems_User_User $user Optional, the user whose password might change + * @return boolean + */ + public function canSetPassword(Gems_User_User $user = null) + { + return true; + } + + /** + * Check whether a reset key is really linked to a user. + * + * @param Gems_User_User $user The user the key was created for (hopefully). + * @param string The key + * @return boolean + */ + public function checkPasswordResetKey(Gems_User_User $user, $key) + { + $model = new MUtil_Model_TableModel('gems__user_passwords'); + + $filter['gup_id_user'] = $user->getUserLoginId(); + $filter[] = 'DATE_ADD(gup_reset_requested, INTERVAL 24 HOUR) >= CURRENT_TIMESTAMP'; + + $row = $model->loadFirst($filter); + if ($row && $row['gup_reset_key']) { + return $key == $row['gup_reset_key']; + } + + return false; + } + + public function getAuthAdapter($formValues) + { + $adapter = new Zend_Auth_Adapter_DbTable($this->db, 'gems__user_passwords', 'gul_login', 'gup_password'); + + $pwd_hash = $this->hashPassword($formValues['password']); + + $select = $adapter->getDbSelect(); + $select->join('gems__user_logins', 'gup_id_user = gul_id_user', array()) + ->where('gul_can_login = 1') + ->where('gul_id_organization = ?', $formValues['organization']); + + $adapter->setIdentity($formValues['userlogin']) + ->setCredential($pwd_hash); + + return $adapter; + } + + /** + * Return a password reset key + * + * @param Gems_User_User $user The user to create a key for. + * @return string + */ + public function getPasswordResetKey(Gems_User_User $user) + { + $model = new MUtil_Model_TableModel('gems__user_passwords'); + Gems_Model::setChangeFieldsByPrefix($model, 'gup', $user->getUserId()); + + $data['gup_id_user'] = $user->getUserLoginId(); + + $row = $model->loadFirst($data + array('DATE_ADD(gup_reset_requested, INTERVAL 24 HOUR) >= CURRENT_TIMESTAMP')); + if ($row && $row['gup_reset_key']) { + // Keep using the key. + $data['gup_reset_key'] = $row['gup_reset_key']; + } else { + $data['gup_reset_key'] = $this->hashPassword(time() . $user->getEmailAddress()); + } + $data['gup_reset_requested'] = new Zend_Db_Expr('CURRENT_TIMESTAMP'); + + $model->save($data); + + return $data['gup_reset_key']; + } + + /** + * Returns a user object, that may be empty if the user is unknown. + * + * @param string $login_name + * @param int $organization + * @return array Of data to fill the user with. + */ + public function getUserData($login_name, $organization) + { + $select = $this->getUserSelect($login_name, $organization); + + return $this->db->fetchRow($select, array($login_name, $organization), Zend_Db::FETCH_ASSOC); + } + + /** + * A select used by subclasses to add fields to the select. + * + * @param string $login_name + * @param int $organization + * @return Zend_Db_Select + */ + abstract protected function getUserSelect($login_name, $organization); + + /** + * Allow overruling of password hashing. + * + * @param string $password + * @return string + */ + protected function hashPassword($password) + { + return $this->project->getValueHash($password); + } + + /** + * Return true if the user has a password. + * + * @param Gems_User_User $user The user to check + * @return boolean + */ + public function hasPassword(Gems_User_User $user) + { + $sql = "SELECT CASE WHEN gup_password IS NULL THEN 0 ELSE 1 END FROM gems__user_passwords WHERE gup_id_user = ?"; + + return (boolean) $this->db->fetchOne($sql, $user->getUserLoginId()); + } + + /** + * Set the password, if allowed for this user type. + * + * @param Gems_User_User $user The user whose password to change + * @param string $password + * @return Gems_User_UserDefinitionInterface (continuation pattern) + */ + public function setPassword(Gems_User_User $user, $password) + { + $data['gup_id_user'] = $user->getUserLoginId(); + $data['gup_reset_key'] = null; + $data['gup_reset_requested'] = null; + $data['gup_reset_required'] = 0; + if (null === $password) { + // Passwords may be emptied. + $data['gup_password'] = null; + } else { + $data['gup_password'] = $this->hashPassword($password); + } + + $model = new MUtil_Model_TableModel('gems__user_passwords'); + Gems_Model::setChangeFieldsByPrefix($model, 'gup', $user->getUserId()); + + $model->save($data); + + return $this; + } +} \ No newline at end of file Modified: trunk/library/classes/Gems/User/OldStaffUserDefinition.php =================================================================== --- trunk/library/classes/Gems/User/OldStaffUserDefinition.php 2011-11-25 12:55:53 UTC (rev 288) +++ trunk/library/classes/Gems/User/OldStaffUserDefinition.php 2011-11-25 16:12:43 UTC (rev 289) @@ -170,19 +170,26 @@ protected function getUserSelect($login_name, $organization) { /** - * Read the needed parameters from the different tables, lots of renames for backward - * compatibility + * Read the needed parameters from the different tables, lots of renames + * for compatibility accross implementations. */ $select = new Zend_Db_Select($this->db); - $select->from('gems__staff', array('user_id' => 'gsf_id_user', - 'user_login' => 'gsf_login', - 'user_email' => 'gsf_email', - 'user_group' => 'gsf_id_primary_group', - 'user_locale' => 'gsf_iso_lang', - 'user_logout' => 'gsf_logout_on_survey', - 'user_base_org_id' => 'gsf_id_organization')) - ->columns(array('user_name'=>"(concat(coalesce(concat(`gems__staff`.`gsf_first_name`,_utf8' '),_utf8''),coalesce(concat(`gems__staff`.`gsf_surname_prefix`,_utf8' '),_utf8''),coalesce(`gems__staff`.`gsf_last_name`,_utf8'')))")) - ->join('gems__groups', 'gsf_id_primary_group = ggp_id_group', array('user_role'=>'ggp_role')) + $select->from('gems__staff', array( + 'user_id' => 'gsf_id_user', + 'user_login' => 'gsf_login', + 'user_email' => 'gsf_email', + 'user_first_name' => 'gsf_first_name', + 'user_surname_prefix' => 'gsf_surname_prefix', + 'user_last_name' => 'gsf_last_name', + 'user_gender' => 'gsf_gender', + 'user_group' => 'gsf_id_primary_group', + 'user_locale' => 'gsf_iso_lang', + 'user_logout' => 'gsf_logout_on_survey', + 'user_base_org_id' => 'gsf_id_organization' + )) + ->join('gems__groups', 'gsf_id_primary_group = ggp_id_group', array( + 'user_role' => 'ggp_role', + )) ->where('ggp_group_active = 1') ->where('gsf_active = 1') ->where('gsf_login = ?') Added: trunk/library/classes/Gems/User/RespondentUserDefinition.php =================================================================== --- trunk/library/classes/Gems/User/RespondentUserDefinition.php (rev 0) +++ trunk/library/classes/Gems/User/RespondentUserDefinition.php 2011-11-25 16:12:43 UTC (rev 289) @@ -0,0 +1,94 @@ +<?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. + * + * + * @package Gems + * @subpackage User + * @author Matijs de Jong <mj...@ma...> + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @version $Id: Sample.php 203 2011-07-07 12:51:32Z matijs $ + */ + +/** + * A standard, database stored and authenticate staff user as of version 1.5. + * + * @package Gems + * @subpackage User + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @since Class available since version 1.5 + */ +class Gems_User_RespondentUserDefinition extends Gems_User_DbUserDefinitionAbstract +{ + /** + * A select used by subclasses to add fields to the select. + * + * @param string $login_name + * @param int $organization + * @return Zend_Db_Select + */ + protected function getUserSelect($login_name, $organization) + { + // 'user_group' => 'gsf_id_primary_group', 'user_logout' => 'gsf_logout_on_survey', + $select = new Zend_Db_Select($this->db); + $select->from('gems__user_logins', array( + 'user_login_id' => 'gul_id_user', + )) + ->join('gems__respondent2org', 'gul_login = gr2o_patient_nr AND gul_id_organization = gr2o_id_organization', array( + 'user_login' => 'gr2o_patient_nr', + 'user_base_org_id' => 'gr2o_id_organization', + )) + ->join('gems__respondents', 'gr2o_id_user = grs_id_user', array( + 'user_id' => 'grs_id_user', + 'user_email' => 'grs_email', + 'user_first_name' => 'grs_first_name', + 'user_surname_prefix' => 'grs_surname_prefix', + 'user_last_name' => 'grs_last_name', + 'user_gender' => 'grs_gender', + 'user_locale' => 'grs_iso_lang', + )) + ->join('gems__organizations', 'gr2o_id_organization=gor_id_organization', array()) + ->join('gems__groups', 'gor_respondent_group=ggp_id_group', array( + 'user_role'=>'ggp_role', + 'user_allowed_ip_ranges' => 'ggp_allowed_ip_ranges', + )) + ->joinLeft('gems__user_passwords', 'gul_id_user = gup_id_user', array( + 'user_password_reset' => 'gup_reset_required', + )) + ->joinLeft('gems__reception_codes', 'gr2o_reception_code = grc_id_reception_code', array()) + ->where('ggp_group_active = 1') + ->where('grc_success = 1') + ->where('gul_can_login = 1') + ->where('gul_login = ?') + ->where('gul_id_organization = ?') + ->limit(1); + + return $select; + } +} \ No newline at end of file Modified: trunk/library/classes/Gems/User/StaffUserDefinition.php =================================================================== --- trunk/library/classes/Gems/User/StaffUserDefinition.php 2011-11-25 12:55:53 UTC (rev 288) +++ trunk/library/classes/Gems/User/StaffUserDefinition.php 2011-11-25 16:12:43 UTC (rev 289) @@ -44,156 +44,45 @@ * @license New BSD License * @since Class available since version 1.5 */ -class Gems_User_StaffUserDefinition extends Gems_User_UserDefinitionAbstract +class Gems_User_StaffUserDefinition extends Gems_User_DbUserDefinitionAbstract { /** + * A select used by subclasses to add fields to the select. * - * @var Zend_Db_Adapter_Abstract - */ - protected $db; - - /** - * - * @var Gems_Project_ProjectSettings - */ - protected $project; - - /** - * Return true if a password reset key can be created. - * - * Returns the setting for the definition whan no user is passed, otherwise - * returns the answer for this specific user. - * - * @param Gems_User_User $user Optional, the user whose password might change - * @return boolean - */ - public function canResetPassword(Gems_User_User $user = null) - { - if ($user) { - // Depends on the user. - return $user->hasEmailAddress() && $user->canSetPassword(); - } else { - return true; - } - } - - /** - * Return true if the password can be set. - * - * Returns the setting for the definition whan no user is passed, otherwise - * returns the answer for this specific user. - * - * @param Gems_User_User $user Optional, the user whose password might change - * @return boolean - */ - public function canSetPassword(Gems_User_User $user = null) - { - return true; - } - - /** - * Check whether a reset key is really linked to a user. - * - * @param Gems_User_User $user The user the key was created for (hopefully). - * @param string The key - * @return boolean - */ - public function checkPasswordResetKey(Gems_User_User $user, $key) - { - $model = new MUtil_Model_TableModel('gems__user_passwords'); - - $filter['gup_id_user'] = $user->getUserLoginId(); - $filter[] = 'DATE_ADD(gup_reset_requested, INTERVAL 24 HOUR) >= CURRENT_TIMESTAMP'; - - $row = $model->loadFirst($filter); - if ($row && $row['gup_reset_key']) { - return $key == $row['gup_reset_key']; - } - - return false; - } - - public function getAuthAdapter($formValues) - { - $adapter = new Zend_Auth_Adapter_DbTable($this->db, 'gems__user_passwords', 'gul_login', 'gup_password'); - - $pwd_hash = $this->hashPassword($formValues['password']); - - $select = $adapter->getDbSelect(); - $select->join('gems__user_logins', 'gup_id_user = gul_id_user', array()) - ->where('gul_can_login = 1') - ->where('gul_id_organization = ?', $formValues['organization']); - - $adapter->setIdentity($formValues['userlogin']) - ->setCredential($pwd_hash); - - return $adapter; - } - - /** - * Return a password reset key - * - * @param Gems_User_User $user The user to create a key for. - * @return string - */ - public function getPasswordResetKey(Gems_User_User $user) - { - $model = new MUtil_Model_TableModel('gems__user_passwords'); - Gems_Model::setChangeFieldsByPrefix($model, 'gup', $user->getUserId()); - - $data['gup_id_user'] = $user->getUserLoginId(); - - $row = $model->loadFirst($data + array('DATE_ADD(gup_reset_requested, INTERVAL 24 HOUR) >= CURRENT_TIMESTAMP')); - if ($row && $row['gup_reset_key']) { - // Keep using the key. - $data['gup_reset_key'] = $row['gup_reset_key']; - } else { - $data['gup_reset_key'] = $this->hashPassword(time() . $user->getEmailAddress()); - } - $data['gup_reset_requested'] = new Zend_Db_Expr('CURRENT_TIMESTAMP'); - - $model->save($data); - - return $data['gup_reset_key']; - } - - /** - * Returns a user object, that may be empty if the user is unknown. - * * @param string $login_name * @param int $organization - * @return array Of data to fill the user with. - */ - public function getUserData($login_name, $organization) - { - $select = $this->getUserSelect($login_name, $organization); - - return $this->db->fetchRow($select, array($login_name, $organization), Zend_Db::FETCH_ASSOC); - } - - /** - * Stub to allow subclasses to add fields to the select. - * - * @param string $login_name - * @param int $organization * @return Zend_Db_Select */ protected function getUserSelect($login_name, $organization) { + /** + * Read the needed parameters from the different tables, lots of renames + * for compatibility accross implementations. + */ $select = new Zend_Db_Select($this->db); - $select->from('gems__user_logins', array('user_login_id' => 'gul_id_user')) + $select->from('gems__user_logins', array( + 'user_login_id' => 'gul_id_user', + )) ->join('gems__staff', 'gul_login = gsf_login AND gul_id_organization = gsf_id_organization', array( - 'user_id' => 'gsf_id_user', - 'user_login' => 'gsf_login', - 'user_email' => 'gsf_email', - 'user_group' => 'gsf_id_primary_group', - 'user_locale' => 'gsf_iso_lang', - 'user_logout' => 'gsf_logout_on_survey', - 'user_base_org_id' => 'gsf_id_organization')) - ->columns(array('user_name'=>"(concat(coalesce(concat(`gems__staff`.`gsf_first_name`,_utf8' '),_utf8''),coalesce(concat(`gems__staff`.`gsf_surname_prefix`,_utf8' '),_utf8''),coalesce(`gems__staff`.`gsf_last_name`,_utf8'')))")) - ->join('gems__groups', 'gsf_id_primary_group = ggp_id_group', array('user_role'=>'ggp_role', 'user_allowed_ip_ranges' => 'ggp_allowed_ip_ranges')) - ->joinLeft('gems__user_passwords', 'gul_id_user = gup_id_user', - array('user_password_reset' => 'gup_reset_required')) + 'user_id' => 'gsf_id_user', + 'user_login' => 'gsf_login', + 'user_email' => 'gsf_email', + 'user_first_name' => 'gsf_first_name', + 'user_surname_prefix' => 'gsf_surname_prefix', + 'user_last_name' => 'gsf_last_name', + 'user_gender' => 'gsf_gender', + 'user_group' => 'gsf_id_primary_group', + 'user_locale' => 'gsf_iso_lang', + 'user_logout' => 'gsf_logout_on_survey', + 'user_base_org_id' => 'gsf_id_organization', + )) + ->join('gems__groups', 'gsf_id_primary_group = ggp_id_group', array( + 'user_role'=>'ggp_role', + 'user_allowed_ip_ranges' => 'ggp_allowed_ip_ranges', + )) + ->joinLeft('gems__user_passwords', 'gul_id_user = gup_id_user', array( + 'user_password_reset' => 'gup_reset_required', + )) ->where('ggp_group_active = 1') ->where('gsf_active = 1') ->where('gul_can_login = 1') @@ -203,56 +92,4 @@ return $select; } - - /** - * Allow overruling of password hashing. - * - * @param string $password - * @return string - */ - protected function hashPassword($password) - { - return $this->project->getValueHash($password); - } - - /** - * Return true if the user has a password. - * - * @param Gems_User_User $user The user to check - * @return boolean - */ - public function hasPassword(Gems_User_User $user) - { - $sql = "SELECT CASE WHEN gup_password IS NULL THEN 0 ELSE 1 END FROM gems__user_passwords WHERE gup_id_user = ?"; - - return (boolean) $this->db->fetchOne($sql, $user->getUserLoginId()); - } - - /** - * Set the password, if allowed for this user type. - * - * @param Gems_User_User $user The user whose password to change - * @param string $password - * @return Gems_User_UserDefinitionInterface (continuation pattern) - */ - public function setPassword(Gems_User_User $user, $password) - { - $data['gup_id_user'] = $user->getUserLoginId(); - $data['gup_reset_key'] = null; - $data['gup_reset_requested'] = null; - $data['gup_reset_required'] = 0; - if (null === $password) { - // Passwords may be emptied. - $data['gup_password'] = null; - } else { - $data['gup_password'] = $this->hashPassword($password); - } - - $model = new MUtil_Model_TableModel('gems__user_passwords'); - Gems_Model::setChangeFieldsByPrefix($model, 'gup', $user->getUserId()); - - $model->save($data); - - return $this; - } } \ No newline at end of file Modified: trunk/library/classes/Gems/User/User.php =================================================================== --- trunk/library/classes/Gems/User/User.php 2011-11-25 12:55:53 UTC (rev 288) +++ trunk/library/classes/Gems/User/User.php 2011-11-25 16:12:43 UTC (rev 289) @@ -411,6 +411,22 @@ */ public function getFullName() { + if (! $this->_getVar('user_name')) { + $name = ltrim($this->_getVar('user_first_name') . ' ') . + ltrim($this->_getVar('user_surname_prefix') . ' ') . + $this->_getVar('user_last_name'); + + if (! $name) { + // Use obfuscated login name + $name = $this->getLoginName(); + $name = subs($name, 0, 3) . str_repeat('*', strlen($name) - 2); + } + + $this->_setVar('user_name', $name); + + // MUtil_Echo::track($name); + } + return $this->_getVar('user_name'); } Modified: trunk/library/classes/Gems/Util/DbLookup.php =================================================================== --- trunk/library/classes/Gems/Util/DbLookup.php 2011-11-25 12:55:53 UTC (rev 288) +++ trunk/library/classes/Gems/Util/DbLookup.php 2011-11-25 16:12:43 UTC (rev 289) @@ -128,6 +128,18 @@ * * @return array */ + public function getAllowedRespondentGroups() + { + return $this->util->getTranslated()->getEmptyDropdownArray() + + $this->db->fetchPairs('SELECT ggp_id_group, ggp_name FROM gems__groups WHERE ggp_group_active=1 AND ggp_respondent_members=1 ORDER BY ggp_name'); + } + + /** + * Retrieve an array of groups the user is allowed to assign: his own group and all groups + * he inherits rights from + * + * @return array + */ public function getAllowedStaffGroups() { $groups = $this->getActiveStaffGroups(); Modified: trunk/library/classes/GemsEscort.php =================================================================== --- trunk/library/classes/GemsEscort.php 2011-11-25 12:55:53 UTC (rev 288) +++ trunk/library/classes/GemsEscort.php 2011-11-25 16:12:43 UTC (rev 289) @@ -884,9 +884,11 @@ */ protected function _layoutUser(array $args = null) { - if (isset($this->session->user_name)) { + $user = $this->getLoader()->getCurrentUser(); + + if ($user->isActive()) { return MUtil_Html::create()->div( - sprintf($this->_('User: %s'), $this->session->user_name), + sprintf($this->_('User: %s'), $user->getFullName()), $args, array('id' => 'username') ); Modified: trunk/library/configs/db/patches.sql =================================================================== --- trunk/library/configs/db/patches.sql 2011-11-25 12:55:53 UTC (rev 288) +++ trunk/library/configs/db/patches.sql 2011-11-25 16:12:43 UTC (rev 289) @@ -325,9 +325,15 @@ UPDATE `gems__organizations` SET gor_has_respondents = COALESCE((SELECT 1 FROM gems__respondent2org WHERE gr2o_id_organization = gor_id_organization GROUP BY gr2o_id_organization), 0); UPDATE `gems__organizations` SET gor_add_respondents = CASE WHEN gor_has_respondents = 1 AND gor_active = 1 THEN 1 ELSE 0 END; +ALTER TABLE `gems__organizations` ADD gor_respondent_group bigint unsigned null AFTER gor_add_respondents; + -- PATCH: Log failed logins INSERT INTO `gems__log_actions` (`glac_id_action`, `glac_name`, `glac_change`, `glac_log`, `glac_created`) VALUES (NULL , 'loginFail', '0', '1', CURRENT_TIMESTAMP); -- PATCH: IP ranges for groups ALTER TABLE `gems__groups` ADD `ggp_allowed_ip_ranges` TEXT CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' null AFTER `ggp_respondent_members`; + +-- PATCH: Roles fields sometimes empty +ALTER TABLE gems__roles CHANGE grl_parents grl_parents text CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' null; +ALTER TABLE gems__roles CHANGE grl_privileges grl_privileges text CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' null; Modified: trunk/library/configs/db/tables/gems__organizations.20.sql =================================================================== --- trunk/library/configs/db/tables/gems__organizations.20.sql 2011-11-25 12:55:53 UTC (rev 288) +++ trunk/library/configs/db/tables/gems__organizations.20.sql 2011-11-25 16:12:43 UTC (rev 289) @@ -1,33 +1,34 @@ CREATE TABLE if not exists gems__organizations ( - gor_id_organization bigint unsigned not null auto_increment, + gor_id_organization bigint unsigned not null auto_increment, - gor_name varchar(50) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' not null, - gor_code varchar(20) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' null, - gor_location varchar(50) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' null, - gor_url varchar(127) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' null, - gor_task varchar(50) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' null, + gor_name varchar(50) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' not null, + gor_code varchar(20) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' null, + gor_location varchar(50) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' null, + gor_url varchar(127) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' null, + gor_task varchar(50) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' null, -- A commy separated list of organization numbers that can look at respondents in this organization - gor_accessible_by text CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' null, + gor_accessible_by text CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' null, - gor_contact_name varchar(50) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' null, - gor_contact_email varchar(127) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' null, - gor_welcome text CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' null, - gor_signature text CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' null, + gor_contact_name varchar(50) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' null, + gor_contact_email varchar(127) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' null, + gor_welcome text CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' null, + gor_signature text CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' null, - gor_style varchar(15) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' not null default 'gems', - gor_iso_lang char(2) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' - not null default 'en' references gems__languages (gml_iso_lang), + gor_style varchar(15) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' not null default 'gems', + gor_iso_lang char(2) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' + not null default 'en' references gems__languages (gml_iso_lang), - gor_has_respondents boolean not null default 1, - gor_add_respondents boolean not null default 1, - gor_active boolean not null default 1, + gor_has_respondents boolean not null default 1, + gor_add_respondents boolean not null default 1, + gor_respondent_group bigint unsigned references gems__groups (ggp_id_group) null, + gor_active boolean not null default 1, - gor_changed timestamp not null default current_timestamp on update current_timestamp, - gor_changed_by bigint unsigned not null, - gor_created timestamp not null, - gor_created_by bigint unsigned not null, + gor_changed timestamp not null default current_timestamp on update current_timestamp, + gor_changed_by bigint unsigned not null, + gor_created timestamp not null, + gor_created_by bigint unsigned not null, PRIMARY KEY(gor_id_organization), UNIQUE (gor_code) Modified: trunk/library/configs/db/tables/gems__roles.20.sql =================================================================== --- trunk/library/configs/db/tables/gems__roles.20.sql 2011-11-25 12:55:53 UTC (rev 288) +++ trunk/library/configs/db/tables/gems__roles.20.sql 2011-11-25 16:12:43 UTC (rev 289) @@ -4,10 +4,10 @@ grl_name varchar(30) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' not null, grl_description varchar(50) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' not null, - grl_parents text CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' not null, + grl_parents text CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' null, -- The grl_parents is a comma-separated list of parents for this role - grl_privileges text CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' not null, + grl_privileges text CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' null, -- The grl_privilege is a comma-separated list of privileges for this role grl_changed timestamp not null default current_timestamp on update current_timestamp, Modified: trunk/library/languages/default-en.mo =================================================================== (Binary files differ) Modified: trunk/library/languages/default-en.po =================================================================== --- trunk/library/languages/default-en.po 2011-11-25 12:55:53 UTC (rev 288) +++ trunk/library/languages/default-en.po 2011-11-25 16:12:43 UTC (rev 289) @@ -2,7 +2,7 @@ msgstr "" "Project-Id-Version: Pulse EN\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-11-23 19:43+0100\n" +"POT-Creation-Date: 2011-11-25 17:05+0100\n" "PO-Revision-Date: \n" "Last-Translator: Matijs de Jong <mj...@ma...>\n" "Language-Team: Erasmus MGZ <mat...@ma...>\n" @@ -23,53 +23,53 @@ msgid "Path %s not writable" msgstr "Path %s not writable" -#: classes/GemsEscort.php:887 +#: classes/GemsEscort.php:891 #, php-format msgid "User: %s" msgstr "User: %s" -#: classes/GemsEscort.php:911 +#: classes/GemsEscort.php:916 msgid "version" msgstr "version" -#: classes/GemsEscort.php:1342 +#: classes/GemsEscort.php:1347 msgid "Take note: your session has expired, your inputs were not saved. Please check the input data and try again" msgstr "Take note: your session has expired, your inputs were not saved. Please check the input data and try again" -#: classes/GemsEscort.php:1469 +#: classes/GemsEscort.php:1474 msgid "Please check back later." msgstr "Please check back later." -#: classes/GemsEscort.php:1471 -#: classes/GemsEscort.php:1475 #: classes/GemsEscort.php:1476 +#: classes/GemsEscort.php:1480 +#: classes/GemsEscort.php:1481 msgid "System is in maintenance mode" msgstr "System is in maintenance mode" -#: classes/GemsEscort.php:1486 +#: classes/GemsEscort.php:1491 msgid "No access to site." msgstr "No access to site." -#: classes/GemsEscort.php:1488 -#: classes/GemsEscort.php:1524 +#: classes/GemsEscort.php:1493 +#: classes/GemsEscort.php:1529 msgid "You have no access to this site." msgstr "You have no access to this site." -#: classes/GemsEscort.php:1504 +#: classes/GemsEscort.php:1509 msgid "No access to page" msgstr "No access to page" -#: classes/GemsEscort.php:1506 +#: classes/GemsEscort.php:1511 #, php-format msgid "Access to this page is not allowed for current role: %s." msgstr "Access to this page is not allowed for current role: %s." -#: classes/GemsEscort.php:1511 -#: classes/GemsEscort.php:1522 +#: classes/GemsEscort.php:1516 +#: classes/GemsEscort.php:1527 msgid "You are no longer logged in." msgstr "You are no longer logged in." -#: classes/GemsEscort.php:1512 +#: classes/GemsEscort.php:1517 msgid "You must login to access this page." msgstr "You must login to access this page." @@ -1094,50 +1094,50 @@ msgid "Your password must be changed." msgstr "Your password must be changed." -#: classes/Gems/Default/IndexAction.php:301 +#: classes/Gems/Default/IndexAction.php:300 #, php-format msgid "Login successful, welcome %s." msgstr "Login successful, welcome %s." -#: classes/Gems/Default/IndexAction.php:341 +#: classes/Gems/Default/IndexAction.php:340 #, php-format msgid "Good bye: %s." msgstr "Good bye: %s." -#: classes/Gems/Default/IndexAction.php:366 +#: classes/Gems/Default/IndexAction.php:365 msgid "Reset accepted, enter your new password." msgstr "Reset accepted, enter your new password." -#: classes/Gems/Default/IndexAction.php:370 +#: classes/Gems/Default/IndexAction.php:369 msgid "This key timed out or does not belong to this user." msgstr "This key timed out or does not belong to this user." -#: classes/Gems/Default/IndexAction.php:387 +#: classes/Gems/Default/IndexAction.php:386 msgid "Password reset requested" msgstr "Password reset requested" -#: classes/Gems/Default/IndexAction.php:388 +#: classes/Gems/Default/IndexAction.php:387 #, php-format msgid "To reset your password for %s, please click this link: %s" msgstr "To reset your password for %s, please click this link: %s" -#: classes/Gems/Default/IndexAction.php:393 +#: classes/Gems/Default/IndexAction.php:392 msgid "We sent you an e-mail with a reset link. Click on the link in the e-mail." msgstr "We sent you an e-mail with a reset link. Click on the link in the e-mail." -#: classes/Gems/Default/IndexAction.php:395 +#: classes/Gems/Default/IndexAction.php:394 msgid "Unable to send e-mail." msgstr "Unable to send e-mail." -#: classes/Gems/Default/IndexAction.php:400 +#: classes/Gems/Default/IndexAction.php:399 msgid "No such user found or no e-mail address known or user cannot be reset." msgstr "No such user found or no e-mail address known or user cannot be reset." -#: classes/Gems/Default/IndexAction.php:404 +#: classes/Gems/Default/IndexAction.php:403 msgid "We received your password reset key." msgstr "We received your password reset key." -#: classes/Gems/Default/IndexAction.php:405 +#: classes/Gems/Default/IndexAction.php:404 msgid "Please enter the organization and username belonging to this key." msgstr "Please enter the organization and username belonging to this key." @@ -1484,7 +1484,7 @@ msgstr "Login Name" #: classes/Gems/Default/OptionAction.php:188 -#: classes/Gems/Default/OrganizationAction.php:191 +#: classes/Gems/Default/OrganizationAction.php:134 #: classes/Gems/Default/RespondentAction.php:173 #: classes/Gems/Default/StaffAction.php:224 msgid "Language" @@ -1513,100 +1513,100 @@ msgid "Item" msgstr "Item" -#: classes/Gems/Default/OrganizationAction.php:124 -msgid "Cookies must be enabled." -msgstr "Cookies must be enabled." - -#: classes/Gems/Default/OrganizationAction.php:127 +#: classes/Gems/Default/OrganizationAction.php:91 msgid "Invalid organization." msgstr "Invalid organization." -#: classes/Gems/Default/OrganizationAction.php:135 +#: classes/Gems/Default/OrganizationAction.php:99 msgid "New organization..." msgstr "New organization..." -#: classes/Gems/Default/OrganizationAction.php:144 -msgid "Choose an organization" -msgstr "Choose an organization" - -#: classes/Gems/Default/OrganizationAction.php:180 +#: classes/Gems/Default/OrganizationAction.php:123 msgid "Url" msgstr "Url" -#: classes/Gems/Default/OrganizationAction.php:181 +#: classes/Gems/Default/OrganizationAction.php:124 msgid "Task" msgstr "Task" -#: classes/Gems/Default/OrganizationAction.php:182 +#: classes/Gems/Default/OrganizationAction.php:125 msgid "Contact name" msgstr "Contact name" -#: classes/Gems/Default/OrganizationAction.php:183 +#: classes/Gems/Default/OrganizationAction.php:126 msgid "Contact email" msgstr "Contact email" -#: classes/Gems/Default/OrganizationAction.php:186 +#: classes/Gems/Default/OrganizationAction.php:129 msgid "Style" msgstr "Style" -#: classes/Gems/Default/OrganizationAction.php:195 +#: classes/Gems/Default/OrganizationAction.php:138 msgid "Can the organization be used?" msgstr "Can the organization be used?" -#: classes/Gems/Default/OrganizationAction.php:196 +#: classes/Gems/Default/OrganizationAction.php:139 msgid "Accepting" msgstr "Accepting" -#: classes/Gems/Default/OrganizationAction.php:196 +#: classes/Gems/Default/OrganizationAction.php:139 msgid "Can new respondents be added to the organization?" msgstr "Can new patients be added to the organization?" -#: classes/Gems/Default/OrganizationAction.php:197 +#: classes/Gems/Default/OrganizationAction.php:140 msgid "Does the organization have respondents?" msgstr "Does the organization have patients?" -#: classes/Gems/Default/OrganizationAction.php:201 +#: classes/Gems/Default/OrganizationAction.php:141 +msgid "Respondent group" +msgstr "Patient group" + +#: classes/Gems/Default/OrganizationAction.php:141 +msgid "Allows respondents to login." +msgstr "Allow patients to login." + +#: classes/Gems/Default/OrganizationAction.php:145 msgid "Greeting" msgstr "Greeting" -#: classes/Gems/Default/OrganizationAction.php:201 -#: classes/Gems/Default/OrganizationAction.php:202 +#: classes/Gems/Default/OrganizationAction.php:145 +#: classes/Gems/Default/OrganizationAction.php:146 msgid "For emails and token forward screen." msgstr "For emails and token forward screen." -#: classes/Gems/Default/OrganizationAction.php:202 +#: classes/Gems/Default/OrganizationAction.php:146 msgid "Signature" msgstr "Signature" -#: classes/Gems/Default/OrganizationAction.php:204 +#: classes/Gems/Default/OrganizationAction.php:148 msgid "Accessible by" msgstr "Accessible by" -#: classes/Gems/Default/OrganizationAction.php:204 +#: classes/Gems/Default/OrganizationAction.php:148 msgid "Checked organizations see this organizations respondents." msgstr "Checked organizations see this organizations patients." -#: classes/Gems/Default/OrganizationAction.php:214 +#: classes/Gems/Default/OrganizationAction.php:158 msgid "Code name" msgstr "Code name" -#: classes/Gems/Default/OrganizationAction.php:214 +#: classes/Gems/Default/OrganizationAction.php:158 msgid "Only for programmers." msgstr "Only for programmers." -#: classes/Gems/Default/OrganizationAction.php:228 +#: classes/Gems/Default/OrganizationAction.php:172 msgid "Delete organization" msgstr "Delete organization" -#: classes/Gems/Default/OrganizationAction.php:238 +#: classes/Gems/Default/OrganizationAction.php:182 msgid "Edit organization" msgstr "Edit organization" -#: classes/Gems/Default/OrganizationAction.php:248 +#: classes/Gems/Default/OrganizationAction.php:192 msgid "Participating organizations" msgstr "Participating organizations" -#: classes/Gems/Default/OrganizationAction.php:258 +#: classes/Gems/Default/OrganizationAction.php:202 msgid "Show organization" msgstr "Show organization" @@ -3442,6 +3442,10 @@ msgstr[0] "A password should contain at least one number." msgstr[1] "A password should contain at least %d numbers." +#: classes/Gems/User/User.php:765 +msgid "Cookies must be enabled for this site." +msgstr "Cookies must be enabled for this site." + #: classes/Gems/User/UserPasswordValidator.php:115 msgid "Wrong password." msgstr "Wrong password." @@ -3784,7 +3788,6 @@ msgstr "Deleted token %s for survey %s." #: snippets/DeleteTrackTokenSnippet.php:277 -#: snippets/EditTrackTokenSnippet.php:174 #, php-format msgid "%d token changed by recalculation." msgid_plural "%d tokens changed by recalculation." @@ -3809,10 +3812,12 @@ msgstr "Recalculate track" #: snippets/RespondentDetailsSnippet.php:59 +#: snippets/RespondentDetailsWithAssignmentsSnippet.php:74 msgid "Respondent information" msgstr "Patient information" #: snippets/RespondentDetailsSnippet.php:71 +#: snippets/RespondentDetailsWithAssignmentsSnippet.php:97 msgid "Respondent nr: " msgstr "Patient nr:" @@ -3900,6 +3905,10 @@ msgid "This track can be assigned since %s." msgstr "This track can be assigned since %s." +#: snippets/Organization/ChooseOrganizationSnippet.php:86 +msgid "Choose an organization" +msgstr "Choose an organization" + #: snippets/Organization/ChooseOrganizationSnippet.php:93 msgid "This organization cannot have any respondents, please choose one that does:" msgstr "This organization cannot have any patients, please choose one that does:" @@ -3908,8 +3917,8 @@ msgid "This organization cannot have any respondents." msgstr "This organization cannot have any patients." -#~ msgid "Allow new respondents" -#~ msgstr "Allow new patients" +#~ msgid "Cookies must be enabled." +#~ msgstr "Cookies must be enabled." #~ msgid "Please update the database" #~ msgstr "Please update the database" Modified: trunk/library/languages/default-nl.mo =================================================================== (Binary files differ) Modified: trunk/library/languages/default-nl.po =================================================================== --- trunk/library/languages/default-nl.po 2011-11-25 12:55:53 UTC (rev 288) +++ trunk/library/languages/default-nl.po 2011-11-25 16:12:43 UTC (rev 289) @@ -2,7 +2,7 @@ msgstr "" "Project-Id-Version: Pulse NL\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-11-23 19:43+0100\n" +"POT-Creation-Date: 2011-11-25 17:06+0100\n" "PO-Revision-Date: \n" "Last-Translator: Matijs de Jong <mj...@ma...>\n" "Language-Team: Erasmus MGZ <mat...@ma...>\n" @@ -23,53 +23,53 @@ msgid "Path %s not writable" msgstr "Path %s niet schrijfbaar" -#: classes/GemsEscort.php:887 +#: classes/GemsEscort.php:891 #, php-format msgid "User: %s" msgstr "Login: %s" -#: classes/GemsEscort.php:911 +#: classes/GemsEscort.php:916 msgid "version" msgstr "versie" -#: classes/GemsEscort.php:1342 +#: classes/GemsEscort.php:1347 msgid "Take note: your session has expired, your inputs were not saved. Please check the input data and try again" msgstr "Let op: uw sessie is verlopen, uw invoer is niet opgeslagen. Controleer uw gegevens en probeer a.u.b. opnieuw." -#: classes/GemsEscort.php:1469 +#: classes/GemsEscort.php:1474 msgid "Please check back later." msgstr "Probeer het later opnieuw." -#: classes/GemsEscort.php:1471 -#: classes/GemsEscort.php:1475 #: classes/GemsEscort.php:1476 +#: classes/GemsEscort.php:1480 +#: classes/GemsEscort.php:1481 msgid "System is in maintenance mode" msgstr "Systeem is in onderhoudsmodus" -#: classes/GemsEscort.php:1486 +#: classes/GemsEscort.php:1491 msgid "No access to site." msgstr "Geen toegang tot website." -#: classes/GemsEscort.php:1488 -#: classes/GemsEscort.php:1524 +#: classes/GemsEscort.php:1493 +#: classes/GemsEscort.php:1529 msgid "You have no access to this site." msgstr "U heeft geen toegang tot deze website." -#: classes/GemsEscort.php:1504 +#: classes/GemsEscort.php:1509 msgid "No access to page" msgstr "Geen toegang tot pagina" -#: classes/GemsEscort.php:1506 +#: classes/GemsEscort.php:1511 #, php-format msgid "Access to this page is not allowed for current role: %s." msgstr "U heeft geen toegang tot deze pagina. Uw huidige rol is: %s." -#: classes/GemsEscort.php:1511 -#: classes/GemsEscort.php:1522 +#: classes/GemsEscort.php:1516 +#: classes/GemsEscort.php:1527 msgid "You are no longer logged in." msgstr "U bent niet meer ingelogd." -#: classes/GemsEscort.php:1512 +#: classes/GemsEscort.php:1517 msgid "You must login to access this page." msgstr "U moet ingelogd zijn voor toegang tot deze pagina." @@ -1094,50 +1094,50 @@ msgid "Your password must be changed." msgstr "Uw wachtwoord moet veranderd worden." -#: classes/Gems/Default/IndexAction.php:301 +#: classes/Gems/Default/IndexAction.php:300 #, php-format msgid "Login successful, welcome %s." msgstr "Login in orde, welkom %s." -#: classes/Gems/Default/IndexAction.php:341 +#: classes/Gems/Default/IndexAction.php:340 #, php-format msgid "Good bye: %s." msgstr "Tot ziens: %s." -#: classes/Gems/Default/IndexAction.php:366 +#: classes/Gems/Default/IndexAction.php:365 msgid "Reset accepted, enter your new password." msgstr "Reset geaccepteerd, voer uw nieuwe wachtwoord in." -#: classes/Gems/Default/IndexAction.php:370 +#: classes/Gems/Default/IndexAction.php:369 msgid "This key timed out or does not belong to this user." msgstr "Te oude sleutel of sleutel hoort niet bij gebruiker." -#: classes/Gems/Default/IndexAction.php:387 +#: classes/Gems/Default/IndexAction.php:386 msgid "Password reset requested" msgstr "Wachtwoord reset aangevraagd" -#: classes/Gems/Default/IndexAction.php:388 +#: classes/Gems/Default/IndexAction.php:387 #, php-format msgid "To reset your password for %s, please click this link: %s" msgstr "Om uw wachtwoord voor %s te resetten, klik op deze link: %s" -#: classes/Gems/Default/IndexAction.php:393 +#: classes/Gems/Default/IndexAction.php:392 msgid "We sent you an e-mail with a reset link. Click on the link in the e-mail." msgstr "We hebben u een email met reset link gestuurd. Klik op de link in de email." -#: classes/Gems/Default/IndexAction.php:395 +#: classes/Gems/Default/IndexAction.php:394 msgid "Unable to send e-mail." msgstr "Verzenden e-mail mislukt." -#: classes/Gems/Default/IndexAction.php:400 +#: classes/Gems/Default/IndexAction.php:399 msgid "No such user found or no e-mail address known or user cannot be reset." msgstr "Gebruiker niet gevonden of e-mail adres onbekend of gebruiker kan niet gereset worden." -#: classes/Gems/Default/IndexAction.php:404 +#: classes/Gems/Default/IndexAction.php:403 msgid "We received your password reset key." msgstr "Wachtwoord resetsleutel ontvangen." -#: classes/Gems/Default/IndexAction.php:405 +#: classes/Gems/Default/IndexAction.php:404 msgid "Please enter the organization and username belonging to this key." msgstr "Geef de organisatie en gebruikersnaam die bij deze sleutel horen op." @@ -1484,7 +1484,7 @@ msgstr "Login Naam" #: classes/Gems/Default/OptionAction.php:188 -#: classes/Gems/Default/OrganizationAction.php:191 +#: classes/Gems/Default/OrganizationAction.php:134 #: classes/Gems/Default/RespondentAction.php:173 #: classes/Gems/Default/StaffAction.php:224 msgid "Language" @@ -1513,100 +1513,100 @@ msgid "Item" msgstr "Item" -#: classes/Gems/Default/OrganizationAction.php:124 -msgid "Cookies must be enabled." -msgstr "Zonder cookies kan de taal niet ingesteld worden." - -#: classes/Gems/Default/OrganizationAction.php:127 +#: classes/Gems/Default/OrganizationAction.php:91 msgid "Invalid organization." msgstr "Ongeldige organisatie." -#: classes/Gems/Default/OrganizationAction.php:135 +#: classes/Gems/Default/OrganizationAction.php:99 msgid "New organization..." msgstr "Nieuwe organisatie..." -#: classes/Gems/Default/OrganizationAction.php:144 -msgid "Choose an organization" -msgstr "Kies een organisatie" - -#: classes/Gems/Default/OrganizationAction.php:180 +#: classes/Gems/Default/OrganizationAction.php:123 msgid "Url" msgstr "Url" -#: classes/Gems/Default/OrganizationAction.php:181 +#: classes/Gems/Default/OrganizationAction.php:124 msgid "Task" msgstr "Taak" -#: classes/Gems/Default/OrganizationAction.php:182 +#: classes/Gems/Default/OrganizationAction.php:125 msgid "Contact name" msgstr "Contact naam" -#: classes/Gems/Default/OrganizationAction.php:183 +#: classes/Gems/Default/OrganizationAction.php:126 msgid "Contact email" msgstr "Contact email" -#: classes/Gems/Default/OrganizationAction.php:186 +#: classes/Gems/Default/OrganizationAction.php:129 msgid "Style" msgstr "Stijl" -#: classes/Gems/Default/OrganizationAction.php:195 +#: classes/Gems/Default/OrganizationAction.php:138 msgid "Can the organization be used?" msgstr "Is de organisatie in gebruik?" -#: classes/Gems/Default/OrganizationAction.php:196 +#: classes/Gems/Default/OrganizationAction.php:139 msgid "Accepting" msgstr "Accepteerd" -#: classes/Gems/Default/OrganizationAction.php:196 +#: classes/Gems/Default/OrganizationAction.php:139 msgid "Can new respondents be added to the organization?" msgstr "Accepteert de organisatie nieuwe patiënten?" -#: classes/Gems/Default/OrganizationAction.php:197 +#: classes/Gems/Default/OrganizationAction.php:140 msgid "Does the organization have respondents?" msgstr "Heeft de organisatie patiënten?" -#: classes/Gems/Default/OrganizationAction.php:201 +#: classes/Gems/Default/OrganizationAction.php:141 +msgid "Respondent group" +msgstr "Patiënten groep" + +#: classes/Gems/Default/OrganizationAction.php:141 +msgid "Allows respondents to login." +msgstr "Patiënten toestaan in te loggen." + +#: classes/Gems/Default/OrganizationAction.php:145 msgid "Greeting" msgstr "Begroeting" -#: classes/Gems/Default/OrganizationAction.php:201 -#: classes/Gems/Default/OrganizationAction.php:202 +#: classes/Gems/Default/OrganizationAction.php:145 +#: classes/Gems/Default/OrganizationAction.php:146 msgid "For emails and token forward screen." msgstr "Voor emails en kenmerk scherm." -#: classes/Gems/Default/OrganizationAction.php:202 +#: classes/Gems/Default/OrganizationAction.php:146 msgid "Signature" msgstr "Handtekening" -#: classes/Gems/Default/OrganizationAction.php:204 +#: classes/Gems/Default/OrganizationAction.php:148 msgid "Accessible by" msgstr "Toegankelijk voor" -#: classes/Gems/Default/OrganizationAction.php:204 +#: classes/Gems/Default/OrganizationAction.php:148 msgid "Checked organizations see this organizations respondents." msgstr "Geselecteerde organizaties kunnen de patiënten van deze organisatie bekijken." -#: classes/Gems/Default/OrganizationAction.php:214 +#: classes/Gems/Default/OrganizationAction.php:158 msgid "Code name" msgstr "Code naam" -#: classes/Gems/Default/OrganizationAction.php:214 +#: classes/Gems/Default/OrganizationAction.php:158 msgid "Only for programmers." msgstr "Uitsluitend voor programmeurs." -#: classes/Gems/Default/OrganizationAction.php:228 +#: classes/Gems/Default/OrganizationAction.php:172 msgid "Delete organization" msgstr "Verwijder organisatie" -#: classes/Gems/Default/OrganizationAction.php:238 +#: classes/Gems/Default/OrganizationAction.php:182 msgid "Edit organization" msgstr "Bewerk organisatie" -#: classes/Gems/Default/OrganizationAction.php:248 +#: classes/Gems/Default/OrganizationAction.php:192 msgid "Participating organizations" msgstr "Deelnemende organisaties" -#: classes/Gems/Default/OrganizationAction.php:258 +#: classes/Gems/Default/OrganizationAction.php:202 msgid "Show organization" msgstr "Toon organisatie" @@ -3442,6 +3442,10 @@ msgstr[0] "Het wachtwoord moet minstens een getal bevatten." msgstr[1] "Het wachtwoord moet minstens %d getallen bevatten." +#: classes/Gems/User/User.php:765 +msgid "Cookies must be enabled for this site." +msgstr "Zonder cookies heeft u geen toegang tot deze site." + #: classes/Gems/User/UserPasswordValidator.php:115 msgid "Wrong password." msgstr "Verkeerd wachtwoord." @@ -3784,7 +3788,6 @@ msgstr "Kenmerk %s voor vragenlijsten %s is verwijderd." #: snippets/DeleteTrackTokenSnippet.php:277 -#: snippets/EditTrackTokenSnippet.php:174 #, php-format msgid "%d token changed by recalculation." msgid_plural "%d tokens changed by recalculation." @@ -3809,10 +3812,12 @@ msgstr "Berekening traject opnieuw" #: snippets/RespondentDetailsSnippet.php:59 +#: snippets/RespondentDetailsWithAssignmentsSnippet.php:74 msgid "Respondent information" msgstr "Patiënt informatie" #: snippets/RespondentDetailsSnippet.php:71 +#: snippets/RespondentDetailsWithAssignmentsSnippet.php:97 msgid "Respondent nr: " msgstr "Patiënt nr:" @@ -3900,6 +3905,10 @@ msgid "This track can be assigned since %s." msgstr "Dit traject kan sinds %s aan een patiënt toegewezen worden." +#: snippets/Organization/ChooseOrganizationSnippet.php:86 +msgid "Choose an organization" +msgstr "Kies een organisatie" + #: snippets/Organization/ChooseOrganizationSnippet.php:93 msgid "This organization cannot have any respondents, please choose one that does:" msgstr "Deze organisatie heeft geen patiënten. Kies een organisatie met patiënten." @@ -3908,8 +3917,8 @@ msgid "This organization cannot have any respondents." msgstr "Deze organisatie heeft geen patiënten." -#~ msgid "Allow new responde... [truncated message content] |
From: <gem...@li...> - 2011-12-01 15:27:01
|
Revision: 326 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=326&view=rev Author: mennodekker Date: 2011-12-01 15:26:53 +0000 (Thu, 01 Dec 2011) Log Message: ----------- Merged userloader branch up to revision 321 - indexAction: use project email for retrieve password emails - StaffAction: start towards better handling of other userclasses (mainly raising questions) unique gsf_login replaced by unique gsf_login + gsf_id_organization unique constraint on email removed (one email can have two logins for example admin / non admin login (needs check with password retrieval) - SurveyMaintenanceAction: Show description of survey (so we can see what 'version' we use - ProjectSettings: Just a note on init and notice fixes - TabForm: bugfixes - TrackEngineAbstract: Show description of survey (like in SurveyMaintenanceAction - Survey: allow to read description - Organization: moved -> access to get, so we can have default values and get something when key exists but value is null - UserLoader: Related to StaffAction, retrieve definition without having a user - TrackData: Extra method to have surveys with and without description - patches.sql: Remove unique constraint from the index to allow multiple accounts with the same email Revision Links: -------------- http://gemstracker.svn.sourceforge.net/gemstracker/?rev=321&view=rev Modified Paths: -------------- trunk/library/classes/Gems/Default/IndexAction.php trunk/library/classes/Gems/Default/StaffAction.php trunk/library/classes/Gems/Default/SurveyMaintenanceAction.php trunk/library/classes/Gems/Project/ProjectSettings.php trunk/library/classes/Gems/TabForm.php trunk/library/classes/Gems/Tracker/Engine/TrackEngineAbstract.php trunk/library/classes/Gems/Tracker/Survey.php trunk/library/classes/Gems/User/Organization.php trunk/library/classes/Gems/User/UserLoader.php trunk/library/classes/Gems/Util/TrackData.php trunk/library/configs/db/patches.sql Added Paths: ----------- trunk/library/classes/Zend/ trunk/library/classes/Zend/Translate/ trunk/library/classes/Zend/Translate/Adapter.php Removed Paths: ------------- trunk/library/classes/Zend/Translate/ trunk/library/classes/Zend/Translate/Adapter.php Property Changed: ---------------- trunk/library/ Property changes on: trunk/library ___________________________________________________________________ Modified: svn:mergeinfo - /branches/1.5.0-pulse/library:306-311 /branches/newUser:113-150 /branches/newUser2:175-207 /tags/1.5.0beta1/library:305 + /branches/1.5.0-pulse/library:306-311 /branches/newUser:113-150 /branches/newUser2:175-207 /branches/userloader:259-324 /tags/1.5.0beta1/library:305 Modified: trunk/library/classes/Gems/Default/IndexAction.php =================================================================== --- trunk/library/classes/Gems/Default/IndexAction.php 2011-12-01 15:14:59 UTC (rev 325) +++ trunk/library/classes/Gems/Default/IndexAction.php 2011-12-01 15:26:53 UTC (rev 326) @@ -1,5 +1,4 @@ <?php - /** * Copyright (c) 2011, Erasmus MC * All rights reserved. @@ -416,12 +415,14 @@ $this->addMessage($this->_('This key timed out or does not belong to this user.')); } } else { - // P{ass mail by key + // Pass mail by key $mail = new MUtil_Mail(); - $mail->setFrom('mj...@ma...'); $mail->addTo($user->getEmailAddress(), $user->getFullName()); - if (isset($this->escort->project->email) && isset($this->escort->project->email['bcc'])) { + if (isset($this->escort->project->email['site'])) { + $mail->setFrom($this->escort->project->email['site']); + } + if (isset($this->escort->project->email['bcc'])) { $mail->addBcc($this->escort->project->email['bcc']); } Modified: trunk/library/classes/Gems/Default/StaffAction.php =================================================================== --- trunk/library/classes/Gems/Default/StaffAction.php 2011-12-01 15:14:59 UTC (rev 325) +++ trunk/library/classes/Gems/Default/StaffAction.php 2011-12-01 15:26:53 UTC (rev 326) @@ -44,6 +44,8 @@ */ class Gems_Default_StaffAction extends Gems_Controller_BrowseEditAction { + //@@TODO What if we want a different one per organization? + //Maybe check if org has a default and otherwise use this one? public $defaultStaffDefinition = Gems_User_UserLoader::USER_STAFF; public $filterStandard = array('gsf_active' => 1); @@ -102,22 +104,23 @@ } $dbLookup = $this->util->getDbLookup(); - switch ($data['gul_user_class']) { - case Gems_User_UserLoader::USER_STAFF: + $passwordField = false; + + //@@TODO Like this? should work when user is not saved, but storing the password should be done when + //we do have a user... + $definition = $this->loader->getUserLoader()->getUserDefinition($data['gul_user_class'].'Definition'); + + if ($definition->canSetPassword()) { + //@@TODO: Should we handle it like this? The userdef has a setpassword method... + if ($definition instanceof Gems_User_StaffUserDefinition) { Gems_Model::addUserPassword($model); $passwordField = 'gup_password'; $model->setOnSave($passwordField, array($this->project, 'getValueHash')); - break; - - case Gems_User_UserLoader::USER_OLD_STAFF: + } elseif ($definition instanceof Gems_User_OldStaffUserDefinition) { $passwordField = 'gsf_password'; $model->setOnSave($passwordField, array($this, 'getOldPasswordHash')); - break; - - default: - $passwordField = false; - break; } + } $model->set('gsf_id_primary_group', 'multiOptions', MUtil_Lazy::call($dbLookup->getAllowedStaffGroups)); if ($new) { @@ -133,8 +136,10 @@ $bridge->addHidden( 'gul_id_user'); $bridge->addHidden( 'gup_id_user'); $bridge->addHidden( 'gul_user_class'); + //@@TODO: How do we change this? Only per org, or allow per user? + //What classes are available? Maybe use something like event loader and add a little desc. to each type? $bridge->addText( 'gsf_login', 'size', 15, 'minlength', 4, - 'validator', $model->createUniqueValidator('gsf_login', array('gsf_id_user'))); + 'validator', $model->createUniqueValidator(array('gsf_login', 'gsf_id_organization'), array('gsf_id_user'))); // Can the organization be changed? if ($this->escort->hasPrivilege('pr.staff.edit.all')) { @@ -163,7 +168,7 @@ $bridge->addText( 'gsf_surname_prefix', 'label', $this->_('Surname prefix'), 'description', 'de, van der, \'t, etc...'); $bridge->addText( 'gsf_last_name', 'label', $this->_('Last name'), 'required', true); $bridge->addFilter( 'gsf_last_name', $ucfirst); - $bridge->addText( 'gsf_email', array('size' => 30))->addValidator('SimpleEmail')->addValidator($model->createUniqueValidator('gsf_email')); + $bridge->addText( 'gsf_email', array('size' => 30))->addValidator('SimpleEmail'); $bridge->addSelect('gsf_id_primary_group'); $bridge->addCheckbox('gsf_logout_on_survey', 'description', $this->_('If checked the user will logoff when answering a survey.')); Modified: trunk/library/classes/Gems/Default/SurveyMaintenanceAction.php =================================================================== --- trunk/library/classes/Gems/Default/SurveyMaintenanceAction.php 2011-12-01 15:14:59 UTC (rev 325) +++ trunk/library/classes/Gems/Default/SurveyMaintenanceAction.php 2011-12-01 15:26:53 UTC (rev 326) @@ -344,11 +344,11 @@ $model->resetOrder(); $model->set('gsu_survey_name', 'label', $this->_('Name')); + $model->set('gsu_survey_description', 'label', $this->_('Description'), 'formatFunction', array(__CLASS__, 'formatDescription')); $model->set('gso_source_name', 'label', $this->_('Source')); $model->set('gsu_status_show', 'label', $this->_('Status in source')); if ($detailed) { - $model->set('gsu_survey_description', 'label', $this->_('Description'), 'formatFunction', array(__CLASS__, 'formatDescription')); $model->set('gsu_surveyor_active', 'label', $this->_('Active in source')); $model->set('gsu_active', 'label', sprintf($this->_('Active in %s'), GEMS_PROJECT_NAME_UC)); } else { Modified: trunk/library/classes/Gems/Project/ProjectSettings.php =================================================================== --- trunk/library/classes/Gems/Project/ProjectSettings.php 2011-12-01 15:14:59 UTC (rev 325) +++ trunk/library/classes/Gems/Project/ProjectSettings.php 2011-12-01 15:26:53 UTC (rev 326) @@ -97,6 +97,8 @@ parent::__construct($array, ArrayObject::ARRAY_AS_PROPS); + //@@TODO: some checks should not be done on each and every request! + // this can be a problem when testing $this->checkRequiredValues(); } @@ -276,7 +278,7 @@ */ public function getSuperAdminName() { - if (isset($this->admin['user'])) { + if (isset($this->admin) && isset($this->admin['user'])) { return $this->admin['user']; } } @@ -288,7 +290,7 @@ */ protected function getSuperAdminPassword() { - if (isset($this->admin['pwd'])) { + if (isset($this->admin) && isset($this->admin['pwd'])) { return $this->admin['pwd']; } } Modified: trunk/library/classes/Gems/TabForm.php =================================================================== --- trunk/library/classes/Gems/TabForm.php 2011-12-01 15:14:59 UTC (rev 325) +++ trunk/library/classes/Gems/TabForm.php 2011-12-01 15:26:53 UTC (rev 326) @@ -60,18 +60,22 @@ if ($this->currentTab && !($element instanceof Zend_Form_Element_Hidden)) { return $this->currentTab->addElement($element, $name, $options); } else { + parent::addElement($element, $name, $options); + if (is_string($element)) { + $element = $this->getElement($element); + } if ($element instanceof Zend_Form_Element_Hidden) { //Remove decorators $element->removeDecorator('htmlTag'); $element->removeDecorator('Label'); - } else { + } elseif ($element instanceof Zend_Form_Element) { $error = $element->getDecorator('Errors'); if ($error instanceof Zend_Form_Decorator_Errors) { $element->removeDecorator('Errors'); $element->addDecorator($error); } } - return parent::addElement($element, $name, $options); + return $this; } } @@ -337,6 +341,13 @@ * @return Gems_TabForm */ public function setView(Zend_View_Interface $view = null) { + /** + * If the form is populated... and we have a tab set... select it + */ + if ($tab = $this->getValue('tab')) { + $this->selectTab($tab); + } + $form = parent::setView($view); if ($view) { Modified: trunk/library/classes/Gems/Tracker/Engine/TrackEngineAbstract.php =================================================================== --- trunk/library/classes/Gems/Tracker/Engine/TrackEngineAbstract.php 2011-12-01 15:14:59 UTC (rev 325) +++ trunk/library/classes/Gems/Tracker/Engine/TrackEngineAbstract.php 2011-12-01 15:26:53 UTC (rev 326) @@ -702,7 +702,7 @@ $model->set('gro_id_track', 'label', $this->_('Track'), 'elementClass', 'exhibitor', 'multiOptions', MUtil_Lazy::call($this->util->getTrackData()->getAllTracks)); } - $model->set('gro_id_survey', 'label', $this->_('Survey'), 'multiOptions', $this->util->getTrackData()->getAllSurveys()); + $model->set('gro_id_survey', 'label', $this->_('Survey'), 'multiOptions', $this->util->getTrackData()->getAllSurveysAndDescriptions()); $model->set('gro_id_order', 'label', $this->_('Order'), 'default', 10, 'validators[]', $model->createUniqueValidator(array('gro_id_order', 'gro_id_track'))); $model->set('gro_round_description', 'label', $this->_('Description'), 'size', '30'); //, 'minlength', 4, 'required', true); $model->set('gro_changed_event', 'label', $this->_('After change'), 'multiOptions', $this->events->listRoundChangedEvents()); Modified: trunk/library/classes/Gems/Tracker/Survey.php =================================================================== --- trunk/library/classes/Gems/Tracker/Survey.php 2011-12-01 15:14:59 UTC (rev 325) +++ trunk/library/classes/Gems/Tracker/Survey.php 2011-12-01 15:26:53 UTC (rev 326) @@ -1,5 +1,4 @@ <?php - /** * Copyright (c) 2011, Erasmus MC * All rights reserved. @@ -262,7 +261,16 @@ return $source->getDatesList($language, $this->_surveyId, $this->_gemsSurvey['gsu_surveyor_id']); } + /** + * + * @return string Description of the survey + */ + public function getDescription() + { + return $this->_gemsSurvey['gsu_survey_description']; + } + /** * * @return int Gems group id for survey Modified: trunk/library/classes/Gems/User/Organization.php =================================================================== --- trunk/library/classes/Gems/User/Organization.php 2011-12-01 15:14:59 UTC (rev 325) +++ trunk/library/classes/Gems/User/Organization.php 2011-12-01 15:26:53 UTC (rev 326) @@ -77,22 +77,6 @@ protected $db; /** - * Returns a callable if a method is called as a variable - * or the value from the organizationData if it exists - * - * @param string $name - * @return Callable - */ - public function __get($name) - { - if (isset($this->_data[$name])) { - return $this->_data[$name]; - } - - return parent::__get($name); - } - - /** * Set menu parameters from the organization * * @param Gems_Menu_ParameterSource $source @@ -122,6 +106,22 @@ { return (boolean) $this->_get('gor_has_respondents') || $this->_get('gor_add_respondents'); } + + /** + * Returns the $key in organizationData when set otherwise the default value + * + * @param string $key + * @param mixed $default + * @return mixed + */ + public function get($key, $default = null) + { + if (array_key_exists($key, $this->_data)) { + return $this->_data[$key]; + } else { + return $default; + } + } /** * Get the organizations this organizations can access. Modified: trunk/library/classes/Gems/User/UserLoader.php =================================================================== --- trunk/library/classes/Gems/User/UserLoader.php 2011-12-01 15:14:59 UTC (rev 325) +++ trunk/library/classes/Gems/User/UserLoader.php 2011-12-01 15:26:53 UTC (rev 326) @@ -189,7 +189,7 @@ list($defName, $userOrganization) = $this->getUserClassInfo($login_name, $currentOrganization); // MUtil_Echo::track($defName, $userOrganization); - $definition = $this->_getClass($defName); + $definition = $this->getUserDefinition($defName); $values = $definition->getUserData($login_name, $userOrganization); // MUtil_Echo::track($defName, $login_name, $userOrganization, $values); @@ -208,6 +208,20 @@ } /** + * Retrieve a userdefinition, so we can check it's capabilities without + * instantiating a user + * + * @param type $userClassName + * @return Gems_User_UserDefinitionInterface + */ + public function getUserDefinition($userClassName) + { + $definition = $this->_getClass($userClassName); + + return $definition; + } + + /** * Get a staff user using the $staff_id * * @param int $staff_id Modified: trunk/library/classes/Gems/Util/TrackData.php =================================================================== --- trunk/library/classes/Gems/Util/TrackData.php 2011-12-01 15:14:59 UTC (rev 325) +++ trunk/library/classes/Gems/Util/TrackData.php 2011-12-01 15:26:53 UTC (rev 326) @@ -95,6 +95,13 @@ return $surveys; } // */ + + /** + * Retrieve an array of key/value pairs for gsu_id_survey and gsu_survey_name + * + * @staticvar array $surveys + * @return array + */ public function getAllSurveys() { static $surveys; @@ -107,6 +114,23 @@ } /** + * Retrieve an array of key/value pairs for gsu_id_survey and gsu_survey_name plus gsu_survey_description + * + * @staticvar array $surveys + * @return array + */ + public function getAllSurveysAndDescriptions() + { + static $surveys; + + if (! $surveys) { + $surveys = $this->db->fetchPairs('SELECT gsu_id_survey, LEFT(CONCAT_WS(" - ", gsu_survey_name, gsu_survey_description),50) FROM gems__surveys ORDER BY gsu_survey_name'); + } + + return $surveys; + } + + /** * Returns array (id => name) of all tracks, sorted alphabetically * @return array */ Deleted: trunk/library/classes/Zend/Translate/Adapter.php =================================================================== --- branches/userloader/classes/Zend/Translate/Adapter.php 2011-12-01 14:57:08 UTC (rev 324) +++ trunk/library/classes/Zend/Translate/Adapter.php 2011-12-01 15:26:53 UTC (rev 326) @@ -1,999 +0,0 @@ -<?php -/** - * Zend Framework - * - * LICENSE - * - * This source file is subject to the new BSD license that is bundled - * with this package in the file LICENSE.txt. - * It is also available through the world-wide-web at this URL: - * http://framework.zend.com/license/new-bsd - * If you did not receive a copy of the license and are unable to - * obtain it through the world-wide-web, please send an email - * to li...@ze... so we can send you a copy immediately. - * - * @category Zend - * @package Zend_Translate - * @subpackage Zend_Translate_Adapter - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) - * @license http://framework.zend.com/license/new-bsd New BSD License - * @version $Id: Adapter.php 24268 2011-07-25 14:47:42Z guilhermeblanco $ - */ - -/** - * @see Zend_Locale - */ -require_once 'Zend/Locale.php'; - -/** - * @see Zend_Translate_Plural - */ -require_once 'Zend/Translate/Plural.php'; - -/** - * Basic adapter class for each translation source adapter - * - * THIS CLASS IS ALTERED FOR THE GEMSTRACKER PROJECT TO NEVER CACHE THE OPTIONS AS THEY CHANGE - * ON EVERY REQUEST AND THIS COUSES TROUBLE AS DESCRIBED AND IGNORED BY ZEND IN - * http://framework.zend.com/issues/browse/ZF-9850 - * - * @category Zend - * @package Zend_Translate - * @subpackage Zend_Translate_Adapter - * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) - * @license http://framework.zend.com/license/new-bsd New BSD License - */ -abstract class Zend_Translate_Adapter { - /** - * Shows if locale detection is in automatic level - * @var boolean - */ - private $_automatic = true; - - /** - * Internal value to see already routed languages - * @var array() - */ - private $_routed = array(); - - /** - * Internal cache for all adapters - * @var Zend_Cache_Core - */ - protected static $_cache = null; - - /** - * Internal value to remember if cache supports tags - * - * @var boolean - */ - private static $_cacheTags = false; - - /** - * Scans for the locale within the name of the directory - * @constant integer - */ - const LOCALE_DIRECTORY = 'directory'; - - /** - * Scans for the locale within the name of the file - * @constant integer - */ - const LOCALE_FILENAME = 'filename'; - - /** - * Array with all options, each adapter can have own additional options - * 'clear' => when true, clears already loaded translations when adding new files - * 'content' => content to translate or file or directory with content - * 'disableNotices' => when true, omits notices from being displayed - * 'ignore' => a prefix for files and directories which are not being added - * 'locale' => the actual set locale to use - * 'log' => a instance of Zend_Log where logs are written to - * 'logMessage' => message to be logged - * 'logPriority' => priority which is used to write the log message - * 'logUntranslated' => when true, untranslated messages are not logged - * 'reload' => reloads the cache by reading the content again - * 'scan' => searches for translation files using the LOCALE constants - * 'tag' => tag to use for the cache - * - * @var array - */ - protected $_options = array( - 'clear' => false, - 'content' => null, - 'disableNotices' => false, - 'ignore' => '.', - 'locale' => 'auto', - 'log' => null, - 'logMessage' => "Untranslated message within '%locale%': %message%", - 'logPriority' => 5, - 'logUntranslated' => false, - 'reload' => false, - 'route' => null, - 'scan' => null, - 'tag' => 'Zend_Translate' - ); - - /** - * Translation table - * @var array - */ - protected $_translate = array(); - - /** - * Generates the adapter - * - * @param array|Zend_Config $options Translation options for this adapter - * @throws Zend_Translate_Exception - * @return void - */ - public function __construct($options = array()) - { - if ($options instanceof Zend_Config) { - $options = $options->toArray(); - } else if (func_num_args() > 1) { - $args = func_get_args(); - $options = array(); - $options['content'] = array_shift($args); - - if (!empty($args)) { - $options['locale'] = array_shift($args); - } - - if (!empty($args)) { - $opt = array_shift($args); - $options = array_merge($opt, $options); - } - } else if (!is_array($options)) { - $options = array('content' => $options); - } - - if (array_key_exists('cache', $options)) { - self::setCache($options['cache']); - unset($options['cache']); - } - - /*if (isset(self::$_cache)) { - $id = 'Zend_Translate_' . $this->toString() . '_Options'; - $result = self::$_cache->load($id); - if ($result) { - $this->_options = $result; - } - }*/ - - if (empty($options['locale']) || ($options['locale'] === "auto")) { - $this->_automatic = true; - } else { - $this->_automatic = false; - } - - $locale = null; - if (!empty($options['locale'])) { - $locale = $options['locale']; - unset($options['locale']); - } - - $this->setOptions($options); - $options['locale'] = $locale; - - if (!empty($options['content'])) { - $this->addTranslation($options); - } - - if ($this->getLocale() !== (string) $options['locale']) { - $this->setLocale($options['locale']); - } - } - - /** - * Add translations - * - * This may be a new language or additional content for an existing language - * If the key 'clear' is true, then translations for the specified - * language will be replaced and added otherwise - * - * @param array|Zend_Config $options Options and translations to be added - * @throws Zend_Translate_Exception - * @return Zend_Translate_Adapter Provides fluent interface - */ - public function addTranslation($options = array()) - { - if ($options instanceof Zend_Config) { - $options = $options->toArray(); - } else if (func_num_args() > 1) { - $args = func_get_args(); - $options = array(); - $options['content'] = array_shift($args); - - if (!empty($args)) { - $options['locale'] = array_shift($args); - } - - if (!empty($args)) { - $opt = array_shift($args); - $options = array_merge($opt, $options); - } - } else if (!is_array($options)) { - $options = array('content' => $options); - } - - if (!isset($options['content']) || empty($options['content'])) { - require_once 'Zend/Translate/Exception.php'; - throw new Zend_Translate_Exception("Required option 'content' is missing"); - } - - $originate = null; - if (!empty($options['locale'])) { - $originate = (string) $options['locale']; - } - - if ((array_key_exists('log', $options)) && !($options['log'] instanceof Zend_Log)) { - require_once 'Zend/Translate/Exception.php'; - throw new Zend_Translate_Exception('Instance of Zend_Log expected for option log'); - } - - try { - if (!($options['content'] instanceof Zend_Translate) && !($options['content'] instanceof Zend_Translate_Adapter)) { - if (empty($options['locale'])) { - $options['locale'] = null; - } - - $options['locale'] = Zend_Locale::findLocale($options['locale']); - } - } catch (Zend_Locale_Exception $e) { - require_once 'Zend/Translate/Exception.php'; - throw new Zend_Translate_Exception("The given Language '{$options['locale']}' does not exist", 0, $e); - } - - $options = $options + $this->_options; - if (is_string($options['content']) and is_dir($options['content'])) { - $options['content'] = realpath($options['content']); - $prev = ''; - $iterator = new RecursiveIteratorIterator( - new RecursiveRegexIterator( - new RecursiveDirectoryIterator($options['content'], RecursiveDirectoryIterator::KEY_AS_PATHNAME), - '/^(?!.*(\.svn|\.cvs)).*$/', RecursiveRegexIterator::MATCH - ), - RecursiveIteratorIterator::SELF_FIRST - ); - - foreach ($iterator as $directory => $info) { - $file = $info->getFilename(); - if (is_array($options['ignore'])) { - foreach ($options['ignore'] as $key => $ignore) { - if (strpos($key, 'regex') !== false) { - if (preg_match($ignore, $directory)) { - // ignore files matching the given regex from option 'ignore' and all files below - continue 2; - } - } else if (strpos($directory, DIRECTORY_SEPARATOR . $ignore) !== false) { - // ignore files matching first characters from option 'ignore' and all files below - continue 2; - } - } - } else { - if (strpos($directory, DIRECTORY_SEPARATOR . $options['ignore']) !== false) { - // ignore files matching first characters from option 'ignore' and all files below - continue; - } - } - - if ($info->isDir()) { - // pathname as locale - if (($options['scan'] === self::LOCALE_DIRECTORY) and (Zend_Locale::isLocale($file, true, false))) { - $options['locale'] = $file; - $prev = (string) $options['locale']; - } - } else if ($info->isFile()) { - // filename as locale - if ($options['scan'] === self::LOCALE_FILENAME) { - $filename = explode('.', $file); - array_pop($filename); - $filename = implode('.', $filename); - if (Zend_Locale::isLocale((string) $filename, true, false)) { - $options['locale'] = (string) $filename; - } else { - $parts = explode('.', $file); - $parts2 = array(); - foreach($parts as $token) { - $parts2 += explode('_', $token); - } - $parts = array_merge($parts, $parts2); - $parts2 = array(); - foreach($parts as $token) { - $parts2 += explode('-', $token); - } - $parts = array_merge($parts, $parts2); - $parts = array_unique($parts); - $prev = ''; - foreach($parts as $token) { - if (Zend_Locale::isLocale($token, true, false)) { - if (strlen($prev) <= strlen($token)) { - $options['locale'] = $token; - $prev = $token; - } - } - } - } - } - - try { - $options['content'] = $info->getPathname(); - $this->_addTranslationData($options); - } catch (Zend_Translate_Exception $e) { - // ignore failed sources while scanning - } - } - } - - unset($iterator); - } else { - $this->_addTranslationData($options); - } - - if ((isset($this->_translate[$originate]) === true) and (count($this->_translate[$originate]) > 0)) { - $this->setLocale($originate); - } - - return $this; - } - - /** - * Sets new adapter options - * - * @param array $options Adapter options - * @throws Zend_Translate_Exception - * @return Zend_Translate_Adapter Provides fluent interface - */ - public function setOptions(array $options = array()) - { - $change = false; - $locale = null; - foreach ($options as $key => $option) { - if ($key == 'locale') { - $locale = $option; - } else if ((isset($this->_options[$key]) and ($this->_options[$key] != $option)) or - !isset($this->_options[$key])) { - if (($key == 'log') && !($option instanceof Zend_Log)) { - require_once 'Zend/Translate/Exception.php'; - throw new Zend_Translate_Exception('Instance of Zend_Log expected for option log'); - } - - if ($key == 'cache') { - self::setCache($option); - continue; - } - - $this->_options[$key] = $option; - $change = true; - } - } - - if ($locale !== null) { - $this->setLocale($locale); - } - - /*if (isset(self::$_cache) and ($change == true)) { - $id = 'Zend_Translate_' . $this->toString() . '_Options'; - if (self::$_cacheTags) { - self::$_cache->save($this->_options, $id, array($this->_options['tag'])); - } else { - self::$_cache->save($this->_options, $id); - } - }*/ - - return $this; - } - - /** - * Returns the adapters name and it's options - * - * @param string|null $optionKey String returns this option - * null returns all options - * @return integer|string|array|null - */ - public function getOptions($optionKey = null) - { - if ($optionKey === null) { - return $this->_options; - } - - if (isset($this->_options[$optionKey]) === true) { - return $this->_options[$optionKey]; - } - - return null; - } - - /** - * Gets locale - * - * @return Zend_Locale|string|null - */ - public function getLocale() - { - return $this->_options['locale']; - } - - /** - * Sets locale - * - * @param string|Zend_Locale $locale Locale to set - * @throws Zend_Translate_Exception - * @return Zend_Translate_Adapter Provides fluent interface - */ - public function setLocale($locale) - { - if (($locale === "auto") or ($locale === null)) { - $this->_automatic = true; - } else { - $this->_automatic = false; - } - - try { - $locale = Zend_Locale::findLocale($locale); - } catch (Zend_Locale_Exception $e) { - require_once 'Zend/Translate/Exception.php'; - throw new Zend_Translate_Exception("The given Language ({$locale}) does not exist", 0, $e); - } - - if (!isset($this->_translate[$locale])) { - $temp = explode('_', $locale); - if (!isset($this->_translate[$temp[0]]) and !isset($this->_translate[$locale])) { - if (!$this->_options['disableNotices']) { - if ($this->_options['log']) { - $this->_options['log']->log("The language '{$locale}' has to be added before it can be used.", $this->_options['logPriority']); - } else { - trigger_error("The language '{$locale}' has to be added before it can be used.", E_USER_NOTICE); - } - } - } - - $locale = $temp[0]; - } - - if (empty($this->_translate[$locale])) { - if (!$this->_options['disableNotices']) { - if ($this->_options['log']) { - $this->_options['log']->log("No translation for the language '{$locale}' available.", $this->_options['logPriority']); - } else { - trigger_error("No translation for the language '{$locale}' available.", E_USER_NOTICE); - } - } - } - - if ($this->_options['locale'] != $locale) { - $this->_options['locale'] = $locale; - - /*if (isset(self::$_cache)) { - $id = 'Zend_Translate_' . $this->toString() . '_Options'; - if (self::$_cacheTags) { - self::$_cache->save($this->_options, $id, array($this->_options['tag'])); - } else { - self::$_cache->save($this->_options, $id); - } - }*/ - } - - return $this; - } - - /** - * Returns the available languages from this adapter - * - * @return array|null - */ - public function getList() - { - $list = array_keys($this->_translate); - $result = null; - foreach($list as $value) { - if (!empty($this->_translate[$value])) { - $result[$value] = $value; - } - } - return $result; - } - - /** - * Returns the message id for a given translation - * If no locale is given, the actual language will be used - * - * @param string $message Message to get the key for - * @param string|Zend_Locale $locale (optional) Language to return the message ids from - * @return string|array|false - */ - public function getMessageId($message, $locale = null) - { - if (empty($locale) or !$this->isAvailable($locale)) { - $locale = $this->_options['locale']; - } - - return array_search($message, $this->_translate[(string) $locale]); - } - - /** - * Returns all available message ids from this adapter - * If no locale is given, the actual language will be used - * - * @param string|Zend_Locale $locale (optional) Language to return the message ids from - * @return array - */ - public function getMessageIds($locale = null) - { - if (empty($locale) or !$this->isAvailable($locale)) { - $locale = $this->_options['locale']; - } - - return array_keys($this->_translate[(string) $locale]); - } - - /** - * Returns all available translations from this adapter - * If no locale is given, the actual language will be used - * If 'all' is given the complete translation dictionary will be returned - * - * @param string|Zend_Locale $locale (optional) Language to return the messages from - * @return array - */ - public function getMessages($locale = null) - { - if ($locale === 'all') { - return $this->_translate; - } - - if ((empty($locale) === true) or ($this->isAvailable($locale) === false)) { - $locale = $this->_options['locale']; - } - - return $this->_translate[(string) $locale]; - } - - /** - * Is the wished language available ? - * - * @see Zend_Locale - * @param string|Zend_Locale $locale Language to search for, identical with locale identifier, - * @see Zend_Locale for more information - * @return boolean - */ - public function isAvailable($locale) - { - $return = isset($this->_translate[(string) $locale]); - return $return; - } - - /** - * Load translation data - * - * @param mixed $data - * @param string|Zend_Locale $locale - * @param array $options (optional) - * @return array - */ - abstract protected function _loadTranslationData($data, $locale, array $options = array()); - - /** - * Internal function for adding translation data - * - * This may be a new language or additional data for an existing language - * If the options 'clear' is true, then the translation data for the specified - * language is replaced and added otherwise - * - * @see Zend_Locale - * @param array|Zend_Config $content Translation data to add - * @throws Zend_Translate_Exception - * @return Zend_Translate_Adapter Provides fluent interface - */ - private function _addTranslationData($options = array()) - { - if ($options instanceof Zend_Config) { - $options = $options->toArray(); - } else if (func_num_args() > 1) { - $args = func_get_args(); - $options['content'] = array_shift($args); - - if (!empty($args)) { - $options['locale'] = array_shift($args); - } - - if (!empty($args)) { - $options += array_shift($args); - } - } - - if (($options['content'] instanceof Zend_Translate) || ($options['content'] instanceof Zend_Translate_Adapter)) { - $options['usetranslateadapter'] = true; - if (!empty($options['locale']) && ($options['locale'] !== 'auto')) { - $options['content'] = $options['content']->getMessages($options['locale']); - } else { - $content = $options['content']; - $locales = $content->getList(); - foreach ($locales as $locale) { - $options['locale'] = $locale; - $options['content'] = $content->getMessages($locale); - $this->_addTranslationData($options); - } - - return $this; - } - } - - try { - $options['locale'] = Zend_Locale::findLocale($options['locale']); - } catch (Zend_Locale_Exception $e) { - require_once 'Zend/Translate/Exception.php'; - throw new Zend_Translate_Exception("The given Language '{$options['locale']}' does not exist", 0, $e); - } - - if ($options['clear'] || !isset($this->_translate[$options['locale']])) { - $this->_translate[$options['locale']] = array(); - } - - $read = true; - if (isset(self::$_cache)) { - $id = 'Zend_Translate_' . md5(serialize($options['content'])) . '_' . $this->toString(); - $temp = self::$_cache->load($id); - if ($temp) { - $read = false; - } - } - - if ($options['reload']) { - $read = true; - } - - if ($read) { - if (!empty($options['usetranslateadapter'])) { - $temp = array($options['locale'] => $options['content']); - } else { - $temp = $this->_loadTranslationData($options['content'], $options['locale'], $options); - } - } - - if (empty($temp)) { - $temp = array(); - } - - $keys = array_keys($temp); - foreach($keys as $key) { - if (!isset($this->_translate[$key])) { - $this->_translate[$key] = array(); - } - - if (array_key_exists($key, $temp) && is_array($temp[$key])) { - $this->_translate[$key] = $temp[$key] + $this->_translate[$key]; - } - } - - if ($this->_automatic === true) { - $find = new Zend_Locale($options['locale']); - $browser = $find->getEnvironment() + $find->getBrowser(); - arsort($browser); - foreach($browser as $language => $quality) { - if (isset($this->_translate[$language])) { - $this->_options['locale'] = $language; - break; - } - } - } - - if (($read) and (isset(self::$_cache))) { - $id = 'Zend_Translate_' . md5(serialize($options['content'])) . '_' . $this->toString(); - if (self::$_cacheTags) { - self::$_cache->save($temp, $id, array($this->_options['tag'])); - } else { - self::$_cache->save($temp, $id); - } - } - - return $this; - } - - /** - * Translates the given string - * returns the translation - * - * @see Zend_Locale - * @param string|array $messageId Translation string, or Array for plural translations - * @param string|Zend_Locale $locale (optional) Locale/Language to use, identical with - * locale identifier, @see Zend_Locale for more information - * @return string - */ - public function translate($messageId, $locale = null) - { - if ($locale === null) { - $locale = $this->_options['locale']; - } - - $plural = null; - if (is_array($messageId)) { - if (count($messageId) > 2) { - $number = array_pop($messageId); - if (!is_numeric($number)) { - $plocale = $number; - $number = array_pop($messageId); - } else { - $plocale = 'en'; - } - - $plural = $messageId; - $messageId = $messageId[0]; - } else { - $messageId = $messageId[0]; - } - } - - if (!Zend_Locale::isLocale($locale, true, false)) { - if (!Zend_Locale::isLocale($locale, false, false)) { - // language does not exist, return original string - $this->_log($messageId, $locale); - // use rerouting when enabled - if (!empty($this->_options['route'])) { - if (array_key_exists($locale, $this->_options['route']) && - !array_key_exists($locale, $this->_routed)) { - $this->_routed[$locale] = true; - return $this->translate($messageId, $this->_options['route'][$locale]); - } - } - - $this->_routed = array(); - if ($plural === null) { - return $messageId; - } - - $rule = Zend_Translate_Plural::getPlural($number, $plocale); - if (!isset($plural[$rule])) { - $rule = 0; - } - - return $plural[$rule]; - } - - $locale = new Zend_Locale($locale); - } - - $locale = (string) $locale; - if ((is_string($messageId) || is_int($messageId)) && isset($this->_translate[$locale][$messageId])) { - // return original translation - if ($plural === null) { - $this->_routed = array(); - return $this->_translate[$locale][$messageId]; - } - - $rule = Zend_Translate_Plural::getPlural($number, $locale); - if (isset($this->_translate[$locale][$plural[0]][$rule])) { - $this->_routed = array(); - return $this->_translate[$locale][$plural[0]][$rule]; - } - } else if (strlen($locale) != 2) { - // faster than creating a new locale and separate the leading part - $locale = substr($locale, 0, -strlen(strrchr($locale, '_'))); - - if ((is_string($messageId) || is_int($messageId)) && isset($this->_translate[$locale][$messageId])) { - // return regionless translation (en_US -> en) - if ($plural === null) { - $this->_routed = array(); - return $this->_translate[$locale][$messageId]; - } - - $rule = Zend_Translate_Plural::getPlural($number, $locale); - if (isset($this->_translate[$locale][$plural[0]][$rule])) { - $this->_routed = array(); - return $this->_translate[$locale][$plural[0]][$rule]; - } - } - } - - $this->_log($messageId, $locale); - // use rerouting when enabled - if (!empty($this->_options['route'])) { - if (array_key_exists($locale, $this->_options['route']) && - !array_key_exists($locale, $this->_routed)) { - $this->_routed[$locale] = true; - return $this->translate($messageId, $this->_options['route'][$locale]); - } - } - - $this->_routed = array(); - if ($plural === null) { - return $messageId; - } - - $rule = Zend_Translate_Plural::getPlural($number, $plocale); - if (!isset($plural[$rule])) { - $rule = 0; - } - - return $plural[$rule]; - } - - /** - * Translates the given string using plural notations - * Returns the translated string - * - * @see Zend_Locale - * @param string $singular Singular translation string - * @param string $plural Plural translation string - * @param integer $number Number for detecting the correct plural - * @param string|Zend_Locale $locale (Optional) Locale/Language to use, identical with - * locale identifier, @see Zend_Locale for more information - * @return string - */ - public function plural($singular, $plural, $number, $locale = null) - { - return $this->translate(array($singular, $plural, $number), $locale); - } - - /** - * Logs a message when the log option is set - * - * @param string $message Message to log - * @param String $locale Locale to log - */ - protected function _log($message, $locale) { - if ($this->_options['logUntranslated']) { - $message = str_replace('%message%', $message, $this->_options['logMessage']); - $message = str_replace('%locale%', $locale, $message); - if ($this->_options['log']) { - $this->_options['log']->log($message, $this->_options['logPriority']); - } else { - trigger_error($message, E_USER_NOTICE); - } - } - } - - /** - * Translates the given string - * returns the translation - * - * @param string $messageId Translation string - * @param string|Zend_Locale $locale (optional) Locale/Language to use, identical with locale - * identifier, @see Zend_Locale for more information - * @return string - */ - public function _($messageId, $locale = null) - { - return $this->translate($messageId, $locale); - } - - /** - * Checks if a string is translated within the source or not - * returns boolean - * - * @param string $messageId Translation string - * @param boolean $original (optional) Allow translation only for original language - * when true, a translation for 'en_US' would give false when it can - * be translated with 'en' only - * @param string|Zend_Locale $locale (optional) Locale/Language to use, identical with locale identifier, - * see Zend_Locale for more information - * @return boolean - */ - public function isTranslated($messageId, $original = false, $locale = null) - { - if (($original !== false) and ($original !== true)) { - $locale = $original; - $original = false; - } - - if ($locale === null) { - $locale = $this->_options['locale']; - } - - if (!Zend_Locale::isLocale($locale, true, false)) { - if (!Zend_Locale::isLocale($locale, false, false)) { - // language does not exist, return original string - return false; - } - - $locale = new Zend_Locale($locale); - } - - $locale = (string) $locale; - if ((is_string($messageId) || is_int($messageId)) && isset($this->_translate[$locale][$messageId])) { - // return original translation - return true; - } else if ((strlen($locale) != 2) and ($original === false)) { - // faster than creating a new locale and separate the leading part - $locale = substr($locale, 0, -strlen(strrchr($locale, '_'))); - - if ((is_string($messageId) || is_int($messageId)) && isset($this->_translate[$locale][$messageId])) { - // return regionless translation (en_US -> en) - return true; - } - } - - // No translation found, return original - return false; - } - - /** - * Returns the set cache - * - * @return Zend_Cache_Core The set cache - */ - public static function getCache() - { - return self::$_cache; - } - - /** - * Sets a cache for all Zend_Translate_Adapters - * - * @param Zend_Cache_Core $cache Cache to store to - */ - public static function setCache(Zend_Cache_Core $cache) - { - self::$_cache = $cache; - self::_getTagSupportForCache(); - } - - /** - * Returns true when a cache is set - * - * @return boolean - */ - public static function hasCache() - { - if (self::$_cache !== null) { - return true; - } - - return false; - } - - /** - * Removes any set cache - * - * @return void - */ - public static function removeCache() - { - self::$_cache = null; - } - - /** - * Clears all set cache data - * - * @param string $tag Tag to clear when the default tag name is not used - * @return void - */ - public static function clearCache($tag = null) - { - require_once 'Zend/Cache.php'; - if (self::$_cacheTags) { - if ($tag == null) { - $tag = 'Zend_Translate'; - } - - self::$_cache->clean(Zend_Cache::CLEANING_MODE_MATCHING_TAG, array($tag)); - } else { - self::$_cache->clean(Zend_Cache::CLEANING_MODE_ALL); - } - } - - /** - * Returns the adapter name - * - * @return string - */ - abstract public function toString(); - - /** - * Internal method to check if the given cache supports tags - * - * @param Zend_Cache $cache - */ - private static function _getTagSupportForCache() - { - $backend = self::$_cache->getBackend(); - if ($backend instanceof Zend_Cache_Backend_ExtendedInterface) { - $cacheOptions = $backend->getCapabilities(); - self::$_cacheTags = $cacheOptions['tags']; - } else { - self::$_cacheTags = false; - } - - return self::$_cacheTags; - } -} \ No newline at end of file Copied: trunk/library/classes/Zend/Translate/Adapter.php (from rev 324, branches/userloader/classes/Zend/Translate/Adapter.php) =================================================================== --- trunk/library/classes/Zend/Translate/Adapter.php (rev 0) +++ trunk/library/classes/Zend/Translate/Adapter.php 2011-12-01 15:26:53 UTC (rev 326) @@ -0,0 +1,999 @@ +<?php +/** + * Zend Framework + * + * LICENSE + * + * This source file is subject to the new BSD license that is bundled + * with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://framework.zend.com/license/new-bsd + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to li...@ze... so we can send you a copy immediately. + * + * @category Zend + * @package Zend_Translate + * @subpackage Zend_Translate_Adapter + * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + * @version $Id: Adapter.php 24268 2011-07-25 14:47:42Z guilhermeblanco $ + */ + +/** + * @see Zend_Locale + */ +require_once 'Zend/Locale.php'; + +/** + * @see Zend_Translate_Plural + */ +require_once 'Zend/Translate/Plural.php'; + +/** + * Basic adapter class for each translation source adapter + * + * THIS CLASS IS ALTERED FOR THE GEMSTRACKER PROJECT TO NEVER CACHE THE OPTIONS AS THEY CHANGE + * ON EVERY REQUEST AND THIS COUSES TROUBLE AS DESCRIBED AND IGNORED BY ZEND IN + * http://framework.zend.com/issues/browse/ZF-9850 + * + * @category Zend + * @package Zend_Translate + * @subpackage Zend_Translate_Adapter + * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ +abstract class Zend_Translate_Adapter { + /** + * Shows if locale detection is in automatic level + * @var boolean + */ + private $_automatic = true; + + /** + * Internal value to see already routed languages + * @var array() + */ + private $_routed = array(); + + /** + * Internal cache for all adapters + * @var Zend_Cache_Core + */ + protected static $_cache = null; + + /** + * Internal value to remember if cache supports tags + * + * @var boolean + */ + private static $_cacheTags = false; + + /** + * Scans for the locale within the name of the directory + * @constant integer + */ + const LOCALE_DIRECTORY = 'directory'; + + /** + * Scans for the locale within the name of the file + * @constant integer + */ + const LOCALE_FILENAME = 'filename'; + + /** + * Array with all options, each adapter can have own additional options + * 'clear' => when true, clears already loaded translations when adding new files + * 'content' => content to translate or file or directory with content + * 'disableNotices' => when true, omits notices from being displayed + * 'ignore' => a prefix for files and directories which are not being added + * 'locale' => the actual set locale to use + * 'log' => a instance of Zend_Log where logs are written to + * 'logMessage' => message to be logged + * 'logPriority' => priority which is used to write the log message + * 'logUntranslated' => when true, untranslated messages are not logged + * 'reload' => reloads the cache by reading the content again + * 'scan' => searches for translation files using the LOCALE constants + * 'tag' => tag to use for the cache + * + * @var array + */ + protected $_options = array( + 'clear' => false, + 'content' => null, + 'disableNotices' => false, + 'ignore' => '.', + 'locale' => 'auto', + 'log' => null, + 'logMessage' => "Untranslated message within '%locale%': %message%", + 'logPriority' => 5, + 'logUntranslated' => false, + 'reload' => false, + 'route' => null, + 'scan' => null, + 'tag' => 'Zend_Translate' + ); + + /** + * Translation table + * @var array + */ + protected $_translate = array(); + + /** + * Generates the adapter + * + * @param array|Zend_Config $options Translation options for this adapter + * @throws Zend_Translate_Exception + * @return void + */ + public function __construct($options = array()) + { + if ($options instanceof Zend_Config) { + $options = $options->toArray(); + } else if (func_num_args() > 1) { + $args = func_get_args(); + $options = array(); + $options['content'] = array_shift($args); + + if (!empty($args)) { + $options['locale'] = array_shift($args); + } + + if (!empty($args)) { + $opt = array_shift($args); + $options = array_merge($opt, $options); + } + } else if (!is_array($options)) { + $options = array('content' => $options); + } + + if (array_key_exists('cache', $options)) { + self::setCache($options['cache']); + unset($options['cache']); + } + + /*if (isset(self::$_cache)) { + $id = 'Zend_Translate_' . $this->toString() . '_Options'; + $result = self::$_cache->load($id); + if ($result) { + $this->_options = $result; + } + }*/ + + if (empty($options['locale']) || ($options['locale'] === "auto")) { + $this->_automatic = true; + } else { + $this->_automatic = false; + } + + $locale = null; + if (!empty($options['locale'])) { + $locale = $options['locale']; + unset($options['locale']); + } + + $this->setOptions($options); + $options['locale'] = $locale; + + if (!empty($options['content'])) { + $this->addTranslation($options); + } + + if ($this->getLocale() !== (string) $options['locale']) { + $this->setLocale($options['locale']); + } + } + + /** + * Add translations + * + * This may be a new language or additional content for an existing language + * If the key 'clear' is true, then translations for the specified + * language will be replaced and ad... [truncated message content] |
From: <gem...@li...> - 2011-12-13 13:33:03
|
Revision: 353 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=353&view=rev Author: mennodekker Date: 2011-12-13 13:32:54 +0000 (Tue, 13 Dec 2011) Log Message: ----------- title is properly set (need to bootstrap project first in view) fixed layout so meta comes first (allows for ie compativility view overrides) Modified Paths: -------------- trunk/library/classes/GemsEscort.php trunk/library/layouts/scripts/gems.phtml trunk/library/layouts/scripts/gemsnew.phtml Modified: trunk/library/classes/GemsEscort.php =================================================================== --- trunk/library/classes/GemsEscort.php 2011-12-12 08:47:58 UTC (rev 352) +++ trunk/library/classes/GemsEscort.php 2011-12-13 13:32:54 UTC (rev 353) @@ -478,14 +478,15 @@ */ protected function _initView() { + $this->bootstrap('project'); // Initialize view $view = new Zend_View(); $view->addHelperPath('MUtil/View/Helper', 'MUtil_View_Helper'); $view->addHelperPath('Gems/View/Helper', 'Gems_View_Helper'); - $view->doctype('XHTML1_STRICT'); - $view->headTitle($this->project->name); + $view->doctype(Zend_View_Helper_Doctype::XHTML1_STRICT); + $view->headTitle($this->project->getName()); $view->setEncoding('UTF-8'); - $view->headMeta('text/html;charset=UTF-8', 'Content-Type', 'http-equiv'); + $view->headMeta()->appendHttpEquiv('Content-Type', 'text/html;charset=UTF-8'); // Add it to the ViewRenderer $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer'); Modified: trunk/library/layouts/scripts/gems.phtml =================================================================== --- trunk/library/layouts/scripts/gems.phtml 2011-12-12 08:47:58 UTC (rev 352) +++ trunk/library/layouts/scripts/gems.phtml 2011-12-13 13:32:54 UTC (rev 353) @@ -1,10 +1,10 @@ <?php echo $this->doctype(); ?> <html <?php echo 'xmlns="http://www.w3.org/1999/xhtml" xml:lang="'.$this->locale.'"' ?> lang="<?php echo $this->locale; ?>"> <head><?php + echo $this->headMeta(); echo $this->headTitle(); echo $this->headLink(); echo $this->headStyle(); - echo $this->headMeta(); // Check if jQuery library is needed if ($this->jQuery) { Modified: trunk/library/layouts/scripts/gemsnew.phtml =================================================================== --- trunk/library/layouts/scripts/gemsnew.phtml 2011-12-12 08:47:58 UTC (rev 352) +++ trunk/library/layouts/scripts/gemsnew.phtml 2011-12-13 13:32:54 UTC (rev 353) @@ -1,10 +1,10 @@ <?php echo $this->doctype(); ?> <html <?php echo 'xmlns="http://www.w3.org/1999/xhtml" xml:lang="'.$this->locale.'"' ?> lang="<?php echo $this->locale; ?>"> <head><?php + echo $this->headMeta(); echo $this->headTitle(); echo $this->headLink(); echo $this->headStyle(); - echo $this->headMeta(); // Check if jQuery library is needed if ($this->jQuery) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2012-01-06 10:22:41
|
Revision: 400 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=400&view=rev Author: michieltcs Date: 2012-01-06 10:22:34 +0000 (Fri, 06 Jan 2012) Log Message: ----------- Pass to initItems() and addItems() Modified Paths: -------------- trunk/library/classes/MUtil/Snippets/ModelFormSnippetAbstract.php trunk/library/snippets/Organization/OrganizationEditSnippet.php Modified: trunk/library/classes/MUtil/Snippets/ModelFormSnippetAbstract.php =================================================================== --- trunk/library/classes/MUtil/Snippets/ModelFormSnippetAbstract.php 2012-01-05 12:48:04 UTC (rev 399) +++ trunk/library/classes/MUtil/Snippets/ModelFormSnippetAbstract.php 2012-01-06 10:22:34 UTC (rev 400) @@ -157,10 +157,10 @@ protected function addFormElements(MUtil_Model_FormBridge $bridge, MUtil_Model_ModelAbstract $model) { //Get all elements in the model if not already done - $this->initItems(); + $this->initItems($model); //And any remaining item - $this->addItems($bridge, $this->_items); + $this->addItems($bridge, $model, $this->_items); } /** @@ -171,22 +171,23 @@ * * @return void */ - protected function addItems(MUtil_Model_FormBridge $bridge, $element1) + protected function addItems(MUtil_Model_FormBridge $bridge, MUtil_Model_ModelAbstract $model, $element1) { $args = func_get_args(); - if (count($args)<2) { - throw new Gems_Exception_Coding('Use at least 2 arguments, first the bridge and then one or more idividual items'); + if (count($args) < 3) { + throw new Gems_Exception_Coding('Use at least 3 arguments; bridge, model and then one or more individual items'); } $bridge = array_shift($args); + $model = array_shift($args); $elements = MUtil_Ra::flatten($args); //Remove the elements from the _items variable $this->_items = array_diff($this->_items, $elements); - + //And add them to the bridge foreach($elements as $name) { - if ($label = $this->model->get($name, 'label')) { + if ($label = $model->get($name, 'label')) { $bridge->add($name); } else { $bridge->addHidden($name); @@ -361,10 +362,10 @@ /** * Initialize the _items variable to hold all items from the model */ - protected function initItems() + protected function initItems(MUtil_Model_ModelAbstract $model) { if (is_null($this->_items)) { - $this->_items = $this->model->getItemsOrdered(); + $this->_items = $model->getItemsOrdered(); } } Modified: trunk/library/snippets/Organization/OrganizationEditSnippet.php =================================================================== --- trunk/library/snippets/Organization/OrganizationEditSnippet.php 2012-01-05 12:48:04 UTC (rev 399) +++ trunk/library/snippets/Organization/OrganizationEditSnippet.php 2012-01-06 10:22:34 UTC (rev 400) @@ -64,7 +64,7 @@ protected function addFormElements(MUtil_Model_FormBridge $bridge, MUtil_Model_ModelAbstract $model) { //Get all elements in the model if not already done - $this->initItems(); + $this->initItems($model); //Create our tab structure first check if tab already exists to allow extension if (!($bridge->getTab('general'))) { @@ -72,17 +72,17 @@ } //Need the first two together for validation $bridge->addHtml('org')->b($this->_('Organization')); - $this->addItems($bridge, 'gor_name', 'gor_id_organization', 'gor_location', 'gor_url', 'gor_active'); + $this->addItems($bridge, $model, 'gor_name', 'gor_id_organization', 'gor_location', 'gor_url', 'gor_active'); $bridge->addHtml('contact')->b($this->_('Contact')); $bridge->addHtml('contact_desc')->i($this->_('The contact details for this organization, used for emailing.')); - $this->addItems($bridge, 'gor_contact_name', 'gor_contact_email'); + $this->addItems($bridge, $model, 'gor_contact_name', 'gor_contact_email'); $bridge->addHtml('general_other')->b($this->_('Other')); - $this->addItems($bridge, 'gor_iso_lang', 'gor_code', 'gor_has_respondents'); + $this->addItems($bridge, $model, 'gor_iso_lang', 'gor_code', 'gor_has_respondents'); if (!($bridge->getTab('email'))) { $bridge->addTab('email', 'value', $this->_('Email') . ' & ' . $this->_('Token')); } - $this->addItems($bridge, 'gor_welcome', 'gor_signature'); + $this->addItems($bridge, $model, 'gor_welcome', 'gor_signature'); if (!($bridge->getTab('access'))) { $bridge->addTab('access', 'value', $this->_('Access')); @@ -94,7 +94,7 @@ unset($multiOptions[$this->formData['gor_id_organization']]); $model->set('gor_accessible_by', 'multiOptions', $multiOptions); } - $this->addItems($bridge, 'gor_has_login', 'gor_add_respondents', 'gor_respondent_group', 'gor_accessible_by'); + $this->addItems($bridge, $model, 'gor_has_login', 'gor_add_respondents', 'gor_respondent_group', 'gor_accessible_by'); //Show what organizations we can access if (isset($this->formData['gor_id_organization']) && !empty($this->formData['gor_id_organization'])) { @@ -106,7 +106,7 @@ $bridge->addExhibitor('allowed', 'value', $display, 'label', $this->_('Can access')); } - $this->addItems($bridge, 'gor_user_class'); + $this->addItems($bridge, $model, 'gor_user_class'); if (isset($this->formData['gor_user_class']) && !empty($this->formData['gor_user_class'])) { $class = $this->formData['gor_user_class'] . 'Definition'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2012-03-08 16:21:06
|
Revision: 539 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=539&view=rev Author: matijsdejong Date: 2012-03-08 16:20:56 +0000 (Thu, 08 Mar 2012) Log Message: ----------- Updated translation ModelSnippetActionAbstract.php now has titles comparable to BrowseEditAction Modified Paths: -------------- trunk/library/classes/Gems/Controller/ModelSnippetActionAbstract.php trunk/library/classes/Gems/Default/MailJobAction.php trunk/library/classes/Gems/Default/MailLogAction.php trunk/library/classes/Gems/Default/OrganizationAction.php trunk/library/classes/Gems/Default/SourceAction.php trunk/library/languages/default-en.mo trunk/library/languages/default-en.po trunk/library/languages/default-nl.mo trunk/library/languages/default-nl.po Modified: trunk/library/classes/Gems/Controller/ModelSnippetActionAbstract.php =================================================================== --- trunk/library/classes/Gems/Controller/ModelSnippetActionAbstract.php 2012-03-08 15:44:35 UTC (rev 538) +++ trunk/library/classes/Gems/Controller/ModelSnippetActionAbstract.php 2012-03-08 16:20:56 UTC (rev 539) @@ -78,7 +78,7 @@ * * @var mixed String or array of snippets name */ - protected $deleteSnippets = array('Generic_ContentTitleSnippet', 'Generic_ModelItemYesNoDeleteSnippet'); + protected $deleteSnippets = 'Generic_ModelItemYesNoDeleteSnippet'; /** * @@ -135,6 +135,37 @@ } /** + * Action for showing a create new item page with extra title + */ + public function createAction() + { + $this->createEditParameters['formTitle'] = $this->getCreateTitle(); + + parent::createAction(); + } + + /** + * Action for showing a delete item page with extra titles + */ + public function deleteAction() + { + $this->deleteParameters['displayTitle'] = $this->getDeleteTitle(); + $this->deleteParameters['deleteQuestion'] = $this->getDeleteQuestion(); + + parent::deleteAction(); + } + + /** + * Action for showing a edit item page with extra title + */ + public function editAction() + { + $this->createEditParameters['formTitle'] = $this->getEditTitle(); + + parent::editAction(); + } + + /** * Outputs the model to excel, applying all filters and searches needed * * When you want to change the output, there are two places to check: @@ -186,6 +217,46 @@ } /** + * Helper function to get the title for the create action. + * + * @return $string + */ + public function getCreateTitle() + { + return sprintf($this->_('New %s...'), $this->getTopic(1)); + } + + /** + * Helper function to get the question for the delete action. + * + * @return $string + */ + public function getDeleteQuestion() + { + return sprintf($this->_('Do you want to delete this %s?'), $this->getTopic(1)); + } + + /** + * Helper function to get the title for the delete action. + * + * @return $string + */ + public function getDeleteTitle() + { + return sprintf($this->_('Delete %s'), $this->getTopic(1)); + } + + /** + * Helper function to get the title for the edit action. + * + * @return $string + */ + public function getEditTitle() + { + return sprintf($this->_('Edit %s...'), $this->getTopic(1)); + } + + /** * Returns an array with all columns from the model that have a label * * @param array $data @@ -225,6 +296,16 @@ } /** + * Helper function to get the title for the index action. + * + * @return $string + */ + public function getIndexTitle() + { + return ucfirst($this->getTopic(100)); + } + + /** * Return the current request ID, if any. * * Overrule this function if the last item in the page title @@ -247,10 +328,20 @@ */ public function getOnEmptyText() { - return $this->_('Nothing found...'); + return sprintf($this->_('No %s found...'), $this->getTopic(0)); } /** + * Helper function to get the title for the show action. + * + * @return $string + */ + public function getShowTitle() + { + return sprintf($this->_('Showing %s'), $this->getTopic(1)); + } + + /** * Returns the current html/head/title for this page. * * If the title is an array the seperator concatenates the parts. @@ -276,11 +367,23 @@ } /** + * Helper function to allow generalized statements about the items in the model. + * + * @param int $count + * @return $string + */ + public function getTopic($count = 1) + { + return $this->plural('item', 'items', $count); + } + + /** * Action for showing a browse page */ public function indexAction() { $this->autofilterParameters = $this->autofilterParameters + $this->_autofilterExtraParameters; + $this->indexParameters['contentTitle'] = $this->getIndexTitle(); return parent::indexAction(); } @@ -299,4 +402,14 @@ parent::initHtml($reset); } + + /** + * Action for showing an item page with title + */ + public function showAction() + { + $this->showParameters['contentTitle'] = $this->getShowTitle(); + + parent::showAction(); + } } Modified: trunk/library/classes/Gems/Default/MailJobAction.php =================================================================== --- trunk/library/classes/Gems/Default/MailJobAction.php 2012-03-08 15:44:35 UTC (rev 538) +++ trunk/library/classes/Gems/Default/MailJobAction.php 2012-03-08 16:20:56 UTC (rev 539) @@ -53,16 +53,6 @@ public $project; /** - * Action for showing a create new item page - */ - public function createAction() - { - $this->createEditParameters['formTitle'] = $this->_('New automatic mail job...'); - - parent::createAction(); - } - - /** * 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 @@ -113,27 +103,6 @@ } /** - * Action for showing a delete item page - */ - public function deleteAction() - { - $this->deleteParameters['deleteQuestion'] = $this->_('Do you want to delete this mail job?'); - $this->deleteParameters['displayTitle'] = $this->deleteParameters['deleteQuestion']; - - parent::deleteAction(); - } - - /** - * Action for showing a edit item page - */ - public function editAction() - { - $this->createEditParameters['formTitle'] = $this->_('Edit automatic mail job'); - - parent::editAction(); - } - - /** * The types of mail filters * * @return array @@ -166,22 +135,31 @@ } /** - * Returns the on empty texts for the autofilter snippets + * Helper function to get the title for the index action. * - * @return string + * @return $string */ - public function getOnEmptyText() + public function getIndexTitle() { - return $this->_('No automatic mail jobs found...'); + return $this->_('Automatic mail jobs'); } /** + * Helper function to allow generalized statements about the items in the model. + * + * @param int $count + * @return $string + */ + public function getTopic($count = 1) + { + return $this->plural('automatic mail job', 'automatic mail jobs', $count); + } + + /** * Action for showing a browse page */ public function indexAction() { - $this->indexParameters['contentTitle'] = $this->_('Automatic mail jobs'); - $lock = $this->util->getCronJobLock(); if ($lock->isLocked()) { $this->addMessage(sprintf($this->_('Automatic mails have been turned off since %s.'), $lock->getLockTime())); @@ -196,14 +174,4 @@ $this->html->pInfo($this->_('With automatic mail jobs and a cron job on the server, mails can be sent without manual user action.')); } - - /** - * Action for showing an item page - */ - public function showAction() - { - $this->showParameters['displayTitle'] = $this->_('Automatic mail job details'); - - parent::showAction(); - } } Modified: trunk/library/classes/Gems/Default/MailLogAction.php =================================================================== --- trunk/library/classes/Gems/Default/MailLogAction.php 2012-03-08 15:44:35 UTC (rev 538) +++ trunk/library/classes/Gems/Default/MailLogAction.php 2012-03-08 16:20:56 UTC (rev 539) @@ -134,34 +134,23 @@ } /** - * Returns the on empty texts for the autofilter snippets + * Helper function to get the title for the index action. * - * @return string + * @return $string */ - public function getOnEmptyText() + public function getIndexTitle() { - return $this->_('No mail activity found...'); + return $this->_('Mail Activity Log'); } /** - * Action for showing a browse page + * Helper function to allow generalized statements about the items in the model. + * + * @param int $count + * @return $string */ - public function indexAction() + public function getTopic($count = 1) { - $this->indexParameters['contentTitle'] = $this->_('Mail Activity Log'); - - parent::indexAction(); + return $this->plural('mail activity', 'mail activities', $count); } - - - /** - * Action for showing an item page - */ - public function showAction() - { - $this->showParameters['displayTitle'] = $this->_('Show Mail Activity Log item'); - - // MUtil_Echo::track($this->indexParameters); - parent::showAction(); - } } Modified: trunk/library/classes/Gems/Default/OrganizationAction.php =================================================================== --- trunk/library/classes/Gems/Default/OrganizationAction.php 2012-03-08 15:44:35 UTC (rev 538) +++ trunk/library/classes/Gems/Default/OrganizationAction.php 2012-03-08 16:20:56 UTC (rev 539) @@ -92,16 +92,6 @@ } /** - * Action for showing a create new item page - */ - public function createAction() - { - $this->createEditParameters['formTitle'] = $this->_('New organization...'); - - parent::createAction(); - } - - /** * 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 @@ -187,52 +177,23 @@ } /** - * Action for showing a delete item page + * Helper function to get the title for the index action. + * + * @return $string */ - public function deleteAction() + public function getIndexTitle() { - $this->indexParameters['contentTitle'] = $this->_('Delete organization'); - - parent::deleteAction(); + return $this->_('Participating organizations'); } /** - * Action for showing a edit item page - */ - public function editAction() - { - $this->createEditParameters['formTitle'] = $this->_("Edit organization"); - - parent::editAction(); - } - - /** - * Returns the on empty texts for the autofilter snippets + * Helper function to allow generalized statements about the items in the model. * - * @return string + * @param int $count + * @return $string */ - public function getOnEmptyText() + public function getTopic($count = 1) { - return $this->_('No organization found...'); + return $this->plural('organization', 'organizations', $count); } - - /** - * Action for showing a browse page - */ - public function indexAction() - { - $this->indexParameters['contentTitle'] = $this->_('Participating organizations'); - - parent::indexAction(); - } - - /** - * Action for showing an item page - */ - public function showAction() - { - $this->indexParameters['contentTitle'] = $this->_('Show organization'); - - parent::showAction(); - } } Modified: trunk/library/classes/Gems/Default/SourceAction.php =================================================================== --- trunk/library/classes/Gems/Default/SourceAction.php 2012-03-08 15:44:35 UTC (rev 538) +++ trunk/library/classes/Gems/Default/SourceAction.php 2012-03-08 16:20:56 UTC (rev 539) @@ -112,7 +112,7 @@ $batch = $this->loader->getTracker()->refreshTokenAttributesBatch('sourceCheck' . $sourceId, $where); - $title = sprintf($this->_('Refreshing token attributes for for %s source.'), + $title = sprintf($this->_('Refreshing token attributes for %s source.'), $this->db->fetchOne("SELECT gso_source_name FROM gems__sources WHERE gso_id_source = ?", $sourceId)); $this->_helper->BatchRunner($batch, $title); Modified: trunk/library/languages/default-en.mo =================================================================== (Binary files differ) Modified: trunk/library/languages/default-en.po =================================================================== --- trunk/library/languages/default-en.po 2012-03-08 15:44:35 UTC (rev 538) +++ trunk/library/languages/default-en.po 2012-03-08 16:20:56 UTC (rev 539) @@ -2,7 +2,7 @@ msgstr "" "Project-Id-Version: Pulse EN\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-02-15 14:22+0100\n" +"POT-Creation-Date: 2012-03-08 17:17+0100\n" "PO-Revision-Date: \n" "Last-Translator: Matijs de Jong <mj...@ma...>\n" "Language-Team: Erasmus MGZ <mat...@ma...>\n" @@ -23,72 +23,72 @@ msgid "Path %s not writable" msgstr "Path %s not writable" -#: classes/GemsEscort.php:739 +#: classes/GemsEscort.php:743 #, php-format msgid "You are logged in as %s" msgstr "You are logged in as %s" -#: classes/GemsEscort.php:741 +#: classes/GemsEscort.php:745 #: classes/Gems/Menu.php:248 msgid "Logoff" msgstr "Logoff" -#: classes/GemsEscort.php:744 +#: classes/GemsEscort.php:748 msgid "You are not logged in" msgstr "You are not logged in" -#: classes/GemsEscort.php:927 +#: classes/GemsEscort.php:931 #, php-format msgid "User: %s" msgstr "User: %s" -#: classes/GemsEscort.php:952 +#: classes/GemsEscort.php:956 msgid "version" msgstr "version" -#: classes/GemsEscort.php:1383 +#: classes/GemsEscort.php:1387 msgid "Take note: your session has expired, your inputs were not saved. Please check the input data and try again" msgstr "Take note: your session has expired, your inputs were not saved. Please check the input data and try again" -#: classes/GemsEscort.php:1513 +#: classes/GemsEscort.php:1517 msgid "Please check back later." msgstr "Please check back later." -#: classes/GemsEscort.php:1515 #: classes/GemsEscort.php:1519 -#: classes/GemsEscort.php:1520 +#: classes/GemsEscort.php:1523 +#: classes/GemsEscort.php:1524 msgid "System is in maintenance mode" msgstr "System is in maintenance mode" -#: classes/GemsEscort.php:1530 +#: classes/GemsEscort.php:1534 msgid "No access to site." msgstr "No access to site." -#: classes/GemsEscort.php:1532 -#: classes/GemsEscort.php:1574 +#: classes/GemsEscort.php:1536 +#: classes/GemsEscort.php:1578 msgid "You have no access to this site." msgstr "You have no access to this site." -#: classes/GemsEscort.php:1548 +#: classes/GemsEscort.php:1552 msgid "No access to page" msgstr "No access to page" -#: classes/GemsEscort.php:1550 +#: classes/GemsEscort.php:1554 #, php-format msgid "Access to this page is not allowed for current role: %s." msgstr "Access to this page is not allowed for current role: %s." -#: classes/GemsEscort.php:1560 -#: classes/GemsEscort.php:1572 +#: classes/GemsEscort.php:1564 +#: classes/GemsEscort.php:1576 msgid "You are no longer logged in." msgstr "You are no longer logged in." -#: classes/GemsEscort.php:1561 +#: classes/GemsEscort.php:1565 msgid "You must login to access this page." msgstr "You must login to access this page." -#: classes/GemsEscort.php:1705 -#: classes/GemsEscort.php:1707 +#: classes/GemsEscort.php:1709 +#: classes/GemsEscort.php:1711 #, php-format msgid "%d survey" msgid_plural "%d surveys" @@ -103,31 +103,31 @@ msgid "Combination of organization, username and password not found." msgstr "Combination of organization, username and password not found." -#: classes/Gems/Html.php:155 +#: classes/Gems/Html.php:154 msgid "<< First" msgstr "<< First" -#: classes/Gems/Html.php:156 +#: classes/Gems/Html.php:155 msgid "< Previous" msgstr "< Previous" -#: classes/Gems/Html.php:157 +#: classes/Gems/Html.php:156 msgid "Next >" msgstr "Next >" -#: classes/Gems/Html.php:158 +#: classes/Gems/Html.php:157 msgid "Last >>" msgstr "Last >>" -#: classes/Gems/Html.php:159 +#: classes/Gems/Html.php:158 msgid " | " msgstr " | " -#: classes/Gems/Html.php:163 +#: classes/Gems/Html.php:162 msgid "to" msgstr "to" -#: classes/Gems/Html.php:164 +#: classes/Gems/Html.php:163 msgid "of" msgstr "of" @@ -324,35 +324,35 @@ msgid "Answers" msgstr "Answers" -#: classes/Gems/Menu.php:518 +#: classes/Gems/Menu.php:530 msgid "Respondents" msgstr "Patients" -#: classes/Gems/Menu.php:526 +#: classes/Gems/Menu.php:538 msgid "Overview" msgstr "Overview" -#: classes/Gems/Menu.php:533 +#: classes/Gems/Menu.php:545 msgid "Project" msgstr "Project" -#: classes/Gems/Menu.php:536 +#: classes/Gems/Menu.php:548 msgid "Setup" msgstr "Setup" -#: classes/Gems/Menu.php:539 +#: classes/Gems/Menu.php:551 msgid "Mail" msgstr "Mail" -#: classes/Gems/Menu.php:542 +#: classes/Gems/Menu.php:554 msgid "Track Builder" msgstr "Track Builder" -#: classes/Gems/Menu.php:551 +#: classes/Gems/Menu.php:563 msgid "Contact" msgstr "Contact" -#: classes/Gems/Menu.php:564 +#: classes/Gems/Menu.php:576 msgid "Changelog" msgstr "Changelog" @@ -427,47 +427,28 @@ msgid " The error message is: %s" msgstr " The error message is: %s" -#: classes/Gems/Tracker.php:753 +#: classes/Gems/Tracker.php:761 msgid "Checks performed" msgstr "Checks performed" -#: classes/Gems/Upgrades.php:69 -#: classes/Gems/Upgrades.php:71 -#, php-format -msgid "Executing patchlevel %d" -msgstr "Executing patchlevel %d" - -#: classes/Gems/Upgrades.php:76 -msgid "Creating new tables" -msgstr "Creating new tables" - -#: classes/Gems/Upgrades.php:81 +#: classes/Gems/Upgrades.php:75 msgid "Syncing surveys for all sources" msgstr "Syncing surveys for all sources" -#: classes/Gems/UpgradesAbstract.php:175 -#, php-format -msgid "Finished %s creation script for object %d of %d" -msgstr "Finished %s creation script for object %d of %d" - -#: classes/Gems/UpgradesAbstract.php:206 +#: classes/Gems/UpgradesAbstract.php:154 msgid "Already at max. level." msgstr "Already at max. level." -#: classes/Gems/UpgradesAbstract.php:213 +#: classes/Gems/UpgradesAbstract.php:161 #, php-format msgid "Trying upgrade for %s from level %s to level %s" msgstr "Trying upgrade for %s from level %s to level %s" -#: classes/Gems/UpgradesAbstract.php:221 +#: classes/Gems/UpgradesAbstract.php:169 #, php-format msgid "Trying upgrade for %s to level %s: %s" msgstr "Trying upgrade for %s to level %s: %s" -#: classes/Gems/UpgradesAbstract.php:379 -msgid "Cache cleaned" -msgstr "Cache cleaned" - #: classes/Gems/Controller/BrowseEditAction.php:354 #, php-format msgid "New %s..." @@ -557,14 +538,53 @@ #: classes/Gems/Controller/ModelActionAbstract.php:97 #: classes/Gems/Default/AskAction.php:150 -#: classes/Gems/Default/DatabaseAction.php:487 +#: classes/Gems/Default/DatabaseAction.php:488 msgid "Cancel" msgstr "Cancel" -#: classes/Gems/Controller/ModelSnippetActionAbstract.php:181 +#: classes/Gems/Controller/ModelSnippetActionAbstract.php:236 +#, php-format +msgid "Do you want to delete this %s?" +msgstr "Do you want to delete this %s?" + +#: classes/Gems/Controller/ModelSnippetActionAbstract.php:256 +#, php-format +msgid "Edit %s..." +msgstr "Edit %s..." + +#: classes/Gems/Controller/ModelSnippetActionAbstract.php:269 msgid "No data found." msgstr "No data found." +#: classes/Gems/Controller/ModelSnippetActionAbstract.php:331 +#, php-format +msgid "No %s found..." +msgstr "No %s found..." + +#: classes/Gems/Controller/ModelSnippetActionAbstract.php:341 +#, php-format +msgid "Showing %s" +msgstr "Showing %s" + +#: classes/Gems/Controller/ModelSnippetActionAbstract.php:377 +msgid "item" +msgid_plural "items" +msgstr[0] "item" +msgstr[1] "items" + +#: classes/Gems/Controller/Action/Helper/BatchRunner.php:65 +msgid "Prepare recheck" +msgstr "Prepare recheck" + +#: classes/Gems/Controller/Action/Helper/BatchRunner.php:68 +#, php-format +msgid "Start %s jobs" +msgstr "Start %s jobs" + +#: classes/Gems/Controller/Action/Helper/BatchRunner.php:71 +msgid "Nothing to do." +msgstr "Nothing to do." + #: classes/Gems/Default/AskAction.php:128 #, php-format msgid "Welcome %s," @@ -817,180 +837,189 @@ msgid "Object is not a table." msgstr "Object is not a table." -#: classes/Gems/Default/DatabaseAction.php:246 +#: classes/Gems/Default/DatabaseAction.php:247 msgid "Structure" msgstr "Structure" -#: classes/Gems/Default/DatabaseAction.php:255 +#: classes/Gems/Default/DatabaseAction.php:256 msgid "database object" msgid_plural "database objects" msgstr[0] "database object" msgstr[1] "database objects" -#: classes/Gems/Default/DatabaseAction.php:260 +#: classes/Gems/Default/DatabaseAction.php:261 msgid "Database object overview" msgstr "Database object overview" -#: classes/Gems/Default/DatabaseAction.php:269 -#: classes/Gems/Default/DatabaseAction.php:321 +#: classes/Gems/Default/DatabaseAction.php:270 +#: classes/Gems/Default/DatabaseAction.php:322 msgid "Level" msgstr "Level" -#: classes/Gems/Default/DatabaseAction.php:270 -#: classes/Gems/Default/DatabaseAction.php:322 +#: classes/Gems/Default/DatabaseAction.php:271 +#: classes/Gems/Default/DatabaseAction.php:323 msgid "Subtype" msgstr "Subtype" -#: classes/Gems/Default/DatabaseAction.php:272 +#: classes/Gems/Default/DatabaseAction.php:273 msgid "To be executed" msgstr "To be executed" -#: classes/Gems/Default/DatabaseAction.php:273 -#: classes/Gems/Default/DatabaseAction.php:325 +#: classes/Gems/Default/DatabaseAction.php:274 +#: classes/Gems/Default/DatabaseAction.php:326 msgid "Executed" msgstr "Executed" -#: classes/Gems/Default/DatabaseAction.php:274 -#: classes/Gems/Default/DatabaseAction.php:326 +#: classes/Gems/Default/DatabaseAction.php:275 +#: classes/Gems/Default/DatabaseAction.php:327 msgid "Finished" msgstr "Finished" -#: classes/Gems/Default/DatabaseAction.php:277 +#: classes/Gems/Default/DatabaseAction.php:278 msgid "Create the patch table!" msgstr "Create the patch table!" -#: classes/Gems/Default/DatabaseAction.php:279 +#: classes/Gems/Default/DatabaseAction.php:280 #, php-format msgid "%d new or changed patch(es)." msgstr "%d new or changed patch(es)." -#: classes/Gems/Default/DatabaseAction.php:284 +#: classes/Gems/Default/DatabaseAction.php:285 msgid "Gems build" msgstr "Gems build" -#: classes/Gems/Default/DatabaseAction.php:285 +#: classes/Gems/Default/DatabaseAction.php:286 msgid "Database build" msgstr "Database build" -#: classes/Gems/Default/DatabaseAction.php:287 +#: classes/Gems/Default/DatabaseAction.php:288 msgid "Execute level" msgstr "Execute level" -#: classes/Gems/Default/DatabaseAction.php:291 +#: classes/Gems/Default/DatabaseAction.php:292 msgid "Ignore finished" msgstr "Ignore finished" -#: classes/Gems/Default/DatabaseAction.php:292 +#: classes/Gems/Default/DatabaseAction.php:293 msgid "Ignore executed" msgstr "Ignore executed" -#: classes/Gems/Default/DatabaseAction.php:293 +#: classes/Gems/Default/DatabaseAction.php:294 msgid "Show patches" msgstr "Show patches" -#: classes/Gems/Default/DatabaseAction.php:307 +#: classes/Gems/Default/DatabaseAction.php:308 #, php-format msgid "%d patch(es) executed." msgstr "%d patch(es) executed." -#: classes/Gems/Default/DatabaseAction.php:320 +#: classes/Gems/Default/DatabaseAction.php:315 +msgid "Cache cleaned" +msgstr "Cache cleaned" + +#: classes/Gems/Default/DatabaseAction.php:321 msgid "Patch" msgstr "Patch" -#: classes/Gems/Default/DatabaseAction.php:324 +#: classes/Gems/Default/DatabaseAction.php:325 msgid "Query" msgstr "Query" -#: classes/Gems/Default/DatabaseAction.php:327 +#: classes/Gems/Default/DatabaseAction.php:328 msgid "Result" msgstr "Result" -#: classes/Gems/Default/DatabaseAction.php:351 +#: classes/Gems/Default/DatabaseAction.php:352 msgid "Patch maintenance" msgstr "Patch maintenance" -#: classes/Gems/Default/DatabaseAction.php:355 +#: classes/Gems/Default/DatabaseAction.php:356 msgid "Patch overview" msgstr "Patch overview" -#: classes/Gems/Default/DatabaseAction.php:417 +#: classes/Gems/Default/DatabaseAction.php:418 msgid "This database object does not exist. You cannot create it." msgstr "This database object does not exist. You cannot create it." -#: classes/Gems/Default/DatabaseAction.php:423 +#: classes/Gems/Default/DatabaseAction.php:424 msgid "This database object has no script. You cannot execute it." msgstr "This database object has no script. You cannot execute it." -#: classes/Gems/Default/DatabaseAction.php:434 +#: classes/Gems/Default/DatabaseAction.php:435 #, php-format msgid "Run %s" msgstr "Run %s" -#: classes/Gems/Default/DatabaseAction.php:454 +#: classes/Gems/Default/DatabaseAction.php:455 #, php-format msgid "Starting %d object creation scripts." msgstr "Starting %d object creation scripts." -#: classes/Gems/Default/DatabaseAction.php:464 +#: classes/Gems/Default/DatabaseAction.php:461 +#, php-format +msgid "Finished %s creation script for object %d of %d" +msgstr "Finished %s creation script for object %d of %d" + +#: classes/Gems/Default/DatabaseAction.php:465 msgid "All objects exist. Nothing was executed." msgstr "All objects exist. Nothing was executed." -#: classes/Gems/Default/DatabaseAction.php:470 +#: classes/Gems/Default/DatabaseAction.php:471 msgid "Create not-existing database objects" msgstr "Create not-existing database objects" -#: classes/Gems/Default/DatabaseAction.php:472 +#: classes/Gems/Default/DatabaseAction.php:473 #, php-format msgid "One database object does not exist." msgid_plural "These %d database objects do not exist." msgstr[0] "One database object does not exist." msgstr[1] "These %d database objects do not exist." -#: classes/Gems/Default/DatabaseAction.php:473 +#: classes/Gems/Default/DatabaseAction.php:474 msgid "Are you sure you want to create it?" msgid_plural "Are you sure you want to create them all?" msgstr[0] "Are you sure you want to create it?" msgstr[1] "Are you sure you want to create them all?" -#: classes/Gems/Default/DatabaseAction.php:486 +#: classes/Gems/Default/DatabaseAction.php:487 msgid "All database objects exist. There is nothing to create." msgstr "All database objects exist. There is nothing to create." -#: classes/Gems/Default/DatabaseAction.php:499 +#: classes/Gems/Default/DatabaseAction.php:500 msgid "Separate multiple commands with semicolons (;)." msgstr "Separate multiple commands with semicolons (;)." -#: classes/Gems/Default/DatabaseAction.php:506 +#: classes/Gems/Default/DatabaseAction.php:507 msgid "Run" msgstr "Run" -#: classes/Gems/Default/DatabaseAction.php:515 +#: classes/Gems/Default/DatabaseAction.php:516 msgid "raw" msgstr "raw" -#: classes/Gems/Default/DatabaseAction.php:525 +#: classes/Gems/Default/DatabaseAction.php:526 #, php-format msgid "Result set %s." msgstr "Result set %s." -#: classes/Gems/Default/DatabaseAction.php:548 +#: classes/Gems/Default/DatabaseAction.php:549 msgid "Execute raw SQL" msgstr "Execute raw SQL" -#: classes/Gems/Default/DatabaseAction.php:551 +#: classes/Gems/Default/DatabaseAction.php:552 msgid "Result sets" msgstr "Result sets" -#: classes/Gems/Default/DatabaseAction.php:576 +#: classes/Gems/Default/DatabaseAction.php:577 msgid "This database object does not exist. You cannot view it." msgstr "This database object does not exist. You cannot view it." -#: classes/Gems/Default/DatabaseAction.php:581 +#: classes/Gems/Default/DatabaseAction.php:582 #, php-format msgid "The data in table %s" msgstr "The data in table %s" -#: classes/Gems/Default/DatabaseAction.php:582 +#: classes/Gems/Default/DatabaseAction.php:583 #, php-format msgid "Contents of %s %s" msgstr "Contents of %s %s" @@ -1004,7 +1033,6 @@ msgstr "Export data" #: classes/Gems/Default/ExportAction.php:153 -#: classes/Gems/Default/MailJobAction.php:121 msgid "Survey" msgstr "Survey" @@ -1016,7 +1044,6 @@ #: classes/Gems/Default/ExportAction.php:172 #: classes/Gems/Default/IndexAction.php:203 #: classes/Gems/Default/LogAction.php:197 -#: classes/Gems/Default/MailJobAction.php:119 msgid "Organization" msgstr "Organization" @@ -1030,7 +1057,6 @@ msgstr "Role" #: classes/Gems/Default/GroupAction.php:92 -#: classes/Gems/Default/MailJobAction.php:104 msgid "Active" msgstr "Active" @@ -1247,141 +1273,130 @@ msgid "Log maintenance" msgstr "Log maintenance" -#: classes/Gems/Default/MailJobAction.php:62 -msgid "No automatic mail jobs found..." -msgstr "No automatic mail jobs found..." - -#: classes/Gems/Default/MailJobAction.php:72 -msgid "New automatic mail job..." -msgstr "New automatic mail job..." - -#: classes/Gems/Default/MailJobAction.php:100 +#: classes/Gems/Default/MailJobAction.php:78 +#: classes/Gems/Default/MailLogAction.php:118 msgid "Template" msgstr "Template" -#: classes/Gems/Default/MailJobAction.php:101 +#: classes/Gems/Default/MailJobAction.php:79 msgid "By staff member" msgstr "By staff member" -#: classes/Gems/Default/MailJobAction.php:103 +#: classes/Gems/Default/MailJobAction.php:81 msgid "Used for logging and possibly from address." msgstr "Used for logging and possibly from address." -#: classes/Gems/Default/MailJobAction.php:106 +#: classes/Gems/Default/MailJobAction.php:84 msgid "Job is only run when active." msgstr "Job is only run when active." -#: classes/Gems/Default/MailJobAction.php:109 +#: classes/Gems/Default/MailJobAction.php:87 msgid "From address used" msgstr "From address used" -#: classes/Gems/Default/MailJobAction.php:111 +#: classes/Gems/Default/MailJobAction.php:89 msgid "From other" msgstr "From other" -#: classes/Gems/Default/MailJobAction.php:112 +#: classes/Gems/Default/MailJobAction.php:90 #, php-format msgid "Only when '%s' is '%s'." msgstr "Only when '%s' is '%s'." -#: classes/Gems/Default/MailJobAction.php:114 +#: classes/Gems/Default/MailJobAction.php:92 msgid "Processing Method" msgstr "Processing Method" -#: classes/Gems/Default/MailJobAction.php:115 +#: classes/Gems/Default/MailJobAction.php:93 msgid "Filter for" msgstr "Filter for" -#: classes/Gems/Default/MailJobAction.php:116 +#: classes/Gems/Default/MailJobAction.php:94 msgid "Days between reminders" msgstr "Days between reminders" -#: classes/Gems/Default/MailJobAction.php:132 -msgid "Do you want to delete this mail job?" -msgstr "Do you want to delete this mail job?" - -#: classes/Gems/Default/MailJobAction.php:143 -msgid "Edit automatic mail job" -msgstr "Edit automatic mail job" - -#: classes/Gems/Default/MailJobAction.php:156 +#: classes/Gems/Default/MailJobAction.php:113 msgid "First mail" msgstr "First mail" -#: classes/Gems/Default/MailJobAction.php:157 +#: classes/Gems/Default/MailJobAction.php:114 msgid "Reminder" msgstr "Reminder" -#: classes/Gems/Default/MailJobAction.php:168 +#: classes/Gems/Default/MailJobAction.php:125 msgid "Use organizational from address" msgstr "Use organizational from address" -#: classes/Gems/Default/MailJobAction.php:171 +#: classes/Gems/Default/MailJobAction.php:128 #, php-format msgid "Use site %s address" msgstr "Use site %s address" -#: classes/Gems/Default/MailJobAction.php:174 +#: classes/Gems/Default/MailJobAction.php:131 msgid "Use the 'By staff member' address" msgstr "Use the 'By staff member' address" -#: classes/Gems/Default/MailJobAction.php:175 +#: classes/Gems/Default/MailJobAction.php:132 msgid "Other" msgstr "Other" -#: classes/Gems/Default/MailJobAction.php:185 +#: classes/Gems/Default/MailJobAction.php:144 msgid "Automatic mail jobs" msgstr "Automatic mail jobs" -#: classes/Gems/Default/MailJobAction.php:189 +#: classes/Gems/Default/MailJobAction.php:155 +msgid "automatic mail job" +msgid_plural "automatic mail jobs" +msgstr[0] "automatic mail job" +msgstr[1] "automatic mail jobs" + +#: classes/Gems/Default/MailJobAction.php:165 #, php-format msgid "Automatic mails have been turned off since %s." msgstr "Automatic mails have been turned off since %s." -#: classes/Gems/Default/MailJobAction.php:193 +#: classes/Gems/Default/MailJobAction.php:169 msgid "Turn Automatic Mail Jobs ON" msgstr "Turn Automatic Mail Jobs ON" -#: classes/Gems/Default/MailJobAction.php:199 +#: classes/Gems/Default/MailJobAction.php:175 msgid "With automatic mail jobs and a cron job on the server, mails can be sent without manual user action." msgstr "With automatic mail jobs and a cron job on the server, mails can be sent without manual user action." -#: classes/Gems/Default/MailJobAction.php:207 -msgid "Automatic mail job details" -msgstr "Automatic mail job details" - -#: classes/Gems/Default/MailLogAction.php:107 +#: classes/Gems/Default/MailLogAction.php:109 msgid "Date sent" msgstr "Date sent" -#: classes/Gems/Default/MailLogAction.php:108 +#: classes/Gems/Default/MailLogAction.php:110 msgid "Receiver" msgstr "Receiver" -#: classes/Gems/Default/MailLogAction.php:109 +#: classes/Gems/Default/MailLogAction.php:111 msgid "To address" msgstr "To address" -#: classes/Gems/Default/MailLogAction.php:110 +#: classes/Gems/Default/MailLogAction.php:112 msgid "Sender" msgstr "Sender" -#: classes/Gems/Default/MailLogAction.php:111 +#: classes/Gems/Default/MailLogAction.php:113 msgid "From address" msgstr "From address" -#: classes/Gems/Default/MailLogAction.php:113 +#: classes/Gems/Default/MailLogAction.php:115 #: classes/Gems/Default/MailTemplateAction.php:62 msgid "Subject" msgstr "Subject" -#: classes/Gems/Default/MailLogAction.php:129 +#: classes/Gems/Default/MailLogAction.php:143 msgid "Mail Activity Log" msgstr "Mail Activity Log" -#: classes/Gems/Default/MailLogAction.php:140 -msgid "Show Mail Activity Log item" -msgstr "Show Mail Activity Log item" +#: classes/Gems/Default/MailLogAction.php:154 +msgid "mail activity" +msgid_plural "mail activities" +msgstr[0] "mail activity" +msgstr[1] "mail activities" #: classes/Gems/Default/MailServerAction.php:68 msgid "From address [part]" @@ -1489,8 +1504,8 @@ msgstr "Login Name" #: classes/Gems/Default/OptionAction.php:188 -#: classes/Gems/Default/OrganizationAction.php:139 -#: classes/Gems/Default/RespondentAction.php:173 +#: classes/Gems/Default/OrganizationAction.php:129 +#: classes/Gems/Default/RespondentAction.php:175 #: classes/Gems/Default/StaffAction.php:319 msgid "Language" msgstr "Language" @@ -1508,12 +1523,6 @@ msgid "Date / time" msgstr "Date / time" -#: classes/Gems/Default/OptionAction.php:233 -msgid "item" -msgid_plural "items" -msgstr[0] "item" -msgstr[1] "items" - #: classes/Gems/Default/OptionAction.php:238 msgid "Item" msgstr "Item" @@ -1522,124 +1531,113 @@ msgid "Invalid organization." msgstr "Invalid organization." -#: classes/Gems/Default/OrganizationAction.php:99 -msgid "New organization..." -msgstr "New organization..." - -#: classes/Gems/Default/OrganizationAction.php:123 +#: classes/Gems/Default/OrganizationAction.php:113 msgid "Url" msgstr "Url" -#: classes/Gems/Default/OrganizationAction.php:124 +#: classes/Gems/Default/OrganizationAction.php:114 msgid "Task" msgstr "Task" -#: classes/Gems/Default/OrganizationAction.php:125 +#: classes/Gems/Default/OrganizationAction.php:115 msgid "Contact name" msgstr "Contact name" -#: classes/Gems/Default/OrganizationAction.php:126 +#: classes/Gems/Default/OrganizationAction.php:116 msgid "Contact email" msgstr "Contact email" -#: classes/Gems/Default/OrganizationAction.php:129 +#: classes/Gems/Default/OrganizationAction.php:119 msgid "Style" msgstr "Style" -#: classes/Gems/Default/OrganizationAction.php:133 +#: classes/Gems/Default/OrganizationAction.php:123 msgid "Default url" msgstr "Default url" -#: classes/Gems/Default/OrganizationAction.php:135 +#: classes/Gems/Default/OrganizationAction.php:125 #, php-format msgid "Always switch to this organization when %s is accessed from this url" msgstr "Always switch to this organization when %s is accessed from this url" -#: classes/Gems/Default/OrganizationAction.php:143 +#: classes/Gems/Default/OrganizationAction.php:133 msgid "Can the organization be used?" msgstr "Can the organization be used?" -#: classes/Gems/Default/OrganizationAction.php:144 +#: classes/Gems/Default/OrganizationAction.php:134 msgid "Can people login for this organization?" msgstr "Can people login for this organization?" -#: classes/Gems/Default/OrganizationAction.php:145 +#: classes/Gems/Default/OrganizationAction.php:135 msgid "Accepting" msgstr "Accepting" -#: classes/Gems/Default/OrganizationAction.php:145 +#: classes/Gems/Default/OrganizationAction.php:135 msgid "Can new respondents be added to the organization?" msgstr "Can new patients be added to the organization?" -#: classes/Gems/Default/OrganizationAction.php:146 +#: classes/Gems/Default/OrganizationAction.php:136 msgid "Does the organization have respondents?" msgstr "Does the organization have patients?" -#: classes/Gems/Default/OrganizationAction.php:147 +#: classes/Gems/Default/OrganizationAction.php:137 msgid "Respondent group" msgstr "Patient group" -#: classes/Gems/Default/OrganizationAction.php:147 +#: classes/Gems/Default/OrganizationAction.php:137 msgid "Allows respondents to login." msgstr "Allow patients to login." -#: classes/Gems/Default/OrganizationAction.php:151 +#: classes/Gems/Default/OrganizationAction.php:141 msgid "Greeting" msgstr "Greeting" -#: classes/Gems/Default/OrganizationAction.php:151 -#: classes/Gems/Default/OrganizationAction.php:152 +#: classes/Gems/Default/OrganizationAction.php:141 +#: classes/Gems/Default/OrganizationAction.php:142 msgid "For emails and token forward screen." msgstr "For emails and token forward screen." -#: classes/Gems/Default/OrganizationAction.php:152 +#: classes/Gems/Default/OrganizationAction.php:142 msgid "Signature" msgstr "Signature" -#: classes/Gems/Default/OrganizationAction.php:154 +#: classes/Gems/Default/OrganizationAction.php:144 msgid "Accessible by" msgstr "Accessible by" -#: classes/Gems/Default/OrganizationAction.php:154 +#: classes/Gems/Default/OrganizationAction.php:144 msgid "Checked organizations see this organizations respondents." msgstr "Checked organizations see this organizations patients." -#: classes/Gems/Default/OrganizationAction.php:164 +#: classes/Gems/Default/OrganizationAction.php:154 msgid "Code name" msgstr "Code name" -#: classes/Gems/Default/OrganizationAction.php:164 +#: classes/Gems/Default/OrganizationAction.php:154 msgid "Only for programmers." msgstr "Only for programmers." -#: classes/Gems/Default/OrganizationAction.php:174 +#: classes/Gems/Default/OrganizationAction.php:164 msgid "This can not be changed yet" msgstr "This can not be changed yet" -#: classes/Gems/Default/OrganizationAction.php:176 +#: classes/Gems/Default/OrganizationAction.php:166 #: classes/Gems/Default/StaffAction.php:131 msgid "User Definition" msgstr "User Definition" -#: classes/Gems/Default/OrganizationAction.php:194 -msgid "Delete organization" -msgstr "Delete organization" - -#: classes/Gems/Default/OrganizationAction.php:204 -msgid "Edit organization" -msgstr "Edit organization" - -#: classes/Gems/Default/OrganizationAction.php:214 +#: classes/Gems/Default/OrganizationAction.php:186 msgid "Participating organizations" msgstr "Participating organizations" -#: classes/Gems/Default/OrganizationAction.php:224 -msgid "Show organization" -msgstr "Show organization" +#: classes/Gems/Default/OrganizationAction.php:197 +msgid "organization" +msgid_plural "organizations" +msgstr[0] "organization" +msgstr[1] "organizations" #: classes/Gems/Default/OverviewPlanAction.php:115 #: classes/Gems/Default/ProjectSurveysAction.php:88 -#: classes/Gems/Default/SurveyAction.php:203 msgid "survey" msgid_plural "surveys" msgstr[0] "survey" @@ -1762,19 +1760,16 @@ msgstr "Session" #: classes/Gems/Default/ProjectSurveysAction.php:68 -#: classes/Gems/Default/SurveyAction.php:192 msgid "By" msgstr "By" #: classes/Gems/Default/ProjectSurveysAction.php:69 #: classes/Gems/Default/ProjectTracksAction.php:67 -#: classes/Gems/Default/SurveyAction.php:193 msgid "From" msgstr "From" #: classes/Gems/Default/ProjectSurveysAction.php:70 #: classes/Gems/Default/ProjectTracksAction.php:68 -#: classes/Gems/Default/SurveyAction.php:195 msgid "Until" msgstr "Until" @@ -1802,7 +1797,6 @@ msgstr "Questions in survey %s" #: classes/Gems/Default/ProjectTracksAction.php:118 -#: classes/Gems/Default/SurveyAction.php:85 #, php-format msgid "Survey %s does not exist." msgstr "Survey %s does not exist." @@ -1895,90 +1889,89 @@ msgid "Enter a 9-digit SSN number." msgstr "Enter a 9-digit BSN number." -#: classes/Gems/Default/RespondentAction.php:131 +#: classes/Gems/Default/RespondentAction.php:127 msgid "Identification" msgstr "Identification" -#: classes/Gems/Default/RespondentAction.php:132 +#: classes/Gems/Default/RespondentAction.php:134 msgid "SSN" msgstr "BSN" -#: classes/Gems/Default/RespondentAction.php:136 +#: classes/Gems/Default/RespondentAction.php:138 msgid "Patient number" msgstr "Patient number" -#: classes/Gems/Default/RespondentAction.php:145 +#: classes/Gems/Default/RespondentAction.php:147 msgid "Medical data" msgstr "Medical data" -#: classes/Gems/Default/RespondentAction.php:152 +#: classes/Gems/Default/RespondentAction.php:154 msgid "DBC's, etc..." msgstr "DBC's, etc..." -#: classes/Gems/Default/RespondentAction.php:155 +#: classes/Gems/Default/RespondentAction.php:157 msgid "Contact information" msgstr "Contact information" -#: classes/Gems/Default/RespondentAction.php:160 +#: classes/Gems/Default/RespondentAction.php:162 msgid "Respondent has no e-mail" msgstr "Patient has no e-mail" -#: classes/Gems/Default/RespondentAction.php:161 +#: classes/Gems/Default/RespondentAction.php:163 msgid "With housenumber" msgstr "With housenumber" -#: classes/Gems/Default/RespondentAction.php:168 +#: classes/Gems/Default/RespondentAction.php:170 msgid "Country" msgstr "Country" -#: classes/Gems/Default/RespondentAction.php:172 +#: classes/Gems/Default/RespondentAction.php:174 msgid "Settings" msgstr "Settings" -#: classes/Gems/Default/RespondentAction.php:174 +#: classes/Gems/Default/RespondentAction.php:176 msgid "Has the respondent signed the informed consent letter?" msgstr "Has the patient signed the informed consent letter?" -#: classes/Gems/Default/RespondentAction.php:204 +#: classes/Gems/Default/RespondentAction.php:206 msgid "Comments" msgstr "Comments" -#: classes/Gems/Default/RespondentAction.php:205 +#: classes/Gems/Default/RespondentAction.php:207 msgid "Treatment" msgstr "Treatment" -#: classes/Gems/Default/RespondentAction.php:233 +#: classes/Gems/Default/RespondentAction.php:235 msgid "Rejection code" msgstr "Rejection code" -#: classes/Gems/Default/RespondentAction.php:240 +#: classes/Gems/Default/RespondentAction.php:242 msgid "Delete respondent" msgstr "Delete patient" -#: classes/Gems/Default/RespondentAction.php:272 +#: classes/Gems/Default/RespondentAction.php:274 msgid "Respondent deleted." msgstr "Patient deleted" -#: classes/Gems/Default/RespondentAction.php:276 +#: classes/Gems/Default/RespondentAction.php:278 msgid "Respondent tracks stopped." msgstr "Patient tracks stopped." -#: classes/Gems/Default/RespondentAction.php:280 +#: classes/Gems/Default/RespondentAction.php:282 msgid "Choose a reception code to delete." msgstr "Choose a reception code to delete." -#: classes/Gems/Default/RespondentAction.php:324 +#: classes/Gems/Default/RespondentAction.php:326 msgid "respondent" msgid_plural "respondents" msgstr[0] "patient" msgstr[1] "patients" -#: classes/Gems/Default/RespondentAction.php:394 +#: classes/Gems/Default/RespondentAction.php:396 msgid "Please settle the informed consent form for this respondent." msgstr "Please settle the informed consent form for this patient." #: classes/Gems/Default/RespondentPlanAction.php:67 -#: classes/Gems/Default/SurveyAction.php:171 msgid "Show respondent" msgstr "Show patient" @@ -2071,95 +2064,91 @@ msgid "Database Password" msgstr "Database Password" -#: classes/Gems/Default/SourceAction.php:116 +#: classes/Gems/Default/SourceAction.php:115 #, php-format +msgid "Refreshing token attributes for %s source." +msgstr "Refreshing token attributes for %s source." + +#: classes/Gems/Default/SourceAction.php:131 +#, php-format msgid "Checking survey results for %s source." msgstr "Checking survey results for %s source." -#: classes/Gems/Default/SourceAction.php:121 -#: classes/Gems/Default/SourceAction.php:145 -msgid "Prepare recheck" -msgstr "Prepare recheck" - -#: classes/Gems/Default/SourceAction.php:125 -#: classes/Gems/Default/SourceAction.php:149 -#, php-format -msgid "Check %s tokens" -msgstr "Check %s tokens" - -#: classes/Gems/Default/SourceAction.php:128 -#: classes/Gems/Default/SourceAction.php:152 -msgid "No tokens to check." -msgstr "No tokens to check." - -#: classes/Gems/Default/SourceAction.php:141 +#: classes/Gems/Default/SourceAction.php:143 msgid "Checking survey results for all sources." msgstr "Checking survey results for all sources." -#: classes/Gems/Default/SourceAction.php:175 +#: classes/Gems/Default/SourceAction.php:164 msgid "Source Url" msgstr "Source Url" -#: classes/Gems/Default/SourceAction.php:177 +#: classes/Gems/Default/SourceAction.php:166 msgid "Adaptor class" msgstr "Adaptor class" -#: classes/Gems/Default/SourceAction.php:179 +#: classes/Gems/Default/SourceAction.php:168 msgid "Database Server" msgstr "Database Server" -#: classes/Gems/Default/SourceAction.php:181 +#: classes/Gems/Default/SourceAction.php:170 msgid "Database host" msgstr "Database host" -#: classes/Gems/Default/SourceAction.php:185 +#: classes/Gems/Default/SourceAction.php:174 msgid "Table prefix" msgstr "Table prefix" -#: classes/Gems/Default/SourceAction.php:189 +#: classes/Gems/Default/SourceAction.php:178 msgid "Last check" msgstr "Last check" -#: classes/Gems/Default/SourceAction.php:222 +#: classes/Gems/Default/SourceAction.php:211 msgid "source" msgid_plural "sources" msgstr[0] "source" msgstr[1] "sources" -#: classes/Gems/Default/SourceAction.php:227 +#: classes/Gems/Default/SourceAction.php:216 msgid "Survey Sources" msgstr "Survey Sources" -#: classes/Gems/Default/SourceAction.php:235 +#: classes/Gems/Default/SourceAction.php:224 msgid "This installation is active." msgstr "This installation is active." -#: classes/Gems/Default/SourceAction.php:237 +#: classes/Gems/Default/SourceAction.php:226 msgid "Inactive installation." msgstr "Inactive installation." -#: classes/Gems/Default/SourceAction.php:250 -#: classes/Gems/Default/SourceAction.php:269 -msgid "No changes." -msgstr "No changes." +#: classes/Gems/Default/SourceAction.php:245 +#, php-format +msgid "Synchronize the %s source." +msgstr "Synchronize the %s source." -#: classes/Gems/Default/SourceAction.php:265 +#: classes/Gems/Default/SourceAction.php:254 #, php-format -msgid "Synchronization of source %s:" -msgstr "Synchronization of source %s:" +msgid "Check %s surveys" +msgstr "Check %s surveys" -#: classes/Gems/Default/SourceAction.php:276 -msgid "Synchronize all sources of surveys" -msgstr "Synchronize all sources of surveys" +#: classes/Gems/Default/SourceAction.php:257 +msgid "No surveys to check." +msgstr "No surveys to check." -#: classes/Gems/Default/SourceAction.php:277 -msgid "Synchronization will update the status of all surveys imported into this project to the status at the sources." -msgstr "Synchronization will update the status of all surveys imported into this project to the status at the sources." +#: classes/Gems/Default/SourceAction.php:274 +msgid "Synchronize all sources." +msgstr "Synchronize all sources." -#: classes/Gems/Default/SourceAction.php:318 -msgid "Are you sure you want to synchronize all survey sources?" -msgstr "Are you sure you want to synchronize all survey sources?" +#: classes/Gems/Default/SourceAction.php:282 +#, php-format +msgid "Check %s source" +msgid_plural "Check %s sources" +msgstr[0] "Check %s source" +msgstr[1] "Check %s sources" +#: classes/Gems/Default/SourceAction.php:285 +msgid "No sources to check." +msgstr "No sources to check." + #: classes/Gems/Default/StaffAction.php:137 msgid "Unsupported UserDefinition" msgstr "Unsupported UserDefinition" @@ -2291,51 +2280,51 @@ msgid "Survey should be assigned to a group before making it active." msgstr "Survey should be assigned to a group before making it active." -#: classes/Gems/Default/SurveyMaintenanceAction.php:277 +#: classes/Gems/Default/SurveyMaintenanceAction.php:276 #, php-format msgid "Checking survey results for the %s survey." msgstr "Checking survey results for the %s survey." -#: classes/Gems/Default/SurveyMaintenanceAction.php:302 +#: classes/Gems/Default/SurveyMaintenanceAction.php:288 msgid "Checking survey results for all surveys." msgstr "Checking survey results for all surveys." -#: classes/Gems/Default/SurveyMaintenanceAction.php:379 +#: classes/Gems/Default/SurveyMaintenanceAction.php:352 msgid "Source" msgstr "Source" -#: classes/Gems/Default/SurveyMaintenanceAction.php:380 +#: classes/Gems/Default/SurveyMaintenanceAction.php:353 msgid "Status in source" msgstr "Status in source" -#: classes/Gems/Default/SurveyMaintenanceAction.php:383 +#: classes/Gems/Default/SurveyMaintenanceAction.php:356 msgid "Active in source" msgstr "Active in source" -#: classes/Gems/Default/SurveyMaintenanceAction.php:384 +#: classes/Gems/Default/SurveyMaintenanceAction.php:357 #, php-format msgid "Active in %s" msgstr "Active in %s" -#: classes/Gems/Default/SurveyMaintenanceAction.php:391 +#: classes/Gems/Default/SurveyMaintenanceAction.php:364 msgid "Single" msgstr "Single" -#: classes/Gems/Default/SurveyMaintenanceAction.php:424 +#: classes/Gems/Default/SurveyMaintenanceAction.php:397 #, php-format msgid "%d times in track." msgstr "%d times in track." -#: classes/Gems/Default/SurveyMaintenanceAction.php:426 +#: classes/Gems/Default/SurveyMaintenanceAction.php:399 #, php-format msgid "%d times in %d track(s)." msgstr "%d times in %d track(s)." -#: classes/Gems/Default/SurveyMaintenanceAction.php:430 +#: classes/Gems/Default/SurveyMaintenanceAction.php:403 msgid "Not used in track." msgstr "Not used in track." -#: classes/Gems/Default/SurveyMaintenanceAction.php:432 +#: classes/Gems/Default/SurveyMaintenanceAction.php:405 msgid "Not used in tracks." msgstr "Not used in tracks." @@ -2666,31 +2655,27 @@ msgid "Rounds" msgstr "Rounds" -#: classes/Gems/Default/UpgradeAction.php:85 +#: classes/Gems/Default/UpgradeAction.php:93 #, php-format msgid "Upgrading %s" msgstr "Upgrading %s" -#: classes/Gems/Default/UpgradeAction.php:95 -msgid "Back" -msgstr "Back" - -#: classes/Gems/Default/UpgradeAction.php:126 -#: classes/Gems/Default/UpgradeAction.php:153 +#: classes/Gems/Default/UpgradeAction.php:124 +#: classes/Gems/Default/UpgradeAction.php:151 msgid "Context" msgstr "Context" -#: classes/Gems/Default/UpgradeAction.php:127 +#: classes/Gems/Default/UpgradeAction.php:125 msgid "Max level" msgstr "Max level" -#: classes/Gems/Default/UpgradeAction.php:182 +#: classes/Gems/Default/UpgradeAction.php:180 #, php-format msgid "Context %s not found!" msgstr "Context %s not found!" -#: classes/Gems/Default/UpgradeAction.php:191 -#: classes/Gems/Default/UpgradeAction.php:195 +#: classes/Gems/Default/UpgradeAction.php:189 +#: classes/Gems/Default/UpgradeAction.php:193 msgid "Upgrades" msgstr "Upgrades" @@ -2714,35 +2699,35 @@ msgid "You do not have an e-mail address." msgstr "You do not have an e-mail address." -#: classes/Gems/Email/EmailFormAbstract.php:289 +#: classes/Gems/Email/EmailFormAbstract.php:291 msgid "Preview HTML" msgstr "Preview HTML" -#: classes/Gems/Email/EmailFormAbstract.php:298 +#: classes/Gems/Email/EmailFormAbstract.php:300 msgid "Preview text" msgstr "Preview text" -#: classes/Gems/Email/EmailFormAbstract.php:330 +#: classes/Gems/Email/EmailFormAbstract.php:332 msgid "Send" msgstr "Send" -#: classes/Gems/Email/EmailFormAbstract.php:427 +#: classes/Gems/Email/EmailFormAbstract.php:429 msgid "Input error! No changes made!" msgstr "Input error! No changes made!" -#: classes/Gems/Email/EmailFormAbstract.php:444 +#: classes/Gems/Email/EmailFormAbstract.php:446 msgid "Subject:" msgstr "Subject:" -#: classes/Gems/Email/EmailFormAbstract.php:472 +#: classes/Gems/Email/EmailFormAbstract.php:474 msgid "Field" msgstr "Field" -#: classes/Gems/Email/EmailFormAbstract.php:473 +#: classes/Gems/Email/EmailFormAbstract.php:475 msgid "Value" msgstr "Value" -#: classes/Gems/Email/EmailFormAbstract.php:476 +#: classes/Gems/Email/EmailFormAbstract.php:478 msgid "BBCode info page" msgstr "BBCode info page" @@ -2800,12 +2785,12 @@ msgid "The sending of emails was blocked for this installation." msgstr "The sending of emails was blocked for this installation." -#: classes/Gems/Email/OneMailForm.php:140 +#: classes/Gems/Email/OneMailForm.php:141 #: classes/Gems/Email/TemplateMailer.php:250 msgid "Mail failed to send." msgstr "Mail failed to send." -#: classes/Gems/Email/OneMailForm.php:144 +#: classes/Gems/Email/OneMailForm.php:145 #, php-format msgid "Sent email to %s." msgstr "Sent email to %s." @@ -2843,89 +2828,93 @@ msgid "Some help for this export" msgstr "Some help for this export" -#: classes/Gems/Menu/MenuAbstract.php:243 +#: classes/Gems/Menu/MenuAbstract.php:247 msgid "Activity log" msgstr "Activity Log" -#: classes/Gems/Menu/MenuAbstract.php:249 +#: classes/Gems/Menu/MenuAbstract.php:253 msgid "Automatic mail" msgstr "Automatic mail" -#: classes/Gems/Menu/MenuAbstract.php:250 +#: classes/Gems/Menu/MenuAbstract.php:254 msgid "Turn Automatic Mail Jobs OFF" msgstr "Turn Automatic Mail Jobs OFF" -#: classes/Gems/Menu/MenuAbstract.php:254 +#: classes/Gems/Menu/MenuAbstract.php:258 msgid "Servers" msgstr "Servers" -#: classes/Gems/Menu/MenuAbstract.php:258 +#: classes/Gems/Menu/MenuAbstract.php:262 msgid "Templates" msgstr "Templates" -#: classes/Gems/Menu/MenuAbstract.php:290 +#: classes/Gems/Menu/MenuAbstract.php:294 msgid "By period" msgstr "By period" -#: classes/Gems/Menu/MenuAbstract.php:291 +#: classes/Gems/Menu/MenuAbstract.php:295 msgid "By token" msgstr "By token" -#: classes/Gems/Menu/MenuAbstract.php:292 +#: classes/Gems/Menu/MenuAbstract.php:296 msgid "By respondent" msgstr "By patient" -#: classes/Gems/Menu/MenuAbstract.php:296 +#: classes/Gems/Menu/MenuAbstract.php:300 msgid "Bulk mail" msgstr "Bulk mail" -#: classes/Gems/Menu/MenuAbstract.php:314 +#: classes/Gems/Menu/MenuAbstract.php:318 msgid "Errors" msgstr "Errors" -#: classes/Gems/Menu/MenuAbstract.php:315 +#: classes/Gems/Menu/MenuAbstract.php:319 msgid "PHP" msgstr "PHP" -#: classes/Gems/Menu/MenuAbstract.php:318 +#: classes/Gems/Menu/MenuAbstract.php:322 msgid "Maintenance mode" msgstr "Maintenance mode" -#: classes/Gems/Menu/MenuAbstract.php:319 +#: classes/Gems/Menu/MenuAbstract.php:323 msgid "Clean cache" msgstr "Clean cache" -#: classes/Gems/Menu/MenuAbstract.php:412 +#: classes/Gems/Menu/MenuAbstract.php:415 msgid "Check status" msgstr "Check status" -#: classes/Gems/Menu/MenuAbstract.php:413 +#: classes/Gems/Menu/MenuAbstract.php:416 msgid "Synchronize surveys" msgstr "Synchronize surveys" -#: classes/Gems/Menu/MenuAbstract.php:414 -#: classes/Gems/Menu/MenuAbstract.php:425 +#: classes/Gems/Menu/MenuAbstract.php:417 +#: classes/Gems/Menu/MenuAbstract.php:429 msgid "Check answers" msgstr "Check answers" -#: classes/Gems/Menu/MenuAbstract.php:415 +#: classes/Gems/Menu/MenuAbstract.php:418 +msgid "Check attributes" +msgstr "Check attributes" + +#: classes/Gems/Menu/MenuAbstract.php:419 msgid "Synchronize all surveys" msgstr "Synchronize all surveys" -#: classes/Gems/Menu/MenuAbstract.php:416 -#: classes/Gems/Menu/MenuAbstract.php:426 +#: classes/Gems/Menu/MenuAbstract.php:420 +#: classes/Gems/Menu/MenuAbstract.php:430 msgid "Check all answers" msgstr "Check all answers" -#: classes/Gems/Menu/MenuAbstract.php:422 +#: classes/Gems/Menu/MenuAbstract.php:426 msgid "PDF" msgstr "PDF" -#: classes/Gems/Menu/MenuAbstract.php:456 +#: classes/Gems/Menu/MenuAbstract.php:460 msgid "Check assignments" msgstr "Check assignments" -#: classes/Gems/Menu/MenuAbstract.php:459 +#: classes/Gems/Menu/MenuAbstract.php:463 msgid "Check all assignments" msgstr "Check all assignments" @@ -3110,65 +3099,82 @@ msgid "Answered surveys" msgstr "Answered surveys" -#: classes/Gems/Tracker/ChangeTracker.php:64 -#: classes/Gems/Tracker/Batch/ProcessTokensBatch.php:110 +#: classes/Gems/Task/Db/ExecutePatch.php:66 #, php-format -msgid "Checked %d tracks." -msgstr "Checked %d tracks." +msgid "Executing patchlevel %d" +msgstr "Executing patchlevel %d" -#: classes/Gems/Tracker/ChangeTracker.php:67 -#: classes/Gems/Tracker/Batch/ProcessTokensBatch.php:113 +#: classes/Gems/Task/Tracker/CheckTokenCompletion.php:74 #, php-format -msgid "Checked %d tokens." -msgstr "Checked %d tokens." - -#: classes/Gems/Tracker/ChangeTracker.php:72 -#: classes/Gems/Tracker/Batch/ProcessTokensBatch.php:118 -#, php-format msgid "Answers changed by survey completion event for %d tokens." msgstr "Answers changed by survey completion event for %d tokens." -#: classes/Gems/Tracker/ChangeTracker.php:75 -#: classes/Gems/Tracker/Batch/ProcessTokensBatch.php:121 +#: classes/Gems/Task/Tracker/CheckTokenCompletion.php:78 #, php-format msgid "Results and timing changed for %d tokens." msgstr "Results and timing changed for %d tokens." +#: classes/Gems/Task/Tracker/CheckTokenCompletion.php:81 +#, php-format +msgid "Checked %d tokens." +msgstr "Checked %d tokens." + +#: classes/Gems/Task/Tracker/CheckTrackTokens.php:64 +#, php-format +msgid "%2$d token date changes in %1$d tracks." +msgstr "%2$d token date changes in %1$d tracks." + +#: classes/Gems/Task/Tracker/CheckTrackTokens.php:67 +#, php-format +msgid "Checked %d tracks." +msgstr "Checked %d tracks." + +#: classes/Gems/Task/Tracker/ProcessTokenCompletion.php:70 #: classes/Gems/Tracker/ChangeTracker.php:78 -#: classes/Gems/Tracker/Batch/ProcessTokensBatch.php:124 #, php-format msgid "%d token round completion events caused changed to %d tokens." msgstr "%d token round completion events caused changed to %d tokens." -#: classes/Gems/Tracker/ChangeTracker.php:81 -#: classes/Gems/Tracker/Batch/ProcessTokensBatch.php:127 +#: classes/Gems/Task/Tracker/RefreshTokenAttributes.php:67 #, php-format -msgid "%2$d token date changes in %1$d tracks." -msgstr "%2$d token date changes in %1$d tracks." +msgid "%d token out of %d tokens changed." +msgid_plural "%d tokens out of %d tokens changed." +msgstr[0] "%d token out of %d tokens changed." +msgstr[1] "%d tokens out of %d tokens changed." #: classes/Gems/Tracker/ChangeTracker.php:84 -#: classes/Gems/Tracker/Batch/ProcessTokensBatch.php:130 #, php-format msgid "Round changes propagated to %d tokens." msgstr "Round changes propagated to %d tokens." #: classes/Gems/Tracker/ChangeTracker.php:87 -#: classes/Gems/Tracker/Batch/ProcessTokensBatch.php:133 #, php-format msgid "%d tokens deleted by round changes." msgstr "%d tokens deleted by round changes." #: classes/Gems/Tracker/ChangeTracker.php:90 -#: classes/Gems/Tracker/Batch/ProcessTokensBatch.php:136 #, php-format msgid "%d tokens created to by round changes." msgstr "%d tokens cr... [truncated message content] |
From: <gem...@li...> - 2012-03-09 08:38:50
|
Revision: 541 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=541&view=rev Author: mennodekker Date: 2012-03-09 08:38:44 +0000 (Fri, 09 Mar 2012) Log Message: ----------- Final steps before tagging 1.5.2 Modified Paths: -------------- trunk/library/changelog.txt trunk/library/classes/Gems/Upgrades.php Modified: trunk/library/changelog.txt =================================================================== --- trunk/library/changelog.txt 2012-03-09 08:28:26 UTC (rev 540) +++ trunk/library/changelog.txt 2012-03-09 08:38:44 UTC (rev 541) @@ -1,3 +1,8 @@ +Important changes from 1.5.1 => 1.5.2 +============================================================ +Renamed project.ini setting concentRejected to consentRejected +Default consent can be changed from 'Unknown' to something else in Project.ini setting consentDefault, please check local respondentController + Important changes from 1.5.0 => 1.5.1 ============================================================ New event introduced: TrackCompletedEvent Modified: trunk/library/classes/Gems/Upgrades.php =================================================================== --- trunk/library/classes/Gems/Upgrades.php 2012-03-09 08:28:26 UTC (rev 540) +++ trunk/library/classes/Gems/Upgrades.php 2012-03-09 08:38:44 UTC (rev 541) @@ -57,6 +57,7 @@ //And add our patches $this->register('Upgrade143to15', 'Upgrade from 1.43 to 1.5'); $this->register('Upgrade15to151', 'Upgrade from 1.5.0. to 1.5.1'); + $this->register('Upgrade151to152', 'Upgrade from 1.5.1. to 1.5.2'); } @@ -94,4 +95,14 @@ return true; } + + /** + * To upgrade to 1.5.2 just execute patchlevel 45 + */ + public function Upgrade15to151() + { + $this->_batch->addTask('Db_ExecutePatch', 45); + + return true; + } } \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2012-03-12 12:15:38
|
Revision: 546 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=546&view=rev Author: mennodekker Date: 2012-03-12 12:15:27 +0000 (Mon, 12 Mar 2012) Log Message: ----------- -Moved to 1.5.3 -Added 'charset' to source database, to fix sync errors with external db -Migrated the last batch to the task system, also fixing a couple of errors with inserting new surveys Modified Paths: -------------- trunk/library/classes/Gems/Default/SourceAction.php trunk/library/classes/Gems/Task/Tracker/SourceSyncSurveys.php trunk/library/classes/Gems/Tracker/Source/LimeSurvey1m9Database.php trunk/library/classes/Gems/Tracker/Source/SourceAbstract.php trunk/library/classes/Gems/Tracker/Source/SourceInterface.php trunk/library/classes/Gems/Tracker.php trunk/library/classes/Gems/Versions.php trunk/library/configs/db/patches.sql trunk/library/configs/db/tables/gems__sources.20.sql Added Paths: ----------- trunk/library/classes/Gems/Task/Tracker/SourceCommand.php Modified: trunk/library/classes/Gems/Default/SourceAction.php =================================================================== --- trunk/library/classes/Gems/Default/SourceAction.php 2012-03-12 09:20:59 UTC (rev 545) +++ trunk/library/classes/Gems/Default/SourceAction.php 2012-03-12 12:15:27 UTC (rev 546) @@ -169,6 +169,7 @@ $model->set('gso_ls_dbhost', 'label', $this->_('Database host')); $model->set('gso_ls_database', 'label', $this->_('Database')); + $model->set('gso_ls_charset', 'label', $this->_('Charset')); } $model->set('gso_ls_table_prefix', 'label', $this->_('Table prefix'), 'default', 'ls__'); @@ -238,26 +239,9 @@ $batch = $this->loader->getTracker()->synchronizeSourcesBatch($sourceId, $this->loader->getCurrentUser()->getUserId()); - if ($batch->run($this->getRequest())) { - exit; - } else { - $this->html->h3( - sprintf($this->_('Synchronize the %s source.'), - $this->db->fetchOne("SELECT gso_source_name FROM gems__sources WHERE gso_id_source = ?", $sourceId))); - - if ($batch->isFinished()) { - $this->addMessage($batch->getMessages(true)); - $this->html->pInfo($batch->getRestartButton($this->_('Prepare recheck'), array('class' => 'actionlink'))); - } else { - if ($batch->count()) { - // Batch is loaded by Tracker - $this->html->pInfo($batch->getStartButton(sprintf($this->_('Check %s surveys'), $batch->getSurveyCounter()))); - $this->html->append($batch->getPanel($this->view, $batch->getProgressPercentage() . '%')); - } else { - $this->html->pInfo($this->_('No surveys to check.')); - } - } - } + $title = sprintf($this->_('Synchronize the %s source.'), + $this->db->fetchOne("SELECT gso_source_name FROM gems__sources WHERE gso_id_source = ?", $sourceId)); + $this->_helper->BatchRunner($batch, $title); } /** @@ -268,59 +252,9 @@ //* $batch = $this->loader->getTracker()->synchronizeSourcesBatch(null, $this->loader->getCurrentUser()->getUserId()); - if ($batch->run($this->getRequest())) { - exit; - } else { - $this->html->h3($this->_('Synchronize all sources.')); - - if ($batch->isFinished()) { - $this->addMessage($batch->getMessages(true)); - $this->html->pInfo($batch->getRestartButton($this->_('Prepare recheck'), array('class' => 'actionlink'))); - } else { - if ($batch->count()) { - // Batch is loaded by Tracker - $this->html->pInfo($batch->getStartButton(sprintf($this->plural('Check %s source', 'Check %s sources', $batch->getSourceCounter()), $batch->getSourceCounter()))); - $this->html->append($batch->getPanel($this->view, $batch->getProgressPercentage() . '%')); - } else { - $this->html->pInfo($this->_('No sources to check.')); - } - } - } // */ - - /* - $batch = new MUtil_Batch_WaitBatch(); - $batch->setMethodPush(5); - $batch->progressParameterName = 'waitprogress'; - // $batch->autoStart = true; - // $batch->minimalStepDurationMs = 2000; - if ($batch->run($this->getRequest())) { - exit; - } else { - if ($batch->isFinished()) { - $this->addMessage($batch->getMessages(true)); - $this->html->pInfo($batch->getRestartButton($this->_('Prepare restart'), array('class' => 'actionlink'))); - } else { - // Populate the batch (from scratch). - $batch->reset(); - if (true) { - $batch->addWaitsMs(400, 20); - $batch->addWaits(2, 1, 'Har har'); - $batch->addWaitsMs(20, 50); - } else { - $batch->addWaits(1440, 10); - //$batch->addWaits(4, 2); - //$batch->addWaits(2, 1); - //$batch->addWaitsLater(15, 1); - //$batch->addWait(4, 'That took some time!'); - //$batch->addWait(4, 'So we see the message. :)'); - //$batch->addWaitsLater(1, 2); - //$batch->addWaits(4); - } - $this->html->pInfo($batch->getStartButton($this->_('Start synchronization'))); - $this->html->append($batch->getPanel($this->view, '0%')); - } - } // */ - + $title = $this->_('Synchronize all sources.'); + $this->_helper->BatchRunner($batch, $title); + $this->html->actionLink(array('action' => 'index'), $this->_('Cancel')); } } Added: trunk/library/classes/Gems/Task/Tracker/SourceCommand.php =================================================================== --- trunk/library/classes/Gems/Task/Tracker/SourceCommand.php (rev 0) +++ trunk/library/classes/Gems/Task/Tracker/SourceCommand.php 2012-03-12 12:15:27 UTC (rev 546) @@ -0,0 +1,58 @@ +<?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. + * + * @package Gems + * @subpackage Task_Tracker + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @version $Id: SourceSyncSurveys.php 528 2012-03-01 14:06:23Z mennodekker $ + */ + +/** + * Executes any command in a source for a given $sourceId + * + * @package Gems + * @subpackage Task_Tracker + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @since Class available since version 1.5.3 + */ +class Gems_Task_Tracker_SourceCommand extends Gems_Task_TaskAbstract +{ + public function execute($sourceId = null, $command = null) + { + $params = array_slice(func_get_args(), 2); + $source = $this->loader->getTracker()->getSource($sourceId); + $source->setBatch($this->_batch); + + if ($messages = call_user_func_array(array($source, $command), $params)) { + foreach ($messages as $message) { + $this->_batch->addMessage($command . ': ' . $message); + } + } + } +} \ No newline at end of file Modified: trunk/library/classes/Gems/Task/Tracker/SourceSyncSurveys.php =================================================================== --- trunk/library/classes/Gems/Task/Tracker/SourceSyncSurveys.php 2012-03-12 09:20:59 UTC (rev 545) +++ trunk/library/classes/Gems/Task/Tracker/SourceSyncSurveys.php 2012-03-12 12:15:27 UTC (rev 546) @@ -46,10 +46,14 @@ public function execute($id = null, $userId = null) { $source = $this->loader->getTracker()->getSource($id); + $source->setBatch($this->_batch); if (is_null($userId)) { $userId = $this->loader->getCurrentUser()->getUserId(); } + + $surveyCount = $this->_batch->addToCounter('sourceSyncSources'); + $this->_batch->setMessage('sourceSyncSources', sprintf($this->translate->plural('Check %s source', 'Check %s sources', $surveyCount), $surveyCount)); if ($messages = $source->synchronizeSurveys($userId)) { foreach ($messages as $message) { Modified: trunk/library/classes/Gems/Tracker/Source/LimeSurvey1m9Database.php =================================================================== --- trunk/library/classes/Gems/Tracker/Source/LimeSurvey1m9Database.php 2012-03-12 09:20:59 UTC (rev 545) +++ trunk/library/classes/Gems/Tracker/Source/LimeSurvey1m9Database.php 2012-03-12 12:15:27 UTC (rev 546) @@ -399,7 +399,7 @@ { $messages = array(); $survey = $this->tracker->getSurvey($surveyId); - + if (null === $sourceSurveyId) { // Was removed $values['gsu_active'] = 0; @@ -526,6 +526,8 @@ $values['gsu_surveyor_active'] = $surveyor_active ? 1 : 0; $values['gsu_active'] = 0; $values['gsu_status'] = $surveyor_status; + $values['gsu_surveyor_id'] = $sourceSurveyId; + $values['gsu_id_source'] = $this->getId(); $messages[] = sprintf($this->translate->_('Imported the \'%s\' survey.'), $surveyor_title); } @@ -1110,6 +1112,51 @@ */ public function synchronizeSurveys($userId, $updateTokens = true) { + // Surveys in LS + $lsDb = $this->getSourceDatabase(); + $select = $lsDb->select(); + $select->from($this->_getSurveysTableName(), 'sid') + ->order('sid'); + $lsSurveys = $lsDb->fetchCol($select); + $lsSurveys = array_combine($lsSurveys, $lsSurveys); + + // Surveys in Gems + $gemsSurveys = $this->_getGemsSurveysForSynchronisation(); + + foreach ($gemsSurveys as $surveyId => $sourceSurveyId) { + if (isset($lsSurveys[$sourceSurveyId])) { + if ($this->hasBatch()) { + $this->_batch->addTask('Tracker_SourceCommand', $this->getId(), 'CheckSurvey', $sourceSurveyId, $surveyId, $userId); + } else { + $this->checkSurvey($sourceSurveyId, $surveyId, $userId); + } + } else { + if ($this->hasBatch()) { + $this->_batch->addTask('Tracker_SourceCommand', $this->getId(), 'CheckSurvey', null, $surveyId, $userId); + } else { + $this->checkSurvey(null, $surveyId, $userId); + } + } + } + + foreach (array_diff($lsSurveys, $gemsSurveys) as $sourceSurveyId) { + if ($this->hasBatch()) { + $this->_batch->addTask('Tracker_SourceCommand', $this->getId(), 'CheckSurvey', $sourceSurveyId, null, $userId); + } else { + $this->checkSurvey($sourceSurveyId, null, $userId); + } + } + } + + /** + * Updates the gems database with the latest information about the surveys in this source adapter + * + * @param int $userId Id of the user who takes the action (for logging) + * @param bool $updateTokens Wether the tokens should be updated or not, default is true + * @return array Returns an array of messages + */ + public function synchronizeSurveysOld($userId, $updateTokens = true) + { $lsDb = $this->getSourceDatabase(); $messages = array(); $source_id = $this->getId(); Modified: trunk/library/classes/Gems/Tracker/Source/SourceAbstract.php =================================================================== --- trunk/library/classes/Gems/Tracker/Source/SourceAbstract.php 2012-03-12 09:20:59 UTC (rev 545) +++ trunk/library/classes/Gems/Tracker/Source/SourceAbstract.php 2012-03-12 12:15:27 UTC (rev 546) @@ -48,6 +48,13 @@ abstract class Gems_Tracker_Source_SourceAbstract extends Gems_Registry_TargetAbstract implements Gems_Tracker_Source_SourceInterface { /** + * Holds the current batch if there is any + * + * @var Gems_Task_TaskRunnerBatch + */ + protected $_batch = null; + + /** * The database connection to Gems itself * * @var Zend_Db_Adapter_Abstract @@ -272,6 +279,10 @@ if (($dbConfig['dbname'] != $gemsName) && ($adapter = $this->_sourceData['gso_ls_adapter'])) { + //If upgrade has run and we have a 'charset' use it + if (array_key_exists('gso_ls_charset', $this->_sourceData)) { + $dbConfig['charset'] = $this->_sourceData['gso_ls_charset'] ? $this->_sourceData['gso_ls_charset'] : $gemsConfig['charset']; + } $dbConfig['host'] = $this->_sourceData['gso_ls_dbhost'] ? $this->_sourceData['gso_ls_dbhost'] : $gemsConfig['host']; $dbConfig['username'] = $this->_sourceData['gso_ls_username'] ? $this->_sourceData['gso_ls_username'] : $gemsConfig['username']; $dbConfig['password'] = $this->_sourceData['gso_ls_password'] ? $this->_sourceData['gso_ls_password'] : $gemsConfig['password']; @@ -316,6 +327,16 @@ } /** + * Returns true if a batch is set + * + * @return boolean + */ + public function hasBatch() + { + return ($this->_batch instanceof Gems_Task_TaskRunnerBatch); + } + + /** * Updates the gems__tokens table so all tokens stick to the (possibly) new token name rules. * * @param int $userId Id of the user who takes the action (for logging) @@ -334,4 +355,16 @@ return $this->_gemsDb->query($sql)->rowCount(); } + + /** + * Set the batch to be used by this source + * + * Use $this->hasBatch to check for existence + * + * @param Gems_Task_TaskRunnerBatch $batch + */ + public function setBatch(Gems_Task_TaskRunnerBatch $batch) + { + $this->_batch = $batch; + } } Modified: trunk/library/classes/Gems/Tracker/Source/SourceInterface.php =================================================================== --- trunk/library/classes/Gems/Tracker/Source/SourceInterface.php 2012-03-12 09:20:59 UTC (rev 545) +++ trunk/library/classes/Gems/Tracker/Source/SourceInterface.php 2012-03-12 12:15:27 UTC (rev 546) @@ -55,14 +55,6 @@ public function __construct(array $sourceData, Zend_Db_Adapter_Abstract $gemsDb); /** - * Add the commands to update this source to a source synchornization batch - * - * @param Gems_Tracker_Batch_SynchronizeSourcesBatch $batch - * @param int $userId Id of the user who takes the action (for logging) - */ - public function addSynchronizeSurveyCommands(Gems_Tracker_Batch_SynchronizeSourcesBatch $batch, $userId); - - /** * Inserts the token in the source (if needed) and sets those attributes the source wants to set. * * @param Gems_Tracker_Token $token @@ -233,6 +225,13 @@ public function getTokenUrl(Gems_Tracker_Token $token, $language, $surveyId, $sourceSurveyId); /** + * Returns true if a batch is set + * + * @return boolean + */ + public function hasBatch(); + + /** * Checks whether the token is in the source. * * @param Gems_Tracker_Token $token Gems token object @@ -255,6 +254,15 @@ public function isCompleted(Gems_Tracker_Token $token, $surveyId, $sourceSurveyId = null); /** + * Set the batch to be used by this source + * + * Use $this->hasBatch to check for existence + * + * @param Gems_Task_TaskRunnerBatch $batch + */ + public function setBatch(Gems_Task_TaskRunnerBatch $batch); + + /** * Sets the answers passed on. * * @param Gems_Tracker_Token $token Gems token object Modified: trunk/library/classes/Gems/Tracker.php =================================================================== --- trunk/library/classes/Gems/Tracker.php 2012-03-12 09:20:59 UTC (rev 545) +++ trunk/library/classes/Gems/Tracker.php 2012-03-12 12:15:27 UTC (rev 546) @@ -469,7 +469,7 @@ $surveyId = $surveyData; } - if (! isset($this->_surveys[$surveyId])) { + if ($surveyId == null || ! isset($this->_surveys[$surveyId])) { $this->_surveys[$surveyId] = $this->_loadClass('survey', true, array($surveyData)); } @@ -877,7 +877,7 @@ public function synchronizeSourcesBatch($sourceId = null, $userId = null) { $batch_id = 'source_synch' . ($sourceId ? '_' . $sourceId : ''); - $batch = $this->_loadClass('Batch_SynchronizeSourcesBatch', true, array($batch_id)); + $batch = $this->loader->getTaskRunnerBatch($batch_id); if (! $batch->isLoaded()) { if ($sourceId) { @@ -890,7 +890,7 @@ } foreach ($sources as $source) { - $batch->addSource($source, $userId); + $batch->addTask('Tracker_SourceSyncSurveys', $source, $userId); } } Modified: trunk/library/classes/Gems/Versions.php =================================================================== --- trunk/library/classes/Gems/Versions.php 2012-03-12 09:20:59 UTC (rev 545) +++ trunk/library/classes/Gems/Versions.php 2012-03-12 12:15:27 UTC (rev 546) @@ -43,12 +43,12 @@ { public final function getBuild() { - return 45; + return 46; } public final function getGemsVersion() { - return '1.5.2'; + return '1.5.3'; } public function getProjectVersion() Modified: trunk/library/configs/db/patches.sql =================================================================== --- trunk/library/configs/db/patches.sql 2012-03-12 09:20:59 UTC (rev 545) +++ trunk/library/configs/db/patches.sql 2012-03-12 12:15:27 UTC (rev 546) @@ -379,3 +379,7 @@ -- GEMS VERSION: 45 -- PATCH: Assign attribute sync to super role UPDATE gems__roles SET grl_privileges = CONCAT(grl_privileges,',pr.source.check-attributes') WHERE grl_name = 'super' AND grl_privileges NOT LIKE '%pr.source.check-attributes%'; + +-- GEMS VERSION: 46 +-- PATCH: Add charset attribute for source database +ALTER TABLE `gems__sources` ADD `gso_ls_charset` VARCHAR( 8 ) NOT NULL AFTER `gso_ls_password`; \ No newline at end of file Modified: trunk/library/configs/db/tables/gems__sources.20.sql =================================================================== --- trunk/library/configs/db/tables/gems__sources.20.sql 2012-03-12 09:20:59 UTC (rev 545) +++ trunk/library/configs/db/tables/gems__sources.20.sql 2012-03-12 12:15:27 UTC (rev 546) @@ -1,30 +1,31 @@ -CREATE TABLE if not exists gems__sources ( - gso_id_source int unsigned not null auto_increment, - gso_source_name varchar(40) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' unique key not null, +CREATE TABLE IF NOT EXISTS `gems__sources` ( + `gso_id_source` int(10) unsigned NOT NULL auto_increment, + `gso_source_name` varchar(40) NOT NULL, - gso_ls_url varchar(255) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' unique key not null, - gso_ls_class varchar(60) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' not null default 'Gems_Source_LimeSurvey1m8Database', - gso_ls_adapter varchar(20) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' null, - gso_ls_dbhost varchar(127) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' null, - gso_ls_database varchar(127) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' null, - gso_ls_table_prefix varchar(127) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' null, - gso_ls_username varchar(64) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' null, - gso_ls_password varchar(255) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' null, + `gso_ls_url` varchar(255) NOT NULL, + `gso_ls_class` varchar(60) NOT NULL default 'Gems_Source_LimeSurvey1m9Database', + `gso_ls_adapter` varchar(20) default NULL, + `gso_ls_dbhost` varchar(127) default NULL, + `gso_ls_database` varchar(127) default NULL, + `gso_ls_table_prefix` varchar(127) default NULL, + `gso_ls_username` varchar(64) default NULL, + `gso_ls_password` varchar(255) default NULL, + `gso_ls_charset` varchar(8) NOT NULL, - gso_active boolean not null default 1, + `gso_active` tinyint(1) NOT NULL default '1', - gso_status varchar(20) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' null, - gso_last_synch timestamp null, + `gso_status` varchar(20) default NULL, + `gso_last_synch` timestamp NULL default NULL, - gso_changed timestamp not null default current_timestamp on update current_timestamp, - gso_changed_by bigint unsigned not null, - gso_created timestamp not null, - gso_created_by bigint unsigned not null, + `gso_changed` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, + `gso_changed_by` bigint(20) unsigned NOT NULL, + `gso_created` timestamp NOT NULL default '0000-00-00 00:00:00', + `gso_created_by` bigint(20) unsigned NOT NULL, - PRIMARY KEY(gso_id_source) - ) - ENGINE=InnoDB - auto_increment = 60 - CHARACTER SET 'utf8' COLLATE 'utf8_general_ci'; - + PRIMARY KEY (`gso_id_source`), + UNIQUE KEY `gso_source_name` (`gso_source_name`), + UNIQUE KEY `gso_ls_url` (`gso_ls_url`) +) +ENGINE=InnoDB +DEFAULT CHARSET=utf8; \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2012-03-16 15:26:16
|
Revision: 554 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=554&view=rev Author: matijsdejong Date: 2012-03-16 15:26:05 +0000 (Fri, 16 Mar 2012) Log Message: ----------- Moved changePasswordForm to User class Modified Paths: -------------- trunk/library/classes/Gems/Default/OptionAction.php trunk/library/classes/Gems/User/User.php trunk/library/languages/default-en.mo trunk/library/languages/default-en.po trunk/library/languages/default-nl.mo trunk/library/languages/default-nl.po Modified: trunk/library/classes/Gems/Default/OptionAction.php =================================================================== --- trunk/library/classes/Gems/Default/OptionAction.php 2012-03-16 12:32:50 UTC (rev 553) +++ trunk/library/classes/Gems/Default/OptionAction.php 2012-03-16 15:26:05 UTC (rev 554) @@ -73,11 +73,6 @@ */ public function changePasswordAction() { - /************* - * Make form * - *************/ - $form = $this->createForm(); - $user = $this->loader->getCurrentUser(); if (! $user->canSetPassword()) { @@ -85,67 +80,33 @@ return; } - if ($user->isPasswordResetRequired()) { - $this->menu->setVisible(false); + /************* + * Make form * + *************/ + $form = $user->getPasswordChangeForm(); - } elseif ($user->hasPassword()) { - // Field current password - // - // This is only used when the password is already set, which may not always be the case - // e.g. when using embedded login in Pulse. - $element = new Zend_Form_Element_Password('old_password'); - $element->setLabel($this->_('Current password')); - $element->setAttrib('size', 10); - $element->setAttrib('maxlength', 20); - $element->setRenderPassword(true); - $element->setRequired(true); - $element->addValidator(new Gems_User_UserPasswordValidator($user, $this->translate)); - $form->addElement($element); - } - - // Field new password - $element = new Zend_Form_Element_Password('new_password'); - $element->setLabel($this->_('New password')); - $element->setAttrib('size', 10); - $element->setAttrib('maxlength', 20); - $element->setRequired(true); - $element->setRenderPassword(true); - $element->addValidator(new Gems_User_UserNewPasswordValidator($user)); - $element->addValidator(new MUtil_Validate_IsConfirmed('repeat_password', $this->_('Repeat password'))); - $form->addElement($element); - - // Field repeat password - $element = new Zend_Form_Element_Password('repeat_password'); - $element->setLabel($this->_('Repeat password')); - $element->setAttrib('size', 10); - $element->setAttrib('maxlength', 20); - $element->setRequired(true); - $element->setRenderPassword(true); - $element->addValidator(new MUtil_Validate_IsConfirmed('new_password', $this->_('New password'))); - $form->addElement($element); - // Show password info if ($info = $user->reportPasswordWeakness()) { - foreach ($info as &$line) { - $line .= ','; - } - $line[strlen($line) - 1] = '.'; - $element = new MUtil_Form_Element_Html('rules'); $element->setLabel($this->_('Password rules')); - $element->div($this->_('A password:'))->ul($info); - $form->addElement($element); - $element = new Zend_Form_Element_Submit('submit'); - $element->setAttrib('class', 'button'); - $element->setLabel($this->_('Save')); + if (1 == count($info)) { + $element->div(sprintf($this->_('A password %s.'), reset($info))); + } else { + foreach ($info as &$line) { + $line .= ','; + } + $line[strlen($line) - 1] = '.'; + + $element->div($this->_('A password:'))->ul($info); + } $form->addElement($element); } /**************** * Process form * ****************/ - if ($this->_request->isPost() && $form->isValid($_POST)) { + if ($this->_request->isPost() && $form->isValid($_POST, false)) { $user->setPassword($_POST['new_password']); $this->addMessage($this->_('New password is active.')); @@ -167,7 +128,9 @@ $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 (! $user->isPasswordResetRequired() && ($links = $this->createMenuLinks())) { + if ($user->isPasswordResetRequired()) { + $this->menu->setVisible(false); + } elseif ($links = $this->createMenuLinks()) { $table->tf(); // Add empty cell, no label $linksCell = $table->tf($links); } Modified: trunk/library/classes/Gems/User/User.php =================================================================== --- trunk/library/classes/Gems/User/User.php 2012-03-16 12:32:50 UTC (rev 553) +++ trunk/library/classes/Gems/User/User.php 2012-03-16 15:26:05 UTC (rev 554) @@ -515,6 +515,72 @@ } /** + * Returns a form to change the possword for this user. + * + * @param boolean $askOld Ask for the old password, calculated when not set. + * @return Gems_Form + */ + public function getPasswordChangeForm($askOld = null) + { + if (! $this->canSetPassword()) { + return; + } + + if (null === $askOld) { + // By default only ask for the old password if the user just entered + // it but is required to change it. + $askOld = (! $this->isPasswordResetRequired()); + } + + $form = new Gems_Form(); + + // Never ask for the old password if it does not exist + // + // A password does not always exist, e.g. when using embedded login in Pulse + // or after creating a new user. + if ($askOld && $this->hasPassword()) { + // Field current password + $element = new Zend_Form_Element_Password('old_password'); + $element->setLabel($this->translate->_('Current password')); + $element->setAttrib('size', 10); + $element->setAttrib('maxlength', 20); + $element->setRenderPassword(true); + $element->setRequired(true); + $element->addValidator(new Gems_User_UserPasswordValidator($this, $this->translate)); + $form->addElement($element); + } + + // Field new password + $element = new Zend_Form_Element_Password('new_password'); + $element->setLabel($this->translate->_('New password')); + $element->setAttrib('size', 10); + $element->setAttrib('maxlength', 20); + $element->setRequired(true); + $element->setRenderPassword(true); + $element->addValidator(new Gems_User_UserNewPasswordValidator($this)); + $element->addValidator(new MUtil_Validate_IsConfirmed('repeat_password', $this->translate->_('Repeat password'))); + $form->addElement($element); + + // Field repeat password + $element = new Zend_Form_Element_Password('repeat_password'); + $element->setLabel($this->translate->_('Repeat password')); + $element->setAttrib('size', 10); + $element->setAttrib('maxlength', 20); + $element->setRequired(true); + $element->setRenderPassword(true); + $element->addValidator(new MUtil_Validate_IsConfirmed('new_password', $this->translate->_('New password'))); + $form->addElement($element); + + // Submit button + $element = new Zend_Form_Element_Submit('submit'); + $element->setAttrib('class', 'button'); + $element->setLabel($this->translate->_('Save')); + $form->addElement($element); + + return $form; + } + + /** * Return a password reset key * * @return string Modified: trunk/library/languages/default-en.mo =================================================================== (Binary files differ) Modified: trunk/library/languages/default-en.po =================================================================== --- trunk/library/languages/default-en.po 2012-03-16 12:32:50 UTC (rev 553) +++ trunk/library/languages/default-en.po 2012-03-16 15:26:05 UTC (rev 554) @@ -2,7 +2,7 @@ msgstr "" "Project-Id-Version: Pulse EN\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-03-15 15:34+0100\n" +"POT-Creation-Date: 2012-03-16 16:16+0100\n" "PO-Revision-Date: \n" "Last-Translator: Matijs de Jong <mj...@ma...>\n" "Language-Team: Erasmus MGZ <mat...@ma...>\n" @@ -1439,8 +1439,6 @@ msgstr "User ID" #: classes/Gems/Default/MailServerAction.php:90 -#: classes/Gems/Default/OptionAction.php:113 -#: classes/Gems/Default/OptionAction.php:118 #: classes/Gems/Default/SourceAction.php:95 #: classes/Gems/Default/StaffAction.php:161 msgid "Repeat password" @@ -1478,52 +1476,56 @@ msgid "Email templates" msgstr "Email templates" -#: classes/Gems/Default/OptionAction.php:84 +#: classes/Gems/Default/OptionAction.php:79 msgid "You are not allowed to change your password." msgstr "You are not allowed to change your password." -#: classes/Gems/Default/OptionAction.php:96 -msgid "Current password" -msgstr "Current password" +#: classes/Gems/Default/OptionAction.php:91 +msgid "Password rules" +msgstr "Password rules" -#: classes/Gems/Default/OptionAction.php:107 -#: classes/Gems/Default/OptionAction.php:123 -msgid "New password" -msgstr "New password" +#: classes/Gems/Default/OptionAction.php:94 +#, php-format +msgid "A password %s." +msgstr "A password %s." -#: classes/Gems/Default/OptionAction.php:137 +#: classes/Gems/Default/OptionAction.php:101 +msgid "A password:" +msgstr "A password:" + +#: classes/Gems/Default/OptionAction.php:112 msgid "New password is active." msgstr "New password is active." -#: classes/Gems/Default/OptionAction.php:143 +#: classes/Gems/Default/OptionAction.php:118 msgid "Caps Lock seems to be on!" msgstr "Caps Lock seems to be on!" -#: classes/Gems/Default/OptionAction.php:181 +#: classes/Gems/Default/OptionAction.php:158 msgid "Login Name" msgstr "Login Name" -#: classes/Gems/Default/OptionAction.php:188 +#: classes/Gems/Default/OptionAction.php:165 #: classes/Gems/Default/OrganizationAction.php:129 #: classes/Gems/Default/RespondentAction.php:175 #: classes/Gems/Default/StaffAction.php:319 msgid "Language" msgstr "Language" -#: classes/Gems/Default/OptionAction.php:198 +#: classes/Gems/Default/OptionAction.php:175 #, php-format msgid "Options" msgstr "Options" -#: classes/Gems/Default/OptionAction.php:207 +#: classes/Gems/Default/OptionAction.php:184 msgid "This overview provides information about the last login activity on your account." msgstr "This overview provides information about the last login activity on your account." -#: classes/Gems/Default/OptionAction.php:227 +#: classes/Gems/Default/OptionAction.php:204 msgid "Date / time" msgstr "Date / time" -#: classes/Gems/Default/OptionAction.php:238 +#: classes/Gems/Default/OptionAction.php:215 msgid "Item" msgstr "Item" @@ -3560,53 +3562,75 @@ #: classes/Gems/User/PasswordChecker.php:95 #, php-format -msgid "A password should contain at least one uppercase character." -msgid_plural "A password should contain at least %d uppercase characters." -msgstr[0] "A password should contain at least one uppercase character." -msgstr[1] "A password should contain at least %d uppercase characters." +msgid "should contain at least one uppercase character" +msgid_plural "should contain at least %d uppercase characters" +msgstr[0] "should contain at least one uppercase character" +msgstr[1] "should contain at least %d uppercase characters" #: classes/Gems/User/PasswordChecker.php:112 #, php-format -msgid "A password should contain at least one lowercase character." -msgid_plural "A password should contain at least %d lowercase characters." -msgstr[0] "A password should contain at least one lowercase character." -msgstr[1] "A password should contain at least %d lowercase characters." +msgid "should contain at least one lowercase character" +msgid_plural "should contain at least %d lowercase characters" +msgstr[0] "should contain at least one lowercase character" +msgstr[1] "should contain at least %d lowercase characters" #: classes/Gems/User/PasswordChecker.php:127 #, php-format -msgid "A password should be at least %d characters long." -msgstr "A password should be at least %d characters long." +msgid "should be at least %d characters long" +msgstr "should be at least %d characters long" #: classes/Gems/User/PasswordChecker.php:145 #, php-format -msgid "A password should contain at least one not alphabetic character." -msgid_plural "A password should contain at least %d not alphabetic characters." -msgstr[0] "A password should contain at least one not alphabetic character." -msgstr[1] "A password should contain at least %d not alphabetic characters." +msgid "should contain at least one non alphabetic character" +msgid_plural "should contain at least %d non alphabetic characters" +msgstr[0] "should contain at least one non alphabetic character" +msgstr[1] "should contain at least %d non alphabetic characters" -#: classes/Gems/User/PasswordChecker.php:165 +#: classes/Gems/User/PasswordChecker.php:148 +msgid "should not contain non alphabetic characters" +msgstr "should not contain non alphabetic characters" + +#: classes/Gems/User/PasswordChecker.php:167 #, php-format -msgid "A password should contain at least one not alphanumeric character." -msgid_plural "A password should contain at least %d not alphanumeric characters." -msgstr[0] "A password should contain at least one not alphanumeric character." -msgstr[1] "A password should contain at least %d not alphanumeric characters." +msgid "should contain at least one non alphanumeric character" +msgid_plural "should contain at least %d non alphanumeric characters" +msgstr[0] "should contain at least one non alphanumeric character" +msgstr[1] "should contain at least %d non alphanumeric characters" -#: classes/Gems/User/PasswordChecker.php:184 -msgid "A password should not contain the login name." -msgstr "A password should not contain the login name." +#: classes/Gems/User/PasswordChecker.php:170 +msgid "should not contain non alphanumeric characters" +msgstr "should not contain non alphanumeric characters" -#: classes/Gems/User/PasswordChecker.php:201 +#: classes/Gems/User/PasswordChecker.php:188 #, php-format -msgid "A password should contain at least one number." -msgid_plural "A password should contain at least %d numbers." -msgstr[0] "A password should contain at least one number." -msgstr[1] "A password should contain at least %d numbers." +msgid "should not contain your login name \"%s\"" +msgstr "should not contain your login name \"%s\"" +#: classes/Gems/User/PasswordChecker.php:207 +#, php-format +msgid "should contain at least one number" +msgid_plural "should contain at least %d numbers" +msgstr[0] "should contain at least one number" +msgstr[1] "should contain at least %d numbers" + +#: classes/Gems/User/PasswordChecker.php:210 +msgid "may not contain numbers" +msgstr "may not contain numbers" + #: classes/Gems/User/RadiusUserDefinition.php:175 msgid "Shared secret" msgstr "Shared secret" -#: classes/Gems/User/User.php:833 +#: classes/Gems/User/User.php:538 +msgid "Current password" +msgstr "Current password" + +#: classes/Gems/User/User.php:549 +#: classes/Gems/User/User.php:565 +msgid "New password" +msgstr "New password" + +#: classes/Gems/User/User.php:893 msgid "Cookies must be enabled for this site." msgstr "Cookies must be enabled for this site." Modified: trunk/library/languages/default-nl.mo =================================================================== (Binary files differ) Modified: trunk/library/languages/default-nl.po =================================================================== --- trunk/library/languages/default-nl.po 2012-03-16 12:32:50 UTC (rev 553) +++ trunk/library/languages/default-nl.po 2012-03-16 15:26:05 UTC (rev 554) @@ -2,7 +2,7 @@ msgstr "" "Project-Id-Version: Pulse NL\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-03-15 15:34+0100\n" +"POT-Creation-Date: 2012-03-16 16:15+0100\n" "PO-Revision-Date: \n" "Last-Translator: Matijs de Jong <mj...@ma...>\n" "Language-Team: Erasmus MGZ <mat...@ma...>\n" @@ -1439,8 +1439,6 @@ msgstr "Gebruikers ID" #: classes/Gems/Default/MailServerAction.php:90 -#: classes/Gems/Default/OptionAction.php:113 -#: classes/Gems/Default/OptionAction.php:118 #: classes/Gems/Default/SourceAction.php:95 #: classes/Gems/Default/StaffAction.php:161 msgid "Repeat password" @@ -1478,52 +1476,56 @@ msgid "Email templates" msgstr "Email sjabloon" -#: classes/Gems/Default/OptionAction.php:84 +#: classes/Gems/Default/OptionAction.php:79 msgid "You are not allowed to change your password." msgstr "U mag uw wachtwoord niet wijzigen." -#: classes/Gems/Default/OptionAction.php:96 -msgid "Current password" -msgstr "Huidig wachtwoord" +#: classes/Gems/Default/OptionAction.php:91 +msgid "Password rules" +msgstr "Wachtwoord regels" -#: classes/Gems/Default/OptionAction.php:107 -#: classes/Gems/Default/OptionAction.php:123 -msgid "New password" -msgstr "Nieuw wachtwoord" +#: classes/Gems/Default/OptionAction.php:94 +#, php-format +msgid "A password %s." +msgstr "Een wachtwoord %s." -#: classes/Gems/Default/OptionAction.php:137 +#: classes/Gems/Default/OptionAction.php:101 +msgid "A password:" +msgstr "Een wachtwoord:" + +#: classes/Gems/Default/OptionAction.php:112 msgid "New password is active." msgstr "Nieuwe wachtwoord geactiveerd." -#: classes/Gems/Default/OptionAction.php:143 +#: classes/Gems/Default/OptionAction.php:118 msgid "Caps Lock seems to be on!" msgstr "De Caps Lock toets lijkt aan te staan!" -#: classes/Gems/Default/OptionAction.php:181 +#: classes/Gems/Default/OptionAction.php:158 msgid "Login Name" msgstr "Login Naam" -#: classes/Gems/Default/OptionAction.php:188 +#: classes/Gems/Default/OptionAction.php:165 #: classes/Gems/Default/OrganizationAction.php:129 #: classes/Gems/Default/RespondentAction.php:175 #: classes/Gems/Default/StaffAction.php:319 msgid "Language" msgstr "Taal" -#: classes/Gems/Default/OptionAction.php:198 +#: classes/Gems/Default/OptionAction.php:175 #, php-format msgid "Options" msgstr "Instellingen" -#: classes/Gems/Default/OptionAction.php:207 +#: classes/Gems/Default/OptionAction.php:184 msgid "This overview provides information about the last login activity on your account." msgstr "Dit overzicht geeft informatie over de recente inlog activiteit op uw account." -#: classes/Gems/Default/OptionAction.php:227 +#: classes/Gems/Default/OptionAction.php:204 msgid "Date / time" msgstr "Datum / tijd" -#: classes/Gems/Default/OptionAction.php:238 +#: classes/Gems/Default/OptionAction.php:215 msgid "Item" msgstr "Item" @@ -3560,53 +3562,75 @@ #: classes/Gems/User/PasswordChecker.php:95 #, php-format -msgid "A password should contain at least one uppercase character." -msgid_plural "A password should contain at least %d uppercase characters." -msgstr[0] "Het wachtwoord moet minstens een hoofdletter bevatten." -msgstr[1] "Het wachtwoord moet minstens %d hoofdletters bevatten." +msgid "should contain at least one uppercase character" +msgid_plural "should contain at least %d uppercase characters" +msgstr[0] "moet minstens één hoofdletter bevatten" +msgstr[1] "moet minstens %d hoofdletters bevatten" #: classes/Gems/User/PasswordChecker.php:112 #, php-format -msgid "A password should contain at least one lowercase character." -msgid_plural "A password should contain at least %d lowercase characters." -msgstr[0] "Het wachtwoord moet minstens een kleine letter bevatten." -msgstr[1] "Het wachtwoord moet minstens %d kleine letters bevatten." +msgid "should contain at least one lowercase character" +msgid_plural "should contain at least %d lowercase characters" +msgstr[0] "moet minstens één kleine letter bevatten" +msgstr[1] "moet minstens %d kleine letters bevatten" #: classes/Gems/User/PasswordChecker.php:127 #, php-format -msgid "A password should be at least %d characters long." -msgstr "Het wachtwoordt moet minstens %d tekens lang zijn." +msgid "should be at least %d characters long" +msgstr "moet minstens %d tekens lang zijn" #: classes/Gems/User/PasswordChecker.php:145 #, php-format -msgid "A password should contain at least one not alphabetic character." -msgid_plural "A password should contain at least %d not alphabetic characters." -msgstr[0] "Het wachtwoord moet minstens een niet-alphabetisch teken bevatten." -msgstr[1] "Het wachtwoord moet minstens %d niet-alphabetisch tekens bevatten." +msgid "should contain at least one non alphabetic character" +msgid_plural "should contain at least %d non alphabetic characters" +msgstr[0] "moet minstens één niet-letter bevatten" +msgstr[1] "moet minstens %d niet-letter bevatten" -#: classes/Gems/User/PasswordChecker.php:165 +#: classes/Gems/User/PasswordChecker.php:148 +msgid "should not contain non alphabetic characters" +msgstr "moet alleen uit letters bestaan" + +#: classes/Gems/User/PasswordChecker.php:167 #, php-format -msgid "A password should contain at least one not alphanumeric character." -msgid_plural "A password should contain at least %d not alphanumeric characters." -msgstr[0] "Het wachtwoord moet minstens een teken anders dan getallen of letters bevatten." -msgstr[1] "Het wachtwoord moet minstens %d tekens anders dan getallen of letters bevatten." +msgid "should contain at least one non alphanumeric character" +msgid_plural "should contain at least %d non alphanumeric characters" +msgstr[0] "moet minstens één teken anders dan getallen of letters bevatten" +msgstr[1] "moet minstens %d tekens anders dan getallen of letters bevatten" -#: classes/Gems/User/PasswordChecker.php:184 -msgid "A password should not contain the login name." -msgstr "Het wachtwoord mag niet de gebruikersnaam bevatten." +#: classes/Gems/User/PasswordChecker.php:170 +msgid "should not contain non alphanumeric characters" +msgstr "mag alleen letters en cijfers bevatten" -#: classes/Gems/User/PasswordChecker.php:201 +#: classes/Gems/User/PasswordChecker.php:188 #, php-format -msgid "A password should contain at least one number." -msgid_plural "A password should contain at least %d numbers." -msgstr[0] "Het wachtwoord moet minstens een getal bevatten." -msgstr[1] "Het wachtwoord moet minstens %d getallen bevatten." +msgid "should not contain your login name \"%s\"" +msgstr "mag niet je gebruikersnaam \"%s\" bevatten" +#: classes/Gems/User/PasswordChecker.php:207 +#, php-format +msgid "should contain at least one number" +msgid_plural "should contain at least %d numbers" +msgstr[0] "moet minstens één cijfer bevatten" +msgstr[1] "moet minstens %d cijfers bevatten" + +#: classes/Gems/User/PasswordChecker.php:210 +msgid "may not contain numbers" +msgstr "mag geen getallen bevatten" + #: classes/Gems/User/RadiusUserDefinition.php:175 msgid "Shared secret" msgstr "Shared secret" -#: classes/Gems/User/User.php:833 +#: classes/Gems/User/User.php:538 +msgid "Current password" +msgstr "Huidig wachtwoord" + +#: classes/Gems/User/User.php:549 +#: classes/Gems/User/User.php:565 +msgid "New password" +msgstr "Nieuw wachtwoord" + +#: classes/Gems/User/User.php:893 msgid "Cookies must be enabled for this site." msgstr "Zonder cookies heeft u geen toegang tot deze site." This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2012-03-21 17:27:08
|
Revision: 559 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=559&view=rev Author: matijsdejong Date: 2012-03-21 17:26:57 +0000 (Wed, 21 Mar 2012) Log Message: ----------- Start login by e-mail Extra documentation for form Modified Paths: -------------- trunk/library/classes/Gems/User/Form/LoginForm.php trunk/library/classes/Gems/User/UserLoader.php trunk/library/classes/MUtil/Form.php trunk/library/languages/default-nl.mo trunk/library/languages/default-nl.po Modified: trunk/library/classes/Gems/User/Form/LoginForm.php =================================================================== --- trunk/library/classes/Gems/User/Form/LoginForm.php 2012-03-21 14:05:39 UTC (rev 558) +++ trunk/library/classes/Gems/User/Form/LoginForm.php 2012-03-21 17:26:57 UTC (rev 559) @@ -222,7 +222,7 @@ } /** - * Returns/sets a link to the reset password page + * Returns an html link to the reset password page * * @return MUtil_Html_AElement */ @@ -343,7 +343,7 @@ // Veld token $element = new MUtil_Form_Element_Html($this->_tokenFieldName); // $element->br(); - $element->a(array('controller' => 'ask', 'action' => 'token'), $this->translate->_('Enter your token...'), array('class' => 'actionlink')); + $element->setValue($this->getTokenLink()); $this->addElement($element); } @@ -352,6 +352,15 @@ } /** + * Returns an html link for the token input page. + * + * @return MUtil_Html_AElement + */ + public function getTokenLink() + { + return MUtil_Html::create('a', array('controller' => 'ask', 'action' => 'token'), $this->translate->_('Enter your token...'), array('class' => 'actionlink')); + } + /** * Returns/sets a login name element. * * @return Zend_Form_Element_Text Modified: trunk/library/classes/Gems/User/UserLoader.php =================================================================== --- trunk/library/classes/Gems/User/UserLoader.php 2012-03-21 14:05:39 UTC (rev 558) +++ trunk/library/classes/Gems/User/UserLoader.php 2012-03-21 17:26:57 UTC (rev 559) @@ -267,12 +267,12 @@ */ public function getUser($login_name, $currentOrganization) { - list($defName, $userOrganization) = $this->getUserClassInfo($login_name, $currentOrganization); + list($defName, $userOrganization, $userName) = $this->getUserClassInfo($login_name, $currentOrganization); // MUtil_Echo::track($defName, $userOrganization); $definition = $this->getUserDefinition($defName); - $values = $definition->getUserData($login_name, $userOrganization); + $values = $definition->getUserData($userName, $userOrganization); // MUtil_Echo::track($defName, $login_name, $userOrganization, $values); if (! isset($values['user_active'])) { @@ -285,6 +285,7 @@ $values['__user_definition'] = $defName; $user = $this->_loadClass('User', true, array($values, $definition)); + // MUtil_Echo::track($user->getAllowedOrganizations()); $user->setCurrentOrganization($currentOrganization); @@ -328,18 +329,23 @@ * * @param string $login_name * @param int $organization - * @return array Containing definitionName, organizationId + * @return array Containing definitionName, organizationId, (real) userName */ protected function getUserClassInfo($login_name, $organization) { if ((null == $login_name) || (null == $organization)) { - return array(self::USER_NOLOGIN . 'Definition', $organization); + return array(self::USER_NOLOGIN . 'Definition', $organization, $login_name); } if ($this->isProjectUser($login_name)) { - return array(self::USER_PROJECT . 'Definition', $organization); + return array(self::USER_PROJECT . 'Definition', $organization, $login_name); } try { + /* + $select = $this->getUserClassSelect($login_name, $organization); + $row = $this->db->fetchRow($select, null, Zend_Db::FETCH_NUM); + // */ + //* $sql = "SELECT CONCAT(gul_user_class, 'Definition'), gul_id_organization FROM gems__user_logins INNER JOIN gems__organizations ON gor_id_organization = gul_id_organization WHERE gor_active = 1 AND @@ -356,7 +362,7 @@ if (! $row) { // Try to get see if this is another allowed organization for this user - $sql = "SELECT CONCAT(gul_user_class, 'Definition'), gul_id_organization + $sql = "SELECT CONCAT(gul_user_class, 'Definition'), gul_id_organization, gul_login FROM gems__user_logins INNER JOIN gems__organizations ON gor_id_organization != gul_id_organization WHERE gor_active = 1 AND gul_can_login = 1 AND @@ -375,7 +381,7 @@ // // For optimization do set the allowed organizations // Try to get see if this is another allowed organization for this user - $sql = "SELECT CONCAT(gul_user_class, 'Definition'), gul_id_organization + $sql = "SELECT CONCAT(gul_user_class, 'Definition'), gul_id_organization, gul_login FROM gems__user_logins INNER JOIN gems__organizations ON gor_id_organization != gul_id_organization WHERE gor_active = 1 AND gul_can_login = 1 AND @@ -385,7 +391,7 @@ // MUtil_Echo::track($sql, $login_name); $row = $this->db->fetchRow($sql, $login_name, Zend_Db::FETCH_NUM); - } + } // */ if ($row) { // MUtil_Echo::track($row); @@ -435,12 +441,38 @@ // MUtil_Echo::r($e); } - return array(self::USER_OLD_STAFF . 'Definition', $organization); + return array(self::USER_OLD_STAFF . 'Definition', $organization, $login_name); } - return array(self::USER_NOLOGIN . 'Definition', $organization); + return array(self::USER_NOLOGIN . 'Definition', $organization, $login_name); } + /** + * + * @param string $login_name + * @param int $organization + * @return Zend_Db_Select + */ + protected function getUserClassSelect($login_name, $organization) + { + $select = $this->db->select(); + + $select->from('gems__user_logins', array("CONCAT(gul_user_class, 'Definition')", 'gul_id_organization', 'gul_login')) + ->from('gems__organizations', array()) + ->joinLeft('gems__staff', 'gul_login = gsf_login AND gul_id_organization = gsf_id_organization', array()) + ->joinLeft('gems__respondent2org', 'gul_login = gr2o_patient_nr AND gul_id_organization = gr2o_id_organization', array()) + ->joinLeft('gems__respondents', 'gr2o_id_user = grs_id_user', array()) + ->where('gor_active = 1') + ->where('gul_can_login = 1') + ->where('gor_id_organization = ?', $organization) + ->where('(gul_login = ? OR gsf_email = ? OR grs_email = ?)', $login_name) + ->order("CASE WHEN gor_id_organization = gul_id_organization THEN 1 WHEN gor_accessible_by LIKE CONCAT('%:', gul_id_organization, ':%') THEN 2 ELSE 3 END"); + + MUtil_Echo::track($select->__toString()); + + return $select; + } + protected function isProjectUser($login_name) { return $this->project->getSuperAdminName() == $login_name; Modified: trunk/library/classes/MUtil/Form.php =================================================================== --- trunk/library/classes/MUtil/Form.php 2012-03-21 14:05:39 UTC (rev 558) +++ trunk/library/classes/MUtil/Form.php 2012-03-21 17:26:57 UTC (rev 559) @@ -3,7 +3,7 @@ /** * 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 @@ -14,7 +14,7 @@ * * 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 @@ -25,19 +25,22 @@ * 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. - * - * @version $Id$ + * * @package MUtil - * @subpackage Acl + * @subpackage Form + * @author Matijs de Jong <mj...@ma...> * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License + * @version $Id$ */ /** + * * @package MUtil * @subpackage Form * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License + * @since Class available since version 1.0 */ class MUtil_Form extends Zend_Form { @@ -96,9 +99,9 @@ return; } } - + ZendX_JQuery::enableView($view); - + if (false === $view->getPluginLoader('helper')->getPaths('MUtil_JQuery_View_Helper')) { $view->addHelperPath('MUtil/JQuery/View/Helper', 'MUtil_JQuery_View_Helper'); } @@ -157,7 +160,11 @@ return $this->_displayOrder; } - public function getHtml() + /** + * + * @return MUtil_Html_HtmlElement + */ + public function getHtml() { return $this->_html_element; } @@ -176,12 +183,12 @@ /** * Validate the form * - * As it is better for translation utilities to set the labels etc. translated, - * the MUtil default is to disable translation. - * + * As it is better for translation utilities to set the labels etc. translated, + * the MUtil default is to disable translation. + * * However, this also disables the translation of validation messages, which we * cannot set translated. The MUtil form is extended so it can make this switch. - * + * * @param array $data * @param boolean $disableTranslateValidators Extra switch * @return boolean @@ -253,6 +260,15 @@ return $this; } + /** + * Sets the layout to the use of html elements + * + * @see MUtil_Html + * + * @param string $html HtmlTag for element or empty sequence when empty + * @param string $args MUtil_Ra::args additional arguments for element + * @return MUtil_Form (continuation pattern) + */ public function setHtml($html = null, $args = null) { $options = MUtil_Ra::args(func_get_args(), 1); Modified: trunk/library/languages/default-nl.mo =================================================================== (Binary files differ) Modified: trunk/library/languages/default-nl.po =================================================================== --- trunk/library/languages/default-nl.po 2012-03-21 14:05:39 UTC (rev 558) +++ trunk/library/languages/default-nl.po 2012-03-21 17:26:57 UTC (rev 559) @@ -1089,7 +1089,7 @@ #: classes/Gems/Default/IndexAction.php:152 msgid "Login" -msgstr "Login" +msgstr "Inloggen" #: classes/Gems/Default/IndexAction.php:174 msgid "Back to login" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2012-03-22 15:42:42
|
Revision: 561 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=561&view=rev Author: matijsdejong Date: 2012-03-22 15:42:31 +0000 (Thu, 22 Mar 2012) Log Message: ----------- Moved ChangePasswordForm.php to separate Form Reset password action/button for StaffAction instead of staff in-Form password edit new AutoLoadFormAbstract.php Updated translations Modified Paths: -------------- trunk/library/classes/Gems/Default/OptionAction.php trunk/library/classes/Gems/Default/StaffAction.php trunk/library/classes/Gems/Form.php trunk/library/classes/Gems/Menu/MenuAbstract.php trunk/library/classes/Gems/Menu.php trunk/library/classes/Gems/User/Form/LoginForm.php trunk/library/classes/Gems/User/User.php trunk/library/classes/Gems/User/UserLoader.php trunk/library/languages/default-en.mo trunk/library/languages/default-en.po trunk/library/languages/default-nl.mo trunk/library/languages/default-nl.po Added Paths: ----------- trunk/library/classes/Gems/Form/AutoLoadFormAbstract.php trunk/library/classes/Gems/User/Form/ChangePasswordForm.php Modified: trunk/library/classes/Gems/Default/OptionAction.php =================================================================== --- trunk/library/classes/Gems/Default/OptionAction.php 2012-03-22 11:04:04 UTC (rev 560) +++ trunk/library/classes/Gems/Default/OptionAction.php 2012-03-22 15:42:31 UTC (rev 561) @@ -75,6 +75,8 @@ { $user = $this->loader->getCurrentUser(); + $this->html->h3($this->_('Change password')); + if (! $user->canSetPassword()) { $this->addMessage($this->_('You are not allowed to change your password.')); return; @@ -83,59 +85,27 @@ /************* * Make form * *************/ - $form = $user->getPasswordChangeForm(); + $form = $user->getChangePasswordForm(array('showReport' => false)); - // Show password info - if ($info = $user->reportPasswordWeakness()) { - $element = new MUtil_Form_Element_Html('rules'); - $element->setLabel($this->_('Password rules')); - - if (1 == count($info)) { - $element->div(sprintf($this->_('A password %s.'), reset($info))); - } else { - foreach ($info as &$line) { - $line .= ','; - } - $line[strlen($line) - 1] = '.'; - - $element->div($this->_('A password:'))->ul($info); - } - $form->addElement($element); - } - /**************** * Process form * ****************/ if ($this->_request->isPost() && $form->isValid($_POST, false)) { - $user->setPassword($_POST['new_password']); - $this->addMessage($this->_('New password is active.')); $this->_reroute(array($this->getRequest()->getActionKey() => 'edit')); - } else { - if (isset($_POST['old_password'])) { - if ($_POST['old_password'] === strtoupper($_POST['old_password'])) { - $this->addMessage($this->_('Caps Lock seems to be on!')); - } - } - $form->populate($_POST); + $this->addMessage($form->getErrorMessages()); } /**************** * Display form * ****************/ - $table = new MUtil_Html_TableElement(array('class' => 'formTable')); - $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 ($user->isPasswordResetRequired()) { $this->menu->setVisible(false); - } elseif ($links = $this->createMenuLinks()) { - $table->tf(); // Add empty cell, no label - $linksCell = $table->tf($links); + } else { + $form->addButtons($this->createMenuLinks()); } - $this->html->h3($this->_('Change password')); $this->html[] = $form; } Modified: trunk/library/classes/Gems/Default/StaffAction.php =================================================================== --- trunk/library/classes/Gems/Default/StaffAction.php 2012-03-22 11:04:04 UTC (rev 560) +++ trunk/library/classes/Gems/Default/StaffAction.php 2012-03-22 15:42:31 UTC (rev 561) @@ -1,4 +1,5 @@ <?php + /** * Copyright (c) 2011, Erasmus MC * All rights reserved. @@ -103,22 +104,9 @@ } $dbLookup = $this->util->getDbLookup(); - $passwordField = false; - - //@@TODO Like this? should work when user is not saved, but storing the password should be done when - //we do have a user... - $definition = $this->loader->getUserLoader()->getUserDefinition($data['gul_user_class'].'Definition'); - - if ($definition->canSetPassword()) { - $passwordField = 'fld_password'; - } - $model->set('gsf_id_primary_group', 'multiOptions', MUtil_Lazy::call($dbLookup->getAllowedStaffGroups)); if ($new) { $model->set('gsf_id_primary_group', 'default', $dbLookup->getDefaultGroup()); - } elseif ($passwordField) { - $model->set($passwordField, 'description', $this->_('Enter only when changing')); - $model->setSaveWhenNotNull($passwordField); } $ucfirst = new Zend_Filter_Callback('ucfirst'); @@ -129,12 +117,12 @@ //@@TODO: Think of a better way to allow multiple methods per organization if ($this->escort->hasPrivilege('pr.staff.edit.all')) { $model->set('gul_user_class', 'label', $this->_('User Definition')); - + //Make sure old or experimental userdefinitions don't have to be changed to something that is //allowed at the moment. For example the oldStaffUser can stay when editing a user. $options = $model->get('gul_user_class', 'multiOptions'); - if (!array_key_exists($data['gul_user_class'], $options)) { - $options[$data['gul_user_class']] = $this->_('Unsupported UserDefinition'); + if (! array_key_exists($data['gul_user_class'], $options)) { + $options[$data['gul_user_class']] = $this->_('Unsupported User Definition'); $model->set('gul_user_class', 'multiOptions', $options); } $bridge->add('gul_user_class'); @@ -154,19 +142,6 @@ $bridge->addExhibitor('gsf_id_organization'); } - if ($passwordField) { - $pwdElem = $bridge->addPassword($passwordField, - 'label', $this->_('Password'), - // 'renderPassword', true, - 'repeatLabel', $this->_('Repeat password'), - 'required', $new, - 'size', 15 - ); - - if ($user instanceof Gems_User_User) { - $pwdElem->addValidator(new Gems_User_UserNewPasswordValidator($user)); - } - } $bridge->addRadio( 'gsf_gender', 'separator', ''); $bridge->addText( 'gsf_first_name', 'label', $this->_('First name')); $bridge->addFilter( 'gsf_first_name', $ucfirst); @@ -212,7 +187,7 @@ public function createAction() { $this->html->h3(sprintf($this->_('New %s...'), $this->getTopic())); - + $confirmed = $this->getRequest()->getParam('confirmed'); $id = $this->getRequest()->getParam('id'); if (!is_null($confirmed)) { @@ -364,7 +339,7 @@ if (!isset($filter['gsf_id_organization']) || empty($filter['gsf_id_organization'])) { $filter['gsf_id_organization'] = $this->loader->getCurrentUser()->getCurrentOrganizationId(); } - + return $filter; } @@ -407,7 +382,7 @@ //Make sure the menu always has the gsd_id_organization parameter $orgId = $this->getRequest()->getParam('gsf_id_organization'); - + if (is_null($orgId)) { //Get the selected gsf_id_organization used in the index $dataIdx = $this->getCachedRequestData(true, 'index', true); @@ -416,4 +391,46 @@ $this->menu->getParameterSource()->offsetSet('gsf_id_organization', $orgId); } + + /** + * Action to allow password reset + */ + public function resetAction() + { + $staff_id = $this->_getIdParam(); + $user = $this->loader->getUserLoader()->getUserByStaffId($staff_id); + + $this->html->h3(sprintf($this->_('Reset password for: %s'), $user->getFullName())); + + if (! $user->canSetPassword()) { + $this->addMessage($this->_('You are not allowed to change this password.')); + return; + } + + /************* + * Make form * + *************/ + $form = $user->getChangePasswordForm(array('askOld' => false)); + + /**************** + * Process form * + ****************/ + if ($this->_request->isPost() && $form->isValid($_POST, false)) { + $this->addMessage($this->_('New password is active.')); + $this->_reroute(array($this->getRequest()->getActionKey() => 'show')); + } else { + $this->addMessage($form->getErrorMessages()); + } + + /**************** + * Display form * + ****************/ + if ($user->isPasswordResetRequired()) { + $this->menu->setVisible(false); + } else { + $form->addButtons($this->createMenuLinks()); + } + + $this->html[] = $form; + } } Added: trunk/library/classes/Gems/Form/AutoLoadFormAbstract.php =================================================================== --- trunk/library/classes/Gems/Form/AutoLoadFormAbstract.php (rev 0) +++ trunk/library/classes/Gems/Form/AutoLoadFormAbstract.php 2012-03-22 15:42:31 UTC (rev 561) @@ -0,0 +1,102 @@ +<?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 <COPYRIGHT HOLDER> 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. + * + * + * @package Gems + * @subpackage Form + * @author Matijs de Jong <mj...@ma...> + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @version $Id$ + */ + +/** + * Adds default element loading to standard form + * + * @package Gems + * @subpackage Form + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @since Class available since version 1.5.3 + */ +abstract class Gems_Form_AutoLoadFormAbstract extends Gems_Form +{ + /** + * When true all elements are loaded after initiation. + * + * @var boolean + */ + protected $loadDefault = true; + + /** + * Should be called after answering the request to allow the Target + * to check if all required registry values have been set correctly. + * + * @return boolean False if required values are missing. + */ + public function checkRegistryRequestsAnswers() + { + if ($this->loadDefault) { + $this->loadDefaultElements(); + } + + return true; + } + + /** + * When true all elements are loaded after initiation. + * + * @return boolean $loadDefault + */ + public function getLoadDefault($loadDefault = true) + { + return $this->loadDefault; + } + + /** + * The function loads the elements for this form + * + * @return Gems_Form_AutoLoadFormAbstract (continuation pattern) + */ + abstract public function loadDefaultElements(); + + /** + * When true all elements are loaded after initiation. + * + * Enables loading of parameter through Zend_Form::__construct() + * + * @param boolean $loadDefault + * @return Gems_User_Form_LoginForm (continuation pattern) + */ + public function setLoadDefault($loadDefault = true) + { + $this->loadDefault = $loadDefault; + + return $this; + } +} Modified: trunk/library/classes/Gems/Form.php =================================================================== --- trunk/library/classes/Gems/Form.php 2012-03-22 11:04:04 UTC (rev 560) +++ trunk/library/classes/Gems/Form.php 2012-03-22 15:42:31 UTC (rev 561) @@ -1,4 +1,5 @@ <?php + /** * Copyright (c) 2011, Erasmus MC * All rights reserved. @@ -33,7 +34,7 @@ */ /** - * Base form class + * Base form class with extensions for correct load paths, autosubmit forms and registry use. * * @package Gems * @subpackage Form Modified: trunk/library/classes/Gems/Menu/MenuAbstract.php =================================================================== --- trunk/library/classes/Gems/Menu/MenuAbstract.php 2012-03-22 11:04:04 UTC (rev 560) +++ trunk/library/classes/Gems/Menu/MenuAbstract.php 2012-03-22 15:42:31 UTC (rev 561) @@ -386,13 +386,14 @@ $page->addAutofilterAction(); $createPage = $page->addCreateAction(); $page->addShowAction(); - $editPage = $page->addEditAction(); - $delPage = $page->addDeleteAction(); + $pages[] = $page->addEditAction(); + $pages[] = $page->addAction($this->_('Reset password'), 'pr.staff.edit', 'reset')->setModelParameters(1); + $pages[] = $page->addDeleteAction(); if (! $this->escort->hasPrivilege('pr.staff.edit.all')) { $filter = array_keys($this->escort->loader->getCurrentUser()->getAllowedOrganizations()); - $createPage->setParameterFilter('gsf_id_organization', $filter); - $editPage->setParameterFilter('gsf_id_organization', $filter); - $delPage->setParameterFilter('gsf_id_organization', $filter); + foreach ($pages as $sub_page) { + $sub_page->setParameterFilter('gsf_id_organization', $filter); + } } return $page; Modified: trunk/library/classes/Gems/Menu.php =================================================================== --- trunk/library/classes/Gems/Menu.php 2012-03-22 11:04:04 UTC (rev 560) +++ trunk/library/classes/Gems/Menu.php 2012-03-22 15:42:31 UTC (rev 561) @@ -203,7 +203,7 @@ $setup->addBrowsePage($this->_('Organizations'),'pr.organization', 'organization'); // STAFF CONTROLLER - $setup->addStaffPage($this->_('Staff')); + $page = $setup->addStaffPage($this->_('Staff')); // LOG CONTROLLER $page = $setup->addPage($this->_('Logging'), 'pr.log', 'log', 'index'); Added: trunk/library/classes/Gems/User/Form/ChangePasswordForm.php =================================================================== --- trunk/library/classes/Gems/User/Form/ChangePasswordForm.php (rev 0) +++ trunk/library/classes/Gems/User/Form/ChangePasswordForm.php 2012-03-22 15:42:31 UTC (rev 561) @@ -0,0 +1,414 @@ +<?php + +/** + * Copyright (c) 2012, 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. + * + * + * @package Gems + * @subpackage User + * @author Matijs de Jong <mj...@ma...> + * @copyright Copyright (c) 2012 Erasmus MC + * @license New BSD License + * @version $id: LoginForm.php 203 2012-01-01t 12:51:32Z matijs $ + */ + +/** + * + * + * @package Gems + * @subpackage User + * @copyright Copyright (c) 2012 Erasmus MC + * @license New BSD License + * @since Class available since version 1.5 + */ +class Gems_User_Form_ChangePasswordForm extends Gems_Form_AutoLoadFormAbstract +{ + /** + * The field name for the new password element. + * + * @var string + */ + protected $_newPasswordFieldName = 'new_password'; + + /** + * The field name for the old password element. + * + * @var string + */ + protected $_oldPasswordFieldName = 'old_password'; + + /** + * The field name for the repeat password element. + * + * @var string + */ + protected $_repeatPasswordFieldName = 'repeat_password'; + + /** + * The field name for the report rules element. + * + * @var string + */ + protected $_reportRulesFieldName = 'report_rules'; + + /** + * The field name for the submit element. + * + * @var string + */ + protected $_submitFieldName = 'submit'; + + /** + * Layout table + * + * @var MUtil_Html_TableElements + */ + protected $_table; + + /** + * Should the old password be requested. + * + * Calculated when null + * + * @var boolean + */ + protected $askOld = null; + + /** + * Should the password rules be reported. + * + * @var boolean + */ + protected $reportRules = true; + + /** + * + * @var Zend_Translate + */ + protected $translate; + + /** + * + * @var Gems_User_User + */ + protected $user; + + /** + * Use the default form table layout + * + * @var boolean + */ + protected $useTableLayout = true; + + public function addButtons($links) + { + if ($links && $this->_table) { + $this->_table->tf(); // Add empty cell, no label + $this->_table->tf($links); + } + } + + /** + * Should the for asking for an old password + * + * @return boolean + */ + public function getAskOld() + { + if (null === $this->askOld) { + // By default only ask for the old password if the user just entered + // it but is required to change it. + $this->askOld = (! $this->user->isPasswordResetRequired()); + } + + // Never ask for the old password if it does not exist + // + // A password does not always exist, e.g. when using embedded login in Pulse + // or after creating a new user. + return $this->askOld && $this->user->hasPassword(); + } + + /** + * Returns/sets a mew password element. + * + * @return Zend_Form_Element_Password + */ + public function getNewPasswordElement() + { + $element = $this->getElement($this->_newPasswordFieldName); + + if (! $element) { + // Field new password + $element = new Zend_Form_Element_Password($this->_newPasswordFieldName); + $element->setLabel($this->translate->_('New password')); + $element->setAttrib('size', 10); + $element->setAttrib('maxlength', 20); + $element->setRequired(true); + $element->setRenderPassword(true); + $element->addValidator(new Gems_User_UserNewPasswordValidator($this->user)); + $element->addValidator(new MUtil_Validate_IsConfirmed($this->_repeatPasswordFieldName, $this->translate->_('Repeat password'))); + + $this->addElement($element); + } + + return $element; + } + + /** + * Returns/sets a check old password element. + * + * @return Zend_Form_Element_Password + */ + public function getOldPasswordElement() + { + $element = $this->getElement($this->_oldPasswordFieldName); + + if (! $element) { + // Field current password + $element = new Zend_Form_Element_Password($this->_oldPasswordFieldName); + $element->setLabel($this->translate->_('Current password')); + $element->setAttrib('size', 10); + $element->setAttrib('maxlength', 20); + $element->setRenderPassword(true); + $element->setRequired(true); + $element->addValidator(new Gems_User_UserPasswordValidator($this->user, $this->translate)); + + $this->addElement($element); + } + + return $element; + } + + /** + * Returns/sets a repeat password element. + * + * @return Zend_Form_Element_Password + */ + public function getRepeatPasswordElement() + { + $element = $this->getElement($this->_repeatPasswordFieldName); + + if (! $element) { + // Field repeat password + $element = new Zend_Form_Element_Password($this->_repeatPasswordFieldName); + $element->setLabel($this->translate->_('Repeat password')); + $element->setAttrib('size', 10); + $element->setAttrib('maxlength', 20); + $element->setRequired(true); + $element->setRenderPassword(true); + $element->addValidator(new MUtil_Validate_IsConfirmed($this->_newPasswordFieldName, $this->translate->_('New password'))); + + $this->addElement($element); + } + + return $element; + } + + /** + * Returns/sets an element showing the password rules + * + * @return MUtil_Form_Element_Html + */ + public function getReportRulesElement() + { + $element = $this->getElement($this->_reportRulesFieldName); + + if (! $element) { + // Show password info + if ($info = $this->user->reportPasswordWeakness()) { + $element = new MUtil_Form_Element_Html($this->_reportRulesFieldName); + $element->setLabel($this->translate->_('Password rules')); + + if (1 == count($info)) { + $element->div(sprintf($this->translate->_('A password %s.'), reset($info))); + } else { + foreach ($info as &$line) { + $line .= ';'; + } + $line[strlen($line) - 1] = '.'; + + $element->div($this->translate->_('A password:'))->ul($info); + } + $this->addElement($element); + } + } + + return $element; + } + + /** + * Returns/sets a submit button. + * + * @param string $label + * @return Zend_Form_Element_Submit + */ + public function getSubmitButton($label = null) + { + $element = $this->getElement($this->_submitFieldName); + + if (! $element) { + // Submit knop + $element = new Zend_Form_Element_Submit($this->_submitFieldName); + $element->setLabel(null === $label ? $this->translate->_('Save') : $label); + $element->setAttrib('class', 'button'); + + $this->addElement($element); + } + + return $element; + } + + /** + * Validate the form + * + * As it is better for translation utilities to set the labels etc. translated, + * the MUtil default is to disable translation. + * + * However, this also disables the translation of validation messages, which we + * cannot set translated. The MUtil form is extended so it can make this switch. + * + * @param array $data + * @param boolean $disableTranslateValidators Extra switch + * @return boolean + */ + public function isValid($data, $disableTranslateValidators = null) + { + $valid = parent::isValid($data, $disableTranslateValidators); + + if ($valid) { + $this->user->setPassword($data['new_password']); + + } else { + if ($this ->getAskOld() && isset($data['old_password'])) { + if ($data['old_password'] === strtoupper($data['old_password'])) { + $this->addError($this->translate->_('Caps Lock seems to be on!')); + } + } + $this->populate($data); + } + + return $valid; + } + + /** + * The function that determines the element load order + * + * @return Gems_User_Form_LoginForm (continuation pattern) + */ + public function loadDefaultElements() + { + if ($this->getAskOld()) { + $this->getOldPasswordElement(); + } + $this->getNewPasswordElement(); + $this->getRepeatPasswordElement(); + $this->getSubmitButton(); + + if ($this->reportRules) { + $this->getReportRulesElement(); + } + if ($this->useTableLayout) { + /**************** + * Display form * + ****************/ + $this->_table = new MUtil_Html_TableElement(array('class' => 'formTable')); + $this->_table->setAsFormLayout($this, true, true); + $this->_table['tbody'][0][0]->class = 'label'; // Is only one row with formLayout, so all in output fields get class. + } + + return $this; + } + + /** + * Should the form ask for an old password + * + * Enables loading of parameter through Zend_Form::__construct() + * + * @param boolean $askOld + * @return Gems_User_Form_ChangePasswordForm (continuation pattern) + */ + public function setAskOld($askOld = true) + { + $this->askOld = $askOld; + + return $this; + } + + /** + * Should the form report the password rules + * + * Enables loading of parameter through Zend_Form::__construct() + * + * @param boolean $reportRules + * @return Gems_User_Form_ChangePasswordForm (continuation pattern) + */ + public function setReportRules($reportRules = true) + { + $this->reportRules = $reportRules; + + return $this; + } + + /** + * The user to change the password for + * + * Enables loading of parameter through Zend_Form::__construct() + * + * @param Gems_User_User $user + * @return Gems_User_Form_ChangePasswordForm (continuation pattern) + */ + public function setUser(Gems_User_User $user) + { + $this->user = $user; + + return $this; + } + + /** + * Should the form report use the default form table layout + * + * Enables loading of parameter through Zend_Form::__construct() + * + * @param boolean $useTableLayout + * @return Gems_User_Form_ChangePasswordForm (continuation pattern) + */ + public function setUseTableLayout($useTableLayout = true) + { + $this->useTableLayout = $useTableLayout; + + return $this; + } + + /** + * True when this form was submitted. + * + * @return boolean + */ + public function wasSubmitted() + { + return $this->getSubmitButton()->isChecked(); + } +} Modified: trunk/library/classes/Gems/User/Form/LoginForm.php =================================================================== --- trunk/library/classes/Gems/User/Form/LoginForm.php 2012-03-22 11:04:04 UTC (rev 560) +++ trunk/library/classes/Gems/User/Form/LoginForm.php 2012-03-22 15:42:31 UTC (rev 561) @@ -44,7 +44,7 @@ * @license New BSD License * @since Class available since version 1.5 */ -class Gems_User_Form_LoginForm extends Gems_Form +class Gems_User_Form_LoginForm extends Gems_Form_AutoLoadFormAbstract { /** * The field name for the lost password element. @@ -97,14 +97,7 @@ protected $_usernameFieldName = 'userlogin'; /** - * When true all elements are loaded after initiation. * - * @var boolean - */ - protected $loadDefault = true; - - /** - * * @var Gems_Loader */ protected $loader; @@ -151,21 +144,6 @@ protected $util; /** - * Should be called after answering the request to allow the Target - * to check if all required registry values have been set correctly. - * - * @return boolean False if required values are missing. - */ - public function checkRegistryRequestsAnswers() - { - if ($this->loadDefault) { - $this->loadDefaultElements(); - } - - return true; - } - - /** * Returns the organization id that should currently be used for this form. * * @return int Returns the current organization id, if any @@ -406,21 +384,6 @@ } /** - * When true all elements are loaded after initiation. - * - * Enables loading of parameter through Zend_Form::__construct() - * - * @param boolean $loadDefault - * @return Gems_User_Form_LoginForm (continuation pattern) - */ - public function setLoadDefault($loadDefault = true) - { - $this->loadDefault = $loadDefault; - - return $this; - } - - /** * For small numbers of organizations a multiline selectbox will be nice. This * setting handles how many lines will display at once. Use 1 for the normal * dropdown selectbox Modified: trunk/library/classes/Gems/User/User.php =================================================================== --- trunk/library/classes/Gems/User/User.php 2012-03-22 11:04:04 UTC (rev 560) +++ trunk/library/classes/Gems/User/User.php 2012-03-22 15:42:31 UTC (rev 561) @@ -384,6 +384,21 @@ } /** + * Returns a form to change the possword for this user. + * + * @param boolean $askOld Ask for the old password, calculated when not set. + * @return Gems_Form + */ + public function getChangePasswordForm($args_array = null) + { + if (! $this->canSetPassword()) { + return; + } + + return $this->userLoader->getChangePasswordForm($this, func_get_args()); + } + + /** * Returns the organization that is currently used by this user. * * @return Gems_User_Organization @@ -521,72 +536,6 @@ } /** - * Returns a form to change the possword for this user. - * - * @param boolean $askOld Ask for the old password, calculated when not set. - * @return Gems_Form - */ - public function getPasswordChangeForm($askOld = null) - { - if (! $this->canSetPassword()) { - return; - } - - if (null === $askOld) { - // By default only ask for the old password if the user just entered - // it but is required to change it. - $askOld = (! $this->isPasswordResetRequired()); - } - - $form = new Gems_Form(); - - // Never ask for the old password if it does not exist - // - // A password does not always exist, e.g. when using embedded login in Pulse - // or after creating a new user. - if ($askOld && $this->hasPassword()) { - // Field current password - $element = new Zend_Form_Element_Password('old_password'); - $element->setLabel($this->translate->_('Current password')); - $element->setAttrib('size', 10); - $element->setAttrib('maxlength', 20); - $element->setRenderPassword(true); - $element->setRequired(true); - $element->addValidator(new Gems_User_UserPasswordValidator($this, $this->translate)); - $form->addElement($element); - } - - // Field new password - $element = new Zend_Form_Element_Password('new_password'); - $element->setLabel($this->translate->_('New password')); - $element->setAttrib('size', 10); - $element->setAttrib('maxlength', 20); - $element->setRequired(true); - $element->setRenderPassword(true); - $element->addValidator(new Gems_User_UserNewPasswordValidator($this)); - $element->addValidator(new MUtil_Validate_IsConfirmed('repeat_password', $this->translate->_('Repeat password'))); - $form->addElement($element); - - // Field repeat password - $element = new Zend_Form_Element_Password('repeat_password'); - $element->setLabel($this->translate->_('Repeat password')); - $element->setAttrib('size', 10); - $element->setAttrib('maxlength', 20); - $element->setRequired(true); - $element->setRenderPassword(true); - $element->addValidator(new MUtil_Validate_IsConfirmed('new_password', $this->translate->_('New password'))); - $form->addElement($element); - - // Submit button - $element = new Zend_Form_Element_Submit('submit'); - $element->setAttrib('class', 'button'); - $element->setLabel($this->translate->_('Save')); - $form->addElement($element); - - return $form; - } - - /** * Return a password reset key * * @return string Modified: trunk/library/classes/Gems/User/UserLoader.php =================================================================== --- trunk/library/classes/Gems/User/UserLoader.php 2012-03-22 11:04:04 UTC (rev 560) +++ trunk/library/classes/Gems/User/UserLoader.php 2012-03-22 15:42:31 UTC (rev 561) @@ -200,6 +200,22 @@ } /** + * Returns a change password form for this user + * + * @param Gems_user_User $user + * @param mixed $args_array MUtil_Ra::args array for LoginForm initiation. + * @return Gems_User_Form_ChangePasswordForm + */ + public function getChangePasswordForm($user, $args_array = null) + { + $args = MUtil_Ra::args(func_get_args(), array('user' => 'Gems_User_User')); + + $form = $this->_loadClass('Form_ChangePasswordForm', true, array($args)); + + return $form; + } + + /** * Get the currently loggin in user * * @return Gems_User_User @@ -225,7 +241,7 @@ * @param mixed $args_array MUtil_Ra::args array for LoginForm initiation. * @return Gems_User_Form_LoginForm */ - public function getLoginForm($args_array) + public function getLoginForm($args_array = null) { $args = MUtil_Ra::args(func_get_args()); @@ -372,7 +388,7 @@ } /** - * Returns a select statement to find a corresponding user. + * Returns a select statement to find a corresponding user. * * @param string $login_name * @param int $organization Modified: trunk/library/languages/default-en.mo =================================================================== (Binary files differ) Modified: trunk/library/languages/default-en.po =================================================================== --- trunk/library/languages/default-en.po 2012-03-22 11:04:04 UTC (rev 560) +++ trunk/library/languages/default-en.po 2012-03-22 15:42:31 UTC (rev 561) @@ -2,7 +2,7 @@ msgstr "" "Project-Id-Version: Pulse EN\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-03-16 16:16+0100\n" +"POT-Creation-Date: 2012-03-22 16:35+0100\n" "PO-Revision-Date: \n" "Last-Translator: Matijs de Jong <mj...@ma...>\n" "Language-Team: Erasmus MGZ <mat...@ma...>\n" @@ -1042,7 +1042,7 @@ msgstr "%s records found." #: classes/Gems/Default/ExportAction.php:172 -#: classes/Gems/Default/IndexAction.php:203 +#: classes/Gems/Default/IndexAction.php:220 #: classes/Gems/Default/LogAction.php:197 msgid "Organization" msgstr "Organization" @@ -1082,84 +1082,84 @@ msgid "Enter your token..." msgstr "Enter your token..." -#: classes/Gems/Default/IndexAction.php:148 +#: classes/Gems/Default/IndexAction.php:157 #, php-format msgid "Login to %s application" msgstr "Login to %s application" -#: classes/Gems/Default/IndexAction.php:152 +#: classes/Gems/Default/IndexAction.php:169 msgid "Login" msgstr "Login" -#: classes/Gems/Default/IndexAction.php:174 +#: classes/Gems/Default/IndexAction.php:191 msgid "Back to login" msgstr "Back to login" -#: classes/Gems/Default/IndexAction.php:227 +#: classes/Gems/Default/IndexAction.php:244 msgid "Password" msgstr "Password" -#: classes/Gems/Default/IndexAction.php:242 +#: classes/Gems/Default/IndexAction.php:259 #, php-format msgid "Reset password for %s application" msgstr "Reset password for %s application" -#: classes/Gems/Default/IndexAction.php:246 +#: classes/Gems/Default/IndexAction.php:263 msgid "Reset password" msgstr "Reset password" -#: classes/Gems/Default/IndexAction.php:292 +#: classes/Gems/Default/IndexAction.php:309 msgid "Username" msgstr "Username" -#: classes/Gems/Default/IndexAction.php:358 +#: classes/Gems/Default/IndexAction.php:351 msgid "Your password must be changed." msgstr "Your password must be changed." -#: classes/Gems/Default/IndexAction.php:370 +#: classes/Gems/Default/IndexAction.php:363 #, php-format msgid "Login successful, welcome %s." msgstr "Login successful, welcome %s." -#: classes/Gems/Default/IndexAction.php:410 +#: classes/Gems/Default/IndexAction.php:403 #, php-format msgid "Good bye: %s." msgstr "Good bye: %s." -#: classes/Gems/Default/IndexAction.php:435 +#: classes/Gems/Default/IndexAction.php:428 msgid "Reset accepted, enter your new password." msgstr "Reset accepted, enter your new password." -#: classes/Gems/Default/IndexAction.php:439 +#: classes/Gems/Default/IndexAction.php:432 msgid "This key timed out or does not belong to this user." msgstr "This key timed out or does not belong to this user." -#: classes/Gems/Default/IndexAction.php:462 +#: classes/Gems/Default/IndexAction.php:455 msgid "Password reset requested" msgstr "Password reset requested" -#: classes/Gems/Default/IndexAction.php:463 +#: classes/Gems/Default/IndexAction.php:456 #, php-format msgid "To reset your password for %s, please click this link: %s" msgstr "To reset your password for %s, please click this link: %s" -#: classes/Gems/Default/IndexAction.php:468 +#: classes/Gems/Default/IndexAction.php:461 msgid "We sent you an e-mail with a reset link. Click on the link in the e-mail." msgstr "We sent you an e-mail with a reset link. Click on the link in the e-mail." -#: classes/Gems/Default/IndexAction.php:470 +#: classes/Gems/Default/IndexAction.php:463 msgid "Unable to send e-mail." msgstr "Unable to send e-mail." -#: classes/Gems/Default/IndexAction.php:475 +#: classes/Gems/Default/IndexAction.php:468 msgid "No such user found or no e-mail address known or user cannot be reset." msgstr "No such user found or no e-mail address known or user cannot be reset." -#: classes/Gems/Default/IndexAction.php:479 +#: classes/Gems/Default/IndexAction.php:472 msgid "We received your password reset key." msgstr "We received your password reset key." -#: classes/Gems/Default/IndexAction.php:480 +#: classes/Gems/Default/IndexAction.php:473 msgid "Please enter the organization and username belonging to this key." msgstr "Please enter the organization and username belonging to this key." @@ -1440,13 +1440,11 @@ #: classes/Gems/Default/MailServerAction.php:90 #: classes/Gems/Default/SourceAction.php:95 -#: classes/Gems/Default/StaffAction.php:161 msgid "Repeat password" msgstr "Repeat password" #: classes/Gems/Default/MailServerAction.php:91 #: classes/Gems/Default/SourceAction.php:74 -#: classes/Gems/Default/StaffAction.php:120 msgid "Enter only when changing" msgstr "Enter only when changing the password" @@ -1461,8 +1459,8 @@ msgstr "Email servers" #: classes/Gems/Default/MailTemplateAction.php:76 -#: classes/Gems/Default/StaffAction.php:303 -#: classes/Gems/Default/StaffAction.php:336 +#: classes/Gems/Default/StaffAction.php:278 +#: classes/Gems/Default/StaffAction.php:311 msgid "(all organizations)" msgstr "(all organizations)" @@ -1476,56 +1474,40 @@ msgid "Email templates" msgstr "Email templates" -#: classes/Gems/Default/OptionAction.php:79 +#: classes/Gems/Default/OptionAction.php:81 msgid "You are not allowed to change your password." msgstr "You are not allowed to change your password." -#: classes/Gems/Default/OptionAction.php:91 -msgid "Password rules" -msgstr "Password rules" - #: classes/Gems/Default/OptionAction.php:94 -#, php-format -msgid "A password %s." -msgstr "A password %s." - -#: classes/Gems/Default/OptionAction.php:101 -msgid "A password:" -msgstr "A password:" - -#: classes/Gems/Default/OptionAction.php:112 +#: classes/Gems/Default/StaffAction.php:419 msgid "New password is active." msgstr "New password is active." -#: classes/Gems/Default/OptionAction.php:118 -msgid "Caps Lock seems to be on!" -msgstr "Caps Lock seems to be on!" - -#: classes/Gems/Default/OptionAction.php:158 +#: classes/Gems/Default/OptionAction.php:128 msgid "Login Name" msgstr "Login Name" -#: classes/Gems/Default/OptionAction.php:165 +#: classes/Gems/Default/OptionAction.php:135 #: classes/Gems/Default/OrganizationAction.php:129 #: classes/Gems/Default/RespondentAction.php:175 -#: classes/Gems/Default/StaffAction.php:319 +#: classes/Gems/Default/StaffAction.php:294 msgid "Language" msgstr "Language" -#: classes/Gems/Default/OptionAction.php:175 +#: classes/Gems/Default/OptionAction.php:145 #, php-format msgid "Options" msgstr "Options" -#: classes/Gems/Default/OptionAction.php:184 +#: classes/Gems/Default/OptionAction.php:154 msgid "This overview provides information about the last login activity on your account." msgstr "This overview provides information about the last login activity on your account." -#: classes/Gems/Default/OptionAction.php:204 +#: classes/Gems/Default/OptionAction.php:174 msgid "Date / time" msgstr "Date / time" -#: classes/Gems/Default/OptionAction.php:215 +#: classes/Gems/Default/OptionAction.php:185 msgid "Item" msgstr "Item" @@ -1624,7 +1606,7 @@ msgstr "This can not be changed yet" #: classes/Gems/Default/OrganizationAction.php:166 -#: classes/Gems/Default/StaffAction.php:131 +#: classes/Gems/Default/StaffAction.php:119 msgid "User Definition" msgstr "User Definition" @@ -2135,45 +2117,54 @@ msgid "Synchronize all sources." msgstr "Synchronize all sources." -#: classes/Gems/Default/StaffAction.php:137 -msgid "Unsupported UserDefinition" -msgstr "Unsupported UserDefinition" +#: classes/Gems/Default/StaffAction.php:125 +msgid "Unsupported User Definition" +msgstr "Unsupported User Definition" -#: classes/Gems/Default/StaffAction.php:179 +#: classes/Gems/Default/StaffAction.php:154 msgid "Users can only login when this box is checked." msgstr "Users can only login when this box is checked." -#: classes/Gems/Default/StaffAction.php:180 +#: classes/Gems/Default/StaffAction.php:155 msgid "If checked the user will logoff when answering a survey." msgstr "If checked the user will logoff when answering a survey." -#: classes/Gems/Default/StaffAction.php:197 +#: classes/Gems/Default/StaffAction.php:172 msgid "You are not allowed to edit this staff member." msgstr "You are not allowed to edit this staff member." -#: classes/Gems/Default/StaffAction.php:254 +#: classes/Gems/Default/StaffAction.php:229 #, php-format msgid "User with id %s already exists but is deleted, do you want to reactivate the account?" msgstr "User with id %s already exists but is deleted, do you want to reactivate the account?" -#: classes/Gems/Default/StaffAction.php:310 +#: classes/Gems/Default/StaffAction.php:285 msgid "Primary function" msgstr "Primary function" -#: classes/Gems/Default/StaffAction.php:320 +#: classes/Gems/Default/StaffAction.php:295 msgid "Can login" msgstr "Can login" -#: classes/Gems/Default/StaffAction.php:321 +#: classes/Gems/Default/StaffAction.php:296 msgid "Logout on survey" msgstr "Logout on survey" -#: classes/Gems/Default/StaffAction.php:396 +#: classes/Gems/Default/StaffAction.php:371 msgid "staff member" msgid_plural "staff members" msgstr[0] "staff member" msgstr[1] "staff members" +#: classes/Gems/Default/StaffAction.php:403 +#, php-format +msgid "Reset password for: %s" +msgstr "Reset password for: %s" + +#: classes/Gems/Default/StaffAction.php:406 +msgid "You are not allowed to change this password." +msgstr "You are not allowed to change this password." + #: classes/Gems/Default/SurveyAction.php:64 msgid "Add survey" msgstr "Add survey" @@ -2866,41 +2857,41 @@ msgid "Clean cache" msgstr "Clean cache" -#: classes/Gems/Menu/MenuAbstract.php:415 +#: classes/Gems/Menu/MenuAbstract.php:416 msgid "Check status" msgstr "Check status" -#: classes/Gems/Menu/MenuAbstract.php:416 +#: classes/Gems/Menu/MenuAbstract.php:417 msgid "Synchronize surveys" msgstr "Synchronize surveys" -#: classes/Gems/Menu/MenuAbstract.php:417 -#: classes/Gems/Menu/MenuAbstract.php:429 +#: classes/Gems/Menu/MenuAbstract.php:418 +#: classes/Gems/Menu/MenuAbstract.php:430 msgid "Check answers" msgstr "Check answers" -#: classes/Gems/Menu/MenuAbstract.php:418 +#: classes/Gems/Menu/MenuAbstract.php:419 msgid "Check attributes" msgstr "Check attributes" -#: classes/Gems/Menu/MenuAbstract.php:419 +#: classes/Gems/Menu/MenuAbstract.php:420 msgid "Synchronize all surveys" msgstr "Synchronize all surveys" -#: classes/Gems/Menu/MenuAbstract.php:420 -#: classes/Gems/Menu/MenuAbstract.php:430 +#: classes/Gems/Menu/MenuAbstract.php:421 +#: classes/Gems/Menu/MenuAbstract.php:431 msgid "Check all answers" msgstr "Check all answers" -#: classes/Gems/Menu/MenuAbstract.php:426 +#: classes/Gems/Menu/MenuAbstract.php:427 msgid "PDF" msgstr "PDF" -#: classes/Gems/Menu/MenuAbstract.php:460 +#: classes/Gems/Menu/MenuAbstract.php:461 msgid "Check assignments" msgstr "Check assignments" -#: classes/Gems/Menu/MenuAbstract.php:463 +#: classes/Gems/Menu/MenuAbstract.php:464 msgid "Check all assignments" msgstr "Check all assignments" @@ -3106,11 +3097,13 @@ msgstr "Checked %d tokens." #: classes/Gems/Task/Tracker/CheckTrackTokens.php:64 +#: classes/Gems/Tracker/ChangeTracker.php:81 #, php-format msgid "%2$d token date changes in %1$d tracks." msgstr "%2$d token date changes in %1$d tracks." #: classes/Gems/Task/Tracker/CheckTrackTokens.php:67 +#: classes/Gems/Tracker/ChangeTracker.php:64 #, php-format msgid "Checked %d tracks." msgstr "Checked %d tracks." @@ -3617,29 +3610,20 @@ msgid "may not contain numbers" msgstr "may not contain numbers" -#: classes/Gems/User/RadiusUserDefinition.php:175 +#: classes/Gems/User/RadiusUserDefinition.php:178 msgid "Shared secret" msgstr "Shared secret" -#: classes/Gems/User/User.php:538 -msgid "Current password" -msgstr "Current password" - -#: classes/Gems/User/User.php:549 -#: classes/Gems/User/User.php:565 -msgid "New password" -msgstr "New password" - -#: classes/Gems/User/User.php:893 +#: classes/Gems/User/User.php:843 msgid "Cookies must be enabled for this site." msgstr "Cookies must be enabled for this site." -#: classes/Gems/User/UserLoader.php:169 -#: classes/Gems/User/UserLoader.php:183 +#: classes/Gems/User/UserLoader.php:181 +#: classes/Gems/User/UserLoader.php:195 msgid "Db storage" msgstr "Db storage" -#: classes/Gems/User/UserLoader.php:184 +#: classes/Gems/User/UserLoader.php:196 msgid "Radius storage" msgstr "Radius storage" @@ -3647,6 +3631,32 @@ msgid "Wrong password." msgstr "Wrong password." +#: classes/Gems/User/Form/ChangePasswordForm.php:166 +#: classes/Gems/User/Form/ChangePasswordForm.php:222 +msgid "New password" +msgstr "New password" + +#: classes/Gems/User/Form/ChangePasswordForm.php:192 +msgid "Current password" +msgstr "Current password" + +#: classes/Gems/User/Form/ChangePasswordForm.php:243 +msgid "Password rules" +msgstr "Password rules" + +#: classes/Gems/User/Form/ChangePasswordForm.php:246 +#, php-format +msgid "A password %s." +msgstr "A password %s." + +#: classes/Gems/User/Form/ChangePasswordForm.php:253 +msgid "A password:" +msgstr "A password:" + +#: classes/Gems/User/Form/ChangePasswordForm.php:307 +msgid "Caps Lock seems to be on!" +msgstr "Caps Lock seems to be on!" + #: classes/Gems/Util/ReceptionCodeLibrary.php:100 msgid "Yes (forget answers)" msgstr "Yes (forget answers)" Modified: trunk/library/languages/default-nl.mo =================================================================== (Binary files differ) Modified: trunk/library/languages/default-nl.po =================================================================== --- trunk/library/languages/default-nl.po 2012-03-22 11:04:04 UTC (rev 560) +++ trunk/library/languages/default-nl.po 2012-03-22 15:42:31 UTC (rev 561) @@ -2,7 +2,7 @@ msgstr "" "Project-Id-Version: Pulse NL\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-03-16 16:15+0100\n" +"POT-Creation-Date: 2012-03-22 16:35+0100\n" "PO-Revision-Date: \n" "Last-Translator: Matijs de Jong <mj...@ma...>\n" "Language-Team: Erasmus MGZ <mat...@ma...>\n" @@ -1042,7 +1042,7 @@ msgstr "%s records gevonden." #: classes/Gems/Default/ExportAction.php:172 -#: classes/Gems/Default/IndexAction.php:203 +#: classes/Gems/Default/IndexAction.php:220 #: classes/Gems/Default/LogAction.php:197 msgid "Organization" msgstr "Organisatie" @@ -1082,84 +1082,84 @@ msgid "Enter your token..." msgstr "Voer uw kenmerk in..." -#: classes/Gems/Default/IndexAction.php:148 +#: classes/Gems/Default/IndexAction.php:157 #, php-format msgid "Login to %s application" msgstr "%s login" -#: classes/Gems/Default/IndexAction.php:152 +#: classes/Gems/Default/IndexAction.php:169 msgid "Login" msgstr "Inloggen" -#: classes/Gems/Default/IndexAction.php:174 +#: classes/Gems/Default/IndexAction.php:191 msgid "Back to login" msgstr "Terug naar de login" -#: classes/Gems/Default/IndexAction.php:227 +#: classes/Gems/Default/IndexAction.php:244 msgid "Password" msgstr "Wachtwoord" -#: classes/Gems/Default/IndexAction.php:242 +#: classes/Gems/Default/IndexAction.php:259 #, php-format msgid "Reset password for %s application" msgstr "Reset wachtwoord voor %s" -#: classes/Gems/Default/IndexAction.php:246 +#: classes/Gems/Default/IndexAction.php:263 msgid "Reset password" msgstr "Reset wachtwoord" -#: classes/Gems/Default/IndexAction.php:292 +#: classes/Gems/Default/IndexAction.php:309 msgid "Username" msgstr "Gebruikersnaam" -#: classes/Gems/Default/IndexAction.php:358 +#: classes/Gems/Default/IndexAction.php:351 msgid "Your password must be changed." msgstr "Uw wachtwoord moet veranderd worden." -#: classes/Gems/Default/IndexAction.php:370 +#: classes/Gems/Default/IndexAction.php:363 #, php-format msgid "Login successful, welcome %s." msgstr "Login in orde, welkom %s." -#: classes/Gems/Default/IndexAction.php:410 +#: classes/Gems/Default/IndexAction.php:403 #, php-format msgid "Good bye: %s." msgstr "Tot ziens: %s." -#: classes/Gems/Default/IndexAction.php:435 +#: classes/Gems/Default/IndexAction.php:428 msgid "Reset accepted, enter your new password." msgstr "Reset geaccepteerd, voer uw nieuwe wachtwoord in." -#: classes/Gems/Default/IndexAction.php:439 +#: classes/Gems/Default/IndexAction.php:432 msgid "This key timed out or does not belong to this user." msgstr "Te oude sleutel of sleutel hoort niet bij gebruiker." -#: classes/Gems/Default/IndexAction.php:462 +#: classes/Gems/Default/IndexAction.php:455 msgid "Password reset requested" msgstr "Wachtwoord reset aangevraagd" -#: classes/Gems/Default/IndexAction.php:463 +#: classes/Gems/Default/IndexAction.php:456 #, php-format msgid "To reset your password for %s, please click this link: %s" msgstr "Om uw wachtwoord voor %s te resetten, klik op deze link: %s" -#: classes/Gems/Default/IndexAction.php:468 +#: classes/Gems/Default/IndexAction.php:461 msgid "We sent you an e-mail with a reset link. Click on the link in the e-mail." msgstr "We hebben u een email met reset link gestuurd. Klik op de link in de email." -#: classes/Gems/Default/IndexAction.php:470 +#: classes/Gems/Default/IndexAction.php:463 msgid "Unable to send e-mail." msgstr "Verzenden e-mail mislukt." -#: classes/Gems/Default/IndexAction.php:475 +#: classes/Gems/Default/IndexAction.php:468 msgid "No such user found or no e-mail address known or user cannot be reset." msgstr "Gebruiker niet gevonden of e-mail adres onbekend of gebruiker kan niet gereset worden." -#: classes/Gems/Default/IndexAction.php:479 +#: classes/Gems/Default/IndexAction.php:472 msgid "We received your password reset key." msgstr "Wachtwoord resetsleutel ontvangen." -#: classes/Gems/Default/IndexAction.php:480 +#: classes/Gems/Default/IndexAction.php:473 msgid "Please enter the organization and username belonging to this key." msgstr "Geef de organisatie en gebruikersnaam die bij deze sleutel horen op." @@ -1440,13 +1440,11 @@ #: classes/Gems/Default/MailServerAction.php:90 #: classes/Gems/Default/SourceAction.php:95 -#: classes/Gems/Default/StaffAction.php:161 msgid "Repeat password" msgstr "Herhaal wachtwoord" #: classes/Gems/Default/MailServerAction.php:91 #: classes/Gems/Default/SourceAction.php:74 -#: classes/Gems/Default/StaffAction.php:120 msgid "Enter only when changing" msgstr "Alleen invoeren om het wachtwoord te wijzigen" @@ -1461,8 +1459,8 @@ msgstr "Email servers" #: classes/Gems/Default/MailTemplateAction.php:76 -#: classes/Gems/Default/StaffAction.php:303 -#: classes/Gems/Default/StaffAction.php:336 +#: classes/Gems/Default/StaffAction.php:278 +#: classes/Gems/Default/StaffAction.php:311 msgid "(all organizations)" msgstr "(alle organisaties)" @@ -1476,56 +1474,40 @@ msgid "Email templates" msgstr "Email sjabloon" -#: classes/Gems/Default/OptionAction.php:79 +#: classes/Gems/Default/OptionAction.php:81 msgid "You are not allowed to change your password." msgstr "U mag uw wachtwoord niet wijzigen." -#: classes/Gems/Default/OptionAction.php:91 -msgid "Password rules" -msgstr "Wachtwoord regels" - #: classes/Gems/Default/OptionAction.php:94 -#, php-format -msgid "A password %s." -msgstr "Een wachtwoord %s." - -#: classes/Gems/Default/OptionAction.php:101 -msgid "A password:" -msgstr "Een wachtwoord:" - -#: classes/Gems/Default/OptionAction.php:112 +#: classes/Gems/Default/StaffAction.php:419 msgid "New password is active." msgstr "Nieuwe wachtwoord geactiveerd." -#: classes/Gems/Default/OptionAction.php:118 -msgid "Caps Lock seems to be on!" -msgstr "De Caps Lock toets lijkt aan te staan!" - -#: classes/Gems/Default/OptionAction.php:158 +#: classes/Gems/Default/OptionAction.php:128 msgid "Login Name" msgstr "Login Naam" -#: classes/Gems/Default/OptionAction.php:165 +#: classes/Gems/Default/OptionAction.php:135 #: classes/Gems/Default/OrganizationAction.php:129 #: classes/Gems/Default/RespondentAction.php:175 -#: classes/Gems/Default/StaffAction.php:319 +#: classes/Gems/Default/StaffAction.php:294 msgid "Language" msgstr "Taal" -#: classes/Gems/Default/OptionAction.php:175 +#: classes/Gems/Default/OptionAction.php:145 #, php-format msgid "Options" msgstr "Instellingen" -#: classes/Gems/Default/OptionAction.php:184 +#: classes/Gems/Default/OptionAction.php:154 msgid "This overview provides information about the last login activity on your account." msgstr "Dit overzicht geeft informatie over de recente inlog activiteit op uw account." -#: classes/Gems/Default/OptionAction.php:204 +#: classes/Gems/Default/OptionAction.php:174 msgid "Date / time" msgstr "Datum / tijd" -#: classes/Gems/Default/OptionAction.php:215 +#: classes/Gems/Default/OptionAction.php:185 msgid "Item" msgstr "Item" @@ -1624,7 +1606,7 @@ msgstr "Dit kan nog niet gewijzigd worden" #: classes/Gems/Default/OrganizationAction.php:166 -#: classes/Gems/Default/StaffAction.php:131 +#: classes/Gems/Default/StaffAction.php:119 msgid "User Definition" msgstr "User Definition" @@ -2135,45 +2117,54 @@ msgid "Synchronize all sources." msgstr "Synchroniseer alle bronnen." -#: classes/Gems/Default/StaffAction.php:137 -msgid "Unsupported UserDefinition" -msgstr "Onebekende UserDefinition" +#: classes/Gems/Default/StaffAction.php:125 +msgid "Unsupported User Definition" +msgstr "Onbekende User Definition" -#: classes/Gems/Default/StaffAction.php:179 +#: classes/Gems/Default/StaffAction.php:154 msgid "Users can only login when this box is checked." msgstr "Gebruikers kunnen alleen inloggen als dit is aangevinkt." -#: classes/Gems/Default/StaffAction.php:180 +#: classes/Gems/Default/StaffAction.php:155 msgid "If checked the user will logoff when answering a survey." msgstr "Indien actief, dan logt de gebruiker uit voor het beantwoorden van een vragenlijst." -#: classes/Gems/Default/StaffAction.php:197 +#: classes/Gems/Default/StaffAction.php:172 msgid "You are not allowed to edit this staff member." msgstr "U mag deze medewerker niet wijzigen." -#: classes/Gems/Default/StaffAction.php:254 +#: classes/Gems/Default/StaffAction.php:229 #, php-format msgid "User with id %s already exists but is deleted, do you want to reactivate the account?" msgstr "Gebruiker met inlognaam %s bestaat al maar is verwijderd, wilt u het account opnieuw activeren?" -#: classes/Gems/Default/StaffAction.php:310 +#: classes/Gems/Default/StaffAction.php:285 msgid "Primary function" msgstr "Primaire functie" -#: classes/Gems/Default/StaffAction.php:320 +#: classes/Gems/Default/StaffAction.php:295 msgid "Can login" msgstr "Kan inloggen" -#: classes/Gems/Default/StaffAction.php:321 +#: classes/Gems/Default/StaffAction.php:296 msgid "Logout on survey" msgstr "Logout bij beantwoorden vragenlijst" -#: classes/Gems/Default/StaffAction.php:396 +#: classes/Gems/Default/StaffAction.php:371 msgid "staff member" msgid_plural "staff members" msgstr[0] "medewerker" msgstr[1] "medewerkers" +#: classes/Gems/Default/StaffAction.php:403 +#, php-format +msgid "Reset password for: %s" +msgstr "Verander het wachtwoord voor: %s" + +#: classes/Gems/Default/StaffAction.php:406 +msgid "You are not allowed to change this password." +msgstr "U mag dit wachtwoord niet wijzigen." + #: classes/Gems/Default/SurveyAction.php:64 msgid "Add survey" msgstr "Vragenlijst toevoegen" @@ -2866,41 +2857,41 @@ msgid "Clean cache" msgstr "Cache opruimen" -#: classes/Gems/Menu/MenuAbstract.php:415 +#: classes/Gems/Menu/MenuAbstract.php:416 msgid "Check status" msgstr "Status controle" -#: classes/Gems/Menu/MenuAbstract.php:416 +#: classes/Gems/Menu/MenuAbstract.php:417 msgid "Synchronize surveys" msgstr "Synchroniseer vragenlijsten" -#: classes/Gems/Menu/MenuAbstract.php:417 -#: classes/Gems/Menu/MenuAbstract.php:429 +#: classes/Gems/Menu/MenuAbstract.php:418 +#: classes/Gems/Menu/MenuAbstract.php:430 msgid "Check answers" msgstr "Antwoord controle... [truncated message content] |
From: <gem...@li...> - 2012-03-22 16:35:51
|
Revision: 562 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=562&view=rev Author: matijsdejong Date: 2012-03-22 16:35:44 +0000 (Thu, 22 Mar 2012) Log Message: ----------- OldStaffUserDefinition.php user can now have a password reset No more adding . 'Definition' to the end of all calls to getUserDefinition() Modified Paths: -------------- trunk/library/classes/Gems/Model/OrganizationModel.php trunk/library/classes/Gems/User/OldStaffUserDefinition.php trunk/library/classes/Gems/User/UserLoader.php trunk/library/snippets/Organization/OrganizationEditSnippet.php Modified: trunk/library/classes/Gems/Model/OrganizationModel.php =================================================================== --- trunk/library/classes/Gems/Model/OrganizationModel.php 2012-03-22 15:42:31 UTC (rev 561) +++ trunk/library/classes/Gems/Model/OrganizationModel.php 2012-03-22 16:35:44 UTC (rev 562) @@ -128,8 +128,7 @@ //Now check if we need to save config values if (isset($newValues['gor_user_class']) && !empty($newValues['gor_user_class'])) { - $class = $newValues['gor_user_class'] . 'Definition'; - $definition = $this->loader->getUserLoader()->getUserDefinition($class); + $definition = $this->loader->getUserLoader()->getUserDefinition($newValues['gor_user_class']); if ($definition instanceof Gems_User_UserDefinitionConfigurableInterface && $definition->hasConfig()) { $savedValues['config'] = $definition->saveConfig($savedValues,$newValues['config']); @@ -147,8 +146,7 @@ $data = parent::loadFirst($filter, $sort); if (isset($data['gor_user_class']) && !empty($data['gor_user_class'])) { - $class = $data['gor_user_class'] . 'Definition'; - $definition = $this->loader->getUserLoader()->getUserDefinition($class); + $definition = $this->loader->getUserLoader()->getUserDefinition($data['gor_user_class']); if ($definition instanceof Gems_User_UserDefinitionConfigurableInterface && $definition->hasConfig()) { $data['config'] = $definition->loadConfig($data); Modified: trunk/library/classes/Gems/User/OldStaffUserDefinition.php =================================================================== --- trunk/library/classes/Gems/User/OldStaffUserDefinition.php 2012-03-22 15:42:31 UTC (rev 561) +++ trunk/library/classes/Gems/User/OldStaffUserDefinition.php 2012-03-22 16:35:44 UTC (rev 562) @@ -72,54 +72,25 @@ $login_name = $formValues['userlogin']; $organization = $formValues['organization']; $password = $formValues['password']; - $userData = $this->getUserData($formValues['userlogin'], $formValues['organization']); - $staff_id = $userData['user_id']; - - $sql = 'SELECT gul_id_user FROM gems__user_logins WHERE gul_can_login = 1 AND gul_login = ? AND gul_id_organization = ?'; - - try { - $user_id = $this->db->fetchOne($sql, array($login_name, $organization)); - - $currentTimestamp = new Zend_Db_Expr('CURRENT_TIMESTAMP'); - - // Move to USER_STAFF - $values['gup_id_user'] = $user_id; - $values['gup_password'] = $this->project->getValueHash($password); - $values['gup_reset_key'] = null; - $values['gup_reset_requested'] = null; - $values['gup_reset_required'] = 0; - $values['gup_changed'] = $currentTimestamp ; - $values['gup_changed_by'] = $staff_id; - $values['gup_created'] = $currentTimestamp ; - $values['gup_created_by'] = $staff_id; - - $this->db->insert('gems__user_passwords', $values); - - // Update user class - $values = array(); - $values['gul_user_class'] = Gems_User_UserLoader::USER_STAFF; - $values['gul_changed'] = $currentTimestamp ; - $values['gul_changed_by'] = $staff_id; - $this->db->update('gems__user_logins', $values, $this->db->quoteInto('gul_id_user = ?', $user_id)); - - // Remove old password - $values = array(); - $values['gsf_password'] = null; - $values['gsf_changed'] = $currentTimestamp ; - $values['gsf_changed_by'] = $user_id; - - $this->db->update('gems__staff', $values, $this->db->quoteInto('gsf_id_user = ?', $staff_id)); - - } catch (Zend_Db_Exception $e) { - GemsEscort::getInstance()->logger->log($e->getMessage(), Zend_Log::ERR); - // Fall through as this does not work if the database upgrade did not run - // MUtil_Echo::r($e); - - } + $this->makeNewStaffUser($login_name, $organization, $password); } } /** + * Return true if the password can be set. + * + * Returns the setting for the definition whan no user is passed, otherwise + * returns the answer for this specific user. + * + * @param Gems_User_User $user Optional, the user whose password might change + * @return boolean + */ + public function canSetPassword(Gems_User_User $user = null) + { + return true; + } + + /** * Returns an initialized Zend_Auth_Adapter_Interface * * @param string $username @@ -213,8 +184,81 @@ * @param string $password * @return string */ + protected function hashNewPassword($password) + { + return $this->project->getValueHash($password); + } + + /** + * Allow overruling of password hashing. + * + * @param string $password + * @return string + */ protected function hashPassword($password) { return md5($password); } + + protected function makeNewStaffUser($login_name, $organization, $password) + { + $userData = $this->getUserData($login_name, $organization); + $staff_id = $userData['user_id']; + + $sql = 'SELECT gul_id_user FROM gems__user_logins WHERE gul_can_login = 1 AND gul_login = ? AND gul_id_organization = ?'; + + try { + $user_id = $this->db->fetchOne($sql, array($login_name, $organization)); + + $currentTimestamp = new Zend_Db_Expr('CURRENT_TIMESTAMP'); + + // Move to USER_STAFF + $values['gup_id_user'] = $user_id; + $values['gup_password'] = $this->hashNewPassword($password); + $values['gup_reset_key'] = null; + $values['gup_reset_requested'] = null; + $values['gup_reset_required'] = 0; + $values['gup_changed'] = $currentTimestamp ; + $values['gup_changed_by'] = $staff_id; + $values['gup_created'] = $currentTimestamp ; + $values['gup_created_by'] = $staff_id; + + $this->db->insert('gems__user_passwords', $values); + + // Update user class + $values = array(); + $values['gul_user_class'] = Gems_User_UserLoader::USER_STAFF; + $values['gul_changed'] = $currentTimestamp ; + $values['gul_changed_by'] = $staff_id; + $this->db->update('gems__user_logins', $values, $this->db->quoteInto('gul_id_user = ?', $user_id)); + + // Remove old password + $values = array(); + $values['gsf_password'] = null; + $values['gsf_changed'] = $currentTimestamp ; + $values['gsf_changed_by'] = $user_id; + + $this->db->update('gems__staff', $values, $this->db->quoteInto('gsf_id_user = ?', $staff_id)); + + } catch (Zend_Db_Exception $e) { + GemsEscort::getInstance()->logger->log($e->getMessage(), Zend_Log::ERR); + // Fall through as this does not work if the database upgrade did not run + // MUtil_Echo::r($e); + + } + } + + /** + * Set the password, if allowed for this user type. + * + * @param Gems_User_User $user The user whose password to change + * @param string $password + * @return Gems_User_UserDefinitionInterface (continuation pattern) + */ + public function setPassword(Gems_User_User $user, $password) + { + $this->makeNewStaffUser($user->getLoginName(), $user->getBaseOrganizationId(), $password); + + return $this; + } } \ No newline at end of file Modified: trunk/library/classes/Gems/User/UserLoader.php =================================================================== --- trunk/library/classes/Gems/User/UserLoader.php 2012-03-22 15:42:31 UTC (rev 561) +++ trunk/library/classes/Gems/User/UserLoader.php 2012-03-22 16:35:44 UTC (rev 562) @@ -225,7 +225,7 @@ if (! self::$currentUser) { if ($this->session->__isset('__user_definition')) { $defName = $this->session->__get('__user_definition'); - self::$currentUser = $this->_loadClass('User', true, array($this->session, $this->_getClass($defName))); + self::$currentUser = $this->_loadClass('User', true, array($this->session, $this->_getClass($defName . 'Definition'))); } else { self::$currentUser = $this->getUser(null, null); self::$currentUser->setAsCurrentUser(); @@ -295,13 +295,12 @@ */ public function getUser($login_name, $currentOrganization) { - list($defName, $userOrganization, $userName) = $this->getUserClassInfo($login_name, $currentOrganization); - $user = $this->loadUser($defName, $userOrganization, $userName); + $user = $this->getUserClass($login_name, $currentOrganization); // Check: can the user log in as this organization, if not load non-existing user $orgs = $user->getAllowedOrganizations(); if (! isset($orgs[$currentOrganization])) { - $user = $this->loadUser(self::USER_NOLOGIN . 'Definition', $currentOrganization, $login_name); + $user = $this->loadUser(self::USER_NOLOGIN, $currentOrganization, $login_name); } $user->setCurrentOrganization($currentOrganization); @@ -332,15 +331,15 @@ * * @param string $login_name * @param int $organization - * @return array Containing definitionName, organizationId, (real) userName + * @return Gems_User_User But ! ->isActive when the user does not exist */ - protected function getUserClassInfo($login_name, $organization) + protected function getUserClass($login_name, $organization) { if ((null == $login_name) || (null == $organization)) { - return array(self::USER_NOLOGIN . 'Definition', $organization, $login_name); + return $this->loadUser(self::USER_NOLOGIN, $organization, $login_name); } if ($this->isProjectUser($login_name)) { - return array(self::USER_PROJECT . 'Definition', $organization, $login_name); + return $this->loadUser(self::USER_PROJECT, $organization, $login_name); } try { @@ -348,7 +347,7 @@ if ($row = $this->db->fetchRow($select, null, Zend_Db::FETCH_NUM)) { // MUtil_Echo::track($row); - return $row; + return $this->loadUser($row[0], $row[1], $row[2]); } } catch (Zend_Db_Exception $e) { @@ -363,7 +362,7 @@ gems__organizations ON gsf_id_organization = gor_id_organization WHERE gor_active = 1 AND gsf_active = 1 AND gsf_login = ? AND gsf_id_organization = ?"; - if ($user_id = $this->db->fetchOne($sql, $params)) { + if ($user_id = $this->db->fetchOne($sql, array($login_name, $organization))) { // Move user to new staff. $values['gul_login'] = $login_name; $values['gul_id_organization'] = $organization; @@ -381,10 +380,10 @@ // MUtil_Echo::r($e); } - return array(self::USER_OLD_STAFF . 'Definition', $organization, $login_name); + return $this->loadUser(self::USER_OLD_STAFF, $organization, $login_name); } - return array(self::USER_NOLOGIN . 'Definition', $organization, $login_name); + return $this->loadUser(self::USER_NOLOGIN, $organization, $login_name); } /** @@ -398,7 +397,7 @@ { $select = $this->db->select(); - $select->from('gems__user_logins', array("CONCAT(gul_user_class, 'Definition')", 'gul_id_organization', 'gul_login')) + $select->from('gems__user_logins', array("gul_user_class", 'gul_id_organization', 'gul_login')) ->from('gems__organizations', array()) ->where('gor_active = 1') ->where('gul_can_login = 1') @@ -433,7 +432,7 @@ */ public function getUserDefinition($userClassName) { - $definition = $this->_getClass($userClassName); + $definition = $this->_getClass($userClassName . 'Definition'); return $definition; } Modified: trunk/library/snippets/Organization/OrganizationEditSnippet.php =================================================================== --- trunk/library/snippets/Organization/OrganizationEditSnippet.php 2012-03-22 15:42:31 UTC (rev 561) +++ trunk/library/snippets/Organization/OrganizationEditSnippet.php 2012-03-22 16:35:44 UTC (rev 562) @@ -95,7 +95,7 @@ $model->set('gor_accessible_by', 'multiOptions', $multiOptions); } $this->addItems($bridge, 'gor_has_login', 'gor_add_respondents', 'gor_respondent_group', 'gor_accessible_by'); - + //Show what organizations we can access if (isset($this->formData['gor_id_organization']) && !empty($this->formData['gor_id_organization'])) { $org = $this->loader->getOrganization($this->formData['gor_id_organization']); @@ -109,8 +109,7 @@ $this->addItems($bridge, 'gor_user_class'); if (isset($this->formData['gor_user_class']) && !empty($this->formData['gor_user_class'])) { - $class = $this->formData['gor_user_class'] . 'Definition'; - $definition = $this->loader->getUserLoader()->getUserDefinition($class); + $definition = $this->loader->getUserLoader()->getUserDefinition($this->formData['gor_user_class']); if ($definition instanceof Gems_User_UserDefinitionConfigurableInterface && $definition->hasConfig()) { $definition->appendConfigFields($bridge); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2012-03-23 18:23:15
|
Revision: 564 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=564&view=rev Author: matijsdejong Date: 2012-03-23 18:23:04 +0000 (Fri, 23 Mar 2012) Log Message: ----------- Password validated in login form OldStyle staff users are upgraded to new style staff users during login Authentication easier to extend / adapt Fixed temp fix in svn update 552 with callable (in project using it) Modified Paths: -------------- trunk/library/changelog.txt trunk/library/classes/Gems/Default/IndexAction.php trunk/library/classes/Gems/Project/ProjectSettings.php trunk/library/classes/Gems/User/DbUserDefinitionAbstract.php trunk/library/classes/Gems/User/Form/ChangePasswordForm.php trunk/library/classes/Gems/User/Form/LoginForm.php trunk/library/classes/Gems/User/NoLoginDefinition.php trunk/library/classes/Gems/User/OldStaffUserDefinition.php trunk/library/classes/Gems/User/ProjectUserDefinition.php trunk/library/classes/Gems/User/RadiusUserDefinition.php trunk/library/classes/Gems/User/User.php trunk/library/classes/Gems/User/UserDefinitionInterface.php trunk/library/classes/Gems/User/UserLoader.php trunk/library/classes/MUtil/Model/DatabaseModelAbstract.php trunk/library/classes/MUtil/Model/TableBridgeAbstract.php trunk/library/configs/db/patches.sql trunk/library/configs/db/tables/gems__user_login_attempts.10.sql Added Paths: ----------- trunk/library/classes/Gems/User/Validate/ trunk/library/classes/Gems/User/Validate/GetUserInterface.php trunk/library/classes/Gems/User/Validate/GetUserPasswordValidator.php trunk/library/classes/Gems/User/Validate/NewPasswordValidator.php trunk/library/classes/Gems/User/Validate/PasswordValidatorAbstract.php trunk/library/classes/Gems/User/Validate/UserPasswordValidator.php Removed Paths: ------------- trunk/library/classes/Gems/User/UserNewPasswordValidator.php trunk/library/classes/Gems/User/UserPasswordValidator.php Modified: trunk/library/changelog.txt =================================================================== --- trunk/library/changelog.txt 2012-03-22 17:05:18 UTC (rev 563) +++ trunk/library/changelog.txt 2012-03-23 18:23:04 UTC (rev 564) @@ -1,3 +1,12 @@ +Important changes from 1.5.2 => 1.5.3 +============================================================ +People can login using their e-amil address as user name. +Showing a list of organizations to choose during login happens except when 1) there is only one organization or 2) a url is used that is assigned to a specific organization. +Login & other password forms are now easy to customize on a per project basis. +Login and authorizaiton rules are easier to extend. +Alll password rules are reported during reset. + + Important changes from 1.5.1 => 1.5.2 ============================================================ Renamed project.ini setting concentRejected to consentRejected Modified: trunk/library/classes/Gems/Default/IndexAction.php =================================================================== --- trunk/library/classes/Gems/Default/IndexAction.php 2012-03-22 17:05:18 UTC (rev 563) +++ trunk/library/classes/Gems/Default/IndexAction.php 2012-03-23 18:23:04 UTC (rev 564) @@ -161,7 +161,7 @@ Gems_Html::init(); return $this->loader->getUserLoader()->getLoginForm($args); - + /* $form = $this->_getBasicForm(); $form->addElement($this->_getOrganizationElement()); $form->addElement($this->_getUserLoginElement()); @@ -175,7 +175,7 @@ $form->addElement($this->_getResetLinkElement()); } - return $form; + return $form; // */ } /** @@ -330,64 +330,54 @@ if ($request->isPost()) { if ($form->isValid($request->getPost(), false)) { + $user = $form->getUser(); - $user = $this->loader->getUser($request->getParam('userlogin'), $request->getParam('organization')); + $previousRequestParameters = $this->session->previousRequestParameters; - // NO!!! DO not test! Otherwise it is easy to test which users exist. - // if ($user->isActive()) { - $formValues = $form->getValues(); - $authResult = $user->authenticate($formValues); + $user->setAsCurrentUser(); - if ($authResult->isValid()) { - $previousRequestParameters = $this->session->previousRequestParameters; + if ($messages = $user->reportPasswordWeakness($request->getParam($form->passwordFieldName))) { + $user->setPasswordResetRequired(true); + $this->addMessage($this->_('Your password must be changed.')); + $this->addMessage($messages); + } - $user->setAsCurrentUser(); + /** + * Fix current locale in cookies + */ + Gems_Cookies::setLocale($user->getLocale(), $this->basepath->getBasePath()); - $user->afterLogin($form->getValues()); + /** + * Ready + */ + $this->addMessage(sprintf($this->_('Login successful, welcome %s.'), $user->getFullName())); - //* - if ($messages = $user->reportPasswordWeakness($request->getParam('password'))) { - $user->setPasswordResetRequired(true); - $this->addMessage($this->_('Your password must be changed.')); - $this->addMessage($messages); - } // */ + /** + * Log the login + */ + Gems_AccessLog::getLog($this->db)->log("index.login", $this->getRequest(), null, $user->getUserId(), true); - /** - * Fix current locale in cookies - */ - Gems_Cookies::setLocale($user->getLocale(), $this->basepath->getBasePath()); - - /** - * Ready - */ - $this->addMessage(sprintf($this->_('Login successful, welcome %s.'), $user->getFullName())); - - /** - * Log the login - */ - Gems_AccessLog::getLog($this->db)->log("index.login", $this->getRequest(), null, $user->getUserId(), true); - - if ($previousRequestParameters) { - $this->_reroute(array('controller' => $previousRequestParameters['controller'], 'action' => $previousRequestParameters['action']), false); - } else { - // This reroutes to the first available menu page after login. - // - // Do not user $user->gotoStartPage() as the menu is still set - // for no login. - $this->_reroute(array('controller' => null, 'action' => null), true); - } - return; + if ($previousRequestParameters) { + $this->_reroute(array('controller' => $previousRequestParameters['controller'], 'action' => $previousRequestParameters['action']), false); } else { - //Now present the user with an error message - $errors = $authResult->getMessages(); - $this->addMessage($errors); - - //Also log the error to the log table - //when the project has logging enabled - $logErrors = join(' - ', $errors); - $log = Gems_AccessLog::getLog(); - $log->log('loginFail', $this->getRequest(), sprintf('Failed login for : %s (%s) - %s', $formValues['userlogin'], $formValues['organization'], $logErrors), null, true); + // This reroutes to the first available menu page after login. + // + // Do not user $user->gotoStartPage() as the menu is still set + // for no login. + $this->_reroute(array('controller' => null, 'action' => null), true); } + return; + } else { + //Now present the user with an error message + $errors = $form->getErrorMessages(); + $this->addMessage($errors); + + //Also log the error to the log table + //when the project has logging enabled + $logErrors = join(' - ', $errors); + $msg = sprintf('Failed login for : %s (%s) - %s', $request->getParam($form->usernameFieldName), $request->getParam($form->organizationFieldName), $logErrors); + $log = Gems_AccessLog::getLog(); + $log->log('loginFail', $this->getRequest(), $msg, null, true); } } $this->view->form = $form; Modified: trunk/library/classes/Gems/Project/ProjectSettings.php =================================================================== --- trunk/library/classes/Gems/Project/ProjectSettings.php 2012-03-22 17:05:18 UTC (rev 563) +++ trunk/library/classes/Gems/Project/ProjectSettings.php 2012-03-23 18:23:04 UTC (rev 564) @@ -187,20 +187,6 @@ } /** - * Returns the factor used to delay account reloading. - * - * @return int - */ - public function getAccountDelayFactor() - { - if ($this->offsetExists('account') && isset($this->account['delayFactor'])) { - return intval($this->account['delayFactor']); - } else { - return 4; - } - } - - /** * Returns an array with throttling settings for the ask * controller * Modified: trunk/library/classes/Gems/User/DbUserDefinitionAbstract.php =================================================================== --- trunk/library/classes/Gems/User/DbUserDefinitionAbstract.php 2012-03-22 17:05:18 UTC (rev 563) +++ trunk/library/classes/Gems/User/DbUserDefinitionAbstract.php 2012-03-23 18:23:04 UTC (rev 564) @@ -123,12 +123,11 @@ /** * Returns an initialized Zend_Auth_Adapter_Interface * - * @param string $username - * @param int $organizationId + * @param Gems_User_User $user * @param string $password * @return Zend_Auth_Adapter_Interface */ - public function getAuthAdapter($username, $organizationId, $password) + public function getAuthAdapter(Gems_User_User $user, $password) { $adapter = new Zend_Auth_Adapter_DbTable($this->db, 'gems__user_passwords', 'gul_login', 'gup_password'); @@ -137,9 +136,9 @@ $select = $adapter->getDbSelect(); $select->join('gems__user_logins', 'gup_id_user = gul_id_user', array()) ->where('gul_can_login = 1') - ->where('gul_id_organization = ?', $organizationId); + ->where('gul_id_organization = ?', $user->getBaseOrganizationId()); - $adapter->setIdentity($username) + $adapter->setIdentity($user->getLoginName()) ->setCredential($pwd_hash); return $adapter; Modified: trunk/library/classes/Gems/User/Form/ChangePasswordForm.php =================================================================== --- trunk/library/classes/Gems/User/Form/ChangePasswordForm.php 2012-03-22 17:05:18 UTC (rev 563) +++ trunk/library/classes/Gems/User/Form/ChangePasswordForm.php 2012-03-23 18:23:04 UTC (rev 564) @@ -168,7 +168,7 @@ $element->setAttrib('maxlength', 20); $element->setRequired(true); $element->setRenderPassword(true); - $element->addValidator(new Gems_User_UserNewPasswordValidator($this->user)); + $element->addValidator(new Gems_User_Validate_NewPasswordValidator($this->user)); $element->addValidator(new MUtil_Validate_IsConfirmed($this->_repeatPasswordFieldName, $this->translate->_('Repeat password'))); $this->addElement($element); @@ -194,7 +194,7 @@ $element->setAttrib('maxlength', 20); $element->setRenderPassword(true); $element->setRequired(true); - $element->addValidator(new Gems_User_UserPasswordValidator($this->user, $this->translate)); + $element->addValidator(new Gems_User_Validate_UserPasswordValidator($this->user, $this->translate->_('Wrong password.'))); $this->addElement($element); } Modified: trunk/library/classes/Gems/User/Form/LoginForm.php =================================================================== --- trunk/library/classes/Gems/User/Form/LoginForm.php 2012-03-22 17:05:18 UTC (rev 563) +++ trunk/library/classes/Gems/User/Form/LoginForm.php 2012-03-23 18:23:04 UTC (rev 564) @@ -44,7 +44,7 @@ * @license New BSD License * @since Class available since version 1.5 */ -class Gems_User_Form_LoginForm extends Gems_Form_AutoLoadFormAbstract +class Gems_User_Form_LoginForm extends Gems_Form_AutoLoadFormAbstract implements Gems_User_Validate_GetUserInterface { /** * The field name for the lost password element. @@ -54,14 +54,6 @@ protected $_lostPasswordFieldName = 'lost_password'; /** - * The field name for the organization element. - * - * @var string - */ - protected $_organizationFieldName = 'organization'; - - - /** * When true the organization was derived from the the url * * @var boolean @@ -69,13 +61,6 @@ protected $_organizationFromUrl = false; /** - * The field name for the password element. - * - * @var string - */ - protected $_passwordFieldName = 'password'; - - /** * The field name for the submit element. * * @var string @@ -90,11 +75,10 @@ protected $_tokenFieldName = 'token_link'; /** - * The field name for the username element. * - * @var string + * @var Gems_User_User */ - protected $_usernameFieldName = 'userlogin'; + protected $_user; /** * @@ -103,6 +87,13 @@ protected $loader; /** + * The field name for the organization element. + * + * @var string + */ + public $organizationFieldName = 'organization'; + + /** * For small numbers of organizations a multiline selectbox will be nice. This * setting handles how many lines will display at once. Use 1 for the normal * dropdown selectbox @@ -112,7 +103,14 @@ protected $organizationMaxLines = 6; /** + * The field name for the password element. * + * @var string + */ + public $passwordFieldName = 'password'; + + /** + * * @var Zend_Controller_Request_Abstract */ protected $request; @@ -138,7 +136,14 @@ protected $translate; /** + * The field name for the username element. * + * @var string + */ + public $usernameFieldName = 'userlogin'; + + /** + * * @var Zend_Util */ protected $util; @@ -161,7 +166,7 @@ } $request = $this->getRequest(); - if ($request->isPost() && ($orgId = $request->getParam($this->_organizationFieldName))) { + if ($request->isPost() && ($orgId = $request->getParam($this->organizationFieldName))) { return $orgId; } @@ -216,14 +221,14 @@ */ public function getOrganizationElement() { - $element = $this->getElement($this->_organizationFieldName); + $element = $this->getElement($this->organizationFieldName); $orgId = $this->getCurrentOrganizationId(); $orgs = $this->getLoginOrganizations(); $hidden = $this->_organizationFromUrl || (count($orgs) < 2); if ($hidden) { if (! $element instanceof Zend_Form_Element_Hidden) { - $element = new Zend_Form_Element_Hidden($this->_organizationFieldName); + $element = new Zend_Form_Element_Hidden($this->organizationFieldName); $this->addElement($element); } @@ -234,7 +239,7 @@ } } elseif (! $element instanceof Zend_Form_Element_Select) { - $element = new Zend_Form_Element_Select($this->_organizationFieldName); + $element = new Zend_Form_Element_Select($this->organizationFieldName); $element->setLabel($this->translate->_('Organization')); $element->setRequired(true); $element->setMultiOptions($orgs); @@ -257,16 +262,23 @@ */ public function getPasswordElement() { - $element = $this->getElement($this->_passwordFieldName); + $element = $this->getElement($this->passwordFieldName); if (! $element) { // Veld password - $element = new Zend_Form_Element_Password($this->_passwordFieldName); + $element = new Zend_Form_Element_Password($this->passwordFieldName); $element->setLabel($this->translate->_('Password')); $element->setAttrib('size', 10); $element->setAttrib('maxlength', 20); $element->setRequired(true); + if ($this->getOrganizationElement() instanceof Zend_Form_Element_Hidden) { + $explain = $this->translate->_('Combination of user and password not found.'); + } else { + $explain = $this->translate->_('Combination of user and password not found for this organization.'); + } + $element->addValidator(new Gems_User_Validate_GetUserPasswordValidator($this, $explain)); + $this->addElement($element); } @@ -338,18 +350,29 @@ { return MUtil_Html::create('a', array('controller' => 'ask', 'action' => 'token'), $this->translate->_('Enter your token...'), array('class' => 'actionlink')); } + /** + * Returns a user + * + * @return Gems_User_User + */ + public function getUser() + { + return $this->_user; + } + + /** * Returns/sets a login name element. * * @return Zend_Form_Element_Text */ public function getUserNameElement() { - $element = $this->getElement($this->_usernameFieldName); + $element = $this->getElement($this->usernameFieldName); if (! $element) { // Veld inlognaam - $element = new Zend_Form_Element_Text($this->_usernameFieldName); + $element = new Zend_Form_Element_Text($this->usernameFieldName); $element->setLabel($this->translate->_('Username')); $element->setAttrib('size', 10); $element->setAttrib('maxlength', 20); @@ -362,6 +385,26 @@ } /** + * Validate the form + * + * As it is better for translation utilities to set the labels etc. translated, + * the MUtil default is to disable translation. + * + * However, this also disables the translation of validation messages, which we + * cannot set translated. The MUtil form is extended so it can make this switch. + * + * @param array $data + * @param boolean $disableTranslateValidators Extra switch + * @return boolean + */ + public function isValid($data, $disableTranslateValidators = null) + { + $this->_user = $this->loader->getUser($data[$this->usernameFieldName], $data[$this->organizationFieldName]); + + return parent::isValid($data, $disableTranslateValidators); + } + + /** * The function that determines the element load order * * @return Gems_User_Form_LoginForm (continuation pattern) Modified: trunk/library/classes/Gems/User/NoLoginDefinition.php =================================================================== --- trunk/library/classes/Gems/User/NoLoginDefinition.php 2012-03-22 17:05:18 UTC (rev 563) +++ trunk/library/classes/Gems/User/NoLoginDefinition.php 2012-03-23 18:23:04 UTC (rev 564) @@ -47,27 +47,15 @@ class Gems_User_NoLoginDefinition extends Gems_User_UserDefinitionAbstract { /** - * Helper method for the case a user tries to authenticate while he is inactive - * - * @return boolean - */ - public function alwaysFalse() - { - return false; - } - - /** * Returns an initialized Zend_Auth_Adapter_Interface * - * @param string $username - * @param int $organizationId + * @param Gems_User_User $user * @param string $password * @return Zend_Auth_Adapter_Interface */ - public function getAuthAdapter($username, $organizationId, $password) + public function getAuthAdapter(Gems_User_User $user, $password) { - $adapter = new Gems_Auth_Adapter_Callback(array($this,'alwaysFalse'), $username); - return $adapter; + return false; } /** @@ -80,8 +68,11 @@ public function getUserData($login_name, $organization) { return array( - 'user_active' => false, - 'user_role' => 'nologin', + 'user_login' => $login_name, + 'user_name' => $login_name, + 'user_base_org_id' => $organization, + 'user_active' => false, + 'user_role' => 'nologin', ); } } Modified: trunk/library/classes/Gems/User/OldStaffUserDefinition.php =================================================================== --- trunk/library/classes/Gems/User/OldStaffUserDefinition.php 2012-03-22 17:05:18 UTC (rev 563) +++ trunk/library/classes/Gems/User/OldStaffUserDefinition.php 2012-03-23 18:23:04 UTC (rev 564) @@ -60,23 +60,6 @@ protected $project; /** - * Perform UserDefinition specific post-login logic - * - * @param Zend_Auth_Result $authResult - * @return void - */ - public function afterLogin(Zend_Auth_Result $authResult, $formValues) - { - // MUtil_Echo::track($authResult->isValid(), $formValues); - if ($authResult->isValid()) { - $login_name = $formValues['userlogin']; - $organization = $formValues['organization']; - $password = $formValues['password']; - $this->makeNewStaffUser($login_name, $organization, $password); - } - } - - /** * Return true if the password can be set. * * Returns the setting for the definition whan no user is passed, otherwise @@ -93,13 +76,25 @@ /** * Returns an initialized Zend_Auth_Adapter_Interface * - * @param string $username - * @param int $organizationId + * @param Gems_User_User $user * @param string $password * @return Zend_Auth_Adapter_Interface */ - public function getAuthAdapter($username, $organizationId, $password) + public function getAuthAdapter(Gems_User_User $user, $password) { + $pwd_hash = $this->hashPassword($password); + + $sql = "SELECT gsf_id_user FROM gems__staff WHERE gsf_active = 1 AND gsf_login = ? AND gsf_id_organization = ? AND gsf_password = ?"; + + if ($this->db->fetchOne($sql, array($user->getLoginName(), $user->getBaseOrganizationId(), $pwd_hash))) { + $this->makeNewStaffUser($user, $password); + + return true; + } else { + return false; + } + + /* $adapter = new Zend_Auth_Adapter_DbTable(null, 'gems__staff', 'gsf_login', 'gsf_password'); $pwd_hash = $this->hashPassword($password); @@ -112,6 +107,7 @@ ->setCredential($pwd_hash); return $adapter; + // */ } /** @@ -200,15 +196,19 @@ return md5($password); } - protected function makeNewStaffUser($login_name, $organization, $password) + /** + * Sets the user up as a new staff user + * + * @param Gems_User_User $user + * @param string $password + */ + protected function makeNewStaffUser(Gems_User_User $user, $password) { - $userData = $this->getUserData($login_name, $organization); - $staff_id = $userData['user_id']; + $staff_id = $user->getUserId(); + $sql = 'SELECT gul_id_user FROM gems__user_logins WHERE gul_can_login = 1 AND gul_login = ? AND gul_id_organization = ?'; - $sql = 'SELECT gul_id_user FROM gems__user_logins WHERE gul_can_login = 1 AND gul_login = ? AND gul_id_organization = ?'; - try { - $user_id = $this->db->fetchOne($sql, array($login_name, $organization)); + $user_id = $this->db->fetchOne($sql, array($user->getLoginName(), $user->getBaseOrganizationId())); $currentTimestamp = new Zend_Db_Expr('CURRENT_TIMESTAMP'); @@ -240,6 +240,8 @@ $this->db->update('gems__staff', $values, $this->db->quoteInto('gsf_id_user = ?', $staff_id)); + $user->refresh(Gems_User_UserLoader::USER_STAFF); + } catch (Zend_Db_Exception $e) { GemsEscort::getInstance()->logger->log($e->getMessage(), Zend_Log::ERR); // Fall through as this does not work if the database upgrade did not run @@ -257,7 +259,7 @@ */ public function setPassword(Gems_User_User $user, $password) { - $this->makeNewStaffUser($user->getLoginName(), $user->getBaseOrganizationId(), $password); + $this->makeNewStaffUser($user, $password); return $this; } Modified: trunk/library/classes/Gems/User/ProjectUserDefinition.php =================================================================== --- trunk/library/classes/Gems/User/ProjectUserDefinition.php 2012-03-22 17:05:18 UTC (rev 563) +++ trunk/library/classes/Gems/User/ProjectUserDefinition.php 2012-03-23 18:23:04 UTC (rev 564) @@ -55,14 +55,13 @@ /** * Returns an initialized Zend_Auth_Adapter_Interface * - * @param string $username - * @param int $organizationId + * @param Gems_User_User $user * @param string $password * @return Zend_Auth_Adapter_Interface */ - public function getAuthAdapter($username, $organizationId, $password) + public function getAuthAdapter(Gems_User_User $user, $password) { - $adapter = new Gems_Auth_Adapter_Callback(array($this->project,'checkSuperAdminPassword'), $username, array($password)); + $adapter = new Gems_Auth_Adapter_Callback(array($this->project, 'checkSuperAdminPassword'), $user->getLoginName(), array($password)); return $adapter; } @@ -76,14 +75,15 @@ public function getUserData($login_name, $organization) { return array( - 'user_id' => 1, - 'user_login' => $login_name, - 'user_name' => $login_name, - 'user_group' => 800, - 'user_role' => 'master', - 'user_style' => 'gems', - 'user_base_org_id' => $organization, + 'user_id' => 1, + 'user_login' => $login_name, + 'user_name' => $login_name, + 'user_group' => 800, + 'user_role' => 'master', + 'user_style' => 'gems', + 'user_base_org_id' => $organization, 'user_allowed_ip_ranges' => $this->project->getSuperAdminIPRanges(), + 'user_blockable' => false, ); } } \ No newline at end of file Modified: trunk/library/classes/Gems/User/RadiusUserDefinition.php =================================================================== --- trunk/library/classes/Gems/User/RadiusUserDefinition.php 2012-03-22 17:05:18 UTC (rev 563) +++ trunk/library/classes/Gems/User/RadiusUserDefinition.php 2012-03-23 18:23:04 UTC (rev 564) @@ -128,15 +128,14 @@ /** * Returns an initialized Zend_Auth_Adapter_Interface * - * @param string $username - * @param int $organizationId + * @param Gems_User_User $user * @param string $password * @return Zend_Auth_Adapter_Interface */ - public function getAuthAdapter($username, $organizationId, $password) + public function getAuthAdapter(Gems_User_User $user, $password) { //Ok hardcoded for now this needs to be read from the userdefinition - $configData = $this->loadConfig(array('gor_id_organization' => $organizationId)); + $configData = $this->loadConfig(array('gor_id_organization' => $user->getBaseOrganizationId())); $config = array('ip' => $configData['grcfg_ip'], 'authenticationport' => $configData['grcfg_port'], @@ -150,7 +149,7 @@ } $adapter = new Gems_User_Adapter_Radius($config); - $adapter->setIdentity($username) + $adapter->setIdentity($user->getLoginName()) ->setCredential($password); return $adapter; Modified: trunk/library/classes/Gems/User/User.php =================================================================== --- trunk/library/classes/Gems/User/User.php 2012-03-22 17:05:18 UTC (rev 563) +++ trunk/library/classes/Gems/User/User.php 2012-03-23 18:23:04 UTC (rev 564) @@ -87,7 +87,21 @@ protected $definition; /** + * Sets number failed accounts that trigger a block * + * @var int + */ + protected $failureBlockCount = 6; + + /** + * Sets number of seconds until a previous failed login can be ignored + * + * @var int + */ + protected $failureIgnoreTime = 600; + + /** + * * @var Zend_Controller_Request_Abstract */ protected $request; @@ -113,7 +127,16 @@ protected $userLoader; /** + * Use Zend_Auth for authentication * + * Warning: Zend_Auth contains only a partial ID of the current user, the base organization is missing + * + * @var boolean + */ + protected $useZendAuth = false; + + /** + * * @var Gems_Util */ protected $util; @@ -221,56 +244,205 @@ } /** - * Perform project specific after login logic here, can also delegate to the user definition + * Process everything after authentication. * - * @return void + * @param Zend_Auth_Result $result */ - public function afterLogin($formValues) { - if (is_callable(array($this->definition, 'afterLogin'))) { - // Use the USERS organization, not the one he or she is using currently - $formValues['organization'] = $this->getBaseOrganizationId(); - $this->definition->afterLogin($this->_authResult, $formValues); + protected function afterAuthorization(Zend_Auth_Result $result) + { + try { + $select = $this->db->select(); + $select->from('gems__user_login_attempts', array('gula_failed_logins', 'gula_last_failed', 'gula_block_until', 'UNIX_TIMESTAMP() - UNIX_TIMESTAMP(gula_last_failed) AS since_last')) + ->where('gula_login = ?', $this->getLoginName()) + ->where('gula_id_organization = ?', $this->getCurrentOrganizationId()) + ->limit(1); + + $values = $this->db->fetchRow($select); + + // The first login attempt + if (! $values) { + $values['gula_login'] = $this->getLoginName(); + $values['gula_id_organization'] = $this->getCurrentOrganizationId(); + $values['gula_failed_logins'] = 0; + $values['gula_last_failed'] = null; + $values['gula_block_until'] = null; + $values['since_last'] = $this->failureBlockCount + 1; + } + + if ($result->isValid()) { + // Reset login failures + $values['gula_failed_logins'] = 0; + $values['gula_last_failed'] = null; + $values['gula_block_until'] = null; + + } else { + + // Reset the counters when the last login was longer ago than the delay factor + if ($values['since_last'] > $this->failureIgnoreTime) { + $values['gula_failed_logins'] = 1; + } else { + $values['gula_failed_logins'] += 1; + } + + // If block is already set + if ($values['gula_block_until']) { + // Do not change it anymore + unset($values['gula_block_until']); + + } else { + // Only set the block when needed + if ($this->failureBlockCount <= $values['gula_failed_logins']) { + $values['gula_block_until'] = new Zend_Db_Expr('DATE_ADD(CURRENT_TIMESTAMP, INTERVAL ' . $this->failureIgnoreTime . ' SECOND)'); + } + } + + // Always record the last fail + $values['gula_last_failed'] = new Zend_Db_Expr('CURRENT_TIMESTAMP'); + + // Response gets slowly slower + $sleepTime = min($values['gula_failed_logins'] - 1, 10) * 2; + sleep($sleepTime); + // MUtil_Echo::track($sleepTime, $values, $result->getMessages()); + } + + // Value not saveable + unset($values['since_last']); + + if (isset($values['gula_login'])) { + $this->db->insert('gems__user_login_attempts', $values); + } else { + $where = $this->db->quoteInto('gula_login = ? AND ', $this->getLoginName()); + $where .= $this->db->quoteInto('gula_id_organization = ?', $this->getCurrentOrganizationId()); + $this->db->update('gems__user_login_attempts', $values, $where); + } + + } catch (Zend_Db_Exception $e) { + // Fall through as this does not work if the database upgrade did not yet run + // MUtil_Echo::r($e); } + } /** - * Helper method for the case a user tries to authenticate while he is inactive + * Authenticate a users credentials using the submitted form * - * @return boolean + * @param string $password The password to test + * @return Zend_Auth_Result */ - public function alwaysFalse() + public function authenticate($password) { - return false; + if ($this->useZendAuth) { + $zendAuth = Zend_Auth::getInstance(); + } + $auths = $this->loadAuthorizers($password); + + foreach ($auths as $result) { + if (is_callable($result)) { + $result = call_user_func($result); + } + + if ($result instanceof Zend_Auth_Adapter_Interface) { + if ($this->useZendAuth) { + $result = $zendAuth->authenticate($result); + } else { + $result = $result->authenticate(); + } + } + + if ($result instanceof Zend_Auth_Result) { + if (! $result->isValid()) { + break; + } + } else { + if (true === $result) { + $result = new Zend_Auth_Result(Zend_Auth_Result::SUCCESS, $this->getLoginName()); + + } else { + // Always a fail when not true + if ($result === false) { + $code = Zend_Auth_Result::FAILURE_CREDENTIAL_INVALID; + $result = array(); + } else { + $code = Zend_Auth_Result::FAILURE_UNCATEGORIZED; + if (is_string($result)) { + $result = array($result); + } + } + $result = new Zend_Auth_Result($code, $this->getLoginName(), $result); + break; + } + } + } + + $this->afterAuthorization($result); + + // MUtil_Echo::track($result); + $this->_authResult = $result; + + return $result; } /** - * Authenticate a users credentials using the submitted form + * Checks if the user is allowed to login or is blocked * - * @param array $formValues the array containing all formvalues from the login form - * @return Zend_Auth_Result + * An adapter authorizes and if the end resultis boolean, string or array + * it is converted into a Zend_Auth_Result. + * + * @return mixed Zend_Auth_Adapter_Interface|Zend_Auth_Result|boolean|string|array */ - public function authenticate($formValues) + protected function authorizeBlock() { - // Check if the client IP address is within allowed IP ranges - if (! $this->util->isAllowedIP($_SERVER['REMOTE_ADDR'], $this->getAllowedIPRanges())) { - return new Zend_Auth_Result(Zend_Auth_Result::FAILURE_UNCATEGORIZED, $this->getLoginName(), array($this->translate->_('You are not allowed to login from this location.'))); - } + try { + $select = $this->db->select(); + $select->from('gems__user_login_attempts', array('UNIX_TIMESTAMP(gula_block_until) - UNIX_TIMESTAMP() AS wait')) + ->where('gula_block_until is not null') + ->where('gula_login = ?', $this->getLoginName()) + ->where('gula_id_organization = ?', $this->getCurrentOrganizationId()) + ->limit(1); - $auth = Gems_Auth::getInstance(); + // Not the first login + if ($block = $this->db->fetchOne($select)) { + if ($block > 0) { + $minutes = intval($block / 60) + 1; - $formValues['organization'] = $this->getBaseOrganizationId(); - $formValues['userlogin'] = $this->getLoginName(); + // Report all is not well + return sprintf($this->translate->plural('Your account is temporarily blocked, please wait a minute.', 'Your account is temporarily blocked, please wait %d minutes.', $minutes), $minutes); - if ($this->isActive()) { - $adapter = $this->definition->getAuthAdapter($formValues['userlogin'], $formValues['organization'], $formValues['password']); - } else { - $adapter = new Gems_Auth_Adapter_Callback(array($this,'alwaysFalse'), $formValues['userlogin']); + } else { + // Clean the block once it's past + $values['gula_failed_logins'] = 0; + $values['gula_last_failed'] = null; + $values['gula_block_until'] = null; + $where = $this->db->quoteInto('gula_login = ? AND ', $this->getLoginName()); + $where .= $this->db->quoteInto('gula_id_organization = ?', $this->getCurrentOrganizationId()); + + $this->db->update('gems__user_login_attempts', $values, $where); + } + } + + } catch (Zend_Db_Exception $e) { + // Fall through as this does not work if the database upgrade did not run + // MUtil_Echo::r($e); } - $authResult = $auth->authenticate($adapter, $formValues); - $this->_authResult = $authResult; + return true; + } - return $authResult; + /** + * Checks if the user is allowed to login using the current IP address + * + * An adapter authorizes and if the end resultis boolean, string or array + * it is converted into a Zend_Auth_Result. + * + * @return mixed Zend_Auth_Adapter_Interface|Zend_Auth_Result|boolean|string|array + */ + protected function authorizeIp() + { + if ($this->util->isAllowedIP($_SERVER['REMOTE_ADDR'], $this->getAllowedIPRanges())) { + return true; + } else { + return $this->translate->_('You are not allowed to login from this location.'); + } } /** @@ -439,20 +611,6 @@ } /** - * Get the array to use for authenticate() - * - * @param string $password - * @return array - */ - public function getFormValuesForPassword($password) - { - return array( - 'userlogin' => $this->getLoginName(), - 'password' => $password, - 'organization' => $this->getCurrentOrganizationId()); - } - - /** * Returns the full user name (first, prefix, last). * * @return string @@ -704,6 +862,20 @@ } /** + * True when this user must enter a new password. + * + * @return boolean + */ + public function isBlockable() + { + if ($this->_hasVar('user_blockable')) { + return (boolean) $this->_getVar('user_blockable'); + } else { + return true; + } + } + + /** * Checks if this user is the current user * * @return boolean @@ -744,6 +916,53 @@ } /** + * Load the callables | results needed to authenticate/authorize this user + * + * A callable will be called, then an adapter authorizes and if the end result + * is boolean, string or array it is converted into a Zend_Auth_Result. + * + * @param string $password + * @return array Of Callable|Zend_Auth_Adapter_Interface|Zend_Auth_Result|boolean|string|array + */ + protected function loadAuthorizers($password) + { + $auths['ip'] = array($this, 'authorizeIp'); + + if ($this->isBlockable()) { + $auths['block'] = array($this, 'authorizeBlock'); + } + + if ($this->isActive()) { + $auths['pwd'] = $this->definition->getAuthAdapter($this, $password); + } else { + $auths['pwd'] = false; + } + + return $auths; + } + + /** + * + * @param string $defName Optional + * @return Gems_User_User (continuation pattern) + */ + public function refresh($defName = null) + { + if ($defName) { + $this->definition = $this->userLoader->getUserDefinition($defName); + } + + $newData = $this->definition->getUserData($this->getLoginName(), $this->getBaseOrganizationId()); + $newData = $this->userLoader->ensureDefaultUserValues($newData, $this->definition, $defName); + + foreach ($newData as $key => $value) { + $this->_setVar($key, $value); + } + + return $this; + } + + /** * Allowes a refresh of the existing list of organizations * for this user. * Modified: trunk/library/classes/Gems/User/UserDefinitionInterface.php =================================================================== --- trunk/library/classes/Gems/User/UserDefinitionInterface.php 2012-03-22 17:05:18 UTC (rev 563) +++ trunk/library/classes/Gems/User/UserDefinitionInterface.php 2012-03-23 18:23:04 UTC (rev 564) @@ -80,12 +80,10 @@ /** * Returns an initialized Zend_Auth_Adapter_Interface * - * @param string $username - * @param int $organizationId - * @param string $password + * @param Gems_User_User $user * @return Zend_Auth_Adapter_Interface */ - public function getAuthAdapter($username, $organizationId, $password); + public function getAuthAdapter(Gems_User_User $user, $password); /** * Return a password reset key Modified: trunk/library/classes/Gems/User/UserLoader.php =================================================================== --- trunk/library/classes/Gems/User/UserLoader.php 2012-03-22 17:05:18 UTC (rev 563) +++ trunk/library/classes/Gems/User/UserLoader.php 2012-03-23 18:23:04 UTC (rev 564) @@ -171,6 +171,30 @@ } /** + * Makes sure default values are set for a user + * + * @param array $values + * @param Gems_User_UserDefinitionInterface $definition + * @param string $defName Optional + * @return array + */ + public function ensureDefaultUserValues(array $values, Gems_User_UserDefinitionInterface $definition, $defName = null) + { + if (! isset($values['user_active'])) { + $values['user_active'] = true; + } + if (! isset($values['user_staff'])) { + $values['user_staff'] = $definition->isStaff(); + } + + if ($defName) { + $values['__user_definition'] = $defName; + } + + return $values; + } + + /** * Get userclass / description array of available UserDefinitions for respondents * * @return array @@ -464,15 +488,8 @@ $values = $definition->getUserData($userName, $userOrganization); // MUtil_Echo::track($defName, $login_name, $userOrganization, $values); - if (! isset($values['user_active'])) { - $values['user_active'] = true; - } - if (! isset($values['user_staff'])) { - $values['user_staff'] = $definition->isStaff(); - } + $values = $this->ensureDefaultUserValues($values, $definition, $defName); - $values['__user_definition'] = $defName; - return $this->_loadClass('User', true, array($values, $definition)); } Deleted: trunk/library/classes/Gems/User/UserNewPasswordValidator.php =================================================================== --- trunk/library/classes/Gems/User/UserNewPasswordValidator.php 2012-03-22 17:05:18 UTC (rev 563) +++ trunk/library/classes/Gems/User/UserNewPasswordValidator.php 2012-03-23 18:23:04 UTC (rev 564) @@ -1,117 +0,0 @@ -<?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. - * - * - * @package Gems - * @subpackage User - * @author Matijs de Jong <mj...@ma...> - * @copyright Copyright (c) 2011 Erasmus MC - * @license New BSD License - * @version $Id$ - */ - -/** - * - * - * @package Gems - * @subpackage User - * @copyright Copyright (c) 2011 Erasmus MC - * @license New BSD License - * @since Class available since version 1.5 - */ -class Gems_User_UserNewPasswordValidator implements Zend_Validate_Interface -{ - /** - * The reported problems with the password. - * - * @var array or null - */ - private $_report; - - /** - * - * @var Gems_User_User - */ - private $_user; - - /** - * - * @param Gems_User_User $user The user to check - */ - public function __construct(Gems_User_User $user) - { - $this->_user = $user; - } - - /** - * Returns true if and only if $value meets the validation requirements - * - * If $value fails validation, then this method returns false, and - * getMessages() will return an array of messages that explain why the - * validation failed. - * - * @param mixed $value - * @param mixed $content - * @return boolean - * @throws Zend_Validate_Exception If validation of $value is impossible - */ - public function isValid($value, $context = array()) - { - $this->_report = $this->_user->reportPasswordWeakness($value); - - foreach ($this->_report as &$report) { - $report = ucfirst($report) . '.'; - } - - // MUtil_Echo::track($value, $this->_report); - - return ! (boolean) $this->_report; - } - - /** - * Returns an array of messages that explain why the most recent isValid() - * call returned false. The array keys are validation failure message identifiers, - * and the array values are the corresponding human-readable message strings. - * - * If isValid() was never called or if the most recent isValid() call - * returned true, then this method returns an empty array. - * - * @return array - */ - public function getMessages() - { - if ($this->_report) { - return $this->_report; - - } else { - return array(); - } - - - } -} Deleted: trunk/library/classes/Gems/User/UserPasswordValidator.php =================================================================== --- trunk/library/classes/Gems/User/UserPasswordValidator.php 2012-03-22 17:05:18 UTC (rev 563) +++ trunk/library/classes/Gems/User/UserPasswordValidator.php 2012-03-23 18:23:04 UTC (rev 564) @@ -1,120 +0,0 @@ -<?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. - * - * - * @package Gems - * @subpackage User - * @author Matijs de Jong <mj...@ma...> - * @copyright Copyright (c) 2011 Erasmus MC - * @license New BSD License - * @version $Id$ - */ - -/** - * - * - * @package Gems - * @subpackage User - * @copyright Copyright (c) 2011 Erasmus MC - * @license New BSD License - * @since Class available since version 1.5 - */ -class Gems_User_UserPasswordValidator implements Zend_Validate_Interface -{ - /** - * - * @var Gems_User_User - */ - private $_user; - - /** - * - * @var Zend_Translate - */ - private $_translate; - - /** - * - * @var boolean - */ - private $_valid = false; - - /** - * - * @param Gems_User_User $user The user to check - * @param Zend_Translate $translate Optional translator - */ - public function __construct(Gems_User_User $user, Zend_Translate $translate = null) - { - $this->_user = $user; - $this->_translate = $translate ? $translate : new MUtil_Translate_Adapter_Potemkin(); - } - - /** - * Returns true if and only if $value meets the validation requirements - * - * If $value fails validation, then this method returns false, and - * getMessages() will return an array of messages that explain why the - * validation failed. - * - * @param mixed $value - * @param mixed $content - * @return boolean - * @throws Zend_Validate_Exception If validation of $value is impossible - */ - public function isValid($value, $context = array()) - { - $authResult = $this->_user->authenticate($this->_user->getFormValuesForPassword($value)); - - $this->_valid = $authResult->isValid(); - - return $this->_valid; - } - - /** - * Returns an array of messages that explain why the most recent isValid() - * call returned false. The array keys are validation failure message identifiers, - * and the array values are the corresponding human-readable message strings. - * - * If isValid() was never called or if the most recent isValid() call - * returned true, then this method returns an empty array. - * - * @return array - */ - public function getMessages() - { - if ($this->_valid) { - return array(); - - } else { - return array($this->_translate->_('Wrong password.')); - } - - - } -} Property changes on: trunk/library/classes/Gems/User/Validate ___________________________________________________________________ Added: bugtraq:url + http://survey.erasmusmc.nl/support/mantis/view.php?id=%BUGID% Added: bugtraq:logregex + #(\d+) Added: trunk/library/classes/Gems/User/Validate/GetUserInterface.php =================================================================== --- trunk/library/classes/Gems/User/Validate/GetUserInterface.php (rev 0) +++ trunk/library/classes/Gems/User/Validate/GetUserInterface.php 2012-03-23 18:23:04 UTC (rev 564) @@ -0,0 +1,55 @@ +<?php + +/** + * Copyright (c) 2012, 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. + * + * + * @package Gems + * @subpackage User + * @author Matijs de Jong <mj...@ma...> + * @copyright Copyright (c) 2012 Erasmus MC + * @license New BSD License + * @version $id: GetUserInterface.php 203 2012-01-01 12:51:32Z matijs $ + */ + +/** + * + * + * @package Gems + * @subpackage User + * @copyright Copyright (c) 2012 Erasmus MC + * @license New BSD License + * @since Class available since version 1.5.3 + */ +interface Gems_User_Validate_GetUserInterface +{ + /** + * Returns a user + * + * @return Gems_User_User + */ + public function getUser(); +} Added: trunk/library/classes/Gems/User/Validate/GetUserPasswordValidator.php =================================================================== --- trunk/library/classes/Gems/User/Validate/GetUserPasswordValidator.php (rev 0) +++ trunk/library/classes/Gems/User/Validate/GetUserPasswordValidator.php 2012-03-23 18:23:04 UTC (rev 564) @@ -0,0 +1,90 @@ +<?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. + * + * + * @package Gems + * @subpackage User + * @author Matijs de Jong <mj...@ma...> + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @version $Id: UserPasswordValidator.php 370 2011-12-19 09:27:19Z mennodekker $ + */ + +/** + * + * + * @package Gems + * @subpackage User + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @since Class available since version 1.5 + */ +class Gems_User_Validate_GetUserPasswordValidator extends Gems_User_Validate_PasswordValidatorAbstract +{ + /** + * + * @var Gems_User_Validate_GetUserInterface + */ + private $_userSource; + + /** + * + * @param Gems_User_Validate_GetUserInterface $userSource The source for the user + * @param string $message Default message for standard login fail. + */ + public function __construct(Gems_User_Validate_GetUserInterface $userSource, $message) + { + $this->_userSource = $userSource; + + parent::__construct($message); + } + + /** + * Returns true if and only if $value meets the validation requirements + * + * If $value fails validation, then this method returns false, and + * getMessages() will return an array of messages that explain why the + * validation failed. + * + * @param mixed $value + * @param mixed $content + * @return boolean + * @throws Zend_Validate_Exception If validation of $value is impossible + */ + public function isValid($value, $context = array()) + { + $user = $this->_userSource->getUser(); + if ($user instanceof Gems_User_User) { + $result = $user->authenticate($value); + } else { + $result = new Zend_Auth_Result(Zend_Auth_Result::FAILURE_UNCATEGORIZED, null); + } + + return $this->setAuthResult($result); + } +} Added: trunk/library/classes/Gems/User/Validate/NewPassword... [truncated message content] |
From: <gem...@li...> - 2012-03-28 09:27:48
|
Revision: 568 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=568&view=rev Author: matijsdejong Date: 2012-03-28 09:27:38 +0000 (Wed, 28 Mar 2012) Log Message: ----------- Adjusted for case where error reporting went wrong. Plus patch for situation were users are added with NoLogin but as active. Modified Paths: -------------- trunk/library/classes/GemsEscort.php trunk/library/configs/db/patches.sql trunk/library/configs/db/tables/gems__user_logins.10.sql Modified: trunk/library/classes/GemsEscort.php =================================================================== --- trunk/library/classes/GemsEscort.php 2012-03-27 16:39:04 UTC (rev 567) +++ trunk/library/classes/GemsEscort.php 2012-03-28 09:27:38 UTC (rev 568) @@ -736,20 +736,23 @@ { $user = $this->getLoader()->getCurrentUser(); - $div = MUtil_Html::create('div', array('id' => 'login'), $args); + // During error reporting the user or menu are not always known. + if ($user && $this->menu) { + $div = MUtil_Html::create('div', array('id' => 'login'), $args); - $p = $div->p(); - if ($user->isActive()) { - $p->append(sprintf($this->_('You are logged in as %s'), $user->getFullName())); - $item = $this->menu->findController('index', 'logoff'); - $p->a($item->toHRefAttribute(), $this->_('Logoff'), array('class' => 'logout')); - } else { - $item = $this->menu->findController('index', 'login'); - $p->a($item->toHRefAttribute(), $this->_('You are not logged in'), array('class' => 'logout')); + $p = $div->p(); + if ($user->isActive()) { + $p->append(sprintf($this->_('You are logged in as %s'), $user->getFullName())); + $item = $this->menu->findController('index', 'logoff'); + $p->a($item->toHRefAttribute(), $this->_('Logoff'), array('class' => 'logout')); + } else { + $item = $this->menu->findController('index', 'login'); + $p->a($item->toHRefAttribute(), $this->_('You are not logged in'), array('class' => 'logout')); + } + $item->set('visible', false); + + return $div; } - $item->set('visible', false); - - return $div; } /** Modified: trunk/library/configs/db/patches.sql =================================================================== --- trunk/library/configs/db/patches.sql 2012-03-27 16:39:04 UTC (rev 567) +++ trunk/library/configs/db/patches.sql 2012-03-28 09:27:38 UTC (rev 568) @@ -386,3 +386,6 @@ -- PATCH: Add block until to ALTER TABLE gems__user_login_attempts ADD gula_block_until timestamp null AFTER gula_last_failed; + +-- PATCH: logins are sometimes added autmatically as part of outer join +ALTER TABLE gems__user_logins CHANGE gul_can_login gul_can_login boolean not null default 0; Modified: trunk/library/configs/db/tables/gems__user_logins.10.sql =================================================================== --- trunk/library/configs/db/tables/gems__user_logins.10.sql 2012-03-27 16:39:04 UTC (rev 567) +++ trunk/library/configs/db/tables/gems__user_logins.10.sql 2012-03-28 09:27:38 UTC (rev 568) @@ -8,7 +8,7 @@ gul_id_organization bigint not null references gems__organizations (gor_id_organization), gul_user_class varchar(30) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' not null default 'NoLogin', - gul_can_login boolean not null default 1, + gul_can_login boolean not null default 0, gul_changed timestamp not null default current_timestamp on update current_timestamp, gul_changed_by bigint unsigned not null, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2012-03-28 12:15:45
|
Revision: 570 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=570&view=rev Author: matijsdejong Date: 2012-03-28 12:15:34 +0000 (Wed, 28 Mar 2012) Log Message: ----------- Extra function for Https.php and some extra documentation Modified Paths: -------------- trunk/library/classes/Gems/Util.php trunk/library/classes/MUtil/Https.php trunk/library/configs/db/tables/gems__user_logins.10.sql Modified: trunk/library/classes/Gems/Util.php =================================================================== --- trunk/library/classes/Gems/Util.php 2012-03-28 09:36:53 UTC (rev 569) +++ trunk/library/classes/Gems/Util.php 2012-03-28 12:15:34 UTC (rev 570) @@ -161,23 +161,20 @@ return $this->_loadClass('lockFile', true, array(GEMS_ROOT_DIR . '/var/settings/cron_lock.txt')); } + /** + * Returns the current 'base site' url, optionally with a subpath. + * + * @staticvar string $uri + * @param string $subpath Optional string + * @return string The Url + basePath plus the optional subpath + */ public function getCurrentURI($subpath = '') { static $uri; if (! $uri) { - if(isset($_SERVER['HTTPS'])) { - $secure = $_SERVER["HTTPS"]; + $uri = MUtil_Https::on() ? 'https' : 'http'; - if (strtolower($secure) == 'off') { - $secure = false; - } - } else { - $secure = $_SERVER['SERVER_PORT'] == '443'; - } - - $uri = $secure ? 'https' : 'http'; - $uri .= '://'; $uri .= $_SERVER['SERVER_NAME']; $uri .= $this->basepath->getBasePath(); Modified: trunk/library/classes/MUtil/Https.php =================================================================== --- trunk/library/classes/MUtil/Https.php 2012-03-28 09:36:53 UTC (rev 569) +++ trunk/library/classes/MUtil/Https.php 2012-03-28 12:15:34 UTC (rev 570) @@ -1,44 +1,80 @@ <?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. - */ - + /** - * @package MUtil + * 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. + * + * @package MUtil + * @subpackage Https + * @author Matijs de Jong <mj...@ma...> + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @version $id: Html.php 362 2011-12-15 17:21:17Z matijsdejong $ */ +/** + * Static utility function for determining wether https is on. + * + * @package MUtil + * @subpackage Https + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @since Class available since version 1.0 + */ class MUtil_Https { + /** + * True when the url is a HTTPS url, false when HTTP, null otherwise + * + * @return boolean True when HTTPS, false when HTTP, null otherwise + */ + public static function isHttps($url) + { + $url = strtolower(substr($url, 0, 8)); + + if ('https://' == $url) { + return true; + } + + if ('http://' == substr($url, 0, 7)) { + return false; + } + return null; + } + + /** + * True when https is used. + * + * @return boolean + */ public static function on() { if (empty($_SERVER['HTTPS'])) { return false; } - return (($_SERVER['HTTPS'] !== 'off') || ($_SERVER['SERVER_PORT'] == 443)); + return ((strtolower($_SERVER['HTTPS']) !== 'off') || ($_SERVER['SERVER_PORT'] == 443)); } } \ No newline at end of file Modified: trunk/library/configs/db/tables/gems__user_logins.10.sql =================================================================== --- trunk/library/configs/db/tables/gems__user_logins.10.sql 2012-03-28 09:36:53 UTC (rev 569) +++ trunk/library/configs/db/tables/gems__user_logins.10.sql 2012-03-28 12:15:34 UTC (rev 570) @@ -21,3 +21,21 @@ ENGINE=InnoDB AUTO_INCREMENT = 10001 CHARACTER SET 'utf8' COLLATE 'utf8_general_ci'; + +/* +-- Code to restore login codes after failed update. You just never know when we might need it again. + +UPDATE gems__user_logins + SET gul_user_class = + CASE + WHEN EXISTS(SELECT gsf_id_user FROM gems__staff WHERE gsf_login = gul_login AND gsf_id_organization = gul_id_organization) THEN + CASE + WHEN EXISTS(SELECT gup_id_user FROM gems__user_passwords WHERE gup_id_user = gul_id_user) THEN 'StaffUser' + ELSE 'OldStaffUser' + END + WHEN EXISTS(SELECT gr2o_id_user FROM gems__respondent2org WHERE gr2o_patient_nr = gul_login AND gr2o_id_organization = gul_id_organization) THEN 'RespondentUser' + ELSE 'NoLogin' + END + WHERE gul_user_class = 'StaffUser'; + +*/ \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2012-03-30 11:07:26
|
Revision: 582 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=582&view=rev Author: matijsdejong Date: 2012-03-30 11:07:16 +0000 (Fri, 30 Mar 2012) Log Message: ----------- Updated display of 'Can access' Modified Paths: -------------- trunk/library/classes/Gems/User/User.php trunk/library/snippets/Organization/OrganizationEditSnippet.php Modified: trunk/library/classes/Gems/User/User.php =================================================================== --- trunk/library/classes/Gems/User/User.php 2012-03-30 09:56:07 UTC (rev 581) +++ trunk/library/classes/Gems/User/User.php 2012-03-30 11:07:16 UTC (rev 582) @@ -541,6 +541,7 @@ if (! $this->_hasVar('__allowedOrgs')) { $this->refreshAllowedOrganizations(); } + // MUtil_Echo::track($this->_getVar('__allowedOrgs')); return $this->_getVar('__allowedOrgs'); } Modified: trunk/library/snippets/Organization/OrganizationEditSnippet.php =================================================================== --- trunk/library/snippets/Organization/OrganizationEditSnippet.php 2012-03-30 09:56:07 UTC (rev 581) +++ trunk/library/snippets/Organization/OrganizationEditSnippet.php 2012-03-30 11:07:16 UTC (rev 582) @@ -109,9 +109,10 @@ //Strip self unset($allowedOrgs[$this->formData['gor_id_organization']]); $display = join(', ', $allowedOrgs); - if ($display) { - $bridge->addExhibitor('allowed', 'value', $display, 'label', $this->_('Can access')); + if (! $display) { + $display = MUtil_Html::create('em', $this->_('No access to other organizations.')); } + $bridge->addExhibitor('allowed', 'value', $display, 'label', $this->_('Can access')); } $this->addItems($bridge, 'gor_user_class'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2012-04-04 18:33:14
|
Revision: 596 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=596&view=rev Author: matijsdejong Date: 2012-04-04 18:33:08 +0000 (Wed, 04 Apr 2012) Log Message: ----------- Incorrect optimization removed from MUtil_Date Date Valid_Until now includes the whol day of the date specified. Modified Paths: -------------- trunk/library/classes/MUtil/Date.php trunk/library/snippets/EditTrackTokenSnippet.php Modified: trunk/library/classes/MUtil/Date.php =================================================================== --- trunk/library/classes/MUtil/Date.php 2012-04-03 16:52:44 UTC (rev 595) +++ trunk/library/classes/MUtil/Date.php 2012-04-04 18:33:08 UTC (rev 596) @@ -68,12 +68,14 @@ $val1 = intval($day1->getUnixTimestamp() / self::DAY_SECONDS); if (null === $date) { - $val2 = intval(time() / self::DAY_SECONDS); + // We must use date objects as unix timestamps do not take + // account of leap seconds. + $day2 = new MUtil_Date(); } else { $day2 = clone $date; - $day2->setTime(0); - $val2 = intval($day2->getUnixTimestamp() / self::DAY_SECONDS); } + $day2->setTime(0); + $val2 = intval($day2->getUnixTimestamp() / self::DAY_SECONDS); return $val1 - $val2; } Modified: trunk/library/snippets/EditTrackTokenSnippet.php =================================================================== --- trunk/library/snippets/EditTrackTokenSnippet.php 2012-04-03 16:52:44 UTC (rev 595) +++ trunk/library/snippets/EditTrackTokenSnippet.php 2012-04-04 18:33:08 UTC (rev 596) @@ -155,10 +155,18 @@ */ public function saveData() { + $model = $this->getModel(); + if ($this->formData['gto_valid_until']) { + // Make sure date based units are valid until the end of the day. + $date = new MUtil_Date($this->formData['gto_valid_until'], $model->get('gto_valid_until', 'dateFormat')); + $date->addDay(1); + $date->subSecond(1); + $this->formData['gto_valid_until'] = $date; + } + parent::saveData(); if ($this->formData[self::RECALCULATE_FIELD]) { - $model = $this->getModel(); // Refresh token with current form data $updateData['gto_valid_from'] = $model->getOnSave($this->formData['gto_valid_from'], true, 'gto_valid_from'); $updateData['gto_valid_until'] = $model->getOnSave($this->formData['gto_valid_until'], true, 'gto_valid_until'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2012-04-06 14:02:30
|
Revision: 602 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=602&view=rev Author: matijsdejong Date: 2012-04-06 14:02:23 +0000 (Fri, 06 Apr 2012) Log Message: ----------- Generalized TokenForm and made it project adaptable Moved security checks for Token to TokenValidator.php Restore last functionality to IndexAction.php Modified Paths: -------------- trunk/library/classes/Gems/Default/AskAction.php trunk/library/classes/Gems/Default/IndexAction.php trunk/library/classes/Gems/Form/AutoLoadFormAbstract.php trunk/library/classes/Gems/Tracker/Token/TokenValidator.php trunk/library/classes/Gems/Tracker/TrackerInterface.php trunk/library/classes/Gems/Tracker.php trunk/library/classes/Gems/User/Form/OrganizationFormAbstract.php trunk/library/languages/FakeTranslations.php trunk/library/snippets/Track/AvailableTracksSnippets.php trunk/library/snippets/Track/Token/ShowFirstOpenSnippet.php Added Paths: ----------- trunk/library/classes/Gems/Tracker/Form/ trunk/library/classes/Gems/Tracker/Form/AskTokenForm.php Modified: trunk/library/classes/Gems/Default/AskAction.php =================================================================== --- trunk/library/classes/Gems/Default/AskAction.php 2012-04-06 10:53:27 UTC (rev 601) +++ trunk/library/classes/Gems/Default/AskAction.php 2012-04-06 14:02:23 UTC (rev 602) @@ -52,6 +52,15 @@ protected $forwardSnippets = 'Track_Token_ShowFirstOpenSnippet'; /** + * The width factor for the label elements. + * + * Width = (max(characters in labels) * labelWidthFactor) . 'em' + * + * @var float + */ + protected $labelWidthFactor = 0.8; + + /** * Set to true in child class for automatic creation of $this->html. * * To initiate the use of $this->html from the code call $this->initHtml() @@ -64,6 +73,32 @@ public $useHtmlView = true; /** + * Function for overruling the display of the login form. + * + * @param Gems_Tracker_Form_AskTokenForm $form + */ + protected function displayTokenForm(Gems_Tracker_Form_AskTokenForm $form) + { + $user = $this->loader->getCurrentUser(); + + $form->setDescription(sprintf($this->_('Enter your %s token'), $this->project->name)); + $this->html->h3($form->getDescription()); + $this->html[] = $form; + $this->html->pInfo($this->_('Tokens identify a survey that was assigned to you personally.') . ' ' . $this->_('Entering the token and pressing OK will open that survey.')); + + if ($user->isActive()) { + if ($user->isLogoutOnSurvey()) { + $this->html->pInfo($this->_('After answering the survey you will be logged off automatically.')); + } + } + + $this->html->pInfo( + $this->_('A token consists of two groups of four letters and numbers, separated by an optional hyphen. Tokens are case insensitive.'), ' ', + $this->_('The number zero and the letter O are treated as the same; the same goes for the number one and the letter L.') + ); + } + + /** * Show the user a screen with token information and a button to take at least one survey * * @return void @@ -120,85 +155,22 @@ // Make sure to return to ask screen $this->loader->getCurrentUser()->setSurveyReturn($this->getRequest()); - $tracker = $this->loader->getTracker(); - $max_length = $tracker->getTokenLibrary()->getLength(); + $request = $this->getRequest(); + $tracker = $this->loader->getTracker(); + $form = $tracker->getAskTokenForm(array('displayOrder' => array('element', 'description', 'errors'), 'labelWidthFactor' => 0.8)); - $form = new Gems_Form(array('displayOrder' => array('element', 'description', 'errors'), 'labelWidthFactor' => 0.8)); - $form->setMethod('post'); - $form->setDescription(sprintf($this->_('Enter your %s token'), $this->project->name)); - - // Veld token - $element = new Zend_Form_Element_Text(MUtil_Model::REQUEST_ID); - $element->setLabel($this->_('Token')); - $element->setDescription(sprintf($this->_('Enter tokens as %s.'), $tracker->getTokenLibrary()->getFormat())); - $element->setAttrib('size', $max_length); - $element->setAttrib('maxlength', $max_length); - $element->setRequired(true); - $element->addFilter($tracker->getTokenFilter()); - $element->addValidator($tracker->getTokenValidator()); - $form->addElement($element); - - // Submit knop - $element = new Zend_Form_Element_Submit('button'); - $element->setLabel($this->_('OK')); - $element->setAttrib('class', 'button'); - $form->addElement($element); - - if ($this->_request->isPost()) { - $throttleSettings = $this->project->getAskThrottleSettings(); - - // Prune the database for (very) old attempts - $this->db->query("DELETE FROM gems__token_attempts WHERE gta_datetime < DATE_SUB(NOW(), INTERVAL ? second)", - $throttleSettings['period'] * 20); - - // Retrieve the number of failed attempts that occurred within the specified window - $attemptData = $this->db->fetchRow("SELECT COUNT(1) AS attempts, UNIX_TIMESTAMP(MAX(gta_datetime)) AS last " . - "FROM gems__token_attempts WHERE gta_datetime > DATE_SUB(NOW(), INTERVAL ? second)", $throttleSettings['period']); - - $remainingDelay = ($attemptData['last'] + $throttleSettings['delay']) - time(); - - if ($attemptData['attempts'] > $throttleSettings['threshold'] && $remainingDelay > 0) { - $this->escort->logger->log("Possible token brute force attack, throttling for $remainingDelay seconds", Zend_Log::ERR); - - $this->addMessage($this->_('The server is currently busy, please wait a while and try again.')); - } else if ($form->isValid($_POST)) { - $this->_forward('forward'); - return; - } else { - if (isset($_POST[MUtil_Model::REQUEST_ID])) { - $this->db->insert( - 'gems__token_attempts', - array( - 'gta_id_token' => substr($_POST[MUtil_Model::REQUEST_ID], 0, $max_length), - 'gta_ip_address' => $this->getRequest()->getClientIp() - ) - ); - } - } - } elseif ($id = $this->_getParam(MUtil_Model::REQUEST_ID)) { - $form->populate(array(MUtil_Model::REQUEST_ID => $id)); + if ($request->isPost() && $form->isValid($request->getParams())) { + $this->_forward('forward'); + return; } - $this->html->h3($form->getDescription()); - $this->html[] = $form; - $this->html->pInfo($this->_('Tokens identify a survey that was assigned to you personally.') . ' ' . $this->_('Entering the token and pressing OK will open that survey.')); - - if (isset($this->session->user_id)) { - if ($this->session->user_logout) { - $this->html->pInfo($this->_('After answering the survey you will be logged off automatically.')); - } else { - $this->html->pInfo($this->_('After answering the survey you will return to the respondent overview screen.')); - } - // } else { - // $this->html->pInfo($this->_('After answering the survey you will return here.')); - } - - $this->html->pInfo( - $this->_('A token consists of two groups of four letters and numbers, separated by an optional hyphen. Tokens are case insensitive.'), ' ', - $this->_('The number zero and the letter O are treated as the same; the same goes for the number one and the letter L.') - ); + $form->populate($request->getParams()); + $this->displayTokenForm($form); } + /** + * The action where survey sources should return to after survey completion + */ public function returnAction() { $user = $this->loader->getCurrentUser(); @@ -225,9 +197,11 @@ } } + /** + * Duplicate of to-survey to enable separate rights + */ public function takeAction() { - // Dummy to enable separate rights $this->_forward('to-survey'); } @@ -274,10 +248,4 @@ // Default option $this->_forward('index'); } - public function routeError($message) - { - // TODO make nice - throw new exception($message); - } } - Modified: trunk/library/classes/Gems/Default/IndexAction.php =================================================================== --- trunk/library/classes/Gems/Default/IndexAction.php 2012-04-06 10:53:27 UTC (rev 601) +++ trunk/library/classes/Gems/Default/IndexAction.php 2012-04-06 14:02:23 UTC (rev 602) @@ -1,4 +1,5 @@ <?php + /** * Copyright (c) 2011, Erasmus MC * All rights reserved. @@ -238,12 +239,9 @@ $this->_reroute(array('controller' => null, 'action' => null), true); } return; - } /* - else { - //Now present the user with an error message - // $errors = MUtil_Ra::flatten($form->getMessages()); - // $this->addMessage($errors); - MUtil_Echo::track($errors); + } else { + $errors = MUtil_Ra::flatten($form->getMessages()); + // MUtil_Echo::track($errors); //Also log the error to the log table //when the project has logging enabled Modified: trunk/library/classes/Gems/Form/AutoLoadFormAbstract.php =================================================================== --- trunk/library/classes/Gems/Form/AutoLoadFormAbstract.php 2012-04-06 10:53:27 UTC (rev 601) +++ trunk/library/classes/Gems/Form/AutoLoadFormAbstract.php 2012-04-06 14:02:23 UTC (rev 602) @@ -47,6 +47,13 @@ abstract class Gems_Form_AutoLoadFormAbstract extends Gems_Form { /** + * The field name for the submit element. + * + * @var string + */ + protected $_submitFieldName = 'button'; + + /** * When true all elements are loaded after initiation. * * @var boolean @@ -54,6 +61,12 @@ protected $loadDefault = true; /** + * + * @var Zend_Translate + */ + protected $translate; + + /** * Should be called after answering the request to allow the Target * to check if all required registry values have been set correctly. * @@ -79,6 +92,34 @@ } /** + * Returns/sets a submit button. + * + * @return Zend_Form_Element_Submit + */ + public function getSubmitButton() + { + $element = $this->getElement($this->_submitFieldName); + + if (! $element) { + // Submit knop + $element = new Zend_Form_Element_Submit($this->_submitFieldName); + $element->setLabel($this->getSubmitButtonLabel()); + $element->setAttrib('class', 'button'); + + $this->addElement($element); + } + + return $element; + } + + /** + * Returns the label for the submitbutton + * + * @return string + */ + abstract public function getSubmitButtonLabel(); + + /** * The function loads the elements for this form * * @return Gems_Form_AutoLoadFormAbstract (continuation pattern) Property changes on: trunk/library/classes/Gems/Tracker/Form ___________________________________________________________________ Added: bugtraq:url + http://survey.erasmusmc.nl/support/mantis/view.php?id=%BUGID% Added: bugtraq:logregex + #(\d+) Added: trunk/library/classes/Gems/Tracker/Form/AskTokenForm.php =================================================================== --- trunk/library/classes/Gems/Tracker/Form/AskTokenForm.php (rev 0) +++ trunk/library/classes/Gems/Tracker/Form/AskTokenForm.php 2012-04-06 14:02:23 UTC (rev 602) @@ -0,0 +1,114 @@ +<?php + +/** + * Copyright (c) 2012, 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. + * + * + * @package Gems + * @subpackage Tracker + * @author Matijs de Jong <mj...@ma...> + * @copyright Copyright (c) 2012 Erasmus MC + * @license New BSD License + * @version $id: AskToken.php 203 2012-01-01t 12:51:32Z matijs $ + */ + +/** + * + * + * @package Gems + * @subpackage Tracker + * @copyright Copyright (c) 2012 Erasmus MC + * @license New BSD License + * @since Class available since version 1.5 + */ +class Gems_Tracker_Form_AskTokenForm extends Gems_Form_AutoLoadFormAbstract +{ + /** + * The field name for the token element. + * + * @var string + */ + protected $_tokenFieldName = MUtil_Model::REQUEST_ID; + + /** + * + * @var Gems_Tracker + */ + protected $tracker; + + /** + * Returns/sets a password element. + * + * @return Zend_Form_Element_Password + */ + public function getTokenElement() + { + $element = $this->getElement($this->_tokenFieldName); + + if (! $element) { + $tokenLib = $this->tracker->getTokenLibrary(); + $max_length = $tokenLib->getLength(); + + // Veld token + $element = new Zend_Form_Element_Text($this->_tokenFieldName); + $element->setLabel($this->translate->_('Token')); + $element->setDescription(sprintf($this->translate->_('Enter tokens as %s.'), $tokenLib->getFormat())); + $element->setAttrib('size', $max_length + 2); + $element->setAttrib('maxlength', $max_length); + $element->setRequired(true); + $element->addFilter($this->tracker->getTokenFilter()); + $element->addValidator($this->tracker->getTokenValidator()); + + $this->addElement($element); + } + + return $element; + } + + /** + * Returns the label for the submitbutton + * + * @return string + */ + public function getSubmitButtonLabel() + { + return $this->translate->_('OK'); + } + + /** + * The function loads the elements for this form + * + * @return Gems_Form_AutoLoadFormAbstract (continuation pattern) + */ + public function loadDefaultElements() + { + $this->getTokenElement(); + $this->getSubmitButton(); + + return $this; + } + +} Modified: trunk/library/classes/Gems/Tracker/Token/TokenValidator.php =================================================================== --- trunk/library/classes/Gems/Tracker/Token/TokenValidator.php 2012-04-06 10:53:27 UTC (rev 601) +++ trunk/library/classes/Gems/Tracker/Token/TokenValidator.php 2012-04-06 14:02:23 UTC (rev 602) @@ -1,10 +1,9 @@ <?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 @@ -15,7 +14,7 @@ * * 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 @@ -26,79 +25,111 @@ * 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. - */ - -/** - * File description of TokenValidator * - * @author Matijs de Jong <mj...@ma...> - * @since 1.4 - * @version 1.4 - * @package Gems - * @subpackage Tracker + * + * @package Gems + * @subpackage Tracker + * @author Matijs de Jong <mj...@ma...> + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @version $Id$ */ /** - * Class description of TokenValidator + * Checks whether a token kan be used for the ask/forward loop * - * @author Matijs de Jong <mj...@ma...> - * @package Gems - * @subpackage Tracker + * @package Gems + * @subpackage Tracker + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @since Class available since version 1.4 */ -class Gems_Tracker_Token_TokenValidator extends Zend_Validate_Abstract +class Gems_Tracker_Token_TokenValidator extends MUtil_Registry_TargetAbstract implements Zend_Validate_Interface { /** - * Error constants + * + * @var array Or single string */ - const NOT_TOKEN_FORMAT = 'notFormat'; - const TOKEN_DOES_NOT_EXIST = 'notThere'; - const TOKEN_NO_LONGER_VALID = 'noLongerValid'; - const TOKEN_NOT_YET_VALID = 'notYetValid'; - + protected $_messages; + /** - * @var array Message templates + * + * @var Zend_Db_Adapter_Abstract */ - protected $_messageTemplates = array( - self::NOT_TOKEN_FORMAT => 'Not a valid token. The format for valid tokens is: %tokenFormat%.', - self::TOKEN_DOES_NOT_EXIST => 'Unknown token.', - self::TOKEN_NO_LONGER_VALID => 'This token is no longer valid.', - self::TOKEN_NOT_YET_VALID => 'This token cannot be used (yet).', - ); + protected $db; /** - * @var array + * + * @var Gems_Log */ - protected $_messageVariables = array( - 'reuse' => '_reuse', - 'tokenFormat' => '_tokenFormat', - ); + protected $logger; /** + * Optional * - * @var int + * @var Zend_Controller_Request_Abstract */ - protected $_reuse; - + protected $request; + /** + * Required * - * @var string + * @var Gems_Project_ProjectSettings */ - protected $_tokenFormat; + protected $project; /** * - * @var Gems_Tracker + * @var Gems_Tracker_TrackerInterface */ protected $tracker; - - public function __construct(Gems_Tracker $tracker, $tokenFormat, $reuse) + + /** + * + * @var Zend_Translate + */ + protected $translate; + + /** + * Should be called after answering the request to allow the Target + * to check if all required registry values have been set correctly. + * + * @return boolean False if required values are missing. + */ + public function checkRegistryRequestsAnswers() { - $this->_reuse = $reuse; - $this->_tokenFormat = $tokenFormat; - $this->tracker = $tracker; + return $this->db instanceof Zend_Db_Adapter_Abstract && + $this->logger instanceof Gems_Log && + $this->project instanceof Gems_Project_ProjectSettings && + $this->tracker instanceof Gems_Tracker_TrackerInterface && + $this->translate instanceof Zend_Translate; } /** + * Returns an array of messages that explain why the most recent isValid() + * call returned false. The array keys are validation failure message identifiers, + * and the array values are the corresponding human-readable message strings. + * + * If isValid() was never called or if the most recent isValid() call + * returned true, then this method returns an empty array. + * + * @return array + */ + public function getMessages() + { + return (array) $this->_messages; + } + + protected function getRequest() + { + if (! $this->request) { + $this->request = Zend_Controller_Front::getInstance()->getRequest(); + } + + return $this->request; + } + + /** * Returns true if and only if $value meets the validation requirements * * If $value fails validation, then this method returns false, and @@ -111,57 +142,100 @@ */ public function isValid($value) { + if ($throttleSettings = $this->project->getAskThrottleSettings()) { + + // Prune the database for (very) old attempts + $where = $this->db->quoteInto('gta_datetime < DATE_SUB(NOW(), INTERVAL ? second)', $throttleSettings['period'] * 20); + $this->db->delete('gems__token_attempts', $where); + + // Retrieve the number of failed attempts that occurred within the specified window + $select = $this->db->select(); + $select->from('gems__token_attempts', array('COUNT(*) AS attempts', 'UNIX_TIMESTAMP(MAX(gta_datetime)) - UNIX_TIMESTAMP() AS last')) + ->where('gta_datetime > DATE_SUB(NOW(), INTERVAL ? second)', $throttleSettings['period']); + $attemptData = $this->db->fetchRow($select); + + $remainingDelay = ($attemptData['last'] + $throttleSettings['delay']); + + + // MUtil_Echo::track($throttleSettings, $attemptData, $remainingDelay); + if ($attemptData['attempts'] > $throttleSettings['threshold'] && $remainingDelay > 0) { + $this->logger->log("Possible token brute force attack, throttling for $remainingDelay seconds", Zend_Log::ERR); + + $this->_messages = $this->translate->_('The server is currently busy, please wait a while and try again.'); + return false; + } + } + + // The pure token check + if ($this->isValidToken($value)) { + return true; + } + + $max_length = $this->tracker->getTokenLibrary()->getLength(); + $this->db->insert('gems__token_attempts', + array( + 'gta_id_token' => substr($value, 0, $max_length), + 'gta_ip_address' => $this->getRequest()->getClientIp() + ) + ); + return false; + } + + /** + * Seperate the incorrect tokens from the right tokens + * + * @param mixed $value + * @return boolean + */ + protected function isValidToken($value) + { // Make sure the value has the right format - $value = $this->tracker->filterToken($value); + $value = $this->tracker->filterToken($value); + $library = $this->tracker->getTokenLibrary(); + $format = $library->getFormat(); + $reuse = $library->hasReuse() ? $library->getReuse() : -1; - if (strlen($value) !== strlen($this->_tokenFormat)) { - $this->_error(self::NOT_TOKEN_FORMAT, $value); + if (strlen($value) !== strlen($format)) { + $this->_messages = sprintf($this->translate->_('Not a valid token. The format for valid tokens is: %s.'), $format); return false; } - - if ($token = $this->tracker->getToken($value)) { + + $token = $this->tracker->getToken($value); + if ($token && $token->exists) { $currentDate = new MUtil_Date(); - + if ($completionTime = $token->getCompletionTime()) { - - if ($this->_reuse >= 0) { - if ($completionTime->diffDays($currentDate) > $this->_reuse) { - // Oldest date AFTER completiondate. Oldest date is today minus reuse time - $this->_error(self::TOKEN_NO_LONGER_VALID, $value); - return false; - } else { - // It is completed and may be used to look up other - // valid tokens. + // Reuse means a user can use an old token to check for new surveys + if ($reuse >= 0) { + // Oldest date AFTER completiondate. Oldest date is today minus reuse time + if ($completionTime->diffDays($currentDate) <= $reuse) { + // It is completed and may still be used to look + // up other valid tokens. return true; } - } else { - $this->_error(self::TOKEN_NO_LONGER_VALID, $value); - return false; } + $this->_messages = $this->translate->_('This token is no longer valid.'); + return false; } - - if ($fromDate = $token->getValidFrom()) { - if ($currentDate->isEarlier($fromDate)) { - // Current date is BEFORE from date - $this->_error(self::TOKEN_NOT_YET_VALID, $value); - return false; - } - } else { - $this->_error(self::TOKEN_NOT_YET_VALID, $value); + + $fromDate = $token->getValidFrom(); + if ((null === $fromDate) || $currentDate->isEarlier($fromDate)) { + // Current date is BEFORE from date + $this->_messages = $this->translate->_('This token cannot (yet) be used.'); return false; } - + if ($untilDate = $token->getValidUntil()) { if ($currentDate->isLater($untilDate)) { //Current date is AFTER until date - $this->_error(self::TOKEN_NO_LONGER_VALID, $value); + $this->_messages = $this->translate->_('This token is no longer valid.'); return false; } } return true; } else { - $this->_error(self::TOKEN_DOES_NOT_EXIST, $value); + $this->_messages = $this->translate->_('Unknown token.'); return false; } } Modified: trunk/library/classes/Gems/Tracker/TrackerInterface.php =================================================================== --- trunk/library/classes/Gems/Tracker/TrackerInterface.php 2012-04-06 10:53:27 UTC (rev 601) +++ trunk/library/classes/Gems/Tracker/TrackerInterface.php 2012-04-06 14:02:23 UTC (rev 602) @@ -115,7 +115,15 @@ public function filterToken($tokenId); /** + * Returns a form to ask for a token * + * @param mixed $args_array MUtil_Ra::args array for Form initiation. + * @return Gems_Tracker_Form_AskTokenForm + */ + public function getAskTokenForm($args_array = null); + + /** + * * @param mixed $respTrackData Track id or array containing trackdata * @return Gems_Tracker_RespondentTrack */ Modified: trunk/library/classes/Gems/Tracker.php =================================================================== --- trunk/library/classes/Gems/Tracker.php 2012-04-06 10:53:27 UTC (rev 601) +++ trunk/library/classes/Gems/Tracker.php 2012-04-06 14:02:23 UTC (rev 602) @@ -379,6 +379,19 @@ } /** + * Returns a form to ask for a token + * + * @param mixed $args_array MUtil_Ra::args array for Form initiation. + * @return Gems_Tracker_Form_AskTokenForm + */ + public function getAskTokenForm($args_array = null) + { + $args = MUtil_Ra::args(func_get_args()); + + return $this->_loadClass('Form_AskTokenForm', true, array($args)); + } + + /** * Load project specific model or general Gems model otherwise * * @return Gems_Tracker_Model_RespondentTrackModel @@ -592,10 +605,7 @@ */ public function getTokenValidator() { - $library = $this->getTokenLibrary(); - $reuse = $library->hasReuse() ? $library->getReuse() : -1; - - return $this->_loadClass('Token_TokenValidator', true, array($this, $library->getFormat(), $reuse)); + return $this->_loadClass('Token_TokenValidator', true); } /** Modified: trunk/library/classes/Gems/User/Form/OrganizationFormAbstract.php =================================================================== --- trunk/library/classes/Gems/User/Form/OrganizationFormAbstract.php 2012-04-06 10:53:27 UTC (rev 601) +++ trunk/library/classes/Gems/User/Form/OrganizationFormAbstract.php 2012-04-06 14:02:23 UTC (rev 602) @@ -54,14 +54,7 @@ protected $_organizationFromUrl = false; /** - * The field name for the submit element. * - * @var string - */ - protected $_submitFieldName = 'button'; - - /** - * * @var Gems_User_User */ protected $_user; @@ -95,12 +88,6 @@ protected $request; /** - * - * @var Zend_Translate - */ - protected $translate; - - /** * The field name for the username element. * * @var string @@ -214,34 +201,6 @@ } /** - * Returns/sets a submit button. - * - * @return Zend_Form_Element_Submit - */ - public function getSubmitButton() - { - $element = $this->getElement($this->_submitFieldName); - - if (! $element) { - // Submit knop - $element = new Zend_Form_Element_Submit($this->_submitFieldName); - $element->setLabel($this->getSubmitButtonLabel()); - $element->setAttrib('class', 'button'); - - $this->addElement($element); - } - - return $element; - } - - /** - * Returns the label for the submitbutton - * - * @return string - */ - abstract public function getSubmitButtonLabel(); - - /** * Returns a user * * @return Gems_User_User Modified: trunk/library/languages/FakeTranslations.php =================================================================== --- trunk/library/languages/FakeTranslations.php 2012-04-06 10:53:27 UTC (rev 601) +++ trunk/library/languages/FakeTranslations.php 2012-04-06 14:02:23 UTC (rev 602) @@ -46,13 +46,6 @@ _('Your account is temporarily blocked, please wait %s minutes'); _('You are not allowed to login from this location.'); -// Gems_Validate_TokenValidator -_('Not a valid token. The format for valid tokens is: %tokenFormat%.'); -_('Unknown token.'); -_('This token is no longer valid.'); -_('This token cannot be used (any more).'); -_('This token cannot be used (yet).'); - // MUtil_Validate_Date_DateAfter _("Date should be '%dateAfter%' or later."); Modified: trunk/library/snippets/Track/AvailableTracksSnippets.php =================================================================== --- trunk/library/snippets/Track/AvailableTracksSnippets.php 2012-04-06 10:53:27 UTC (rev 601) +++ trunk/library/snippets/Track/AvailableTracksSnippets.php 2012-04-06 14:02:23 UTC (rev 602) @@ -29,7 +29,7 @@ * Short description of file * * @package Gems - * @subpackage Snippets\Track + * @subpackage Tracker\Snippets * @author Matijs de Jong <mj...@ma...> * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License @@ -42,7 +42,7 @@ * Long description for class (if any)... * * @package Gems - * @subpackage Snippets\Track + * @subpackage Tracker\Snippets * @copyright Copyright (c) 2011 Erasmus MC * @license New BSD License * @since Class available since version 1.4 Modified: trunk/library/snippets/Track/Token/ShowFirstOpenSnippet.php =================================================================== --- trunk/library/snippets/Track/Token/ShowFirstOpenSnippet.php 2012-04-06 10:53:27 UTC (rev 601) +++ trunk/library/snippets/Track/Token/ShowFirstOpenSnippet.php 2012-04-06 14:02:23 UTC (rev 602) @@ -28,7 +28,7 @@ * * * @package Gems - * @subpackage Snippets\Track + * @subpackage Tracker\Snippets * @author Matijs de Jong <mj...@ma...> * @copyright Copyright (c) 2012 Erasmus MC * @license New BSD License @@ -36,10 +36,12 @@ */ /** + * Show a single button for an unanswered survey or nothing. * + * Works using $project->getAskDelay() * * @package Gems - * @subpackage Snippets\Track + * @subpackage Tracker\Snippets * @copyright Copyright (c) 2012 Erasmus MC * @license New BSD License * @since Class available since version 1.5.3 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2012-05-03 09:15:28
|
Revision: 656 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=656&view=rev Author: matijsdejong Date: 2012-05-03 09:15:14 +0000 (Thu, 03 May 2012) Log Message: ----------- Adapted inPasswordList() to respond correctly when asking for password rules instead of checking. Improved display of violated rules for the current password. Added warning / documentation for Versions.php / gems__patch_levels.10.sql link for new installations Modified Paths: -------------- trunk/library/classes/Gems/Default/IndexAction.php trunk/library/classes/Gems/User/PasswordChecker.php trunk/library/classes/Gems/Versions.php trunk/library/configs/db/tables/gems__patch_levels.10.sql trunk/library/languages/default-en.mo trunk/library/languages/default-en.po trunk/library/languages/default-nl.mo trunk/library/languages/default-nl.po Modified: trunk/library/classes/Gems/Default/IndexAction.php =================================================================== --- trunk/library/classes/Gems/Default/IndexAction.php 2012-05-03 09:05:15 UTC (rev 655) +++ trunk/library/classes/Gems/Default/IndexAction.php 2012-05-03 09:15:14 UTC (rev 656) @@ -214,6 +214,9 @@ if ($messages = $user->reportPasswordWeakness($request->getParam($form->passwordFieldName))) { $user->setPasswordResetRequired(true); $this->addMessage($this->_('Your password must be changed.')); + foreach ($messages as &$message) { + $message = ucfirst($message) . '.'; + } $this->addMessage($messages); } Modified: trunk/library/classes/Gems/User/PasswordChecker.php =================================================================== --- trunk/library/classes/Gems/User/PasswordChecker.php 2012-05-03 09:05:15 UTC (rev 655) +++ trunk/library/classes/Gems/User/PasswordChecker.php 2012-05-03 09:15:14 UTC (rev 656) @@ -57,7 +57,7 @@ * @var Gems_Project_ProjectSettings */ protected $project; - + /** * @var Zend_Cache */ @@ -103,6 +103,44 @@ } /** + * Tests if the password appears on a (weak) password list. The list should + * be a simpe newline separated list of (lowercase) passwords. + * + * @param string $parameter Filename of the password list, relative to APPLICATION_PATH + * @param string $password The password + */ + protected function inPasswordList($parameter, $password) + { + if (empty($parameter)) { + return; + } + + if ($this->cache) { + $passwordList = $this->cache->load('weakpasswordlist'); + } + + if (empty($passwordList)) { + $filename = APPLICATION_PATH . '/' . ltrim($parameter, '/');; + + if (! file_exists($filename)) { + throw new Gems_Exception("Unable to load password list '{$filename}'"); + } + + $passwordList = explode("\n", file_get_contents($filename)); + + if ($this->cache) { + $this->cache->save($passwordList, 'weakpasswordlist'); + } + } + + if (null === $password) { + $this->_addError($this->translate->_('should not appear in the list of common passwords')); + } elseif (in_array(strtolower($password), $passwordList)) { + $this->_addError($this->translate->_('appears in the list of common passwords')); + } + } + + /** * Test the password for minimum number of lower case characters. * * @param mixed $parameter @@ -216,42 +254,6 @@ } } } - - /** - * Tests if the password appears on a (weak) password list. The list should - * be a simpe newline separated list of (lowercase) passwords. - * - * @param string $parameter Filename of the password list, relative to APPLICATION_PATH - * @param string $password The password - */ - protected function inPasswordList($parameter, $password) - { - if (empty($parameter)) { - return; - } - - if ($this->cache) { - $passwordList = $this->cache->load('weakpasswordlist'); - } - - if (empty($passwordList)) { - $filename = APPLICATION_PATH . $parameter; - - if (!file_exists($filename)) { - throw new Gems_Exception("Unable to load password list '{$filename}'"); - } - - $passwordList = explode("\n", file_get_contents($filename)); - } - - if (in_array(strtolower($password), $passwordList)) { - $this->_addError($this->translate->_('should not appear in a list of common passwords')); - } - - if ($this->cache) { - $this->cache->save($passwordList, 'weakpasswordlist'); - } - } /** * Check for password weakness. Modified: trunk/library/classes/Gems/Versions.php =================================================================== --- trunk/library/classes/Gems/Versions.php 2012-05-03 09:05:15 UTC (rev 655) +++ trunk/library/classes/Gems/Versions.php 2012-05-03 09:15:14 UTC (rev 656) @@ -41,21 +41,54 @@ */ class Gems_Versions { + /** + * Build number + * + * Primarily used for database patches + * + * @return int + */ public final function getBuild() { + /** + * DO NOT FORGET !!! to update gems__patch_levels: + * + * For new installations the initial patch level should + * be THIS LEVEL. + * + * This means that future patches for the current level + * will be loaded, but that previous patches are ignored. + */ return 47; } + /** + * The official Gems version number + * + * @return string + */ public final function getGemsVersion() { return '1.5.4'; } + /** + * An optionally project specific version number + * + * Can be overruled at project level + * + * @return string + */ public function getProjectVersion() { return $this->getGemsVersion(); } + /** + * The long string versions + * + * @return string + */ public function getVersion() { $version = $this->getProjectVersion(); Modified: trunk/library/configs/db/tables/gems__patch_levels.10.sql =================================================================== --- trunk/library/configs/db/tables/gems__patch_levels.10.sql 2012-05-03 09:05:15 UTC (rev 655) +++ trunk/library/configs/db/tables/gems__patch_levels.10.sql 2012-05-03 09:15:14 UTC (rev 656) @@ -11,5 +11,5 @@ INSERT INTO gems__patch_levels (gpl_level, gpl_created) VALUES - (42, CURRENT_TIMESTAMP); + (47, CURRENT_TIMESTAMP); Modified: trunk/library/languages/default-en.mo =================================================================== (Binary files differ) Modified: trunk/library/languages/default-en.po =================================================================== --- trunk/library/languages/default-en.po 2012-05-03 09:05:15 UTC (rev 655) +++ trunk/library/languages/default-en.po 2012-05-03 09:15:14 UTC (rev 656) @@ -2,7 +2,7 @@ msgstr "" "Project-Id-Version: GemsTracker EN\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-04-26 13:30+0100\n" +"POT-Creation-Date: 2012-05-03 10:48+0100\n" "PO-Revision-Date: \n" "Last-Translator: Matijs de Jong <mj...@ma...>\n" "Language-Team: Erasmus MGZ <mat...@ma...>\n" @@ -620,7 +620,7 @@ msgid "The token %s does not exist (any more)." msgstr "The token %s does not exist (any more)." -#: classes/Gems/Default/AskAction.php:270 +#: classes/Gems/Default/AskAction.php:269 #, php-format msgid "The survey for token %s is no longer active." msgstr "The survey for token %s is no longer active." @@ -3436,7 +3436,7 @@ msgstr "This survey can be answered until %s." #: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:376 -#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:1156 +#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:1162 #, php-format msgid "The '%s' survey is no longer active. The survey was removed from LimeSurvey!" msgstr "The '%s' survey is no longer active. The survey was removed from LimeSurvey!" @@ -3466,37 +3466,37 @@ msgstr "Required fields: %s" #: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:466 -#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:1309 +#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:1315 #, php-format msgid "The status of the '%s' survey has changed." msgstr "The status of the '%s' survey has changed." #: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:472 -#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:1315 +#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:1321 #, php-format msgid "Survey '%s' IS NO LONGER ACTIVE!!!" msgstr "Survey '%s' IS NO LONGER ACTIVE!!!" #: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:478 -#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:1321 +#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:1327 #, php-format msgid "The status of the '%s' survey has changed to '%s'." msgstr "The status of the '%s' survey has changed to '%s'." #: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:481 -#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:1324 +#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:1330 #, php-format msgid "The status warning for the '%s' survey was removed." msgstr "The status warning for the '%s' survey was removed." #: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:487 -#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:1330 +#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:1336 #, php-format msgid "The name of the '%s' survey has changed to '%s'." msgstr "The name of the '%s' survey has changed to '%s'." #: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:498 -#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:1340 +#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:1346 #, php-format msgid "Imported the '%s' survey." msgstr "Imported the '%s' survey." @@ -3505,12 +3505,12 @@ msgid "Submitdate" msgstr "Submitdate" -#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:1136 +#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:1142 #, php-format msgid "Updated %d Gems tokens to new token definition." msgstr "Updated %d Gems tokens to new token definition." -#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:1291 +#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:1297 #, php-format msgid "Updated %d token to new token definition in survey '%s'." msgid_plural "Updated %d tokens to new token definition in survey '%s'." @@ -3605,59 +3605,67 @@ msgid "Unknown token." msgstr "Unknown token." -#: classes/Gems/User/PasswordChecker.php:95 +#: classes/Gems/User/PasswordChecker.php:100 #, php-format msgid "should contain at least one uppercase character" msgid_plural "should contain at least %d uppercase characters" msgstr[0] "should contain at least one uppercase character" msgstr[1] "should contain at least %d uppercase characters" -#: classes/Gems/User/PasswordChecker.php:112 +#: classes/Gems/User/PasswordChecker.php:137 +msgid "should not appear in the list of common passwords" +msgstr "should not appear in the list of common passwords" + +#: classes/Gems/User/PasswordChecker.php:139 +msgid "appears in the list of common passwords" +msgstr "appears in the list of common passwords" + +#: classes/Gems/User/PasswordChecker.php:155 #, php-format msgid "should contain at least one lowercase character" msgid_plural "should contain at least %d lowercase characters" msgstr[0] "should contain at least one lowercase character" msgstr[1] "should contain at least %d lowercase characters" -#: classes/Gems/User/PasswordChecker.php:127 +#: classes/Gems/User/PasswordChecker.php:170 #, php-format msgid "should be at least %d characters long" msgstr "should be at least %d characters long" -#: classes/Gems/User/PasswordChecker.php:145 +#: classes/Gems/User/PasswordChecker.php:188 #, php-format msgid "should contain at least one non alphabetic character" msgid_plural "should contain at least %d non alphabetic characters" msgstr[0] "should contain at least one non alphabetic character" msgstr[1] "should contain at least %d non alphabetic characters" -#: classes/Gems/User/PasswordChecker.php:148 +#: classes/Gems/User/PasswordChecker.php:191 msgid "should not contain non alphabetic characters" msgstr "should not contain non alphabetic characters" -#: classes/Gems/User/PasswordChecker.php:167 +#: classes/Gems/User/PasswordChecker.php:210 #, php-format msgid "should contain at least one non alphanumeric character" msgid_plural "should contain at least %d non alphanumeric characters" msgstr[0] "should contain at least one non alphanumeric character" msgstr[1] "should contain at least %d non alphanumeric characters" -#: classes/Gems/User/PasswordChecker.php:170 +#: classes/Gems/User/PasswordChecker.php:213 msgid "should not contain non alphanumeric characters" msgstr "should not contain non alphanumeric characters" -#: classes/Gems/User/PasswordChecker.php:188 +#: classes/Gems/User/PasswordChecker.php:231 msgid "should not contain your login name" msgstr "should not contain your login name" -#: classes/Gems/User/PasswordChecker.php:207 +#: classes/Gems/User/PasswordChecker.php:250 #, php-format msgid "should contain at least one number" msgid_plural "should contain at least %d numbers" msgstr[0] "should contain at least one number" msgstr[1] "should contain at least %d numbers" -#: classes/Gems/User/PasswordChecker.php:210 +#: classes/Gems/User/PasswordChecker.php:253 msgid "may not contain numbers" msgstr "may not contain numbers" @@ -3778,7 +3786,7 @@ msgid "Stop (per respondent or track only)" msgstr "Stop (per patient or track only)" -#: classes/Gems/Util/TrackData.php:132 +#: classes/Gems/Util/TrackData.php:147 msgid "Inactive" msgstr "Inactive" @@ -4048,24 +4056,19 @@ msgstr "Edit track" #: snippets/DeleteSingleSurveyInSourceTokenSnippet.php:172 -#: snippets/DeleteSingleSurveyNotUsedTokenSnippet.php:143 -#: snippets/DeleteTrackTokenSnippet.php:193 msgid "Edit token" msgstr "Edit token" #: snippets/DeleteSingleSurveyInSourceTokenSnippet.php:225 -#: snippets/DeleteTrackTokenSnippet.php:245 #, php-format msgid "Redo of token %s." msgstr "Redo of token %s." #: snippets/DeleteSingleSurveyInSourceTokenSnippet.php:228 -#: snippets/DeleteTrackTokenSnippet.php:248 msgid "Old comment:" msgstr "Old comment:" #: snippets/DeleteSingleSurveyInSourceTokenSnippet.php:249 -#: snippets/DeleteTrackTokenSnippet.php:269 #, php-format msgid "Created replacement token %2$s for token %1$s." msgstr "Created replacement token %2$s for token %1$s." @@ -4092,6 +4095,7 @@ msgstr "Lists choices changed." #: snippets/EditSingleSurveyTokenSnippet.php:132 +#: snippets/ShowSingleSurveyTokenSnippet.php:150 msgid "Show survey" msgstr "Show survey" @@ -4142,7 +4146,6 @@ msgstr "Selected surveys" #: snippets/ShowSingleSurveyTokenSnippet.php:76 -#: snippets/ShowTrackTokenSnippet.php:77 msgid "Actions" msgstr "Actions" Modified: trunk/library/languages/default-nl.mo =================================================================== (Binary files differ) Modified: trunk/library/languages/default-nl.po =================================================================== --- trunk/library/languages/default-nl.po 2012-05-03 09:05:15 UTC (rev 655) +++ trunk/library/languages/default-nl.po 2012-05-03 09:15:14 UTC (rev 656) @@ -1,5000 +1,5029 @@ -msgid "" -msgstr "" -"Project-Id-Version: GemsTracker NL\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-05-02 09:39+0100\n" -"PO-Revision-Date: \n" -"Last-Translator: Michiel Rook <in...@to...>\n" -"Language-Team: Erasmus MGZ <mat...@ma...>\n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Poedit-Language: Dutch\n" -"X-Poedit-Country: NETHERLANDS\n" -"X-Poedit-SourceCharset: iso-8859-1\n" -"X-Poedit-Basepath: ../\n" -"X-Poedit-KeywordsList: plural:1,2\n" -"X-Poedit-SearchPath-0: .\n" - -#: classes/GemsEscort.php:212 -#, php-format -msgid "Path %s not writable" -msgstr "Path %s niet schrijfbaar" - -#: classes/GemsEscort.php:750 -#, php-format -msgid "You are logged in as %s" -msgstr "Ingelogd als %s" - -#: classes/GemsEscort.php:752 -msgid "Logoff" -msgstr "Uitloggen" - -#: classes/GemsEscort.php:755 -msgid "You are not logged in" -msgstr "U bent niet ingelogd" - -#: classes/GemsEscort.php:939 -#, php-format -msgid "User: %s" -msgstr "Login: %s" - -#: classes/GemsEscort.php:964 -msgid "version" -msgstr "versie" - -#: classes/GemsEscort.php:1395 -msgid "Take note: your session has expired, your inputs were not saved. Please check the input data and try again" -msgstr "Let op: uw sessie is verlopen, uw invoer is niet opgeslagen. Controleer uw gegevens en probeer a.u.b. opnieuw." - -#: classes/GemsEscort.php:1526 -msgid "Please check back later." -msgstr "Probeer het later opnieuw." - -#: classes/GemsEscort.php:1528 -#: classes/GemsEscort.php:1533 -msgid "System is in maintenance mode" -msgstr "Systeem is in onderhoudsmodus" - -#: classes/GemsEscort.php:1543 -msgid "No access to site." -msgstr "Geen toegang tot website." - -#: classes/GemsEscort.php:1545 -msgid "You have no access to this site." -msgstr "U heeft geen toegang tot deze website." - -#: classes/GemsEscort.php:1561 -msgid "No access to page" -msgstr "Geen toegang tot pagina" - -#: classes/GemsEscort.php:1563 -#, php-format -msgid "Access to this page is not allowed for current role: %s." -msgstr "U heeft geen toegang tot deze pagina. Uw huidige rol is: %s." - -#: classes/GemsEscort.php:1573 -msgid "You are no longer logged in." -msgstr "U bent niet meer ingelogd." - -#: classes/GemsEscort.php:1574 -msgid "You must login to access this page." -msgstr "U moet ingelogd zijn voor toegang tot deze pagina." - -#: classes/GemsEscort.php:1714 -#, php-format -msgid "%d survey" -msgid_plural "%d surveys" -msgstr[0] "%d vragenlijst" -msgstr[1] "%d vragenlijsten" - -#: classes/Gems/Pdf.php:198 -#, php-format -msgid "PDF Source File '%s' not found!" -msgstr "PDF bron bestand %s niet gevonden!" - -#: classes/Gems/Pdf.php:240 -#, php-format -msgid "Could not create '%s' directory." -msgstr "Kon de directory '%s' niet aanmaken." - -#: classes/Gems/Pdf.php:283 -#, php-format -msgid " The error message is: %s" -msgstr "De foutmelding is: %s" - -#: classes/Gems/Tracker.php:771 -msgid "Checks performed" -msgstr "Controle uitgevoerd" - -#: classes/Gems/Upgrades.php:77 -msgid "Syncing surveys for all sources" -msgstr "Vragenlijsten synchroniseren voor alle bronnen." - -#: classes/Gems/AccessLog.php:236 -msgid "Database needs to be updated!" -msgstr "Database dient ververst te worden!" - -#: classes/Gems/Html.php:154 -msgid "<< First" -msgstr "<< Eerste" - -#: classes/Gems/Html.php:155 -msgid "< Previous" -msgstr "< Terug" - -#: classes/Gems/Html.php:156 -msgid "Next >" -msgstr "Verder >" - -#: classes/Gems/Html.php:157 -msgid "Last >>" -msgstr "Laatste >>" - -#: classes/Gems/Html.php:158 -msgid " | " -msgstr " | " - -#: classes/Gems/Html.php:162 -msgid "to" -msgstr "tot" - -#: classes/Gems/Html.php:163 -msgid "of" -msgstr "van" - -#: classes/Gems/Menu.php:140 -#, php-format -msgid "About %s" -msgstr "Over %s" - -#: classes/Gems/Menu.php:144 -msgid "Reporting bugs" -msgstr "Meld een bug" - -#: classes/Gems/Menu.php:147 -msgid "Support" -msgstr "Ondersteuning" - -#: classes/Gems/Menu.php:167 -msgid "Project setup" -msgstr "Projectinfo" - -#: classes/Gems/Menu.php:170 -msgid "Database" -msgstr "Database" - -#: classes/Gems/Menu.php:174 -msgid "Content" -msgstr "Inhoud" - -#: classes/Gems/Menu.php:177 -msgid "Execute" -msgstr "Uitvoeren" - -#: classes/Gems/Menu.php:182 -msgid "Patches" -msgstr "Patches" - -#: classes/Gems/Menu.php:183 -msgid "Execute new" -msgstr "Nieuwe aanmaken" - -#: classes/Gems/Menu.php:185 -msgid "Refresh translateables" -msgstr "Ververs vertaalbaren" - -#: classes/Gems/Menu.php:187 -msgid "Run SQL" -msgstr "SQL uitvoeren" - -#: classes/Gems/Menu.php:190 -msgid "Reception codes" -msgstr "Ontvangst codes" - -#: classes/Gems/Menu.php:193 -msgid "Consents" -msgstr "Toestemmingen" - -#: classes/Gems/Menu.php:196 -msgid "Roles" -msgstr "Rollen" - -#: classes/Gems/Menu.php:197 -msgid "Assigned" -msgstr "Toegewezen" - -#: classes/Gems/Menu.php:198 -msgid "Privileges" -msgstr "Priviléges" - -#: classes/Gems/Menu.php:201 -msgid "Groups" -msgstr "Groepen" - -#: classes/Gems/Menu.php:204 -msgid "Organizations" -msgstr "Organisaties" - -#: classes/Gems/Menu.php:207 -msgid "Staff" -msgstr "Medewerkers" - -#: classes/Gems/Menu.php:210 -msgid "Logging" -msgstr "Logboek" - -#: classes/Gems/Menu.php:214 -msgid "Maintenance" -msgstr "Onderhoud" - -#: classes/Gems/Menu.php:219 -msgid "Upgrade" -msgstr "Upgrade" - -#: classes/Gems/Menu.php:220 -msgid "Show" -msgstr "Toon" - -#: classes/Gems/Menu.php:221 -msgid "Execute all" -msgstr "Alles uitvoeren" - -#: classes/Gems/Menu.php:222 -msgid "Execute this" -msgstr "Dit uitvoeren" - -#: classes/Gems/Menu.php:223 -msgid "Execute from here" -msgstr "Uitvoeren vanaf hier" - -#: classes/Gems/Menu.php:224 -msgid "Execute to here" -msgstr "Uitvoeren tot hier" - -#: classes/Gems/Menu.php:236 -#, php-format -msgid "Stand-alone privilige: %s" -msgstr "Zelfstandig privilege: %s" - -#: classes/Gems/Menu.php:243 -msgid "Logon" -msgstr "Login" - -#: classes/Gems/Menu.php:244 -msgid "Lost password" -msgstr "Wachtwoord vergeten" - -#: classes/Gems/Menu.php:245 -msgid "Your account" -msgstr "Uw account" - -#: classes/Gems/Menu.php:246 -msgid "Activity overview" -msgstr "Activiteiten overzicht" - -#: classes/Gems/Menu.php:247 -msgid "Change password" -msgstr "Uw wachtwoord" - -#: classes/Gems/Menu.php:248 -#: classes/Gems/Menu.php:323 -msgid "Token" -msgstr "Kenmerk" - -#: classes/Gems/Menu.php:284 -msgid "Track" -msgstr "Traject" - -#: classes/Gems/Menu.php:291 -#: classes/Gems/Menu.php:342 -msgid "Add" -msgstr "Voeg toe" - -#: classes/Gems/Menu.php:295 -msgid "Preview" -msgstr "Preview" - -#: classes/Gems/Menu.php:302 -msgid "Tracks" -msgstr "Trajecten" - -#: classes/Gems/Menu.php:315 -msgid "Assignments" -msgstr "Toewijzingen" - -#: classes/Gems/Menu.php:327 -msgid "Edit" -msgstr "Wijzig" - -#: classes/Gems/Menu.php:331 -msgid "Delete" -msgstr "Verwijder" - -#: classes/Gems/Menu.php:336 -msgid "Surveys" -msgstr "Vragenlijsten" - -#: classes/Gems/Menu.php:368 -msgid "Fill in" -msgstr "Vul in" - -#: classes/Gems/Menu.php:371 -msgid "Print PDF" -msgstr "Print PDF" - -#: classes/Gems/Menu.php:374 -msgid "E-Mail now!" -msgstr "Email nu!" - -#: classes/Gems/Menu.php:380 -msgid "Answers" -msgstr "Antwoorden" - -#: classes/Gems/Menu.php:530 -msgid "Respondents" -msgstr "Patiënten" - -#: classes/Gems/Menu.php:538 -msgid "Overview" -msgstr "Overzicht" - -#: classes/Gems/Menu.php:545 -msgid "Project" -msgstr "Project" - -#: classes/Gems/Menu.php:548 -msgid "Setup" -msgstr "Beheer" - -#: classes/Gems/Menu.php:551 -msgid "Mail" -msgstr "Email" - -#: classes/Gems/Menu.php:554 -msgid "Track Builder" -msgstr "Traject bouwer" - -#: classes/Gems/Menu.php:563 -msgid "Contact" -msgstr "Contact" - -#: classes/Gems/Menu.php:576 -msgid "Changelog" -msgstr "Changelog" - -#: classes/Gems/Model.php:205 -msgid "Respondent nr" -msgstr "Patiënt nr" - -#: classes/Gems/Model.php:206 -msgid "Opened" -msgstr "Bekeken op" - -#: classes/Gems/Model.php:207 -msgid "Consent" -msgstr "Toestemming" - -#: classes/Gems/Model.php:209 -msgid "E-Mail" -msgstr "Email" - -#: classes/Gems/Model.php:214 -msgid "Gender" -msgstr "Geslacht" - -#: classes/Gems/Model.php:215 -msgid "First name" -msgstr "Voornaam" - -#: classes/Gems/Model.php:216 -msgid "Surname prefix" -msgstr "Tussenvoegsel" - -#: classes/Gems/Model.php:217 -msgid "Last name" -msgstr "Achternaam" - -#: classes/Gems/Model.php:219 -msgid "Name" -msgstr "Naam" - -#: classes/Gems/Model.php:222 -msgid "Street" -msgstr "Straat" - -#: classes/Gems/Model.php:223 -msgid "Zipcode" -msgstr "Postcode" - -#: classes/Gems/Model.php:224 -msgid "City" -msgstr "Woonplaats" - -#: classes/Gems/Model.php:226 -msgid "Phone" -msgstr "Telefoon" - -#: classes/Gems/Model.php:228 -msgid "Birthday" -msgstr "Geboren op" - -#: classes/Gems/UpgradesAbstract.php:154 -msgid "Already at max. level." -msgstr "Al op het hoogste niveau." - -#: classes/Gems/UpgradesAbstract.php:161 -#, php-format -msgid "Trying upgrade for %s from level %s to level %s" -msgstr "Probeert upgrade voor %s van niveau %s naar niveau %s uit te voeren" - -#: classes/Gems/UpgradesAbstract.php:169 -#, php-format -msgid "Trying upgrade for %s to level %s: %s" -msgstr "Probeert upgrade voor %s naar niveau %s: %s" - -#: classes/Gems/Model/DbaModel.php:97 -msgid "created" -msgstr "bestaat" - -#: classes/Gems/Model/DbaModel.php:98 -msgid "not created" -msgstr "niet aanwezig" - -#: classes/Gems/Model/DbaModel.php:99 -msgid "unknown" -msgstr "onbekend" - -#: classes/Gems/Model/DbaModel.php:420 -#, php-format -msgid "Executed %2$s creation script %1$s:" -msgstr "Uitvoerresultaat %2$s script %1$s:" - -#: classes/Gems/Model/DbaModel.php:430 -#, php-format -msgid "%d record(s) returned as result set %d in step %d of %d." -msgstr "%d rij(en) in resultaat %d in stap %d van %d." - -#: classes/Gems/Model/DbaModel.php:434 -#, php-format -msgid "%d record(s) updated in step %d of %d." -msgstr "In stap %2$d van %3$d zijn %1$d rij(en) aangepast." - -#: classes/Gems/Model/DbaModel.php:437 -#, php-format -msgid "Script ran step %d of %d succesfully." -msgstr "Stap %d van %d in het script met succes uitgevoerd." - -#: classes/Gems/Model/DbaModel.php:440 -msgid " in step " -msgstr " in stap " - -#: classes/Gems/Model/DbaModel.php:445 -#, php-format -msgid "No script for %1$s." -msgstr "Geen script voor %1$s:" - -#: classes/Gems/Export/Spss.php:59 -msgid "Which file" -msgstr "Kies bestand" - -#: classes/Gems/Export/Spss.php:60 -msgid "syntax" -msgstr "syntax" - -#: classes/Gems/Export/Spss.php:61 -msgid "data" -msgstr "data" - -#: classes/Gems/Export/Spss.php:66 -msgid "Some help for this export" -msgstr "Uitleg over deze export mogelijkheid" - -#: classes/Gems/Export/Excel.php:60 -msgid "Excel options" -msgstr "Excel opties" - -#: classes/Gems/Export/Excel.php:62 -msgid "Export questions instead of variable names" -msgstr "Exporteer vragen in plaats van variabele namen" - -#: classes/Gems/Export/Excel.php:63 -msgid "Format answers" -msgstr "Antwoorden opmaken" - -#: classes/Gems/Util/Translated.php:81 -msgid "-" -msgstr "n.v.t." - -#: classes/Gems/Util/Translated.php:96 -msgid "forever" -msgstr "altijd" - -#: classes/Gems/Util/Translated.php:105 -msgid "n/a" -msgstr "n.v.t." - -#: classes/Gems/Util/Translated.php:114 -msgid "never" -msgstr "nooit" - -#: classes/Gems/Util/Translated.php:139 -msgid "2 days ago" -msgstr "Eergisteren" - -#: classes/Gems/Util/Translated.php:142 -msgid "Yesterday" -msgstr "Gisteren" - -#: classes/Gems/Util/Translated.php:145 -msgid "Today" -msgstr "Vandaag" - -#: classes/Gems/Util/Translated.php:148 -msgid "Tomorrow" -msgstr "Morgen" - -#: classes/Gems/Util/Translated.php:151 -msgid "Over 2 days" -msgstr "Overmorgen" - -#: classes/Gems/Util/Translated.php:156 -#, php-format -msgid "Over %d days" -msgstr "Over %d dagen" - -#: classes/Gems/Util/Translated.php:158 -#, php-format -msgid "%d days ago" -msgstr "%d dagen terug" - -#: classes/Gems/Util/Translated.php:177 -msgid "Send multiple mails per respondent, one for each checked token." -msgstr "Verstuur meerdere emails per patiënt, één per gekozen kenmerk." - -#: classes/Gems/Util/Translated.php:178 -msgid "Send one mail per respondent, mark all checked tokens as send." -msgstr "Verstuur één email per patiënt, zet alle gekozen kenmerken op verzonden." - -#: classes/Gems/Util/Translated.php:179 -msgid "Send one mail per respondent, mark only mailed tokens as send." -msgstr "Verstuur één email per patiënt, zet alleen de verzonden kenmerken op verzonden." - -#: classes/Gems/Util/Translated.php:204 -msgid "Male" -msgstr "Man" - -#: classes/Gems/Util/Translated.php:204 -msgid "Female" -msgstr "Vrouw" - -#: classes/Gems/Util/Translated.php:204 -msgid "Unknown" -msgstr "Onbekend" - -#: classes/Gems/Util/Translated.php:217 -msgid "mr." -msgstr "meneer" - -#: classes/Gems/Util/Translated.php:217 -msgid "mrs." -msgstr "mevrouw" - -#: classes/Gems/Util/Translated.php:217 -msgid "mr./mrs." -msgstr "de heer/mevrouw" - -#: classes/Gems/Util/Translated.php:230 -msgid "Mr." -msgstr "De heer" - -#: classes/Gems/Util/Translated.php:230 -msgid "Mrs." -msgstr "Mevrouw" - -#: classes/Gems/Util/Translated.php:230 -msgid "Mr./Mrs." -msgstr "De heer/Mevrouw" - -#: classes/Gems/Util/Translated.php:238 -msgid "Yes" -msgstr "Ja" - -#: classes/Gems/Util/Translated.php:238 -#: classes/Gems/Util/ReceptionCodeLibrary.php:99 -#: classes/Gems/Util/ReceptionCodeLibrary.php:123 -msgid "No" -msgstr "Nee" - -#: classes/Gems/Util/TrackData.php:147 -msgid "Active" -msgstr "Actief" - -#: classes/Gems/Util/TrackData.php:147 -msgid "Inactive" -msgstr "Inactief" - -#: classes/Gems/Util/ReceptionCodeLibrary.php:100 -msgid "Yes (forget answers)" -msgstr "Ja (vergeet antwoorden)" - -#: classes/Gems/Util/ReceptionCodeLibrary.php:101 -msgid "Yes (keep answers)" -msgstr "Ja (met behoud van antwoorden)" - -#: classes/Gems/Util/ReceptionCodeLibrary.php:124 -msgid "Yes (individual surveys only)" -msgstr "Ja (alleen zelfstandige vragenlijsten)" - -#: classes/Gems/Util/ReceptionCodeLibrary.php:125 -msgid "Stop (per respondent or track only)" -msgstr "Stop (alleen per patiënt og traject)" - -#: classes/Gems/Controller/ModelActionAbstract.php:97 -msgid "Cancel" -msgstr "Annuleren" - -#: classes/Gems/Controller/ModelSnippetActionAbstract.php:228 -#: classes/Gems/Controller/BrowseEditAction.php:354 -#, php-format -msgid "New %s..." -msgstr "Nieuwe %s..." - -#: classes/Gems/Controller/ModelSnippetActionAbstract.php:238 -#, php-format -msgid "Do you want to delete this %s?" -msgstr "Weet u zeker dat deze %s verwijderd moet worden?" - -#: classes/Gems/Controller/ModelSnippetActionAbstract.php:248 -#: classes/Gems/Controller/BrowseEditAction.php:387 -#, php-format -msgid "Delete %s" -msgstr "Verwijder %s" - -#: classes/Gems/Controller/ModelSnippetActionAbstract.php:258 -#, php-format -msgid "Edit %s..." -msgstr "Bewerk %s..." - -#: classes/Gems/Controller/ModelSnippetActionAbstract.php:271 -msgid "No data found." -msgstr "Geen gegevens gevonden." - -#: classes/Gems/Controller/ModelSnippetActionAbstract.php:333 -#, php-format -msgid "No %s found..." -msgstr "Geen %s gevonden..." - -#: classes/Gems/Controller/ModelSnippetActionAbstract.php:343 -#, php-format -msgid "Showing %s" -msgstr "Toon %s" - -#: classes/Gems/Controller/ModelSnippetActionAbstract.php:379 -msgid "item" -msgid_plural "items" -msgstr[0] "item" -msgstr[1] "items" - -#: classes/Gems/Controller/BrowseEditAction.php:391 -#, php-format -msgid "%2$u %1$s deleted" -msgstr "%2$u %1$s verwijderd" - -#: classes/Gems/Controller/BrowseEditAction.php:405 -#, php-format -msgid "Edit %s" -msgstr "Bewerk %s" - -#: classes/Gems/Controller/BrowseEditAction.php:502 -msgid "Free search text" -msgstr "Vrije zoek tekst" - -#: classes/Gems/Controller/BrowseEditAction.php:573 -msgid "Search" -msgstr "Zoeken" - -#: classes/Gems/Controller/BrowseEditAction.php:589 -#, php-format -msgid "No %s found" -msgstr "Geen %s gevonden" - -#: classes/Gems/Controller/BrowseEditAction.php:673 -#, php-format -msgid "No %s found." -msgstr "Geen %s gevonden." - -#: classes/Gems/Controller/BrowseEditAction.php:791 -msgid "Are you sure?" -msgstr "Weet u het zeker?" - -#: classes/Gems/Controller/BrowseEditAction.php:861 -#, php-format -msgid "Unknown %s requested" -msgstr "Onjuist %s verzoek" - -#: classes/Gems/Controller/BrowseEditAction.php:884 -#, php-format -msgid "New %1$s..." -msgstr "Nieuwe %1$s..." - -#: classes/Gems/Controller/BrowseEditAction.php:892 -msgid "Save" -msgstr "Opslaan" - -#: classes/Gems/Controller/BrowseEditAction.php:928 -#, php-format -msgid "%2$u %1$s saved" -msgstr "%2$u %1$s opgeslagen" - -#: classes/Gems/Controller/BrowseEditAction.php:931 -msgid "No changes to save." -msgstr "Geen verandering om op te slaan." - -#: classes/Gems/Controller/BrowseEditAction.php:940 -msgid "Input error! No changes saved!" -msgstr "Invoer fout! Veranderingen niet opgeslagen!" - -#: classes/Gems/Controller/BrowseEditAction.php:968 -#, php-format -msgid "Show %s" -msgstr "Toon %s" - -#: classes/Gems/Controller/BrowseEditAction.php:975 -#, php-format -msgid "Unknown %s." -msgstr "%s is onbekend." - -#: classes/Gems/Controller/Action/Helper/BatchRunner.php:65 -msgid "Prepare recheck" -msgstr "Hercontrole voorbereiden" - -#: classes/Gems/Controller/Action/Helper/BatchRunner.php:68 -#, php-format -msgid "Start %s jobs" -msgstr "Start %s opdrachten" - -#: classes/Gems/Controller/Action/Helper/BatchRunner.php:71 -msgid "Nothing to do." -msgstr "Niets te doen." - -#: classes/Gems/Snippets/TokenModelSnippetAbstract.php:59 -msgid "+" -msgstr "+" - -#: classes/Gems/Email/MailTemplateForm.php:56 -msgid "Send (test)" -msgstr "Verstuur (test)" - -#: classes/Gems/Email/MailTemplateForm.php:81 -#: classes/Gems/Email/EmailFormAbstract.php:193 -#: classes/Gems/Email/EmailFormAbstract.php:251 -msgid "From" -msgstr "Van" - -#: classes/Gems/Email/MailTemplateForm.php:95 -msgid "Test using" -msgstr "Test met" - -#: classes/Gems/Email/MailTemplateForm.php:124 -msgid "To (test)" -msgstr "Aan (test)" - -#: classes/Gems/Email/MailTemplateForm.php:168 -msgid "Test mail send, changes not saved!" -msgstr "Test email verstuurd. De veranderingen zijn nog niet opgeslagen!" - -#: classes/Gems/Email/EmailFormAbstract.php:101 -msgid "no email adress" -msgstr "geen email adres" - -#: classes/Gems/Email/EmailFormAbstract.php:145 -msgid "Available fields" -msgstr "Beschikbare velden" - -#: classes/Gems/Email/EmailFormAbstract.php:153 -msgid "BBCode" -msgstr "BBCode" - -#: classes/Gems/Email/EmailFormAbstract.php:168 -msgid "Message" -msgstr "Bericht" - -#: classes/Gems/Email/EmailFormAbstract.php:216 -msgid "Organization does not have an e-mail address." -msgstr "Organisatie heeft geen email adres." - -#: classes/Gems/Email/EmailFormAbstract.php:231 -msgid "You do not have an e-mail address." -msgstr "U heeft geen email adres." - -#: classes/Gems/Email/EmailFormAbstract.php:291 -msgid "Preview HTML" -msgstr "Html voorbeeld" - -#: classes/Gems/Email/EmailFormAbstract.php:300 -msgid "Preview text" -msgstr "Tekstvoorbeeld" - -#: classes/Gems/Email/EmailFormAbstract.php:308 -msgid "Template" -msgstr "Sjabloon" - -#: classes/Gems/Email/EmailFormAbstract.php:332 -msgid "Send" -msgstr "Verstuur" - -#: classes/Gems/Email/EmailFormAbstract.php:349 -msgid "Subject" -msgstr "Onderwerp" - -#: classes/Gems/Email/EmailFormAbstract.php:429 -msgid "Input error! No changes made!" -msgstr "Invoer fout! Veranderingen niet uitgevoerd!" - -#: classes/Gems/Email/EmailFormAbstract.php:446 -msgid "Subject:" -msgstr "Onderwerp:" - -#: classes/Gems/Email/EmailFormAbstract.php:474 -msgid "Field" -msgstr "Veld" - -#: classes/Gems/Email/EmailFormAbstract.php:475 -msgid "Value" -msgstr "waarde" - -#: classes/Gems/Email/EmailFormAbstract.php:478 -msgid "BBCode info page" -msgstr "BBCode info pagina" - -#: classes/Gems/Email/OneMailForm.php:47 -#: classes/Gems/Email/MultiMailForm.php:49 -msgid "On this test system all mail will be delivered to the from address." -msgstr "Op dit test systeem worden alle emails gestuurd naar het \"van\" adres." - -#: classes/Gems/Email/OneMailForm.php:55 -msgid "Round" -msgstr "Ronde" - -#: classes/Gems/Email/OneMailForm.php:57 -msgid "Survey" -msgstr "Vragenlijst" - -#: classes/Gems/Email/OneMailForm.php:58 -msgid "Last contact" -msgstr "Contactdatum" - -#: classes/Gems/Email/OneMailForm.php:87 -#: classes/Gems/Email/MultiMailForm.php:101 -msgid "To" -msgstr "Aan" - -#: classes/Gems/Email/OneMailForm.php:131 -#: classes/Gems/Email/TemplateMailer.php:217 -msgid "The sending of emails was blocked for this installation." -msgstr "Het versturen van emails is geblokkeerd in deze installatie." - -#: classes/Gems/Email/OneMailForm.php:141 -#: classes/Gems/Email/TemplateMailer.php:250 -msgid "Mail failed to send." -msgstr "Mail sturen mislukt." - -#: classes/Gems/Email/OneMailForm.php:145 -#, php-format -msgid "Sent email to %s." -msgstr "Email naar %s verzonden." - -#: classes/Gems/Email/TemplateMailer.php:266 -#, php-format -msgid "Sent %d e-mails, updated %d tokens." -msgstr "%d emails verzonden en %d kenmerken bijgewerkt." - -#: classes/Gems/Email/MultiMailForm.php:75 -msgid "Method" -msgstr "Methode" - -#: classes/Gems/Email/MultiMailForm.php:122 -msgid "Survey has been taken." -msgstr "Vragenlijsten is al afgenomen" - -#: classes/Gems/Email/MultiMailForm.php:125 -msgid "Respondent does not have an e-mail address." -msgstr "Patiënt heeft geen email adres" - -#: classes/Gems/Email/MultiMailForm.php:128 -msgid "Survey cannot be taken by a respondent." -msgstr "Deze vragenlijst kan niet door een patiënt ingevuld worden." - -#: classes/Gems/Email/MultiMailForm.php:130 -msgid "Survey cannot be taken at this moment." -msgstr "Deze vragenlijst kan op dit moment niet afgenomen worden." - -#: classes/Gems/Tracker/ChangeTracker.php:64 -#, php-format -msgid "Checked %d tracks." -msgstr "%d trajecten gecontroleerd." - -#: classes/Gems/Tracker/ChangeTracker.php:67 -#, php-format -msgid "Checked %d tokens." -msgstr "%d kenmerken gecontroleerd." - -#: classes/Gems/Tracker/ChangeTracker.php:72 -#, php-format -msgid "Answers changed by survey completion event for %d tokens." -msgstr "Bij %d kenmerken zijn de antwoorden aangepast door vragenlijst afrondingscode." - -#: classes/Gems/Tracker/ChangeTracker.php:75 -#, php-format -msgid "Results and timing changed for %d tokens." -msgstr "Bij %d kenmerken zijn de resultaten en/of de tijdstippen aangepast." - -#: classes/Gems/Tracker/ChangeTracker.php:78 -#, php-format -msgid "%d token round completion events caused changed to %d tokens." -msgstr "%2$d kenmerken zijn aangepast vanwege %1$d ronde voltooiingen." - -#: classes/Gems/Tracker/ChangeTracker.php:81 -#, php-format -msgid "%2$d token date changes in %1$d tracks." -msgstr "De datum van %2$d kenmerken is aangepast in %1$d trajecten." - -#: classes/Gems/Tracker/ChangeTracker.php:84 -#, php-format -msgid "Round changes propagated to %d tokens." -msgstr "%d kenmerken veranderd door ronde aanpassingen." - -#: classes/Gems/Tracker/ChangeTracker.php:87 -#, php-format -msgid "%d tokens deleted by round changes." -msgstr "Vanwege ronde aanpassingen zijn %d kenmerken verwijderd." - -#: classes/Gems/Tracker/ChangeTracker.php:90 -#, php-format -msgid "%d tokens created to by round changes." -msgstr "Vanwege ronde aanpassingen zijn nieuwe %d kenmerken gecreëerd." - -#: classes/Gems/Tracker/ChangeTracker.php:93 -msgid "No tokens were changed." -msgstr "Geen kenmerken veranderd." - -#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:370 -msgid "Track start" -msgstr "Traject start" - -#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:371 -msgid "Track end" -msgstr "Traject einde" - -#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:385 -msgid "Valid from" -msgstr "Geldig vanaf" - -#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:386 -#: classes/Gems/Tracker/Model/StandardTokenModel.php:217 -msgid "Valid until" -msgstr "Geldig tot" - -#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:387 -msgid "Start time" -msgstr "Starten tijd" - -#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:388 -msgid "Completion time" -msgstr "Datum invullen" - -#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:403 -msgid "Minutes" -msgstr "Minuten" - -#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:404 -msgid "Hours" -msgstr "Uren" - -#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:405 -msgid "Days" -msgstr "Dagen" - -#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:406 -msgid "Weeks" -msgstr "Weken" - -#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:407 -msgid "Months" -msgstr "Maanden" - -#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:408 -msgid "Quarters" -msgstr "Kwartieren" - -#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:409 -msgid "Years" -msgstr "Jaren" - -#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:444 -msgid "Valid from calculation" -msgstr "Berekening datum geldig vanaf" - -#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:445 -#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:453 -msgid "Date source" -msgstr "Datum bron" - -#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:446 -#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:454 -msgid "Round used" -msgstr "Gebruikte ronde" - -#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:447 -#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:455 -msgid "Date used" -msgstr "Gebruikte datum" - -#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:448 -#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:456 -msgid "Add to date" -msgstr "Optellen bij datum" - -#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:449 -#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:457 -msgid "Add to date unit" -msgstr "Datumoptel eenheid" - -#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:452 -msgid "Valid for calculation" -msgstr "Berekening datum geldig tot" - -#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:486 -msgid "Does not expire" -msgstr "Blijft altijd geldig" - -#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:489 -msgid "Use an answer from a survey." -msgstr "Gebruikt een antwoord uit een vragenlijst." - -#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:490 -msgid "Use a standard token date." -msgstr "Gebruik een datum uit een kenmerk." - -#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:492 -msgid "Use a track level date." -msgstr "Gebruik een op traject niveau ingestelde datum." - -#: classes/Gems/Tracker/Engine/AnyStepEngine.php:95 -#: classes/Gems/Tracker/Engine/NextStepEngine.php:92 -msgid "This round" -msgstr "Deze ronde" - -#: classes/Gems/Tracker/Engine/AnyStepEngine.php:106 -msgid "Engine for tracks where a rounds activation can depend on any previous survey." -msgstr "Een traject type waar de activatie van een ronde van elke willekeurige eerdere ronde afhankelijk kan zijn." - -#: classes/Gems/Tracker/Engine/AnyStepEngine.php:116 -msgid "Previous Survey" -msgstr "Eerdere vragenlijst" - -#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:445 -#, php-format -msgid "%s track engines cannot be converted to %s track engines." -msgstr "Traject type %s kan niet geconverteerd worden naar %s." - -#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:688 -#, php-format -msgid "%d: %s - %s" -msgstr "%d: %s - %s" - -#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:691 -#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:694 -#, php-format -msgid "%d: %s" -msgstr "%d: %s" - -#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:697 -#, php-format -msgid "%s - %s" -msgstr "%s - %s" - -#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:737 -msgid "Icon" -msgstr "Icoon" - -#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:738 -msgid "Order" -msgstr "Volgorde" - -#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:739 -#: classes/Gems/Tracker/Model/StandardTokenModel.php:233 -msgid "Description" -msgstr "Omschrijving" - -#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:740 -msgid "After change" -msgstr "Ronde veranderingscode" - -#: classes/Gems/Tracker/Engine/SingleSurveyEngine.php:117 -msgid "Engine for tracks containing a single survey." -msgstr "Een traject type voor trajecten die bestaan uit een enkele vragenlijst." - -#: classes/Gems/Tracker/Engine/SingleSurveyEngine.php:127 -msgid "Single Survey" -msgstr "Losse vragenlijst" - -#: classes/Gems/Tracker/Engine/SingleSurveyEngine.php:149 -msgid "This track type does not allow the creation of new rounds." -msgstr "Dit type traject staat het niet toe dat nieuwe rondes aangemaakt worden." - -#: classes/Gems/Tracker/Engine/NextStepEngine.php:147 -msgid "Engine for tracks where the next round is always dependent on the previous step." -msgstr "Een traject type waar de activatie van een volgende ronde alleen afhangt van de ronde ervoor." - -#: classes/Gems/Tracker/Engine/NextStepEngine.php:158 -msgid "Next Step" -msgstr "Stap voor stap" - -#: classes/Gems/Tracker/Model/StandardTokenModel.php:216 -msgid "Measure(d) on" -msgstr "Afname op" - -#: classes/Gems/Tracker/Model/StandardTokenModel.php:219 -msgid "Completed" -msgstr "Ingevuld" - -#: classes/Gems/Tracker/Model/StandardTokenModel.php:220 -msgid "Duration in seconds" -msgstr "Antwoordtijd (in sec.)" - -#: classes/Gems/Tracker/Model/StandardTokenModel.php:221 -msgid "Score" -msgstr "Score" - -#: classes/Gems/Tracker/Model/StandardTokenModel.php:222 -msgid "Comments" -msgstr "Opmerkingen" - -#: classes/Gems/Tracker/Model/StandardTokenModel.php:223 -msgid "Changed on" -msgstr "Veranderd op" - -#: classes/Gems/Tracker/Model/StandardTokenModel.php:226 -msgid "Assigned by" -msgstr "Toewijzer" - -#: classes/Gems/Tracker/Model/StandardTokenModel.php:227 -msgid "Respondent name" -msgstr "Patiënt naam" - -#: classes/Gems/Tracker/Model/StandardTokenModel.php:230 -msgid "Assigned to" -msgstr "invuller" - -#: classes/Gems/Tracker/Model/StandardTokenModel.php:231 -msgid "Rejection code" -msgstr "Afkeuringscode" - -#: classes/Gems/Tracker/Model/TrackModel.php:118 -msgid "Track Engine" -msgstr "Traject type" - -#: classes/Gems/Tracker/Model/TrackModel.php:123 -msgid "Use until" -msgstr "Geldig tot" - -#: classes/Gems/Tracker/Model/TrackModel.php:127 -msgid "After completion" -msgstr "Na afronding" - -#: classes/Gems/Tracker/Token/TokenValidator.php:164 -msgid "The server is currently busy, please wait a while and try again." -msgstr "De server is bezet, wacht u alstublieft een moment en probeer het dan nogmaals." - -#: classes/Gems/Tracker/Token/TokenValidator.php:199 -#, php-format -msgid "Not a valid token. The format for valid tokens is: %s." -msgstr "Geen geldig kenmerk. Het formaat voor geldige tokens is: %s." - -#: classes/Gems/Tracker/Token/TokenValidator.php:217 -#: classes/Gems/Tracker/Token/TokenValidator.php:231 -msgid "This token is no longer valid." -msgstr "Dit kenmerk is niet meer geldig." - -#: classes/Gems/Tracker/Token/TokenValidator.php:224 -msgid "This token cannot (yet) be used." -msgstr "Dit kenmerk kan (nog) niet gebruikt worden." - -#: classes/Gems/Tracker/Token/TokenValidator.php:238 -msgid "Unknown token." -msgstr "Onbekend kenmerk." - -#: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:149 -msgid "Uncertain" -msgstr "Weet niet" - -#: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:152 -msgid "Increase" -msgstr "Toenemend" - -#: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:153 -msgid "Same" -msgstr "Zelfde" - -#: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:154 -msgid "Decrease" -msgstr "Afnemend" - -#: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:162 -msgid "Checked" -msgstr "Aangevinkt" - -#: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:163 -msgid "Not checked" -msgstr "Niet aangevinkt" - -#: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:259 -#, php-format -msgid "Rank %d" -msgstr "Schaal %d" - -#: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:278 -#: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:300 -msgid "Comment" -msgstr "Opmerkingen" - -#: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:278 -#: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:300 -msgid " (comment)" -msgstr " (opmerkingen)" - -#: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:290 -#: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:338 -msgid "Other" -msgstr "Overige" - -#: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:472 -msgid "Date" -msgstr "Datum" - -#: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:475 -msgid "Free number" -msgstr "Vrij getal" - -#: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:481 -msgid "Free text (long)" -msgstr "Vrije tekst (lang)" - -#: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:484 -msgid "Free text (very long)" -msgstr "Vrije tekst (zeer lang)" - -#: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:487 -msgid "Free text" -msgstr "Vrije tekst" - -#: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:628 -#: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:678 -#: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:732 -#, php-format -msgid "%s: %s" -msgstr "%s: %s" - -#: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:752 -#, php-format -msgid "- %s" -msgstr "- %s" - -#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:376 -#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:1162 -#, php-format -msgid "The '%s' survey is no longer active. The survey was removed from LimeSurvey!" -msgstr "De vragenlijst '%s' is niet meer actief. De vragenlijst is verwijderd uit LimeSurvey!" - -#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:407 -#, php-format -msgid "Corrected anonymization for survey '%s'" -msgstr "Anonimizatie gecorrigeerd van vragenlijst '%s'" - -#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:431 -msgid ", " -msgstr ", " - -#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:435 -#, php-format -msgid "Added to token table '%s' the field(s): %s" -msgstr "Toegevoegd aan kenmerk tabel '%s', de velden: %s" - -#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:440 -#, php-format -msgid "Attribute fields not created for token table for '%s'" -msgstr "Attribuut velden voor de kenmerk tabel '%s' zijn niet toegevoegd." - -#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:441 -#, php-format -msgid "Required fields: %s" -msgstr "Verplicht veld: %s" - -#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:466 -#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:1315 -#, php-format -msgid "The status of the '%s' survey has changed." -msgstr "De status van de vragenlijst '%s' is veranderd." - -#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:472 -#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:1321 -#, php-format -msgid "Survey '%s' IS NO LONGER ACTIVE!!!" -msgstr "De vragenlijst '%s' IS NIET MEER ACTIEF!!!" - -#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:478 -#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:1327 -#, php-format -msgid "The status of the '%s' survey has changed to '%s'." -msgstr "De status van de vragenlijst '%s' is veranderd naar '%s'." - -#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:481 -#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:1330 -#, php-format -msgid "The status warning for the '%s' survey was removed." -msgstr "De status waarschuwing voor de vragenlijst '%s' is verdwenen." - -#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:487 -#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:1336 -#, php-format -msgid "The name of the '%s' survey has changed to '%s'." -msgstr "De naam van de vragenlijst '%s' is veranderd in '%s'." - -#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:498 -#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:1346 -#, php-format -msgid "Imported the '%s' survey." -msgstr "De vragenlijst '%s' is geïmporteerd." - -#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:723 -msgid "Submitdate" -msgstr "Invoerdatum" - -#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:1142 -#, php-format -msgid "Updated %d Gems tokens to new token definition." -msgstr "%d Gems kenmerken zijn aangepast aan de nieuwe kenmerk definitie." - -#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:1297 -#, php-format -msgid "Updated %d token to new token definition in survey '%s'." -msgid_plural "Updated %d tokens to new token definition in survey '%s'." -msgstr[0] "%d kenmerk in de vragenlijst '%s' is aangepast aan de nieuwe kenmerk definitie." -msgstr[1] "%d kenmerken in de vragenlijst '%s' zijn aangepast aan de nieuwe kenmerk definitie." - -#: classes/Gems/Tracker/Form/AskTokenForm.php:78 -#, php-format -msgid "Enter tokens as %s." -msgstr "Kenmerk invoeren als %s." - -#: classes/Gems/Tracker/Form/AskTokenForm.php:98 -msgid "OK" -msgstr "OK" - -#: classes/Gems/Tracker/Snippets/ShowTokenSnippetAbstract.php:164 -#: classes/Gems/Tracker/Snippets/EditTokenSnippetAbstract.php:124 -#, php-format -msgid "Token %s not found." -msgstr "Kenmerk %s niet gevonden" - -#: classes/Gems/Tracker/Snippets/ShowTokenSnippetAbstract.php:168 -#: classes/Gems/Tracker/Snippets/EditTokenSnippetAbstract.php:128 -msgid "No token specified." -msgstr "Geen kenmerk opgegeven." - -#: classes/Gems/Tracker/Snippets/ShowTrackUsageAbstract.php:149 -msgid "Enter the particulars concerning the assignment to this respondent." -msgstr "Beschrijf de redenen om dit aan deze patiënt toe te wijzen." - -#: classes/Gems/Tracker/Snippets/ShowTrackUsageAbstract.php:151 -msgid "Start" -msgstr "Aanvang" - -#: classes/Gems/Tracker/Snippets/ShowTokenLoopAbstract.php:115 -msgid "We have received your answers today. Thank you!" -msgstr "We hebben uw vragenlijst vandaag ingevuld ontvangen. Dank u wel!" - -#: classes/Gems/Tracker/Snippets/ShowTokenLoopAbstract.php:118 -msgid "We have received your answers yesterday. Thank you!" -msgstr "We hebben uw vragenlijst gisteren ingevuld ontvangen. Dank u wel!" - -#: classes/Gems/Tracker/Snippets/ShowTokenLoopAbstract.php:121 -msgid "We have received your answers 2 days ago. Thank you." -msgstr "We hebben uw vragenlijst eergisteren ingevuld ontvangen. Dank u wel." - -#: classes/Gems/Tracker/Snippets/ShowTokenLoopAbstract.php:125 -#, php-format -msgid "We have received your answers %d days ago. Thank you." -msgstr "We hebben uw vragenlijst %d dagen geleden ingevuld ontvangen. Dank u wel." - -#: classes/Gems/Tracker/Snippets/ShowTokenLoopAbstract.php:127 -#, php-format -msgid "We have received your answers on %s. " -msgstr "We hebben uw vragenlijst op %s ingevuld ontvangen." - -#: classes/Gems/Tracker/Snippets/ShowTokenLoopAbstract.php:140 -msgid "This survey has no set time limit." -msgstr "Deze vragenlijst heeft geen eindtijd." - -#: classes/Gems/Tracker/Snippets/ShowTokenLoopAbstract.php:147 -msgid "Warning!!!" -msgstr "Let op!!!" - -#: classes/Gems/Tracker/Snippets/ShowTokenLoopAbstract.php:147 -msgid "This survey must be answered today!" -msgstr "Deze vragenlijst moet vandaag ingevuld zijn!" - -#: classes/Gems/Tracker/Snippets/ShowTokenLoopAbstract.php:150 -msgid "Warning!!" -msgstr "Let op!!" - -#: classes/Gems/Tracker/Snippets/ShowTokenLoopAbstract.php:150 -msgid "This survey must be answered tomorrow!" -msgstr "Deze vragenlijst moet morgen ingevuld zijn!" - -#: classes/Gems/Tracker/Snippets/ShowTokenLoopAbstract.php:153 -msgid "Warning! This survey must be answered over 2 days!" -msgstr "Let op! Deze vragenlijst moet overmorgen ingevuld zijn!" - -#: classes/Gems/Tracker/Snippets/ShowTokenLoopAbstract.php:158 -#, php-format -msgid "This survey must be answered in %d days." -msgstr "Deze vragenlijst moet binnen %d dagen ingevuld zijn!" - -#: classes/Gems/Tracker/Snippets/ShowTokenLoopAbstract.php:160 -msgid "This survey can no longer be answered." -msgstr "Deze vragenlijst kan niet langer worden ingevuld!" - -#: classes/Gems/Tracker/Snippets/ShowTokenLoopAbstract.php:163 -#, php-format -msgid "This survey can be answered until %s." -msgstr "Deze vragenlijst moet ingevuld worden voor %s." - -#: classes/Gems/Tracker/Snippets/ShowRoundSnippetAbstract.php:132 -#, php-format -msgid "%s round" -msgstr "%s ronde" - -#: classes/Gems/Tracker/Snippets/ShowRoundSnippetAbstract.php:144 -msgid "No round specified." -msgstr "Geen ronde opgegeven." - -#: classes/Gems/Tracker/Snippets/ShowRoundSnippetAbstract.php:163 -msgid "< Previous" -msgstr "< Terug" - -#: classes/Gems/Tracker/Snippets/ShowRoundSnippetAbstract.php:168 -msgid "Next >" -msgstr "Verder >" - -#: classes/Gems/Tracker/Snippets/EditTokenSnippetAbstract.php:141 -msgid "token" -msgid_plural "tokens" -msgstr[0] "kenmerk" -msgstr[1] "kenmerken" - -#: classes/Gems/Tracker/Snippets/EditTrackEngineSnippetGeneric.php:191 -#: classes/Gems/Tracker/Snippets/EditTrackSnippetAbstract.php:170 -msgid "track" -msgid_plural "tracks" -msgstr[0] "traject" -msgstr[1] "trajecten" - -#: classes/Gems/Tracker/Snippets/EditTrackEngineSnippetGeneric.php:201 -#: classes/Gems/Tracker/Snippets/EditTrackEngineSnippetGeneric.php:237 -msgid "Add new track" -msgstr "Voeg traject toe" - -#: classes/Gems/Tracker/Snippets/EditSingleSurveyTokenSnippetAbstract.php:157 -msgid "survey" -msgid_plural "surveys" -msgstr[0] "vragenlijst" -msgstr[1] "vragenlijsten" - -#: classes/Gems/Tracker/Snippets/EditSingleSurveyTokenSnippetAbstract.php:179 -msgid "Add survey" -msgstr "Vragenlijst toevoegen" - -#: classes/Gems/Tracker/Snippets/EditTrackSnippetAbstract.php:180 -#: classes/Gems/Tracker/Snippets/EditTrackSnippetAbstract.php:230 -msgid "Add track" -msgstr "Voeg traject toe" - -#: classes/Gems/Tracker/Snippets/AnswerModelSnippetGeneric.php:141 -msgid "Status" -msgstr "Status" - -#: classes/Gems/Tracker/Snippets/AnswerModelSnippetGeneric.php:145 -msgid "Question" -msgstr "Vraag" - -#: classes/Gems/Tracker/Snippets/AnswerModelSnippetGeneric.php:215 -#, php-format -msgid "%s answers for patient number %s" -msgstr "%s antwoorden voor patientnummer %s" - -#: classes/Gems/Tracker/Snippets/AnswerModelSnippetGeneric.php:218 -#, php-format -msgid "Answers for token %s, patient number %s: %s." -msgstr "Antwoorden voor kenmerk %s, patientnummer %s: %s." - -#: classes/Gems/Tracker/Snippets/AnswerModelSnippetGeneric.php:241 -msgid "Close" -msgstr "Sluiten" - -#: classes/Gems/Tracker/Snippets/AnswerModelSnippetGeneric.php:242 -msgid "Print" -msgstr "Afdrukken" - -#: classes/Gems/Tracker/Snippets/EditRoundSnippetAbstract.php:119 -msgid "round" -msgid_plural "rounds" -msgstr[0] "ronde" -msgstr[1] "rondes" - -#: classes/Gems/Tracker/Snippets/EditRoundSnippetAbstract.php:129 -msgid "Add new round" -msgstr "Nieuwe ronde toevoegen" - -#: classes/Gems/Tracker/Batch/SynchronizeSourcesBatch.php:135 -msgid "No surveys were changed." -msgstr "Geen vragenlijsten veranderd." - -#: classes/Gems/Tracker/Batch/SynchronizeSourcesBatch.php:137 -#, php-format -msgid "%d surveys checked." -msgstr "%d vragenlijsten gecontroleerd" - -#: classes/Gems/Tracker/Batch/SynchronizeSourcesBatch.php:139 -#, php-format -msgid "%d sources checked." -msgstr "%d bronnen gecontroleerd." - -#: classes/Gems/Menu/SubMenuItem.php:380 -msgid "New" -msgstr "Nieuw" - -#: classes/Gems/Menu/SubMenuItem.php:434 -msgid "Export the current data set to Excel" -msgstr "Exporteer de huidige gegevens naar Excel" - -#: classes/Gems/Menu/SubMenuItem.php:438 -msgid "Excel export" -msgstr "Excel export" - -#: classes/Gems/Menu/MenuAbstract.php:247 -msgid "Activity log" -msgstr "Activiteit" - -#: classes/Gems/Menu/MenuAbstract.php:253 -msgid "Automatic mail" -msgstr "Automatische mail" - -#: classes/Gems/Menu/MenuAbstract.php:254 -msgid "Turn Automatic Mail Jobs OFF" -msgstr "Automatische mail opdrachten UITzetten" - -#: classes/Gems/Menu/MenuAbstract.php:255 -msgid "Run" -msgstr "Uitvoeren" - -#: classes/Gems/Menu/MenuAbstract.php:258 -msgid "Servers" -msgstr "Servers" - -#: classes/Gems/Menu/MenuAbstract.php:262 -msgid "Templates" -msgstr "Sjablonen" - -#: classes/Gems/Menu/MenuAbstract.php:294 -msgid "By period" -msgstr "Per periode" - -#: classes/Gems/Menu/MenuAbstract.php:295 -msgid "By token" -msgstr "Per kenmerk" - -#: classes/Gems/Menu/MenuAbstract.php:296 -msgid "By respondent" -msgstr "Per patiënt" - -#: classes/Gems/Menu/MenuAbstract.php:300 -msgid "Bulk mail" -msgstr "Bulk mail" - -#: classes/Gems/Menu/MenuAbstract.php:318 -msgid "Errors" -msgstr "Foutmeldingen" - -#: classes/Gems/Menu/MenuAbstract.php:319 -msgid "PHP" -msgstr "PHP" - -#: classes/Gems/Menu/MenuAbstract.php:321 -msgid "Session" -msgstr "Sessie" - -#: classes/Gems/Menu/MenuAbstract.php:322 -msgid "Maintenance mode" -msgstr "Onderhoudsmodus" - -#: classes/Gems/Menu/MenuAbstract.php:323 -msgid "Clean cache" -msgstr "Cache opruimen" - -#: classes/Gems/Menu/MenuAbstract.php:390 -msgid "Reset passw... [truncated message content] |
From: <gem...@li...> - 2012-05-04 08:30:03
|
Revision: 664 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=664&view=rev Author: mennodekker Date: 2012-05-04 08:29:55 +0000 (Fri, 04 May 2012) Log Message: ----------- Allow to add an ip-range to an organization, changed edit title to display organization name and location so we know where we are in a tab display TODO: implement check in login Modified Paths: -------------- trunk/library/classes/Gems/Default/OrganizationAction.php trunk/library/configs/db/patches.sql trunk/library/configs/db/tables/gems__organizations.20.sql trunk/library/languages/default-en.mo trunk/library/languages/default-en.po trunk/library/languages/default-nl.mo trunk/library/languages/default-nl.po trunk/library/snippets/Organization/OrganizationEditSnippet.php Modified: trunk/library/classes/Gems/Default/OrganizationAction.php =================================================================== --- trunk/library/classes/Gems/Default/OrganizationAction.php 2012-05-03 19:41:43 UTC (rev 663) +++ trunk/library/classes/Gems/Default/OrganizationAction.php 2012-05-04 08:29:55 UTC (rev 664) @@ -156,6 +156,14 @@ } $model->setIfExists('gor_code', 'label', $this->_('Code name'), 'size', 10, 'description', $this->_('Only for programmers.')); + $model->setIfExists('gor_allowed_ip_ranges', + 'label', $this->_('Allowed IP Ranges'), + 'description', $this->_('Separate with | example: 10.0.0.0-10.0.0.255 (subnet masks are not supported)'), + 'size', 50, + 'validator', new Gems_Validate_IPRanges(), + 'maxlength', 500 + ); + if($model->has('gor_user_class')) { $definitions = $this->loader->getUserLoader()->getAvailableStaffDefinitions(); //Use first element as default @@ -179,6 +187,13 @@ return $model; } + public function getEditTitle() + { + $data = $this->getModel()->loadFirst(); + + return sprintf($this->_('Edit %s %s - %s'), $this->getTopic(1), $data['gor_name'], $data['gor_location']); + } + /** * Helper function to get the title for the index action. * Modified: trunk/library/configs/db/patches.sql =================================================================== --- trunk/library/configs/db/patches.sql 2012-05-03 19:41:43 UTC (rev 663) +++ trunk/library/configs/db/patches.sql 2012-05-04 08:29:55 UTC (rev 664) @@ -397,3 +397,4 @@ -- GEMS VERSION: 47 -- PATCH: Add return url to tokens ALTER TABLE gems__tokens ADD gto_return_url varchar(250) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' null default null AFTER gto_reception_code; +ALTER TABLE `gems__organizations` ADD `gor_allowed_ip_ranges` TEXT CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' null AFTER `gor_respondent_group`; \ No newline at end of file Modified: trunk/library/configs/db/tables/gems__organizations.20.sql =================================================================== --- trunk/library/configs/db/tables/gems__organizations.20.sql 2012-05-03 19:41:43 UTC (rev 663) +++ trunk/library/configs/db/tables/gems__organizations.20.sql 2012-05-04 08:29:55 UTC (rev 664) @@ -26,6 +26,7 @@ gor_has_respondents boolean not null default 0, gor_add_respondents boolean not null default 1, gor_respondent_group bigint unsigned null references gems__groups (ggp_id_group), + gor_allowed_ip_ranges text CHARACTER SET 'utf8' COLLATE 'utf8_general_ci' null, gor_active boolean not null default 1, gor_changed timestamp not null default current_timestamp on update current_timestamp, Modified: trunk/library/languages/default-en.mo =================================================================== (Binary files differ) Modified: trunk/library/languages/default-en.po =================================================================== --- trunk/library/languages/default-en.po 2012-05-03 19:41:43 UTC (rev 663) +++ trunk/library/languages/default-en.po 2012-05-04 08:29:55 UTC (rev 664) @@ -2,9 +2,9 @@ msgstr "" "Project-Id-Version: GemsTracker EN\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-05-03 10:48+0100\n" +"POT-Creation-Date: 2012-05-04 10:24+0100\n" "PO-Revision-Date: \n" -"Last-Translator: Matijs de Jong <mj...@ma...>\n" +"Last-Translator: Menno Dekker <men...@er...>\n" "Language-Team: Erasmus MGZ <mat...@ma...>\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -446,11 +446,13 @@ msgstr "Trying upgrade for %s to level %s: %s" #: classes/Gems/Controller/BrowseEditAction.php:354 +#: classes/Gems/Controller/ModelSnippetActionAbstract.php:228 #, php-format msgid "New %s..." msgstr "New %s..." #: classes/Gems/Controller/BrowseEditAction.php:387 +#: classes/Gems/Controller/ModelSnippetActionAbstract.php:248 #, php-format msgid "Delete %s" msgstr "Delete %s" @@ -479,6 +481,7 @@ msgstr "No %s found" #: classes/Gems/Controller/BrowseEditAction.php:673 +#: classes/Gems/Default/ExportAction.php:234 #, php-format msgid "No %s found." msgstr "No %s found." @@ -488,10 +491,14 @@ msgstr "Are you sure?" #: classes/Gems/Controller/BrowseEditAction.php:807 +#: classes/Gems/Default/DatabaseAction.php:187 +#: classes/Gems/Default/DatabaseAction.php:499 msgid "Yes" msgstr "Yes" #: classes/Gems/Controller/BrowseEditAction.php:808 +#: classes/Gems/Default/DatabaseAction.php:188 +#: classes/Gems/Default/DatabaseAction.php:500 msgid "No" msgstr "No" @@ -580,47 +587,47 @@ msgid "Nothing to do." msgstr "Nothing to do." -#: classes/Gems/Default/AskAction.php:84 +#: classes/Gems/Default/AskAction.php:88 #, php-format msgid "Enter your %s token" msgstr "Enter your %s token" -#: classes/Gems/Default/AskAction.php:87 +#: classes/Gems/Default/AskAction.php:91 msgid "Tokens identify a survey that was assigned to you personally." msgstr "Tokens identify a survey that was assigned to you personally." -#: classes/Gems/Default/AskAction.php:87 +#: classes/Gems/Default/AskAction.php:91 msgid "Entering the token and pressing OK will open that survey." msgstr "Entering the token and pressing OK will open that survey." -#: classes/Gems/Default/AskAction.php:91 +#: classes/Gems/Default/AskAction.php:95 msgid "After answering the survey you will be logged off automatically." msgstr "After answering the survey you will be logged off automatically." -#: classes/Gems/Default/AskAction.php:96 +#: classes/Gems/Default/AskAction.php:100 msgid "A token consists of two groups of four letters and numbers, separated by an optional hyphen. Tokens are case insensitive." msgstr "A token consists of two groups of four letters and numbers, separated by an optional hyphen. Tokens are case insensitive." -#: classes/Gems/Default/AskAction.php:97 +#: classes/Gems/Default/AskAction.php:101 msgid "The number zero and the letter O are treated as the same; the same goes for the number one and the letter L." msgstr "The number zero and the letter O are treated as the same; the same goes for the number one and the letter L." -#: classes/Gems/Default/AskAction.php:132 +#: classes/Gems/Default/AskAction.php:136 #, php-format msgid "Thank you for answering. At the moment we have no further surveys for you to take." msgstr "Thank you for answering. At the moment we have no further surveys for you to take." -#: classes/Gems/Default/AskAction.php:134 +#: classes/Gems/Default/AskAction.php:138 #, php-format msgid "The survey for token %s has been answered and no further surveys are open." msgstr "The survey for token %s has been answered and no further surveys are open." -#: classes/Gems/Default/AskAction.php:141 +#: classes/Gems/Default/AskAction.php:145 #, php-format msgid "The token %s does not exist (any more)." msgstr "The token %s does not exist (any more)." -#: classes/Gems/Default/AskAction.php:269 +#: classes/Gems/Default/AskAction.php:273 #, php-format msgid "The survey for token %s is no longer active." msgstr "The survey for token %s is no longer active." @@ -1060,37 +1067,37 @@ msgid "Your password must be changed." msgstr "Your password must be changed." -#: classes/Gems/Default/IndexAction.php:228 +#: classes/Gems/Default/IndexAction.php:231 #, php-format msgid "Login successful, welcome %s." msgstr "Login successful, welcome %s." -#: classes/Gems/Default/IndexAction.php:268 +#: classes/Gems/Default/IndexAction.php:271 #, php-format msgid "Good bye: %s." msgstr "Good bye: %s." -#: classes/Gems/Default/IndexAction.php:291 +#: classes/Gems/Default/IndexAction.php:294 msgid "Your password reset request is no longer valid, please request a new link." msgstr "Your password reset request is no longer valid, please request a new link." -#: classes/Gems/Default/IndexAction.php:293 +#: classes/Gems/Default/IndexAction.php:296 msgid "Your password input request is no longer valid, please request a new link." msgstr "Your password input request is no longer valid, please request a new link." -#: classes/Gems/Default/IndexAction.php:312 +#: classes/Gems/Default/IndexAction.php:315 msgid "We sent you an e-mail with a reset link. Click on the link in the e-mail." msgstr "We sent you an e-mail with a reset link. Click on the link in the e-mail." -#: classes/Gems/Default/IndexAction.php:321 +#: classes/Gems/Default/IndexAction.php:324 msgid "New password is active." msgstr "New password is active." -#: classes/Gems/Default/IndexAction.php:342 +#: classes/Gems/Default/IndexAction.php:345 msgid "Password reset requested" msgstr "Password reset requested" -#: classes/Gems/Default/IndexAction.php:345 +#: classes/Gems/Default/IndexAction.php:348 msgid "" "Dear {greeting},\n" "\n" @@ -1185,7 +1192,6 @@ msgstr "Date" #: classes/Gems/Default/LogAction.php:191 -#: classes/Gems/Default/LogMaintenanceAction.php:52 msgid "Action" msgstr "Action" @@ -1202,7 +1208,6 @@ msgstr "IP address" #: classes/Gems/Default/LogAction.php:209 -#: classes/Gems/Default/LogMaintenanceAction.php:53 msgid "Log" msgstr "Log" @@ -1412,8 +1417,6 @@ msgstr "Email servers" #: classes/Gems/Default/MailTemplateAction.php:76 -#: classes/Gems/Default/StaffAction.php:278 -#: classes/Gems/Default/StaffAction.php:311 msgid "(all organizations)" msgstr "(all organizations)" @@ -1438,7 +1441,6 @@ #: classes/Gems/Default/OptionAction.php:136 #: classes/Gems/Default/OrganizationAction.php:132 #: classes/Gems/Default/RespondentAction.php:175 -#: classes/Gems/Default/StaffAction.php:294 msgid "Language" msgstr "Language" @@ -1553,20 +1555,24 @@ msgid "Only for programmers." msgstr "Only for programmers." -#: classes/Gems/Default/OrganizationAction.php:167 +#: classes/Gems/Default/OrganizationAction.php:175 msgid "This can not be changed yet" msgstr "This can not be changed yet" -#: classes/Gems/Default/OrganizationAction.php:169 -#: classes/Gems/Default/StaffAction.php:119 +#: classes/Gems/Default/OrganizationAction.php:177 msgid "User Definition" msgstr "User Definition" -#: classes/Gems/Default/OrganizationAction.php:189 +#: classes/Gems/Default/OrganizationAction.php:194 +#, php-format +msgid "Edit %s %s - %s" +msgstr "Edit %s %s - %s" + +#: classes/Gems/Default/OrganizationAction.php:204 msgid "Participating organizations" msgstr "Participating organizations" -#: classes/Gems/Default/OrganizationAction.php:200 +#: classes/Gems/Default/OrganizationAction.php:215 msgid "organization" msgid_plural "organizations" msgstr[0] "organization" @@ -2069,55 +2075,55 @@ msgid "Synchronize all sources." msgstr "Synchronize all sources." -#: classes/Gems/Default/StaffAction.php:125 +#: classes/Gems/Default/StaffAction.php:161 msgid "Unsupported User Definition" msgstr "Unsupported User Definition" -#: classes/Gems/Default/StaffAction.php:154 +#: classes/Gems/Default/StaffAction.php:190 msgid "Users can only login when this box is checked." msgstr "Users can only login when this box is checked." -#: classes/Gems/Default/StaffAction.php:155 +#: classes/Gems/Default/StaffAction.php:191 msgid "If checked the user will logoff when answering a survey." msgstr "If checked the user will logoff when answering a survey." -#: classes/Gems/Default/StaffAction.php:172 +#: classes/Gems/Default/StaffAction.php:208 msgid "You are not allowed to edit this staff member." msgstr "You are not allowed to edit this staff member." -#: classes/Gems/Default/StaffAction.php:229 +#: classes/Gems/Default/StaffAction.php:265 #, php-format msgid "User with id %s already exists but is deleted, do you want to reactivate the account?" msgstr "User with id %s already exists but is deleted, do you want to reactivate the account?" -#: classes/Gems/Default/StaffAction.php:270 +#: classes/Gems/Default/StaffAction.php:306 msgid "Username" msgstr "Username" -#: classes/Gems/Default/StaffAction.php:285 +#: classes/Gems/Default/StaffAction.php:321 msgid "Primary function" msgstr "Primary function" -#: classes/Gems/Default/StaffAction.php:295 +#: classes/Gems/Default/StaffAction.php:331 msgid "Can login" msgstr "Can login" -#: classes/Gems/Default/StaffAction.php:296 +#: classes/Gems/Default/StaffAction.php:332 msgid "Logout on survey" msgstr "Logout on survey" -#: classes/Gems/Default/StaffAction.php:371 +#: classes/Gems/Default/StaffAction.php:407 msgid "staff member" msgid_plural "staff members" msgstr[0] "staff member" msgstr[1] "staff members" -#: classes/Gems/Default/StaffAction.php:403 +#: classes/Gems/Default/StaffAction.php:439 #, php-format msgid "Reset password for: %s" msgstr "Reset password for: %s" -#: classes/Gems/Default/StaffAction.php:406 +#: classes/Gems/Default/StaffAction.php:442 msgid "You are not allowed to change this password." msgstr "You are not allowed to change this password." @@ -3680,25 +3686,25 @@ msgstr[0] "Your account is temporarily blocked, please wait a minute." msgstr[1] "Your account is temporarily blocked, please wait %d minutes." -#: classes/Gems/User/User.php:427 +#: classes/Gems/User/User.php:430 msgid "You are not allowed to login from this location." msgstr "You are not allowed to login from this location." -#: classes/Gems/User/User.php:1078 +#: classes/Gems/User/User.php:1081 msgid "Your birthday" msgstr "Your birthday" -#: classes/Gems/User/User.php:1094 +#: classes/Gems/User/User.php:1097 #: classes/Gems/User/Form/ChangePasswordForm.php:163 #, php-format msgid "%s is not correct." msgstr "%s is not correct." -#: classes/Gems/User/User.php:1176 +#: classes/Gems/User/User.php:1179 msgid "Trying to send a password reset to a user that cannot be reset." msgstr "Trying to send a password reset to a user that cannot be reset." -#: classes/Gems/User/User.php:1204 +#: classes/Gems/User/User.php:1207 msgid "Unable to send e-mail." msgstr "Unable to send e-mail." @@ -4056,19 +4062,24 @@ msgstr "Edit track" #: snippets/DeleteSingleSurveyInSourceTokenSnippet.php:172 +#: snippets/DeleteSingleSurveyNotUsedTokenSnippet.php:143 +#: snippets/DeleteTrackTokenSnippet.php:193 msgid "Edit token" msgstr "Edit token" #: snippets/DeleteSingleSurveyInSourceTokenSnippet.php:225 +#: snippets/DeleteTrackTokenSnippet.php:245 #, php-format msgid "Redo of token %s." msgstr "Redo of token %s." #: snippets/DeleteSingleSurveyInSourceTokenSnippet.php:228 +#: snippets/DeleteTrackTokenSnippet.php:248 msgid "Old comment:" msgstr "Old comment:" #: snippets/DeleteSingleSurveyInSourceTokenSnippet.php:249 +#: snippets/DeleteTrackTokenSnippet.php:269 #, php-format msgid "Created replacement token %2$s for token %1$s." msgstr "Created replacement token %2$s for token %1$s." @@ -4095,7 +4106,6 @@ msgstr "Lists choices changed." #: snippets/EditSingleSurveyTokenSnippet.php:132 -#: snippets/ShowSingleSurveyTokenSnippet.php:150 msgid "Show survey" msgstr "Show survey" @@ -4146,6 +4156,7 @@ msgstr "Selected surveys" #: snippets/ShowSingleSurveyTokenSnippet.php:76 +#: snippets/ShowTrackTokenSnippet.php:77 msgid "Actions" msgstr "Actions" @@ -4291,6 +4302,10 @@ msgstr[0] "After this survey there is one other survey we would like you to answer." msgstr[1] "After this survey there are another %d surveys we would like you to answer." +#: views/scripts/index/login.phtml:12 +msgid "The Pulse software was made possible thanks to support from " +msgstr "The Pulse software was made possible thanks to support from " + #~ msgid "Cookies must be enabled for this site." #~ msgstr "Cookies must be enabled for this site." @@ -4421,9 +4436,6 @@ #~ msgid "Back" #~ msgstr "Back" -#~ msgid "The Pulse software was made possible thanks to support from " -#~ msgstr "The Pulse software was made possible thanks to support from " - #~ msgid "Physician" #~ msgstr "Physician" Modified: trunk/library/languages/default-nl.mo =================================================================== (Binary files differ) Modified: trunk/library/languages/default-nl.po =================================================================== --- trunk/library/languages/default-nl.po 2012-05-03 19:41:43 UTC (rev 663) +++ trunk/library/languages/default-nl.po 2012-05-04 08:29:55 UTC (rev 664) @@ -2,9 +2,9 @@ msgstr "" "Project-Id-Version: GemsTracker NL\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-05-03 10:49+0100\n" +"POT-Creation-Date: 2012-05-04 10:26+0100\n" "PO-Revision-Date: \n" -"Last-Translator: Matijs de Jong <mj...@ma...>\n" +"Last-Translator: Menno Dekker <men...@er...>\n" "Language-Team: Erasmus MGZ <mat...@ma...>\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -446,11 +446,13 @@ msgstr "Probeert upgrade voor %s naar niveau %s: %s" #: classes/Gems/Controller/BrowseEditAction.php:354 +#: classes/Gems/Controller/ModelSnippetActionAbstract.php:228 #, php-format msgid "New %s..." msgstr "Nieuwe %s..." #: classes/Gems/Controller/BrowseEditAction.php:387 +#: classes/Gems/Controller/ModelSnippetActionAbstract.php:248 #, php-format msgid "Delete %s" msgstr "Verwijder %s" @@ -479,6 +481,7 @@ msgstr "Geen %s gevonden" #: classes/Gems/Controller/BrowseEditAction.php:673 +#: classes/Gems/Default/ExportAction.php:234 #, php-format msgid "No %s found." msgstr "Geen %s gevonden." @@ -488,10 +491,14 @@ msgstr "Weet u het zeker?" #: classes/Gems/Controller/BrowseEditAction.php:807 +#: classes/Gems/Default/DatabaseAction.php:187 +#: classes/Gems/Default/DatabaseAction.php:499 msgid "Yes" msgstr "Ja" #: classes/Gems/Controller/BrowseEditAction.php:808 +#: classes/Gems/Default/DatabaseAction.php:188 +#: classes/Gems/Default/DatabaseAction.php:500 msgid "No" msgstr "Nee" @@ -580,47 +587,47 @@ msgid "Nothing to do." msgstr "Niets te doen." -#: classes/Gems/Default/AskAction.php:84 +#: classes/Gems/Default/AskAction.php:88 #, php-format msgid "Enter your %s token" msgstr "Voer uw %s kenmerk in" -#: classes/Gems/Default/AskAction.php:87 +#: classes/Gems/Default/AskAction.php:91 msgid "Tokens identify a survey that was assigned to you personally." msgstr "Elk kenmerk verwijst naar een specifiek aan u toegekende vragenlijst." -#: classes/Gems/Default/AskAction.php:87 +#: classes/Gems/Default/AskAction.php:91 msgid "Entering the token and pressing OK will open that survey." msgstr "Vul uw kenmerk in en druk op OK om die vragenlijst te openen." -#: classes/Gems/Default/AskAction.php:91 +#: classes/Gems/Default/AskAction.php:95 msgid "After answering the survey you will be logged off automatically." msgstr "Na het invullen wordt u automatisch uitgelogd." -#: classes/Gems/Default/AskAction.php:96 +#: classes/Gems/Default/AskAction.php:100 msgid "A token consists of two groups of four letters and numbers, separated by an optional hyphen. Tokens are case insensitive." msgstr "Een kenmerk bestaat uit twee groepen van vier cijfers en letters met een (niet verplicht) streepje ertussen. Hoofdletters of gewone letters maakt niets uit." -#: classes/Gems/Default/AskAction.php:97 +#: classes/Gems/Default/AskAction.php:101 msgid "The number zero and the letter O are treated as the same; the same goes for the number one and the letter L." msgstr "Er wordt geen verschil gemaakt tussen het getal nul en de letter O en ook niet tussen het getal één en de letter L." -#: classes/Gems/Default/AskAction.php:132 +#: classes/Gems/Default/AskAction.php:136 #, php-format msgid "Thank you for answering. At the moment we have no further surveys for you to take." msgstr "Dank u voor uw antwoorden. Op dit moment hebben we geen vragenlijsten meer voor u." -#: classes/Gems/Default/AskAction.php:134 +#: classes/Gems/Default/AskAction.php:138 #, php-format msgid "The survey for token %s has been answered and no further surveys are open." msgstr "De vragenlijst met het kenmerk %s is beantwoord en er staan verder geen vragenlijsten open." -#: classes/Gems/Default/AskAction.php:141 +#: classes/Gems/Default/AskAction.php:145 #, php-format msgid "The token %s does not exist (any more)." msgstr "Het kenmerk %s bestaat niet (meer)." -#: classes/Gems/Default/AskAction.php:269 +#: classes/Gems/Default/AskAction.php:273 #, php-format msgid "The survey for token %s is no longer active." msgstr "De vragenlijst voor kenmerk %s is niet meer in gebruik." @@ -1060,37 +1067,37 @@ msgid "Your password must be changed." msgstr "Uw wachtwoord moet veranderd worden." -#: classes/Gems/Default/IndexAction.php:228 +#: classes/Gems/Default/IndexAction.php:231 #, php-format msgid "Login successful, welcome %s." msgstr "Login in orde, welkom %s." -#: classes/Gems/Default/IndexAction.php:268 +#: classes/Gems/Default/IndexAction.php:271 #, php-format msgid "Good bye: %s." msgstr "Tot ziens: %s." -#: classes/Gems/Default/IndexAction.php:291 +#: classes/Gems/Default/IndexAction.php:294 msgid "Your password reset request is no longer valid, please request a new link." msgstr "Uw verzoek om een nieuw wachtwoord is niet meer geldig, maar u kan hieronder een nieuwe link aanvragen." -#: classes/Gems/Default/IndexAction.php:293 +#: classes/Gems/Default/IndexAction.php:296 msgid "Your password input request is no longer valid, please request a new link." msgstr "Uw link om een wachtwoord in te voeren is niet meer geldig, maar u kan hieronder een nieuwe link aanvragen." -#: classes/Gems/Default/IndexAction.php:312 +#: classes/Gems/Default/IndexAction.php:315 msgid "We sent you an e-mail with a reset link. Click on the link in the e-mail." msgstr "We hebben u een email met reset link gestuurd. Klik op de link in de email." -#: classes/Gems/Default/IndexAction.php:321 +#: classes/Gems/Default/IndexAction.php:324 msgid "New password is active." msgstr "Nieuwe wachtwoord geactiveerd." -#: classes/Gems/Default/IndexAction.php:342 +#: classes/Gems/Default/IndexAction.php:345 msgid "Password reset requested" msgstr "Wachtwoord reset aangevraagd" -#: classes/Gems/Default/IndexAction.php:345 +#: classes/Gems/Default/IndexAction.php:348 msgid "" "Dear {greeting},\n" "\n" @@ -1185,7 +1192,6 @@ msgstr "Datum" #: classes/Gems/Default/LogAction.php:191 -#: classes/Gems/Default/LogMaintenanceAction.php:52 msgid "Action" msgstr "Actie" @@ -1202,7 +1208,6 @@ msgstr "IP adres" #: classes/Gems/Default/LogAction.php:209 -#: classes/Gems/Default/LogMaintenanceAction.php:53 msgid "Log" msgstr "Logboek" @@ -1412,8 +1417,6 @@ msgstr "Email servers" #: classes/Gems/Default/MailTemplateAction.php:76 -#: classes/Gems/Default/StaffAction.php:278 -#: classes/Gems/Default/StaffAction.php:311 msgid "(all organizations)" msgstr "(alle organisaties)" @@ -1438,7 +1441,6 @@ #: classes/Gems/Default/OptionAction.php:136 #: classes/Gems/Default/OrganizationAction.php:132 #: classes/Gems/Default/RespondentAction.php:175 -#: classes/Gems/Default/StaffAction.php:294 msgid "Language" msgstr "Taal" @@ -1553,20 +1555,24 @@ msgid "Only for programmers." msgstr "Uitsluitend voor programmeurs." -#: classes/Gems/Default/OrganizationAction.php:167 +#: classes/Gems/Default/OrganizationAction.php:175 msgid "This can not be changed yet" msgstr "Dit kan nog niet gewijzigd worden" -#: classes/Gems/Default/OrganizationAction.php:169 -#: classes/Gems/Default/StaffAction.php:119 +#: classes/Gems/Default/OrganizationAction.php:177 msgid "User Definition" msgstr "User Definition" -#: classes/Gems/Default/OrganizationAction.php:189 +#: classes/Gems/Default/OrganizationAction.php:194 +#, php-format +msgid "Edit %s %s - %s" +msgstr "Bewerk %s %s - %s" + +#: classes/Gems/Default/OrganizationAction.php:204 msgid "Participating organizations" msgstr "Deelnemende organisaties" -#: classes/Gems/Default/OrganizationAction.php:200 +#: classes/Gems/Default/OrganizationAction.php:215 msgid "organization" msgid_plural "organizations" msgstr[0] "organisatie" @@ -2069,55 +2075,55 @@ msgid "Synchronize all sources." msgstr "Synchroniseer alle bronnen." -#: classes/Gems/Default/StaffAction.php:125 +#: classes/Gems/Default/StaffAction.php:161 msgid "Unsupported User Definition" msgstr "Onbekende User Definition" -#: classes/Gems/Default/StaffAction.php:154 +#: classes/Gems/Default/StaffAction.php:190 msgid "Users can only login when this box is checked." msgstr "Gebruikers kunnen alleen inloggen als dit is aangevinkt." -#: classes/Gems/Default/StaffAction.php:155 +#: classes/Gems/Default/StaffAction.php:191 msgid "If checked the user will logoff when answering a survey." msgstr "Indien actief, dan logt de gebruiker uit voor het beantwoorden van een vragenlijst." -#: classes/Gems/Default/StaffAction.php:172 +#: classes/Gems/Default/StaffAction.php:208 msgid "You are not allowed to edit this staff member." msgstr "U mag deze medewerker niet wijzigen." -#: classes/Gems/Default/StaffAction.php:229 +#: classes/Gems/Default/StaffAction.php:265 #, php-format msgid "User with id %s already exists but is deleted, do you want to reactivate the account?" msgstr "Gebruiker met inlognaam %s bestaat al maar is verwijderd, wilt u het account opnieuw activeren?" -#: classes/Gems/Default/StaffAction.php:270 +#: classes/Gems/Default/StaffAction.php:306 msgid "Username" msgstr "Gebruikersnaam" -#: classes/Gems/Default/StaffAction.php:285 +#: classes/Gems/Default/StaffAction.php:321 msgid "Primary function" msgstr "Primaire functie" -#: classes/Gems/Default/StaffAction.php:295 +#: classes/Gems/Default/StaffAction.php:331 msgid "Can login" msgstr "Kan inloggen" -#: classes/Gems/Default/StaffAction.php:296 +#: classes/Gems/Default/StaffAction.php:332 msgid "Logout on survey" msgstr "Logout bij beantwoorden vragenlijst" -#: classes/Gems/Default/StaffAction.php:371 +#: classes/Gems/Default/StaffAction.php:407 msgid "staff member" msgid_plural "staff members" msgstr[0] "medewerker" msgstr[1] "medewerkers" -#: classes/Gems/Default/StaffAction.php:403 +#: classes/Gems/Default/StaffAction.php:439 #, php-format msgid "Reset password for: %s" msgstr "Verander het wachtwoord voor: %s" -#: classes/Gems/Default/StaffAction.php:406 +#: classes/Gems/Default/StaffAction.php:442 msgid "You are not allowed to change this password." msgstr "U mag dit wachtwoord niet wijzigen." @@ -3680,25 +3686,25 @@ msgstr[0] "Uw account is tijdelijk geblokkeerd. U kunt over een minuut opnieuw inloggen." msgstr[1] "Uw account is tijdelijk geblokkeerd. U kunt over %d minuten opnieuw inloggen." -#: classes/Gems/User/User.php:427 +#: classes/Gems/User/User.php:430 msgid "You are not allowed to login from this location." msgstr "U kunt vanaf deze locatie niet inloggen." -#: classes/Gems/User/User.php:1078 +#: classes/Gems/User/User.php:1081 msgid "Your birthday" msgstr "Uw geboortedatum" -#: classes/Gems/User/User.php:1094 +#: classes/Gems/User/User.php:1097 #: classes/Gems/User/Form/ChangePasswordForm.php:163 #, php-format msgid "%s is not correct." msgstr "%s is onjuist." -#: classes/Gems/User/User.php:1176 +#: classes/Gems/User/User.php:1179 msgid "Trying to send a password reset to a user that cannot be reset." msgstr "Het wachtwoord voor deze gebruiker kan niet gewijzigd worden." -#: classes/Gems/User/User.php:1204 +#: classes/Gems/User/User.php:1207 msgid "Unable to send e-mail." msgstr "Verzenden email mislukt." @@ -4056,19 +4062,24 @@ msgstr "Bewerk traject" #: snippets/DeleteSingleSurveyInSourceTokenSnippet.php:172 +#: snippets/DeleteSingleSurveyNotUsedTokenSnippet.php:143 +#: snippets/DeleteTrackTokenSnippet.php:193 msgid "Edit token" msgstr "Kenmerk bewerken" #: snippets/DeleteSingleSurveyInSourceTokenSnippet.php:225 +#: snippets/DeleteTrackTokenSnippet.php:245 #, php-format msgid "Redo of token %s." msgstr "Herkansing voor kenmerk %s." #: snippets/DeleteSingleSurveyInSourceTokenSnippet.php:228 +#: snippets/DeleteTrackTokenSnippet.php:248 msgid "Old comment:" msgstr "Oude opmerkingen" #: snippets/DeleteSingleSurveyInSourceTokenSnippet.php:249 +#: snippets/DeleteTrackTokenSnippet.php:269 #, php-format msgid "Created replacement token %2$s for token %1$s." msgstr "Kenmerk %s is vervangen door het nieuwe kenmerk %s." @@ -4095,7 +4106,6 @@ msgstr "Keuzelijst is veranderd." #: snippets/EditSingleSurveyTokenSnippet.php:132 -#: snippets/ShowSingleSurveyTokenSnippet.php:150 msgid "Show survey" msgstr "Toon vragenlijst" @@ -4146,6 +4156,7 @@ msgstr "Geselecteerde vragenlijsten" #: snippets/ShowSingleSurveyTokenSnippet.php:76 +#: snippets/ShowTrackTokenSnippet.php:77 msgid "Actions" msgstr "Acties" @@ -4291,6 +4302,10 @@ msgstr[0] "Na deze vragenlijst hebben we nog één andere vragenlijst voor u." msgstr[1] "Na deze vragenlijst hebben we nog %d andere vragenlijsten voor u." +#: views/scripts/index/login.phtml:12 +msgid "The Pulse software was made possible thanks to support from " +msgstr "De PULSE software is mede mogelijk gemaakt met steun van " + #~ msgid "Cookies must be enabled for this site." #~ msgstr "Zonder cookies heeft u geen toegang tot deze site." @@ -4430,9 +4445,6 @@ #~ msgid "Back" #~ msgstr "Terug" -#~ msgid "The Pulse software was made possible thanks to support from " -#~ msgstr "De PULSE software is mede mogelijk gemaakt met steun van " - #, fuzzy #~ msgid "Executing patchlevel 43" #~ msgstr "Uit te voeren versie" Modified: trunk/library/snippets/Organization/OrganizationEditSnippet.php =================================================================== --- trunk/library/snippets/Organization/OrganizationEditSnippet.php 2012-05-03 19:41:43 UTC (rev 663) +++ trunk/library/snippets/Organization/OrganizationEditSnippet.php 2012-05-04 08:29:55 UTC (rev 664) @@ -115,7 +115,7 @@ $bridge->addExhibitor('allowed', 'value', $display, 'label', $this->_('Can access')); } - $this->addItems($bridge, 'gor_user_class'); + $this->addItems($bridge, 'gor_allowed_ip_ranges', 'gor_user_class'); if (isset($this->formData['gor_user_class']) && !empty($this->formData['gor_user_class'])) { $definition = $this->loader->getUserLoader()->getUserDefinition($this->formData['gor_user_class']); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2012-05-07 09:27:40
|
Revision: 672 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=672&view=rev Author: mennodekker Date: 2012-05-07 09:27:28 +0000 (Mon, 07 May 2012) Log Message: ----------- Added getSubject method to allow setting a subject for use with tabbed forms. In a tab form the subject you are editing can be in a different tab, so the subject is added to the title. Cleaned up translations Modified Paths: -------------- trunk/library/classes/Gems/Controller/BrowseEditAction.php trunk/library/classes/Gems/Controller/ModelSnippetActionAbstract.php trunk/library/classes/Gems/Default/OrganizationAction.php trunk/library/classes/Gems/Default/RespondentAction.php trunk/library/languages/default-en.mo trunk/library/languages/default-en.po trunk/library/languages/default-nl.mo trunk/library/languages/default-nl.po Modified: trunk/library/classes/Gems/Controller/BrowseEditAction.php =================================================================== --- trunk/library/classes/Gems/Controller/BrowseEditAction.php 2012-05-07 09:13:59 UTC (rev 671) +++ trunk/library/classes/Gems/Controller/BrowseEditAction.php 2012-05-07 09:27:28 UTC (rev 672) @@ -402,7 +402,13 @@ public function editAction() { if ($form = $this->processForm()) { - $this->html->h3(sprintf($this->_('Edit %s'), $this->getTopic())); + if ($this->useTabbedForms && method_exists($this, 'getSubject')) { + $data = $this->getModel()->loadFirst(); + $subject = $this->getSubject($data); + $this->html->h3(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject)); + } else { + $this->html->h3(sprintf($this->_('Edit %s'), $this->getTopic(1))); + } $this->html[] = $form; } } Modified: trunk/library/classes/Gems/Controller/ModelSnippetActionAbstract.php =================================================================== --- trunk/library/classes/Gems/Controller/ModelSnippetActionAbstract.php 2012-05-07 09:13:59 UTC (rev 671) +++ trunk/library/classes/Gems/Controller/ModelSnippetActionAbstract.php 2012-05-07 09:27:28 UTC (rev 672) @@ -255,7 +255,7 @@ */ public function getEditTitle() { - return sprintf($this->_('Edit %s...'), $this->getTopic(1)); + return sprintf($this->_('Edit %s'), $this->getTopic(1)); } /** Modified: trunk/library/classes/Gems/Default/OrganizationAction.php =================================================================== --- trunk/library/classes/Gems/Default/OrganizationAction.php 2012-05-07 09:13:59 UTC (rev 671) +++ trunk/library/classes/Gems/Default/OrganizationAction.php 2012-05-07 09:27:28 UTC (rev 672) @@ -191,7 +191,10 @@ { $data = $this->getModel()->loadFirst(); - return sprintf($this->_('Edit %s %s - %s'), $this->getTopic(1), $data['gor_name'], $data['gor_location']); + //Add location to the subject + $subject = sprintf('%s - %s', $data['gor_name'], $data['gor_location']); + + return sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject); } /** Modified: trunk/library/classes/Gems/Default/RespondentAction.php =================================================================== --- trunk/library/classes/Gems/Default/RespondentAction.php 2012-05-07 09:13:59 UTC (rev 671) +++ trunk/library/classes/Gems/Default/RespondentAction.php 2012-05-07 09:27:28 UTC (rev 672) @@ -321,6 +321,11 @@ } } + public function getSubject($data) + { + return sprintf('%s - %s', $data['name'], $data['gr2o_patient_nr']); + } + public function getTopic($count = 1) { return $this->plural('respondent', 'respondents', $count); Modified: trunk/library/languages/default-en.mo =================================================================== (Binary files differ) Modified: trunk/library/languages/default-en.po =================================================================== --- trunk/library/languages/default-en.po 2012-05-07 09:13:59 UTC (rev 671) +++ trunk/library/languages/default-en.po 2012-05-07 09:27:28 UTC (rev 672) @@ -2,7 +2,7 @@ msgstr "" "Project-Id-Version: GemsTracker EN\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-05-04 10:24+0100\n" +"POT-Creation-Date: 2012-05-07 11:24+0100\n" "PO-Revision-Date: \n" "Last-Translator: Menno Dekker <men...@er...>\n" "Language-Team: Erasmus MGZ <mat...@ma...>\n" @@ -18,77 +18,77 @@ "X-Poedit-KeywordsList: plural:1,2\n" "X-Poedit-SearchPath-0: .\n" -#: classes/GemsEscort.php:212 +#: classes/GemsEscort.php:214 #, php-format msgid "Path %s not writable" msgstr "Path %s not writable" -#: classes/GemsEscort.php:750 +#: classes/GemsEscort.php:752 #, php-format msgid "You are logged in as %s" msgstr "You are logged in as %s" -#: classes/GemsEscort.php:752 +#: classes/GemsEscort.php:754 #: classes/Gems/Menu.php:249 msgid "Logoff" msgstr "Logoff" -#: classes/GemsEscort.php:755 +#: classes/GemsEscort.php:757 msgid "You are not logged in" msgstr "You are not logged in" -#: classes/GemsEscort.php:939 +#: classes/GemsEscort.php:941 #, php-format msgid "User: %s" msgstr "User: %s" -#: classes/GemsEscort.php:964 +#: classes/GemsEscort.php:966 msgid "version" msgstr "version" -#: classes/GemsEscort.php:1395 +#: classes/GemsEscort.php:1397 msgid "Take note: your session has expired, your inputs were not saved. Please check the input data and try again" msgstr "Take note: your session has expired, your inputs were not saved. Please check the input data and try again" -#: classes/GemsEscort.php:1526 +#: classes/GemsEscort.php:1528 msgid "Please check back later." msgstr "Please check back later." -#: classes/GemsEscort.php:1528 -#: classes/GemsEscort.php:1532 -#: classes/GemsEscort.php:1533 +#: classes/GemsEscort.php:1530 +#: classes/GemsEscort.php:1534 +#: classes/GemsEscort.php:1535 msgid "System is in maintenance mode" msgstr "System is in maintenance mode" -#: classes/GemsEscort.php:1543 +#: classes/GemsEscort.php:1545 msgid "No access to site." msgstr "No access to site." -#: classes/GemsEscort.php:1545 -#: classes/GemsEscort.php:1587 +#: classes/GemsEscort.php:1547 +#: classes/GemsEscort.php:1589 msgid "You have no access to this site." msgstr "You have no access to this site." -#: classes/GemsEscort.php:1561 +#: classes/GemsEscort.php:1563 msgid "No access to page" msgstr "No access to page" -#: classes/GemsEscort.php:1563 +#: classes/GemsEscort.php:1565 #, php-format msgid "Access to this page is not allowed for current role: %s." msgstr "Access to this page is not allowed for current role: %s." -#: classes/GemsEscort.php:1573 -#: classes/GemsEscort.php:1585 +#: classes/GemsEscort.php:1575 +#: classes/GemsEscort.php:1587 msgid "You are no longer logged in." msgstr "You are no longer logged in." -#: classes/GemsEscort.php:1574 +#: classes/GemsEscort.php:1576 msgid "You must login to access this page." msgstr "You must login to access this page." -#: classes/GemsEscort.php:1714 #: classes/GemsEscort.php:1716 +#: classes/GemsEscort.php:1718 #, php-format msgid "%d survey" msgid_plural "%d surveys" @@ -423,10 +423,6 @@ msgid " The error message is: %s" msgstr " The error message is: %s" -#: classes/Gems/Tracker.php:771 -msgid "Checks performed" -msgstr "Checks performed" - #: classes/Gems/Upgrades.php:77 msgid "Syncing surveys for all sources" msgstr "Syncing surveys for all sources" @@ -462,79 +458,85 @@ msgid "%2$u %1$s deleted" msgstr "%2$u %1$s deleted" -#: classes/Gems/Controller/BrowseEditAction.php:405 +#: classes/Gems/Controller/BrowseEditAction.php:408 #, php-format +msgid "Edit %s %s" +msgstr "Edit %s %s" + +#: classes/Gems/Controller/BrowseEditAction.php:410 +#: classes/Gems/Controller/ModelSnippetActionAbstract.php:258 +#, php-format msgid "Edit %s" msgstr "Edit %s" -#: classes/Gems/Controller/BrowseEditAction.php:502 +#: classes/Gems/Controller/BrowseEditAction.php:508 msgid "Free search text" msgstr "Free search text" -#: classes/Gems/Controller/BrowseEditAction.php:573 +#: classes/Gems/Controller/BrowseEditAction.php:579 msgid "Search" msgstr "Search" -#: classes/Gems/Controller/BrowseEditAction.php:589 +#: classes/Gems/Controller/BrowseEditAction.php:595 #, php-format msgid "No %s found" msgstr "No %s found" -#: classes/Gems/Controller/BrowseEditAction.php:673 +#: classes/Gems/Controller/BrowseEditAction.php:679 #: classes/Gems/Default/ExportAction.php:234 #, php-format msgid "No %s found." msgstr "No %s found." -#: classes/Gems/Controller/BrowseEditAction.php:791 +#: classes/Gems/Controller/BrowseEditAction.php:797 msgid "Are you sure?" msgstr "Are you sure?" -#: classes/Gems/Controller/BrowseEditAction.php:807 +#: classes/Gems/Controller/BrowseEditAction.php:813 #: classes/Gems/Default/DatabaseAction.php:187 #: classes/Gems/Default/DatabaseAction.php:499 msgid "Yes" msgstr "Yes" -#: classes/Gems/Controller/BrowseEditAction.php:808 +#: classes/Gems/Controller/BrowseEditAction.php:814 #: classes/Gems/Default/DatabaseAction.php:188 #: classes/Gems/Default/DatabaseAction.php:500 msgid "No" msgstr "No" -#: classes/Gems/Controller/BrowseEditAction.php:861 +#: classes/Gems/Controller/BrowseEditAction.php:867 #, php-format msgid "Unknown %s requested" msgstr "Unknown %s requested" -#: classes/Gems/Controller/BrowseEditAction.php:884 +#: classes/Gems/Controller/BrowseEditAction.php:890 #, php-format msgid "New %1$s..." msgstr "New %1$s..." -#: classes/Gems/Controller/BrowseEditAction.php:892 +#: classes/Gems/Controller/BrowseEditAction.php:898 msgid "Save" msgstr "Save" -#: classes/Gems/Controller/BrowseEditAction.php:928 +#: classes/Gems/Controller/BrowseEditAction.php:934 #, php-format msgid "%2$u %1$s saved" msgstr "%2$u %1$s saved" -#: classes/Gems/Controller/BrowseEditAction.php:931 +#: classes/Gems/Controller/BrowseEditAction.php:937 msgid "No changes to save." msgstr "No changes to save." -#: classes/Gems/Controller/BrowseEditAction.php:940 +#: classes/Gems/Controller/BrowseEditAction.php:946 msgid "Input error! No changes saved!" msgstr "Input error! No changes saved!" -#: classes/Gems/Controller/BrowseEditAction.php:968 +#: classes/Gems/Controller/BrowseEditAction.php:974 #, php-format msgid "Show %s" msgstr "Show %s" -#: classes/Gems/Controller/BrowseEditAction.php:975 +#: classes/Gems/Controller/BrowseEditAction.php:981 #, php-format msgid "Unknown %s." msgstr "Unknown %s." @@ -549,11 +551,6 @@ msgid "Do you want to delete this %s?" msgstr "Do you want to delete this %s?" -#: classes/Gems/Controller/ModelSnippetActionAbstract.php:258 -#, php-format -msgid "Edit %s..." -msgstr "Edit %s..." - #: classes/Gems/Controller/ModelSnippetActionAbstract.php:271 msgid "No data found." msgstr "No data found." @@ -1026,78 +1023,78 @@ msgid "Administrative groups" msgstr "Administrative groups" -#: classes/Gems/Default/IndexAction.php:156 +#: classes/Gems/Default/IndexAction.php:157 msgid "Request password reset" msgstr "Request password reset" -#: classes/Gems/Default/IndexAction.php:160 +#: classes/Gems/Default/IndexAction.php:161 msgid "Please enter your organization and your username or e-mail address. " msgstr "Please enter your organization and your username or e-mail address. " -#: classes/Gems/Default/IndexAction.php:162 +#: classes/Gems/Default/IndexAction.php:163 msgid "Please enter your username or e-mail address. " msgstr "Please enter your username or e-mail address. " -#: classes/Gems/Default/IndexAction.php:164 +#: classes/Gems/Default/IndexAction.php:165 msgid "We will then send you an e-mail with a link. The link will bring you to a page where you can set a new password of your choice." msgstr "We will then send you an e-mail with a link. The link will bring you to a page where you can set a new password of your choice." -#: classes/Gems/Default/IndexAction.php:170 +#: classes/Gems/Default/IndexAction.php:171 msgid "Execute password reset" msgstr "Execute password reset" -#: classes/Gems/Default/IndexAction.php:171 +#: classes/Gems/Default/IndexAction.php:172 msgid "We received your password reset request." msgstr "We received your password reset request." -#: classes/Gems/Default/IndexAction.php:174 +#: classes/Gems/Default/IndexAction.php:175 #, php-format msgid "Welcome to %s" msgstr "Welcome to %s" -#: classes/Gems/Default/IndexAction.php:175 +#: classes/Gems/Default/IndexAction.php:176 msgid "Welcome to this website." msgstr "Welcome to this website." -#: classes/Gems/Default/IndexAction.php:178 +#: classes/Gems/Default/IndexAction.php:179 msgid "Please enter your password of choice twice." msgstr "Please enter your password of choice twice." -#: classes/Gems/Default/IndexAction.php:216 +#: classes/Gems/Default/IndexAction.php:217 msgid "Your password must be changed." msgstr "Your password must be changed." -#: classes/Gems/Default/IndexAction.php:231 +#: classes/Gems/Default/IndexAction.php:232 #, php-format msgid "Login successful, welcome %s." msgstr "Login successful, welcome %s." -#: classes/Gems/Default/IndexAction.php:271 +#: classes/Gems/Default/IndexAction.php:272 #, php-format msgid "Good bye: %s." msgstr "Good bye: %s." -#: classes/Gems/Default/IndexAction.php:294 +#: classes/Gems/Default/IndexAction.php:295 msgid "Your password reset request is no longer valid, please request a new link." msgstr "Your password reset request is no longer valid, please request a new link." -#: classes/Gems/Default/IndexAction.php:296 +#: classes/Gems/Default/IndexAction.php:297 msgid "Your password input request is no longer valid, please request a new link." msgstr "Your password input request is no longer valid, please request a new link." -#: classes/Gems/Default/IndexAction.php:315 +#: classes/Gems/Default/IndexAction.php:316 msgid "We sent you an e-mail with a reset link. Click on the link in the e-mail." msgstr "We sent you an e-mail with a reset link. Click on the link in the e-mail." -#: classes/Gems/Default/IndexAction.php:324 +#: classes/Gems/Default/IndexAction.php:325 msgid "New password is active." msgstr "New password is active." -#: classes/Gems/Default/IndexAction.php:345 +#: classes/Gems/Default/IndexAction.php:346 msgid "Password reset requested" msgstr "Password reset requested" -#: classes/Gems/Default/IndexAction.php:348 +#: classes/Gems/Default/IndexAction.php:349 msgid "" "Dear {greeting},\n" "\n" @@ -1563,16 +1560,11 @@ msgid "User Definition" msgstr "User Definition" -#: classes/Gems/Default/OrganizationAction.php:194 -#, php-format -msgid "Edit %s %s - %s" -msgstr "Edit %s %s - %s" - -#: classes/Gems/Default/OrganizationAction.php:204 +#: classes/Gems/Default/OrganizationAction.php:207 msgid "Participating organizations" msgstr "Participating organizations" -#: classes/Gems/Default/OrganizationAction.php:215 +#: classes/Gems/Default/OrganizationAction.php:218 msgid "organization" msgid_plural "organizations" msgstr[0] "organization" @@ -1903,13 +1895,13 @@ msgid "Choose a reception code to delete." msgstr "Choose a reception code to delete." -#: classes/Gems/Default/RespondentAction.php:326 +#: classes/Gems/Default/RespondentAction.php:331 msgid "respondent" msgid_plural "respondents" msgstr[0] "patient" msgstr[1] "patients" -#: classes/Gems/Default/RespondentAction.php:399 +#: classes/Gems/Default/RespondentAction.php:404 msgid "Please settle the informed consent form for this respondent." msgstr "Please settle the informed consent form for this patient." @@ -2075,55 +2067,55 @@ msgid "Synchronize all sources." msgstr "Synchronize all sources." -#: classes/Gems/Default/StaffAction.php:161 +#: classes/Gems/Default/StaffAction.php:158 msgid "Unsupported User Definition" msgstr "Unsupported User Definition" -#: classes/Gems/Default/StaffAction.php:190 +#: classes/Gems/Default/StaffAction.php:187 msgid "Users can only login when this box is checked." msgstr "Users can only login when this box is checked." -#: classes/Gems/Default/StaffAction.php:191 +#: classes/Gems/Default/StaffAction.php:188 msgid "If checked the user will logoff when answering a survey." msgstr "If checked the user will logoff when answering a survey." -#: classes/Gems/Default/StaffAction.php:208 +#: classes/Gems/Default/StaffAction.php:205 msgid "You are not allowed to edit this staff member." msgstr "You are not allowed to edit this staff member." -#: classes/Gems/Default/StaffAction.php:265 +#: classes/Gems/Default/StaffAction.php:262 #, php-format msgid "User with id %s already exists but is deleted, do you want to reactivate the account?" msgstr "User with id %s already exists but is deleted, do you want to reactivate the account?" -#: classes/Gems/Default/StaffAction.php:306 +#: classes/Gems/Default/StaffAction.php:303 msgid "Username" msgstr "Username" -#: classes/Gems/Default/StaffAction.php:321 +#: classes/Gems/Default/StaffAction.php:318 msgid "Primary function" msgstr "Primary function" -#: classes/Gems/Default/StaffAction.php:331 +#: classes/Gems/Default/StaffAction.php:328 msgid "Can login" msgstr "Can login" -#: classes/Gems/Default/StaffAction.php:332 +#: classes/Gems/Default/StaffAction.php:329 msgid "Logout on survey" msgstr "Logout on survey" -#: classes/Gems/Default/StaffAction.php:407 +#: classes/Gems/Default/StaffAction.php:404 msgid "staff member" msgid_plural "staff members" msgstr[0] "staff member" msgstr[1] "staff members" -#: classes/Gems/Default/StaffAction.php:439 +#: classes/Gems/Default/StaffAction.php:436 #, php-format msgid "Reset password for: %s" msgstr "Reset password for: %s" -#: classes/Gems/Default/StaffAction.php:442 +#: classes/Gems/Default/StaffAction.php:439 msgid "You are not allowed to change this password." msgstr "You are not allowed to change this password." @@ -2486,12 +2478,12 @@ msgid "%s %s not found." msgstr "%s %s not found." -#: classes/Gems/Default/TrackActionAbstract.php:489 +#: classes/Gems/Default/TrackActionAbstract.php:492 #, php-format msgid "Overview of %s track for respondent %s" msgstr "Overview of %s track for patient %s" -#: classes/Gems/Default/TrackActionAbstract.php:493 +#: classes/Gems/Default/TrackActionAbstract.php:496 msgid "This track is currently not assigned to this respondent." msgstr "This track is currently not assigned to this patient." @@ -3686,25 +3678,26 @@ msgstr[0] "Your account is temporarily blocked, please wait a minute." msgstr[1] "Your account is temporarily blocked, please wait %d minutes." -#: classes/Gems/User/User.php:430 +#: classes/Gems/User/User.php:431 +#: classes/Gems/User/User.php:458 msgid "You are not allowed to login from this location." msgstr "You are not allowed to login from this location." -#: classes/Gems/User/User.php:1081 +#: classes/Gems/User/User.php:1113 msgid "Your birthday" msgstr "Your birthday" -#: classes/Gems/User/User.php:1097 +#: classes/Gems/User/User.php:1129 #: classes/Gems/User/Form/ChangePasswordForm.php:163 #, php-format msgid "%s is not correct." msgstr "%s is not correct." -#: classes/Gems/User/User.php:1179 +#: classes/Gems/User/User.php:1211 msgid "Trying to send a password reset to a user that cannot be reset." msgstr "Trying to send a password reset to a user that cannot be reset." -#: classes/Gems/User/User.php:1207 +#: classes/Gems/User/User.php:1239 msgid "Unable to send e-mail." msgstr "Unable to send e-mail." @@ -4306,6 +4299,15 @@ msgid "The Pulse software was made possible thanks to support from " msgstr "The Pulse software was made possible thanks to support from " +#~ msgid "Edit %s..." +#~ msgstr "Edit %s..." + +#~ msgid "Checks performed" +#~ msgstr "Checks performed" + +#~ msgid "Edit %s %s - %s" +#~ msgstr "Edit %s %s - %s" + #~ msgid "Cookies must be enabled for this site." #~ msgstr "Cookies must be enabled for this site." Modified: trunk/library/languages/default-nl.mo =================================================================== (Binary files differ) Modified: trunk/library/languages/default-nl.po =================================================================== --- trunk/library/languages/default-nl.po 2012-05-07 09:13:59 UTC (rev 671) +++ trunk/library/languages/default-nl.po 2012-05-07 09:27:28 UTC (rev 672) @@ -2,7 +2,7 @@ msgstr "" "Project-Id-Version: GemsTracker NL\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-05-04 10:26+0100\n" +"POT-Creation-Date: 2012-05-07 11:23+0100\n" "PO-Revision-Date: \n" "Last-Translator: Menno Dekker <men...@er...>\n" "Language-Team: Erasmus MGZ <mat...@ma...>\n" @@ -18,77 +18,77 @@ "X-Poedit-KeywordsList: plural:1,2\n" "X-Poedit-SearchPath-0: .\n" -#: classes/GemsEscort.php:212 +#: classes/GemsEscort.php:214 #, php-format msgid "Path %s not writable" msgstr "Path %s niet schrijfbaar" -#: classes/GemsEscort.php:750 +#: classes/GemsEscort.php:752 #, php-format msgid "You are logged in as %s" msgstr "Ingelogd als %s" -#: classes/GemsEscort.php:752 +#: classes/GemsEscort.php:754 #: classes/Gems/Menu.php:249 msgid "Logoff" msgstr "Uitloggen" -#: classes/GemsEscort.php:755 +#: classes/GemsEscort.php:757 msgid "You are not logged in" msgstr "U bent niet ingelogd" -#: classes/GemsEscort.php:939 +#: classes/GemsEscort.php:941 #, php-format msgid "User: %s" msgstr "Login: %s" -#: classes/GemsEscort.php:964 +#: classes/GemsEscort.php:966 msgid "version" msgstr "versie" -#: classes/GemsEscort.php:1395 +#: classes/GemsEscort.php:1397 msgid "Take note: your session has expired, your inputs were not saved. Please check the input data and try again" msgstr "Let op: uw sessie is verlopen, uw invoer is niet opgeslagen. Controleer uw gegevens en probeer a.u.b. opnieuw." -#: classes/GemsEscort.php:1526 +#: classes/GemsEscort.php:1528 msgid "Please check back later." msgstr "Probeer het later opnieuw." -#: classes/GemsEscort.php:1528 -#: classes/GemsEscort.php:1532 -#: classes/GemsEscort.php:1533 +#: classes/GemsEscort.php:1530 +#: classes/GemsEscort.php:1534 +#: classes/GemsEscort.php:1535 msgid "System is in maintenance mode" msgstr "Systeem is in onderhoudsmodus" -#: classes/GemsEscort.php:1543 +#: classes/GemsEscort.php:1545 msgid "No access to site." msgstr "Geen toegang tot website." -#: classes/GemsEscort.php:1545 -#: classes/GemsEscort.php:1587 +#: classes/GemsEscort.php:1547 +#: classes/GemsEscort.php:1589 msgid "You have no access to this site." msgstr "U heeft geen toegang tot deze website." -#: classes/GemsEscort.php:1561 +#: classes/GemsEscort.php:1563 msgid "No access to page" msgstr "Geen toegang tot pagina" -#: classes/GemsEscort.php:1563 +#: classes/GemsEscort.php:1565 #, php-format msgid "Access to this page is not allowed for current role: %s." msgstr "U heeft geen toegang tot deze pagina. Uw huidige rol is: %s." -#: classes/GemsEscort.php:1573 -#: classes/GemsEscort.php:1585 +#: classes/GemsEscort.php:1575 +#: classes/GemsEscort.php:1587 msgid "You are no longer logged in." msgstr "U bent niet meer ingelogd." -#: classes/GemsEscort.php:1574 +#: classes/GemsEscort.php:1576 msgid "You must login to access this page." msgstr "U moet ingelogd zijn voor toegang tot deze pagina." -#: classes/GemsEscort.php:1714 #: classes/GemsEscort.php:1716 +#: classes/GemsEscort.php:1718 #, php-format msgid "%d survey" msgid_plural "%d surveys" @@ -423,10 +423,6 @@ msgid " The error message is: %s" msgstr "De foutmelding is: %s" -#: classes/Gems/Tracker.php:771 -msgid "Checks performed" -msgstr "Controle uitgevoerd" - #: classes/Gems/Upgrades.php:77 msgid "Syncing surveys for all sources" msgstr "Vragenlijsten synchroniseren voor alle bronnen." @@ -462,79 +458,85 @@ msgid "%2$u %1$s deleted" msgstr "%2$u %1$s verwijderd" -#: classes/Gems/Controller/BrowseEditAction.php:405 +#: classes/Gems/Controller/BrowseEditAction.php:408 #, php-format +msgid "Edit %s %s" +msgstr "Bewerk %s %s" + +#: classes/Gems/Controller/BrowseEditAction.php:410 +#: classes/Gems/Controller/ModelSnippetActionAbstract.php:258 +#, php-format msgid "Edit %s" msgstr "Bewerk %s" -#: classes/Gems/Controller/BrowseEditAction.php:502 +#: classes/Gems/Controller/BrowseEditAction.php:508 msgid "Free search text" msgstr "Vrije zoek tekst" -#: classes/Gems/Controller/BrowseEditAction.php:573 +#: classes/Gems/Controller/BrowseEditAction.php:579 msgid "Search" msgstr "Zoeken" -#: classes/Gems/Controller/BrowseEditAction.php:589 +#: classes/Gems/Controller/BrowseEditAction.php:595 #, php-format msgid "No %s found" msgstr "Geen %s gevonden" -#: classes/Gems/Controller/BrowseEditAction.php:673 +#: classes/Gems/Controller/BrowseEditAction.php:679 #: classes/Gems/Default/ExportAction.php:234 #, php-format msgid "No %s found." msgstr "Geen %s gevonden." -#: classes/Gems/Controller/BrowseEditAction.php:791 +#: classes/Gems/Controller/BrowseEditAction.php:797 msgid "Are you sure?" msgstr "Weet u het zeker?" -#: classes/Gems/Controller/BrowseEditAction.php:807 +#: classes/Gems/Controller/BrowseEditAction.php:813 #: classes/Gems/Default/DatabaseAction.php:187 #: classes/Gems/Default/DatabaseAction.php:499 msgid "Yes" msgstr "Ja" -#: classes/Gems/Controller/BrowseEditAction.php:808 +#: classes/Gems/Controller/BrowseEditAction.php:814 #: classes/Gems/Default/DatabaseAction.php:188 #: classes/Gems/Default/DatabaseAction.php:500 msgid "No" msgstr "Nee" -#: classes/Gems/Controller/BrowseEditAction.php:861 +#: classes/Gems/Controller/BrowseEditAction.php:867 #, php-format msgid "Unknown %s requested" msgstr "Onjuist %s verzoek" -#: classes/Gems/Controller/BrowseEditAction.php:884 +#: classes/Gems/Controller/BrowseEditAction.php:890 #, php-format msgid "New %1$s..." msgstr "Nieuwe %1$s..." -#: classes/Gems/Controller/BrowseEditAction.php:892 +#: classes/Gems/Controller/BrowseEditAction.php:898 msgid "Save" msgstr "Opslaan" -#: classes/Gems/Controller/BrowseEditAction.php:928 +#: classes/Gems/Controller/BrowseEditAction.php:934 #, php-format msgid "%2$u %1$s saved" msgstr "%2$u %1$s opgeslagen" -#: classes/Gems/Controller/BrowseEditAction.php:931 +#: classes/Gems/Controller/BrowseEditAction.php:937 msgid "No changes to save." msgstr "Geen verandering om op te slaan." -#: classes/Gems/Controller/BrowseEditAction.php:940 +#: classes/Gems/Controller/BrowseEditAction.php:946 msgid "Input error! No changes saved!" msgstr "Invoer fout! Veranderingen niet opgeslagen!" -#: classes/Gems/Controller/BrowseEditAction.php:968 +#: classes/Gems/Controller/BrowseEditAction.php:974 #, php-format msgid "Show %s" msgstr "Toon %s" -#: classes/Gems/Controller/BrowseEditAction.php:975 +#: classes/Gems/Controller/BrowseEditAction.php:981 #, php-format msgid "Unknown %s." msgstr "%s is onbekend." @@ -549,11 +551,6 @@ msgid "Do you want to delete this %s?" msgstr "Weet u zeker dat deze %s verwijderd moet worden?" -#: classes/Gems/Controller/ModelSnippetActionAbstract.php:258 -#, php-format -msgid "Edit %s..." -msgstr "Bewerk %s..." - #: classes/Gems/Controller/ModelSnippetActionAbstract.php:271 msgid "No data found." msgstr "Geen gegevens gevonden." @@ -1026,78 +1023,78 @@ msgid "Administrative groups" msgstr "Beheer groepen" -#: classes/Gems/Default/IndexAction.php:156 +#: classes/Gems/Default/IndexAction.php:157 msgid "Request password reset" msgstr "Wachtwoord vergeten?" -#: classes/Gems/Default/IndexAction.php:160 +#: classes/Gems/Default/IndexAction.php:161 msgid "Please enter your organization and your username or e-mail address. " msgstr "Geef uw organisatie en uw email adres of de gebruikersnaam op. " -#: classes/Gems/Default/IndexAction.php:162 +#: classes/Gems/Default/IndexAction.php:163 msgid "Please enter your username or e-mail address. " msgstr "Geef uw email adres of gebruikersnaam op. " -#: classes/Gems/Default/IndexAction.php:164 +#: classes/Gems/Default/IndexAction.php:165 msgid "We will then send you an e-mail with a link. The link will bring you to a page where you can set a new password of your choice." msgstr "Vervolgens sturen wij u een email met een link. De link verwijst naar een pagina waar u een zelfgekozen wachtwoord in kan voeren." -#: classes/Gems/Default/IndexAction.php:170 +#: classes/Gems/Default/IndexAction.php:171 msgid "Execute password reset" msgstr "Vervang vergeten passwood" -#: classes/Gems/Default/IndexAction.php:171 +#: classes/Gems/Default/IndexAction.php:172 msgid "We received your password reset request." msgstr "We hebben uw verzoek voor een nieuw wachtwoord ontvangen." -#: classes/Gems/Default/IndexAction.php:174 +#: classes/Gems/Default/IndexAction.php:175 #, php-format msgid "Welcome to %s" msgstr "Welkom bij %s" -#: classes/Gems/Default/IndexAction.php:175 +#: classes/Gems/Default/IndexAction.php:176 msgid "Welcome to this website." msgstr "Welkom op deze website." -#: classes/Gems/Default/IndexAction.php:178 +#: classes/Gems/Default/IndexAction.php:179 msgid "Please enter your password of choice twice." msgstr "Geef twee keer een zelfgekozen wachtwoord op." -#: classes/Gems/Default/IndexAction.php:216 +#: classes/Gems/Default/IndexAction.php:217 msgid "Your password must be changed." msgstr "Uw wachtwoord moet veranderd worden." -#: classes/Gems/Default/IndexAction.php:231 +#: classes/Gems/Default/IndexAction.php:232 #, php-format msgid "Login successful, welcome %s." msgstr "Login in orde, welkom %s." -#: classes/Gems/Default/IndexAction.php:271 +#: classes/Gems/Default/IndexAction.php:272 #, php-format msgid "Good bye: %s." msgstr "Tot ziens: %s." -#: classes/Gems/Default/IndexAction.php:294 +#: classes/Gems/Default/IndexAction.php:295 msgid "Your password reset request is no longer valid, please request a new link." msgstr "Uw verzoek om een nieuw wachtwoord is niet meer geldig, maar u kan hieronder een nieuwe link aanvragen." -#: classes/Gems/Default/IndexAction.php:296 +#: classes/Gems/Default/IndexAction.php:297 msgid "Your password input request is no longer valid, please request a new link." msgstr "Uw link om een wachtwoord in te voeren is niet meer geldig, maar u kan hieronder een nieuwe link aanvragen." -#: classes/Gems/Default/IndexAction.php:315 +#: classes/Gems/Default/IndexAction.php:316 msgid "We sent you an e-mail with a reset link. Click on the link in the e-mail." msgstr "We hebben u een email met reset link gestuurd. Klik op de link in de email." -#: classes/Gems/Default/IndexAction.php:324 +#: classes/Gems/Default/IndexAction.php:325 msgid "New password is active." msgstr "Nieuwe wachtwoord geactiveerd." -#: classes/Gems/Default/IndexAction.php:345 +#: classes/Gems/Default/IndexAction.php:346 msgid "Password reset requested" msgstr "Wachtwoord reset aangevraagd" -#: classes/Gems/Default/IndexAction.php:348 +#: classes/Gems/Default/IndexAction.php:349 msgid "" "Dear {greeting},\n" "\n" @@ -1563,16 +1560,11 @@ msgid "User Definition" msgstr "User Definition" -#: classes/Gems/Default/OrganizationAction.php:194 -#, php-format -msgid "Edit %s %s - %s" -msgstr "Bewerk %s %s - %s" - -#: classes/Gems/Default/OrganizationAction.php:204 +#: classes/Gems/Default/OrganizationAction.php:207 msgid "Participating organizations" msgstr "Deelnemende organisaties" -#: classes/Gems/Default/OrganizationAction.php:215 +#: classes/Gems/Default/OrganizationAction.php:218 msgid "organization" msgid_plural "organizations" msgstr[0] "organisatie" @@ -1903,13 +1895,13 @@ msgid "Choose a reception code to delete." msgstr "Kies een ontvangst code om te verwijderen." -#: classes/Gems/Default/RespondentAction.php:326 +#: classes/Gems/Default/RespondentAction.php:331 msgid "respondent" msgid_plural "respondents" msgstr[0] "patiënt" msgstr[1] "patiënten" -#: classes/Gems/Default/RespondentAction.php:399 +#: classes/Gems/Default/RespondentAction.php:404 msgid "Please settle the informed consent form for this respondent." msgstr "A.u.b. het informed consent formulier doornemen met deze patiënt" @@ -2075,55 +2067,55 @@ msgid "Synchronize all sources." msgstr "Synchroniseer alle bronnen." -#: classes/Gems/Default/StaffAction.php:161 +#: classes/Gems/Default/StaffAction.php:158 msgid "Unsupported User Definition" msgstr "Onbekende User Definition" -#: classes/Gems/Default/StaffAction.php:190 +#: classes/Gems/Default/StaffAction.php:187 msgid "Users can only login when this box is checked." msgstr "Gebruikers kunnen alleen inloggen als dit is aangevinkt." -#: classes/Gems/Default/StaffAction.php:191 +#: classes/Gems/Default/StaffAction.php:188 msgid "If checked the user will logoff when answering a survey." msgstr "Indien actief, dan logt de gebruiker uit voor het beantwoorden van een vragenlijst." -#: classes/Gems/Default/StaffAction.php:208 +#: classes/Gems/Default/StaffAction.php:205 msgid "You are not allowed to edit this staff member." msgstr "U mag deze medewerker niet wijzigen." -#: classes/Gems/Default/StaffAction.php:265 +#: classes/Gems/Default/StaffAction.php:262 #, php-format msgid "User with id %s already exists but is deleted, do you want to reactivate the account?" msgstr "Gebruiker met inlognaam %s bestaat al maar is verwijderd, wilt u het account opnieuw activeren?" -#: classes/Gems/Default/StaffAction.php:306 +#: classes/Gems/Default/StaffAction.php:303 msgid "Username" msgstr "Gebruikersnaam" -#: classes/Gems/Default/StaffAction.php:321 +#: classes/Gems/Default/StaffAction.php:318 msgid "Primary function" msgstr "Primaire functie" -#: classes/Gems/Default/StaffAction.php:331 +#: classes/Gems/Default/StaffAction.php:328 msgid "Can login" msgstr "Kan inloggen" -#: classes/Gems/Default/StaffAction.php:332 +#: classes/Gems/Default/StaffAction.php:329 msgid "Logout on survey" msgstr "Logout bij beantwoorden vragenlijst" -#: classes/Gems/Default/StaffAction.php:407 +#: classes/Gems/Default/StaffAction.php:404 msgid "staff member" msgid_plural "staff members" msgstr[0] "medewerker" msgstr[1] "medewerkers" -#: classes/Gems/Default/StaffAction.php:439 +#: classes/Gems/Default/StaffAction.php:436 #, php-format msgid "Reset password for: %s" msgstr "Verander het wachtwoord voor: %s" -#: classes/Gems/Default/StaffAction.php:442 +#: classes/Gems/Default/StaffAction.php:439 msgid "You are not allowed to change this password." msgstr "U mag dit wachtwoord niet wijzigen." @@ -2486,12 +2478,12 @@ msgid "%s %s not found." msgstr "%s %s niet gevonden." -#: classes/Gems/Default/TrackActionAbstract.php:489 +#: classes/Gems/Default/TrackActionAbstract.php:492 #, php-format msgid "Overview of %s track for respondent %s" msgstr "Overzicht van het %s traject voor patiënt %s " -#: classes/Gems/Default/TrackActionAbstract.php:493 +#: classes/Gems/Default/TrackActionAbstract.php:496 msgid "This track is currently not assigned to this respondent." msgstr "Dit traject is nog niet aan deze patiënt toegewezen." @@ -3686,25 +3678,26 @@ msgstr[0] "Uw account is tijdelijk geblokkeerd. U kunt over een minuut opnieuw inloggen." msgstr[1] "Uw account is tijdelijk geblokkeerd. U kunt over %d minuten opnieuw inloggen." -#: classes/Gems/User/User.php:430 +#: classes/Gems/User/User.php:431 +#: classes/Gems/User/User.php:458 msgid "You are not allowed to login from this location." msgstr "U kunt vanaf deze locatie niet inloggen." -#: classes/Gems/User/User.php:1081 +#: classes/Gems/User/User.php:1113 msgid "Your birthday" msgstr "Uw geboortedatum" -#: classes/Gems/User/User.php:1097 +#: classes/Gems/User/User.php:1129 #: classes/Gems/User/Form/ChangePasswordForm.php:163 #, php-format msgid "%s is not correct." msgstr "%s is onjuist." -#: classes/Gems/User/User.php:1179 +#: classes/Gems/User/User.php:1211 msgid "Trying to send a password reset to a user that cannot be reset." msgstr "Het wachtwoord voor deze gebruiker kan niet gewijzigd worden." -#: classes/Gems/User/User.php:1207 +#: classes/Gems/User/User.php:1239 msgid "Unable to send e-mail." msgstr "Verzenden email mislukt." @@ -4306,6 +4299,15 @@ msgid "The Pulse software was made possible thanks to support from " msgstr "De PULSE software is mede mogelijk gemaakt met steun van " +#~ msgid "Edit %s..." +#~ msgstr "Bewerk %s..." + +#~ msgid "Checks performed" +#~ msgstr "Controle uitgevoerd" + +#~ msgid "Edit %s %s - %s" +#~ msgstr "Bewerk %s %s - %s" + #~ msgid "Cookies must be enabled for this site." #~ msgstr "Zonder cookies heeft u geen toegang tot deze site." This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2012-05-16 15:12:10
|
Revision: 685 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=685&view=rev Author: michieltcs Date: 2012-05-16 15:11:59 +0000 (Wed, 16 May 2012) Log Message: ----------- First draft of respondent html export Modified Paths: -------------- trunk/library/classes/Gems/Menu.php trunk/library/snippets/AnswerModelSnippet.php Added Paths: ----------- trunk/library/classes/Gems/Default/RespondentExportAction.php trunk/library/controllers/RespondentExportController.php Added: trunk/library/classes/Gems/Default/RespondentExportAction.php =================================================================== --- trunk/library/classes/Gems/Default/RespondentExportAction.php (rev 0) +++ trunk/library/classes/Gems/Default/RespondentExportAction.php 2012-05-16 15:11:59 UTC (rev 685) @@ -0,0 +1,213 @@ +<?php +/** + * Copyright (c) 2012, 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. + * + * + * @package Gems + * @subpackage Default + * @copyright Copyright (c) 2011 Erasmus MC + * @license New BSD License + * @version $Id$ + */ + +/** + * Standard controller to export respondent data to html + * + * @package Gems + * @subpackage Default + * @author Michiel Rook <mi...@to...> + * @copyright Copyright (c) 2012 Erasmus MC + * @license New BSD License + */ +class Gems_Default_RespondentExportAction extends Gems_Controller_Action +{ + public $useHtmlView = true; + + /** + * Constructs the form + * + * @return Gems_Form_TableForm + */ + protected function _getForm() + { + $form = new Gems_Form_TableForm(); + $form->setAttrib('target', '_blank'); + + $element = new Zend_Form_Element_Text('respondentId'); + $element->setLabel($this->_('Respondent number')); + $form->addElement($element); + + $element = new Zend_Form_Element_Submit('export'); + $element->setLabel($this->_('Export')) + ->setAttrib('class', 'button'); + $form->addElement($element); + + return $form; + } + + /** + * Exports all the tokens of a single track, grouped by round + * + * @param Gems_Tracker_RespondentTrack $track + */ + protected function _exportTrackTokens(Gems_Tracker_RespondentTrack $track) + { + $token = $track->getFirstToken(); + + while ($token) { + $this->html->span()->b($token->getSurveyName() . ($token->getRoundDescription() ? ' (' . $token->getRoundDescription() . ')' : '')); + //$this->addSnippets($token->getAnswerSnippetNames(), 'token', $token, 'tokenId', $token->getTokenId(), + // 'showHeaders', false, 'showButtons', false, 'showSelected', false, 'showTakeButton', false); + $this->addSnippet('AnswerModelSnippet', 'token', $token, 'tokenId', $token->getTokenId(), + 'showHeaders', false, 'showButtons', false, 'showSelected', false, 'showTakeButton', false); + + $this->html->br(); + + $token = $token->getNextToken(); + } + } + + /** + * Exports a single track + * + * @param Gems_Tracker_RespondentTrack $track + */ + protected function _exportTrack(Gems_Tracker_RespondentTrack $track) + { + $trackModel = $this->loader->getTracker()->getRespondentTrackModel(); + $trackModel->resetOrder(); + $trackModel->set('gtr_track_name', 'label', $this->_('Track')); + $trackModel->set('gr2t_track_info', 'label', $this->_('Description'), + 'description', $this->_('Enter the particulars concerning the assignment to this respondent.')); + $trackModel->set('assigned_by', 'label', $this->_('Assigned by')); + $trackModel->set('gr2t_start_date', 'label', $this->_('Start'), + 'formatFunction', $this->util->getTranslated()->formatDate, + 'default', MUtil_Date::format(new Zend_date(), 'dd-MM-yyyy')); + $trackModel->set('gr2t_reception_code'); + $trackModel->set('gr2t_comment', 'label', $this->_('Comment')); + $trackModel->setFilter(array('gr2t_id_respondent_track' => $track->getRespondentTrackId())); + $trackData = $trackModel->loadFirst(); + + $this->html->h3($this->_('Track') . ' ' . $trackData['gtr_track_name']); + + $bridge = new MUtil_Model_VerticalTableBridge($trackModel, array('class' => 'browser')); + $bridge->setRepeater(MUtil_Lazy::repeat(array($trackData))); + $bridge->th($this->_('Track information'), array('colspan' => 2)); + $bridge->setColumnCount(1); + foreach($trackModel->getItemsOrdered() as $name) { + if ($label = $trackModel->get($name, 'label')) { + $bridge->addItem($name, $label); + } + } + + $this->html[] = $bridge->getTable(); + $this->html->br(); + + $this->_exportTrackTokens($track); + + $this->html->hr(); + } + + /** + * Exports a single respondent + * + * @param string $respondentId + */ + protected function _exportRespondent($respondentId) + { + $respondentModel = $this->loader->getModels()->getRespondentModel(false); + $respondentModel->setFilter(array('gr2o_patient_nr' => $respondentId)); + $respondentData = $respondentModel->loadFirst(); + + $bridge = new MUtil_Model_VerticalTableBridge($respondentModel, array('class' => 'browser')); + $bridge->setRepeater(MUtil_Lazy::repeat(array($respondentData))); + $bridge->th($this->_('Respondent information'), array('colspan' => 4)); + $bridge->setColumnCount(2); + foreach($respondentModel->getItemsOrdered() as $name) { + if ($label = $respondentModel->get($name, 'label')) { + $bridge->addItem($name, $label); + } + } + + $this->html[] = $bridge->getTable(); + $this->html->hr(); + + $tracker = $this->loader->getTracker(); + $tracks = $tracker->getRespondentTracks($respondentData['gr2o_id_user'], $respondentData['gr2o_id_organization']); + + foreach ($tracks as $trackId => $track) { + $this->_exportTrack($track); + } + } + + /** + * Renders the entire report (including layout) + * + * @param string $respondentId + */ + protected function _render($respondentId) + { + $this->html = new MUtil_Html_Sequence(); + $this->html->h1('Export'); + $this->html->p(sprintf($this->_('Generated by %s on %s'), + $this->loader->getCurrentUser()->getFullName(), new Zend_Date())); + + $this->_exportRespondent($respondentId); + + $this->escort->menu->setVisible(false); + $this->escort->layoutSwitch(); + $this->escort->postDispatch($this->getRequest()); + + $this->_helper->layout()->disableLayout(); + $this->_helper->viewRenderer->setNoRender(true); + + $htmlData = $this->html->render($this->view); + $this->view->layout()->content = $htmlData; + + echo $this->view->layout->render(); + $this->escort->menu->setVisible(true); + } + + public function indexAction() + { + $form = $this->_getForm(); + $this->html->h2($this->_('Export respondent')); + $div = $this->html->div(array('id' => 'mainform')); + $div[] = $form; + + $request = $this->getRequest(); + + if ($request->isPost()) { + $form->populate($request->getPost()); + + $respondentId = $request->getParam('respondentId'); + + if (!empty($respondentId)) { + $this->_render($respondentId); + } + } + } +} \ No newline at end of file Property changes on: trunk/library/classes/Gems/Default/RespondentExportAction.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date Author Added: svn:eol-style + native Modified: trunk/library/classes/Gems/Menu.php =================================================================== --- trunk/library/classes/Gems/Menu.php 2012-05-16 10:44:42 UTC (rev 684) +++ trunk/library/classes/Gems/Menu.php 2012-05-16 15:11:59 UTC (rev 685) @@ -556,6 +556,9 @@ // EXPORT DATA $this->addContainer('Export data', 'pr.export', array('controller'=>'export', 'action'=>'index')); + // EXPORT TO HTML + $this->addContainer('Export respondent to html', 'pr.export-html', array('controller' => 'respondent-export', 'action'=>'index')); + // OTHER ITEMS $this->addLogonOffToken(); Added: trunk/library/controllers/RespondentExportController.php =================================================================== --- trunk/library/controllers/RespondentExportController.php (rev 0) +++ trunk/library/controllers/RespondentExportController.php 2012-05-16 15:11:59 UTC (rev 685) @@ -0,0 +1,31 @@ +<?php +/** + * Copyright (c) 2012, 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. + * + */ +class RespondentExportController extends Gems_Default_RespondentExportAction +{ +} \ No newline at end of file Property changes on: trunk/library/controllers/RespondentExportController.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date Author Added: svn:eol-style + native Modified: trunk/library/snippets/AnswerModelSnippet.php =================================================================== --- trunk/library/snippets/AnswerModelSnippet.php 2012-05-16 10:44:42 UTC (rev 684) +++ trunk/library/snippets/AnswerModelSnippet.php 2012-05-16 15:11:59 UTC (rev 685) @@ -45,4 +45,18 @@ * @since Class available since version 1.4 */ class AnswerModelSnippet extends Gems_Tracker_Snippets_AnswerModelSnippetGeneric -{ } +{ + /** + * Overrule to implement snippet specific filtering and sorting. + * + * @param MUtil_Model_ModelAbstract $model + */ + protected function processFilterAndSort(MUtil_Model_ModelAbstract $model) + { + if ($this->request) { + $this->processSortOnly($model); + + $model->setFilter(array('gto_id_token' => $this->token->getTokenId())); + } + } +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gem...@li...> - 2012-05-18 11:48:33
|
Revision: 688 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=688&view=rev Author: michieltcs Date: 2012-05-18 11:48:24 +0000 (Fri, 18 May 2012) Log Message: ----------- Add additional report information, update translations Modified Paths: -------------- trunk/library/classes/Gems/Default/RespondentExportAction.php trunk/library/languages/default-nl.mo trunk/library/languages/default-nl.po Modified: trunk/library/classes/Gems/Default/RespondentExportAction.php =================================================================== --- trunk/library/classes/Gems/Default/RespondentExportAction.php 2012-05-18 10:50:20 UTC (rev 687) +++ trunk/library/classes/Gems/Default/RespondentExportAction.php 2012-05-18 11:48:24 UTC (rev 688) @@ -200,10 +200,20 @@ protected function _render($respondentId) { $this->html = new MUtil_Html_Sequence(); - $this->html->h1('Export'); - $this->html->p(sprintf($this->_('Generated by %s on %s'), - $this->loader->getCurrentUser()->getFullName(), new Zend_Date())); + $this->html->h1($this->_('Respondent report')); + $table = $this->html->table(array('class' => 'browser')); + + $table->th($this->_('Report information'), array('colspan' => 2)); + $table->tr()->th($this->_('Generated by')) + ->td($this->loader->getCurrentUser()->getFullName()); + $table->tr()->th($this->_('Generated on')) + ->td(new Zend_Date()); + $table->tr()->th($this->_('Organization')) + ->td($this->loader->getCurrentUser()->getCurrentOrganization()->getName()); + + $this->html->br(); + $this->_exportRespondent($respondentId); $this->escort->menu->setVisible(false); Modified: trunk/library/languages/default-nl.mo =================================================================== (Binary files differ) Modified: trunk/library/languages/default-nl.po =================================================================== --- trunk/library/languages/default-nl.po 2012-05-18 10:50:20 UTC (rev 687) +++ trunk/library/languages/default-nl.po 2012-05-18 11:48:24 UTC (rev 688) @@ -2,14 +2,14 @@ msgstr "" "Project-Id-Version: GemsTracker NL\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-05-07 11:23+0100\n" +"POT-Creation-Date: 2012-05-18 13:45+0100\n" "PO-Revision-Date: \n" "Last-Translator: Michiel Rook <in...@to...>\n" "Language-Team: Erasmus MGZ <mat...@ma...>\n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: \n" "Plural-Forms: nplurals=2; plural=n != 1;\n" "X-Poedit-Language: Dutch\n" "X-Poedit-Country: NETHERLANDS\n" @@ -23,78 +23,92 @@ msgid "Path %s not writable" msgstr "Path %s niet schrijfbaar" -#: classes/GemsEscort.php:752 +#: classes/GemsEscort.php:756 #, php-format msgid "You are logged in as %s" msgstr "Ingelogd als %s" -#: classes/GemsEscort.php:754 -#: classes/Gems/Menu.php:249 +#: classes/GemsEscort.php:758 msgid "Logoff" msgstr "Uitloggen" -#: classes/GemsEscort.php:757 +#: classes/GemsEscort.php:761 msgid "You are not logged in" msgstr "U bent niet ingelogd" -#: classes/GemsEscort.php:941 +#: classes/GemsEscort.php:945 #, php-format msgid "User: %s" msgstr "Login: %s" -#: classes/GemsEscort.php:966 +#: classes/GemsEscort.php:970 msgid "version" msgstr "versie" -#: classes/GemsEscort.php:1397 +#: classes/GemsEscort.php:1412 msgid "Take note: your session has expired, your inputs were not saved. Please check the input data and try again" msgstr "Let op: uw sessie is verlopen, uw invoer is niet opgeslagen. Controleer uw gegevens en probeer a.u.b. opnieuw." -#: classes/GemsEscort.php:1528 +#: classes/GemsEscort.php:1543 msgid "Please check back later." msgstr "Probeer het later opnieuw." -#: classes/GemsEscort.php:1530 -#: classes/GemsEscort.php:1534 -#: classes/GemsEscort.php:1535 +#: classes/GemsEscort.php:1545 +#: classes/GemsEscort.php:1550 msgid "System is in maintenance mode" msgstr "Systeem is in onderhoudsmodus" -#: classes/GemsEscort.php:1545 +#: classes/GemsEscort.php:1560 msgid "No access to site." msgstr "Geen toegang tot website." -#: classes/GemsEscort.php:1547 -#: classes/GemsEscort.php:1589 +#: classes/GemsEscort.php:1562 msgid "You have no access to this site." msgstr "U heeft geen toegang tot deze website." -#: classes/GemsEscort.php:1563 +#: classes/GemsEscort.php:1578 msgid "No access to page" msgstr "Geen toegang tot pagina" -#: classes/GemsEscort.php:1565 +#: classes/GemsEscort.php:1580 #, php-format msgid "Access to this page is not allowed for current role: %s." msgstr "U heeft geen toegang tot deze pagina. Uw huidige rol is: %s." -#: classes/GemsEscort.php:1575 -#: classes/GemsEscort.php:1587 +#: classes/GemsEscort.php:1590 msgid "You are no longer logged in." msgstr "U bent niet meer ingelogd." -#: classes/GemsEscort.php:1576 +#: classes/GemsEscort.php:1591 msgid "You must login to access this page." msgstr "U moet ingelogd zijn voor toegang tot deze pagina." -#: classes/GemsEscort.php:1716 -#: classes/GemsEscort.php:1718 +#: classes/GemsEscort.php:1732 #, php-format msgid "%d survey" msgid_plural "%d surveys" msgstr[0] "%d vragenlijst" msgstr[1] "%d vragenlijsten" +#: classes/Gems/Pdf.php:198 +#, php-format +msgid "PDF Source File '%s' not found!" +msgstr "PDF bron bestand %s niet gevonden!" + +#: classes/Gems/Pdf.php:240 +#, php-format +msgid "Could not create '%s' directory." +msgstr "Kon de directory '%s' niet aanmaken." + +#: classes/Gems/Pdf.php:283 +#, php-format +msgid " The error message is: %s" +msgstr "De foutmelding is: %s" + +#: classes/Gems/Upgrades.php:77 +msgid "Syncing surveys for all sources" +msgstr "Vragenlijsten synchroniseren voor alle bronnen." + #: classes/Gems/AccessLog.php:236 msgid "Database needs to be updated!" msgstr "Database dient ververst te worden!" @@ -185,7 +199,6 @@ msgstr "Rollen" #: classes/Gems/Menu.php:197 -#: classes/Gems/Menu.php:346 msgid "Assigned" msgstr "Toegewezen" @@ -218,7 +231,6 @@ msgstr "Upgrade" #: classes/Gems/Menu.php:220 -#: classes/Gems/Menu.php:319 msgid "Show" msgstr "Toon" @@ -264,7 +276,6 @@ msgstr "Uw wachtwoord" #: classes/Gems/Menu.php:248 -#: classes/Gems/Menu.php:288 #: classes/Gems/Menu.php:323 msgid "Token" msgstr "Kenmerk" @@ -274,13 +285,11 @@ msgstr "Traject" #: classes/Gems/Menu.php:291 -#: classes/Gems/Menu.php:311 #: classes/Gems/Menu.php:342 msgid "Add" msgstr "Voeg toe" #: classes/Gems/Menu.php:295 -#: classes/Gems/Menu.php:377 msgid "Preview" msgstr "Preview" @@ -344,89 +353,70 @@ msgid "Track Builder" msgstr "Traject bouwer" -#: classes/Gems/Menu.php:563 +#: classes/Gems/Menu.php:566 msgid "Contact" msgstr "Contact" -#: classes/Gems/Menu.php:576 +#: classes/Gems/Menu.php:579 msgid "Changelog" msgstr "Changelog" -#: classes/Gems/Model.php:205 +#: classes/Gems/Model.php:230 msgid "Respondent nr" msgstr "Patiënt nr" -#: classes/Gems/Model.php:206 +#: classes/Gems/Model.php:231 msgid "Opened" msgstr "Bekeken op" -#: classes/Gems/Model.php:207 +#: classes/Gems/Model.php:232 msgid "Consent" msgstr "Toestemming" -#: classes/Gems/Model.php:209 +#: classes/Gems/Model.php:234 msgid "E-Mail" msgstr "Email" -#: classes/Gems/Model.php:214 +#: classes/Gems/Model.php:239 msgid "Gender" msgstr "Geslacht" -#: classes/Gems/Model.php:215 +#: classes/Gems/Model.php:240 msgid "First name" msgstr "Voornaam" -#: classes/Gems/Model.php:216 +#: classes/Gems/Model.php:241 msgid "Surname prefix" msgstr "Tussenvoegsel" -#: classes/Gems/Model.php:217 +#: classes/Gems/Model.php:242 msgid "Last name" msgstr "Achternaam" -#: classes/Gems/Model.php:219 +#: classes/Gems/Model.php:244 msgid "Name" msgstr "Naam" -#: classes/Gems/Model.php:222 +#: classes/Gems/Model.php:247 msgid "Street" msgstr "Straat" -#: classes/Gems/Model.php:223 +#: classes/Gems/Model.php:248 msgid "Zipcode" msgstr "Postcode" -#: classes/Gems/Model.php:224 +#: classes/Gems/Model.php:249 msgid "City" msgstr "Woonplaats" -#: classes/Gems/Model.php:226 +#: classes/Gems/Model.php:251 msgid "Phone" msgstr "Telefoon" -#: classes/Gems/Model.php:228 +#: classes/Gems/Model.php:253 msgid "Birthday" msgstr "Geboren op" -#: classes/Gems/Pdf.php:198 -#, php-format -msgid "PDF Source File '%s' not found!" -msgstr "PDF bron bestand %s niet gevonden!" - -#: classes/Gems/Pdf.php:240 -#, php-format -msgid "Could not create '%s' directory." -msgstr "Kon de directory '%s' niet aanmaken." - -#: classes/Gems/Pdf.php:283 -#, php-format -msgid " The error message is: %s" -msgstr "De foutmelding is: %s" - -#: classes/Gems/Upgrades.php:77 -msgid "Syncing surveys for all sources" -msgstr "Vragenlijsten synchroniseren voor alle bronnen." - #: classes/Gems/UpgradesAbstract.php:154 msgid "Already at max. level." msgstr "Al op het hoogste niveau." @@ -441,18 +431,250 @@ msgid "Trying upgrade for %s to level %s: %s" msgstr "Probeert upgrade voor %s naar niveau %s: %s" -#: classes/Gems/Controller/BrowseEditAction.php:354 +#: classes/Gems/Model/DbaModel.php:97 +msgid "created" +msgstr "bestaat" + +#: classes/Gems/Model/DbaModel.php:98 +msgid "not created" +msgstr "niet aanwezig" + +#: classes/Gems/Model/DbaModel.php:99 +msgid "unknown" +msgstr "onbekend" + +#: classes/Gems/Model/DbaModel.php:420 +#, php-format +msgid "Executed %2$s creation script %1$s:" +msgstr "Uitvoerresultaat %2$s script %1$s:" + +#: classes/Gems/Model/DbaModel.php:430 +#, php-format +msgid "%d record(s) returned as result set %d in step %d of %d." +msgstr "%d rij(en) in resultaat %d in stap %d van %d." + +#: classes/Gems/Model/DbaModel.php:434 +#, php-format +msgid "%d record(s) updated in step %d of %d." +msgstr "In stap %2$d van %3$d zijn %1$d rij(en) aangepast." + +#: classes/Gems/Model/DbaModel.php:437 +#, php-format +msgid "Script ran step %d of %d succesfully." +msgstr "Stap %d van %d in het script met succes uitgevoerd." + +#: classes/Gems/Model/DbaModel.php:440 +msgid " in step " +msgstr " in stap " + +#: classes/Gems/Model/DbaModel.php:445 +#, php-format +msgid "No script for %1$s." +msgstr "Geen script voor %1$s:" + +#: classes/Gems/Export/Spss.php:59 +msgid "Which file" +msgstr "Kies bestand" + +#: classes/Gems/Export/Spss.php:60 +msgid "syntax" +msgstr "syntax" + +#: classes/Gems/Export/Spss.php:61 +msgid "data" +msgstr "data" + +#: classes/Gems/Export/Spss.php:66 +msgid "Some help for this export" +msgstr "Uitleg over deze export mogelijkheid" + +#: classes/Gems/Export/Excel.php:60 +msgid "Excel options" +msgstr "Excel opties" + +#: classes/Gems/Export/Excel.php:62 +msgid "Export questions instead of variable names" +msgstr "Exporteer vragen in plaats van variabele namen" + +#: classes/Gems/Export/Excel.php:63 +msgid "Format answers" +msgstr "Antwoorden opmaken" + +#: classes/Gems/Util/Translated.php:81 +msgid "-" +msgstr "n.v.t." + +#: classes/Gems/Util/Translated.php:96 +msgid "forever" +msgstr "altijd" + +#: classes/Gems/Util/Translated.php:105 +msgid "n/a" +msgstr "n.v.t." + +#: classes/Gems/Util/Translated.php:114 +msgid "never" +msgstr "nooit" + +#: classes/Gems/Util/Translated.php:139 +msgid "2 days ago" +msgstr "Eergisteren" + +#: classes/Gems/Util/Translated.php:142 +msgid "Yesterday" +msgstr "Gisteren" + +#: classes/Gems/Util/Translated.php:145 +msgid "Today" +msgstr "Vandaag" + +#: classes/Gems/Util/Translated.php:148 +msgid "Tomorrow" +msgstr "Morgen" + +#: classes/Gems/Util/Translated.php:151 +msgid "Over 2 days" +msgstr "Overmorgen" + +#: classes/Gems/Util/Translated.php:156 +#, php-format +msgid "Over %d days" +msgstr "Over %d dagen" + +#: classes/Gems/Util/Translated.php:158 +#, php-format +msgid "%d days ago" +msgstr "%d dagen terug" + +#: classes/Gems/Util/Translated.php:177 +msgid "Send multiple mails per respondent, one for each checked token." +msgstr "Verstuur meerdere emails per patiënt, één per gekozen kenmerk." + +#: classes/Gems/Util/Translated.php:178 +msgid "Send one mail per respondent, mark all checked tokens as send." +msgstr "Verstuur één email per patiënt, zet alle gekozen kenmerken op verzonden." + +#: classes/Gems/Util/Translated.php:179 +msgid "Send one mail per respondent, mark only mailed tokens as send." +msgstr "Verstuur één email per patiënt, zet alleen de verzonden kenmerken op verzonden." + +#: classes/Gems/Util/Translated.php:204 +msgid "Male" +msgstr "Man" + +#: classes/Gems/Util/Translated.php:204 +msgid "Female" +msgstr "Vrouw" + +#: classes/Gems/Util/Translated.php:204 +msgid "Unknown" +msgstr "Onbekend" + +#: classes/Gems/Util/Translated.php:217 +msgid "mr." +msgstr "meneer" + +#: classes/Gems/Util/Translated.php:217 +msgid "mrs." +msgstr "mevrouw" + +#: classes/Gems/Util/Translated.php:217 +msgid "mr./mrs." +msgstr "heer/mevrouw" + +#: classes/Gems/Util/Translated.php:230 +msgid "Mr." +msgstr "De heer" + +#: classes/Gems/Util/Translated.php:230 +msgid "Mrs." +msgstr "Mevrouw" + +#: classes/Gems/Util/Translated.php:230 +msgid "Mr./Mrs." +msgstr "De heer/Mevrouw" + +#: classes/Gems/Util/Translated.php:238 +msgid "Yes" +msgstr "Ja" + +#: classes/Gems/Util/Translated.php:238 +#: classes/Gems/Util/ReceptionCodeLibrary.php:99 +#: classes/Gems/Util/ReceptionCodeLibrary.php:123 +msgid "No" +msgstr "Nee" + +#: classes/Gems/Util/TrackData.php:147 +msgid "Active" +msgstr "Actief" + +#: classes/Gems/Util/TrackData.php:147 +msgid "Inactive" +msgstr "Inactief" + +#: classes/Gems/Util/ReceptionCodeLibrary.php:100 +msgid "Yes (forget answers)" +msgstr "Ja (vergeet antwoorden)" + +#: classes/Gems/Util/ReceptionCodeLibrary.php:101 +msgid "Yes (keep answers)" +msgstr "Ja (met behoud van antwoorden)" + +#: classes/Gems/Util/ReceptionCodeLibrary.php:124 +msgid "Yes (individual surveys only)" +msgstr "Ja (alleen zelfstandige vragenlijsten)" + +#: classes/Gems/Util/ReceptionCodeLibrary.php:125 +msgid "Stop (per respondent or track only)" +msgstr "Stop (alleen per patiënt og traject)" + +#: classes/Gems/Controller/ModelActionAbstract.php:97 +msgid "Cancel" +msgstr "Annuleren" + #: classes/Gems/Controller/ModelSnippetActionAbstract.php:228 +#: classes/Gems/Controller/BrowseEditAction.php:354 #, php-format msgid "New %s..." msgstr "Nieuwe %s..." -#: classes/Gems/Controller/BrowseEditAction.php:387 +#: classes/Gems/Controller/ModelSnippetActionAbstract.php:238 +#, php-format +msgid "Do you want to delete this %s?" +msgstr "Weet u zeker dat deze %s verwijderd moet worden?" + #: classes/Gems/Controller/ModelSnippetActionAbstract.php:248 +#: classes/Gems/Controller/BrowseEditAction.php:387 #, php-format msgid "Delete %s" msgstr "Verwijder %s" +#: classes/Gems/Controller/ModelSnippetActionAbstract.php:258 +#: classes/Gems/Controller/BrowseEditAction.php:410 +#, php-format +msgid "Edit %s" +msgstr "Bewerk %s" + +#: classes/Gems/Controller/ModelSnippetActionAbstract.php:271 +msgid "No data found." +msgstr "Geen gegevens gevonden." + +#: classes/Gems/Controller/ModelSnippetActionAbstract.php:333 +#, php-format +msgid "No %s found..." +msgstr "Geen %s gevonden..." + +#: classes/Gems/Controller/ModelSnippetActionAbstract.php:343 +#, php-format +msgid "Showing %s" +msgstr "Toon %s" + +#: classes/Gems/Controller/ModelSnippetActionAbstract.php:379 +msgid "item" +msgid_plural "items" +msgstr[0] "item" +msgstr[1] "items" + #: classes/Gems/Controller/BrowseEditAction.php:391 #, php-format msgid "%2$u %1$s deleted" @@ -463,12 +685,6 @@ msgid "Edit %s %s" msgstr "Bewerk %s %s" -#: classes/Gems/Controller/BrowseEditAction.php:410 -#: classes/Gems/Controller/ModelSnippetActionAbstract.php:258 -#, php-format -msgid "Edit %s" -msgstr "Bewerk %s" - #: classes/Gems/Controller/BrowseEditAction.php:508 msgid "Free search text" msgstr "Vrije zoek tekst" @@ -483,7 +699,6 @@ msgstr "Geen %s gevonden" #: classes/Gems/Controller/BrowseEditAction.php:679 -#: classes/Gems/Default/ExportAction.php:234 #, php-format msgid "No %s found." msgstr "Geen %s gevonden." @@ -492,18 +707,6 @@ msgid "Are you sure?" msgstr "Weet u het zeker?" -#: classes/Gems/Controller/BrowseEditAction.php:813 -#: classes/Gems/Default/DatabaseAction.php:187 -#: classes/Gems/Default/DatabaseAction.php:499 -msgid "Yes" -msgstr "Ja" - -#: classes/Gems/Controller/BrowseEditAction.php:814 -#: classes/Gems/Default/DatabaseAction.php:188 -#: classes/Gems/Default/DatabaseAction.php:500 -msgid "No" -msgstr "Nee" - #: classes/Gems/Controller/BrowseEditAction.php:867 #, php-format msgid "Unknown %s requested" @@ -541,36 +744,6 @@ msgid "Unknown %s." msgstr "%s is onbekend." -#: classes/Gems/Controller/ModelActionAbstract.php:97 -#: classes/Gems/Default/DatabaseAction.php:503 -msgid "Cancel" -msgstr "Annuleren" - -#: classes/Gems/Controller/ModelSnippetActionAbstract.php:238 -#, php-format -msgid "Do you want to delete this %s?" -msgstr "Weet u zeker dat deze %s verwijderd moet worden?" - -#: classes/Gems/Controller/ModelSnippetActionAbstract.php:271 -msgid "No data found." -msgstr "Geen gegevens gevonden." - -#: classes/Gems/Controller/ModelSnippetActionAbstract.php:333 -#, php-format -msgid "No %s found..." -msgstr "Geen %s gevonden..." - -#: classes/Gems/Controller/ModelSnippetActionAbstract.php:343 -#, php-format -msgid "Showing %s" -msgstr "Toon %s" - -#: classes/Gems/Controller/ModelSnippetActionAbstract.php:379 -msgid "item" -msgid_plural "items" -msgstr[0] "item" -msgstr[1] "items" - #: classes/Gems/Controller/Action/Helper/BatchRunner.php:65 msgid "Prepare recheck" msgstr "Hercontrole voorbereiden" @@ -584,427 +757,1292 @@ msgid "Nothing to do." msgstr "Niets te doen." -#: classes/Gems/Default/AskAction.php:88 +#: classes/Gems/Snippets/TokenModelSnippetAbstract.php:59 +msgid "+" +msgstr "+" + +#: classes/Gems/Email/MailTemplateForm.php:56 +msgid "Send (test)" +msgstr "Verstuur (test)" + +#: classes/Gems/Email/MailTemplateForm.php:81 +#: classes/Gems/Email/EmailFormAbstract.php:193 +#: classes/Gems/Email/EmailFormAbstract.php:251 +msgid "From" +msgstr "Van" + +#: classes/Gems/Email/MailTemplateForm.php:95 +msgid "Test using" +msgstr "Test met" + +#: classes/Gems/Email/MailTemplateForm.php:124 +msgid "To (test)" +msgstr "Aan (test)" + +#: classes/Gems/Email/MailTemplateForm.php:168 +msgid "Test mail send, changes not saved!" +msgstr "Test email verstuurd. De veranderingen zijn nog niet opgeslagen!" + +#: classes/Gems/Email/EmailFormAbstract.php:101 +msgid "no email adress" +msgstr "geen email adres" + +#: classes/Gems/Email/EmailFormAbstract.php:145 +msgid "Available fields" +msgstr "Beschikbare velden" + +#: classes/Gems/Email/EmailFormAbstract.php:153 +msgid "BBCode" +msgstr "BBCode" + +#: classes/Gems/Email/EmailFormAbstract.php:168 +msgid "Message" +msgstr "Bericht" + +#: classes/Gems/Email/EmailFormAbstract.php:216 +msgid "Organization does not have an e-mail address." +msgstr "Organisatie heeft geen email adres." + +#: classes/Gems/Email/EmailFormAbstract.php:231 +msgid "You do not have an e-mail address." +msgstr "U heeft geen email adres." + +#: classes/Gems/Email/EmailFormAbstract.php:291 +msgid "Preview HTML" +msgstr "Html voorbeeld" + +#: classes/Gems/Email/EmailFormAbstract.php:300 +msgid "Preview text" +msgstr "Tekstvoorbeeld" + +#: classes/Gems/Email/EmailFormAbstract.php:308 +msgid "Template" +msgstr "Sjabloon" + +#: classes/Gems/Email/EmailFormAbstract.php:332 +msgid "Send" +msgstr "Verstuur" + +#: classes/Gems/Email/EmailFormAbstract.php:349 +msgid "Subject" +msgstr "Onderwerp" + +#: classes/Gems/Email/EmailFormAbstract.php:429 +msgid "Input error! No changes made!" +msgstr "Invoer fout! Veranderingen niet uitgevoerd!" + +#: classes/Gems/Email/EmailFormAbstract.php:446 +msgid "Subject:" +msgstr "Onderwerp:" + +#: classes/Gems/Email/EmailFormAbstract.php:474 +msgid "Field" +msgstr "Veld" + +#: classes/Gems/Email/EmailFormAbstract.php:475 +msgid "Value" +msgstr "waarde" + +#: classes/Gems/Email/EmailFormAbstract.php:478 +msgid "BBCode info page" +msgstr "BBCode info pagina" + +#: classes/Gems/Email/OneMailForm.php:47 +msgid "On this test system all mail will be delivered to the from address." +msgstr "Op dit test systeem worden alle emails gestuurd naar het \"van\" adres." + +#: classes/Gems/Email/OneMailForm.php:55 +msgid "Round" +msgstr "Ronde" + +#: classes/Gems/Email/OneMailForm.php:57 +msgid "Survey" +msgstr "Vragenlijst" + +#: classes/Gems/Email/OneMailForm.php:58 +msgid "Last contact" +msgstr "Contactdatum" + +#: classes/Gems/Email/OneMailForm.php:87 +msgid "To" +msgstr "Aan" + +#: classes/Gems/Email/OneMailForm.php:131 +#: classes/Gems/Email/TemplateMailer.php:217 +msgid "The sending of emails was blocked for this installation." +msgstr "Het versturen van emails is geblokkeerd in deze installatie." + +#: classes/Gems/Email/OneMailForm.php:141 +#: classes/Gems/Email/TemplateMailer.php:250 +msgid "Mail failed to send." +msgstr "Mail sturen mislukt." + +#: classes/Gems/Email/OneMailForm.php:145 #, php-format -msgid "Enter your %s token" -msgstr "Voer uw %s kenmerk in" +msgid "Sent email to %s." +msgstr "Email naar %s verzonden." -#: classes/Gems/Default/AskAction.php:91 -msgid "Tokens identify a survey that was assigned to you personally." -msgstr "Elk kenmerk verwijst naar een specifiek aan u toegekende vragenlijst." +#: classes/Gems/Email/TemplateMailer.php:266 +#, php-format +msgid "Sent %d e-mails, updated %d tokens." +msgstr "%d emails verzonden en %d kenmerken bijgewerkt." -#: classes/Gems/Default/AskAction.php:91 -msgid "Entering the token and pressing OK will open that survey." -msgstr "Vul uw kenmerk in en druk op OK om die vragenlijst te openen." +#: classes/Gems/Email/MultiMailForm.php:75 +msgid "Method" +msgstr "Methode" -#: classes/Gems/Default/AskAction.php:95 -msgid "After answering the survey you will be logged off automatically." -msgstr "Na het invullen wordt u automatisch uitgelogd." +#: classes/Gems/Email/MultiMailForm.php:122 +msgid "Survey has been taken." +msgstr "Vragenlijsten is al afgenomen" -#: classes/Gems/Default/AskAction.php:100 -msgid "A token consists of two groups of four letters and numbers, separated by an optional hyphen. Tokens are case insensitive." -msgstr "Een kenmerk bestaat uit twee groepen van vier cijfers en letters met een (niet verplicht) streepje ertussen. Hoofdletters of gewone letters maakt niets uit." +#: classes/Gems/Email/MultiMailForm.php:125 +msgid "Respondent does not have an e-mail address." +msgstr "Patiënt heeft geen email adres" -#: classes/Gems/Default/AskAction.php:101 -msgid "The number zero and the letter O are treated as the same; the same goes for the number one and the letter L." -msgstr "Er wordt geen verschil gemaakt tussen het getal nul en de letter O en ook niet tussen het getal één en de letter L." +#: classes/Gems/Email/MultiMailForm.php:128 +msgid "Survey cannot be taken by a respondent." +msgstr "Deze vragenlijst kan niet door een patiënt ingevuld worden." -#: classes/Gems/Default/AskAction.php:136 +#: classes/Gems/Email/MultiMailForm.php:130 +msgid "Survey cannot be taken at this moment." +msgstr "Deze vragenlijst kan op dit moment niet afgenomen worden." + +#: classes/Gems/Tracker/ChangeTracker.php:64 #, php-format -msgid "Thank you for answering. At the moment we have no further surveys for you to take." -msgstr "Dank u voor uw antwoorden. Op dit moment hebben we geen vragenlijsten meer voor u." +msgid "Checked %d tracks." +msgstr "%d trajecten gecontroleerd." -#: classes/Gems/Default/AskAction.php:138 +#: classes/Gems/Tracker/ChangeTracker.php:67 #, php-format -msgid "The survey for token %s has been answered and no further surveys are open." -msgstr "De vragenlijst met het kenmerk %s is beantwoord en er staan verder geen vragenlijsten open." +msgid "Checked %d tokens." +msgstr "%d kenmerken gecontroleerd." -#: classes/Gems/Default/AskAction.php:145 +#: classes/Gems/Tracker/ChangeTracker.php:72 #, php-format -msgid "The token %s does not exist (any more)." -msgstr "Het kenmerk %s bestaat niet (meer)." +msgid "Answers changed by survey completion event for %d tokens." +msgstr "Bij %d kenmerken zijn de antwoorden aangepast door vragenlijst afrondingscode." -#: classes/Gems/Default/AskAction.php:273 +#: classes/Gems/Tracker/ChangeTracker.php:75 #, php-format -msgid "The survey for token %s is no longer active." -msgstr "De vragenlijst voor kenmerk %s is niet meer in gebruik." +msgid "Results and timing changed for %d tokens." +msgstr "Bij %d kenmerken zijn de resultaten en/of de tijdstippen aangepast." -#: classes/Gems/Default/ConsentAction.php:68 -#: classes/Gems/Default/GroupAction.php:88 -msgid "Description" -msgstr "Omschrijving" +#: classes/Gems/Tracker/ChangeTracker.php:78 +#, php-format +msgid "%d token round completion events caused changed to %d tokens." +msgstr "%2$d kenmerken zijn aangepast vanwege %1$d ronde voltooiingen." -#: classes/Gems/Default/ConsentAction.php:70 -#: classes/Gems/Default/DatabaseAction.php:139 -msgid "Order" -msgstr "Volgorde" +#: classes/Gems/Tracker/ChangeTracker.php:81 +#, php-format +msgid "%2$d token date changes in %1$d tracks." +msgstr "De datum van %2$d kenmerken is aangepast in %1$d trajecten." -#: classes/Gems/Default/ConsentAction.php:71 -msgid "Determines order of presentation in interface." -msgstr "Bepaald de presentatie volgorde." +#: classes/Gems/Tracker/ChangeTracker.php:84 +#, php-format +msgid "Round changes propagated to %d tokens." +msgstr "%d kenmerken veranderd door ronde aanpassingen." -#: classes/Gems/Default/ConsentAction.php:73 -msgid "Consent code" -msgstr "Consent code" +#: classes/Gems/Tracker/ChangeTracker.php:87 +#, php-format +msgid "%d tokens deleted by round changes." +msgstr "Vanwege ronde aanpassingen zijn %d kenmerken verwijderd." -#: classes/Gems/Default/ConsentAction.php:75 -msgid "Internal code, not visible to users, copied with the token information to the source." -msgstr "Interne code, niet zichtbaar voor gebruikers maar wordt met de token informatie aan de bron doorgegeven." +#: classes/Gems/Tracker/ChangeTracker.php:90 +#, php-format +msgid "%d tokens created to by round changes." +msgstr "Vanwege ronde aanpassingen zijn nieuwe %d kenmerken gecreëerd." -#: classes/Gems/Default/ConsentAction.php:92 -msgid "respondent consent" -msgid_plural "respondent consents" -msgstr[0] "patiënt toestemming" -msgstr[1] "patiënt toestemmingen" +#: classes/Gems/Tracker/ChangeTracker.php:93 +msgid "No tokens were changed." +msgstr "Geen kenmerken veranderd." -#: classes/Gems/Default/ConsentAction.php:97 -msgid "Respondent consents" -msgstr "Patiënt toestemming" +#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:370 +msgid "Track start" +msgstr "Traject start" -#: classes/Gems/Default/ContactAction.php:71 +#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:371 +msgid "Track end" +msgstr "Traject einde" + +#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:385 +msgid "Valid from" +msgstr "Geldig vanaf" + +#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:386 +#: classes/Gems/Tracker/Model/StandardTokenModel.php:217 +msgid "Valid until" +msgstr "Geldig tot" + +#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:387 +msgid "Start time" +msgstr "Starten tijd" + +#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:388 +msgid "Completion time" +msgstr "Datum invullen" + +#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:403 +msgid "Minutes" +msgstr "Minuten" + +#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:404 +msgid "Hours" +msgstr "Uren" + +#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:405 +msgid "Days" +msgstr "Dagen" + +#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:406 +msgid "Weeks" +msgstr "Weken" + +#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:407 +msgid "Months" +msgstr "Maanden" + +#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:408 +msgid "Quarters" +msgstr "Kwartieren" + +#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:409 +msgid "Years" +msgstr "Jaren" + +#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:444 +msgid "Valid from calculation" +msgstr "Berekening datum geldig vanaf" + +#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:445 +#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:453 +msgid "Date source" +msgstr "Datum bron" + +#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:446 +#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:454 +msgid "Round used" +msgstr "Gebruikte ronde" + +#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:447 +#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:455 +msgid "Date used" +msgstr "Gebruikte datum" + +#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:448 +#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:456 +msgid "Add to date" +msgstr "Optellen bij datum" + +#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:449 +#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:457 +msgid "Add to date unit" +msgstr "Datumoptel eenheid" + +#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:452 +msgid "Valid for calculation" +msgstr "Berekening datum geldig tot" + +#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:486 +msgid "Does not expire" +msgstr "Blijft altijd geldig" + +#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:489 +msgid "Use an answer from a survey." +msgstr "Gebruikt een antwoord uit een vragenlijst." + +#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:490 +msgid "Use a standard token date." +msgstr "Gebruik een datum uit een kenmerk." + +#: classes/Gems/Tracker/Engine/StepEngineAbstract.php:492 +msgid "Use a track level date." +msgstr "Gebruik een op traject niveau ingestelde datum." + +#: classes/Gems/Tracker/Engine/AnyStepEngine.php:95 +#: classes/Gems/Tracker/Engine/NextStepEngine.php:92 +msgid "This round" +msgstr "Deze ronde" + +#: classes/Gems/Tracker/Engine/AnyStepEngine.php:106 +msgid "Engine for tracks where a rounds activation can depend on any previous survey." +msgstr "Een traject type waar de activatie van een ronde van elke willekeurige eerdere ronde afhankelijk kan zijn." + +#: classes/Gems/Tracker/Engine/AnyStepEngine.php:116 +msgid "Previous Survey" +msgstr "Eerdere vragenlijst" + +#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:445 #, php-format -msgid "%s is a web application." -msgstr "%s is een web applicatie." +msgid "%s track engines cannot be converted to %s track engines." +msgstr "Traject type %s kan niet geconverteerd worden naar %s." -#: classes/Gems/Default/ContactAction.php:76 +#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:688 #, php-format -msgid "The %s project is run by: " -msgstr "%s is een project van: " +msgid "%d: %s - %s" +msgstr "%d: %s - %s" -#: classes/Gems/Default/ContactAction.php:82 +#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:691 +#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:694 #, php-format -msgid "%s is a collaboration of these organizations:" -msgstr "Deze organisaties werken samen voor het %s project:" +msgid "%d: %s" +msgstr "%d: %s" -#: classes/Gems/Default/ContactAction.php:103 +#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:697 #, php-format -msgid "The %s project" -msgstr "Het %s project" +msgid "%s - %s" +msgstr "%s - %s" -#: classes/Gems/Default/ContactAction.php:106 -msgid "Information on this application" -msgstr "Information over deze website" +#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:737 +msgid "Icon" +msgstr "Icoon" -#: classes/Gems/Default/ContactAction.php:107 -msgid "Links concerning this web application:" -msgstr "Links met informatie over deze website:" +#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:738 +msgid "Order" +msgstr "Volgorde" -#: classes/Gems/Default/CronAction.php:148 -msgid "Cron jobs turned off." -msgstr "Cron opdrachten uitgezet." +#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:739 +#: classes/Gems/Tracker/Model/StandardTokenModel.php:233 +msgid "Description" +msgstr "Omschrijving" -#: classes/Gems/Default/CronAction.php:221 -msgid "No mails sent." -msgstr "Geen mail verzonden." +#: classes/Gems/Tracker/Engine/TrackEngineAbstract.php:740 +msgid "After change" +msgstr "Ronde veranderingscode" -#: classes/Gems/Default/CronAction.php:224 -msgid "On this test system all mail will be delivered to the from address." -msgstr "Op dit test systeem worden alle emails gestuurd naar het \"van\" adres." +#: classes/Gems/Tracker/Engine/SingleSurveyEngine.php:117 +msgid "Engine for tracks containing a single survey." +msgstr "Een traject type voor trajecten die bestaan uit een enkele vragenlijst." -#: classes/Gems/Default/DatabaseAction.php:75 -msgid "Cache cleaned" -msgstr "Cache opgeschoond" +#: classes/Gems/Tracker/Engine/SingleSurveyEngine.php:127 +msgid "Single Survey" +msgstr "Losse vragenlijst" -#: classes/Gems/Default/DatabaseAction.php:105 -#, php-format -msgid "No rows in %s." -msgstr "Geen gegevens in %s." +#: classes/Gems/Tracker/Engine/SingleSurveyEngine.php:149 +msgid "This track type does not allow the creation of new rounds." +msgstr "Dit type traject staat het niet toe dat nieuwe rondes aangemaakt worden." -#: classes/Gems/Default/DatabaseAction.php:134 -msgid "Type" -msgstr "Type" +#: classes/Gems/Tracker/Engine/NextStepEngine.php:147 +msgid "Engine for tracks where the next round is always dependent on the previous step." +msgstr "Een traject type waar de activatie van een volgende ronde alleen afhangt van de ronde ervoor." -#: classes/Gems/Default/DatabaseAction.php:138 -msgid "Group" -msgstr "Groep" +#: classes/Gems/Tracker/Engine/NextStepEngine.php:158 +msgid "Next Step" +msgstr "Stap voor stap" -#: classes/Gems/Default/DatabaseAction.php:140 -msgid "Location" -msgstr "Locatie" +#: classes/Gems/Tracker/Model/StandardTokenModel.php:216 +msgid "Measure(d) on" +msgstr "Afname op" -#: classes/Gems/Default/DatabaseAction.php:143 -msgid "Status" -msgstr "Status" +#: classes/Gems/Tracker/Model/StandardTokenModel.php:219 +msgid "Completed" +msgstr "Ingevuld" -#: classes/Gems/Default/DatabaseAction.php:146 -msgid "Script" -msgstr "Script" +#: classes/Gems/Tracker/Model/StandardTokenModel.php:220 +msgid "Duration in seconds" +msgstr "Antwoordtijd (in sec.)" -#: classes/Gems/Default/DatabaseAction.php:148 -#: classes/Gems/Default/DatabaseAction.php:293 -#: classes/Gems/Default/DatabaseAction.php:340 +#: classes/Gems/Tracker/Model/StandardTokenModel.php:221 +msgid "Score" +msgstr "Score" + +#: classes/Gems/Tracker/Model/StandardTokenModel.php:222 +msgid "Comments" +msgstr "Opmerkingen" + +#: classes/Gems/Tracker/Model/StandardTokenModel.php:223 msgid "Changed on" msgstr "Veranderd op" -#: classes/Gems/Default/DatabaseAction.php:167 -msgid "This database object does not exist. You cannot delete it." -msgstr "Dit database object bestaat. Het kan dus ook niet verwijderd worden." +#: classes/Gems/Tracker/Model/StandardTokenModel.php:226 +msgid "Assigned by" +msgstr "Toewijzer" -#: classes/Gems/Default/DatabaseAction.php:172 +#: classes/Gems/Tracker/Model/StandardTokenModel.php:227 +msgid "Respondent name" +msgstr "Patiënt naam" + +#: classes/Gems/Tracker/Model/StandardTokenModel.php:230 +msgid "Assigned to" +msgstr "invuller" + +#: classes/Gems/Tracker/Model/StandardTokenModel.php:231 +msgid "Rejection code" +msgstr "Afkeuringscode" + +#: classes/Gems/Tracker/Model/TrackModel.php:118 +msgid "Track Engine" +msgstr "Traject type" + +#: classes/Gems/Tracker/Model/TrackModel.php:123 +msgid "Use until" +msgstr "Geldig tot" + +#: classes/Gems/Tracker/Model/TrackModel.php:127 +msgid "After completion" +msgstr "Na afronding" + +#: classes/Gems/Tracker/Token/TokenValidator.php:164 +msgid "The server is currently busy, please wait a while and try again." +msgstr "De server is bezet, wacht u alstublieft een moment en probeer het dan nogmaals." + +#: classes/Gems/Tracker/Token/TokenValidator.php:199 #, php-format -msgid "Drop %s" -msgstr "Verwijder %s" +msgid "Not a valid token. The format for valid tokens is: %s." +msgstr "Geen geldig kenmerk. Het formaat voor geldige tokens is: %s." -#: classes/Gems/Default/DatabaseAction.php:180 +#: classes/Gems/Tracker/Token/TokenValidator.php:217 +#: classes/Gems/Tracker/Token/TokenValidator.php:231 +msgid "This token is no longer valid." +msgstr "Dit kenmerk is niet meer geldig." + +#: classes/Gems/Tracker/Token/TokenValidator.php:224 +msgid "This token cannot (yet) be used." +msgstr "Dit kenmerk kan (nog) niet gebruikt worden." + +#: classes/Gems/Tracker/Token/TokenValidator.php:238 +msgid "Unknown token." +msgstr "Onbekend kenmerk." + +#: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:149 +msgid "Uncertain" +msgstr "Weet niet" + +#: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:152 +msgid "Increase" +msgstr "Toenemend" + +#: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:153 +msgid "Same" +msgstr "Zelfde" + +#: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:154 +msgid "Decrease" +msgstr "Afnemend" + +#: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:162 +msgid "Checked" +msgstr "Aangevinkt" + +#: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:163 +msgid "Not checked" +msgstr "Niet aangevinkt" + +#: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:259 #, php-format -msgid "There are %d rows in the table." -msgstr "Er zijn %d rijen in deze tabel." +msgid "Rank %d" +msgstr "Schaal %d" -#: classes/Gems/Default/DatabaseAction.php:182 +#: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:278 +#: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:300 +msgid "Comment" +msgstr "Opmerkingen" + +#: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:278 +#: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:300 +msgid " (comment)" +msgstr " (opmerkingen)" + +#: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:290 +#: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:338 +msgid "Other" +msgstr "Overige" + +#: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:472 +msgid "Date" +msgstr "Datum" + +#: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:475 +msgid "Free number" +msgstr "Vrij getal" + +#: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:481 +msgid "Free text (long)" +msgstr "Vrije tekst (lang)" + +#: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:484 +msgid "Free text (very long)" +msgstr "Vrije tekst (zeer lang)" + +#: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:487 +msgid "Free text" +msgstr "Vrije tekst" + +#: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:628 +#: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:678 +#: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:732 #, php-format -msgid "Drop table with %d rows" -msgstr "Tabel met %d rijen aan data verwijderen" +msgid "%s: %s" +msgstr "%s: %s" -#: classes/Gems/Default/DatabaseAction.php:183 -msgid "Are you really sure?" -msgstr "Weet u het heel erg zeker?" +#: classes/Gems/Tracker/Source/LimeSurvey1m9FieldMap.php:752 +#, php-format +msgid "- %s" +msgstr "- %s" -#: classes/Gems/Default/DatabaseAction.php:199 +#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:376 +#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:1162 #, php-format -msgid "%1$s %2$s dropped" -msgstr "%1$s %2$s verwijderd" +msgid "The '%s' survey is no longer active. The survey was removed from LimeSurvey!" +msgstr "De vragenlijst '%s' is niet meer actief. De vragenlijst is verwijderd uit LimeSurvey!" -#: classes/Gems/Default/DatabaseAction.php:205 -msgid " during statement " -msgstr " tijdens het commando " +#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:407 +#, php-format +msgid "Corrected anonymization for survey '%s'" +msgstr "Anonimizatie gecorrigeerd van vragenlijst '%s'" -#: classes/Gems/Default/DatabaseAction.php:216 +#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:431 +msgid ", " +msgstr ", " + +#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:435 #, php-format -msgid "%s no longer exists in the database." -msgstr "%s bestaat niet meer in de database." +msgid "Added to token table '%s' the field(s): %s" +msgstr "Toegevoegd aan kenmerk tabel '%s', de velden: %s" -#: classes/Gems/Default/DatabaseAction.php:219 +#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:440 #, php-format -msgid "%s does not yet exist in the database." -msgstr "%s bestaat nog niet in de database." +msgid "Attribute fields not created for token table for '%s'" +msgstr "Attribuut velden voor de kenmerk tabel '%s' zijn niet toegevoegd." -#: classes/Gems/Default/DatabaseAction.php:222 +#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:441 #, php-format -msgid "%s object does exist." -msgstr "%s object bestaat." +msgid "Required fields: %s" +msgstr "Verplicht veld: %s" -#: classes/Gems/Default/DatabaseAction.php:240 -msgid "Object is not a table." -msgstr "Niet een tabel object." +#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:466 +#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:1315 +#, php-format +msgid "The status of the '%s' survey has changed." +msgstr "De status van de vragenlijst '%s' is veranderd." -#: classes/Gems/Default/DatabaseAction.php:264 -msgid "Structure" -msgstr "Structuur" +#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:472 +#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:1321 +#, php-format +msgid "Survey '%s' IS NO LONGER ACTIVE!!!" +msgstr "De vragenlijst '%s' IS NIET MEER ACTIEF!!!" -#: classes/Gems/Default/DatabaseAction.php:273 -msgid "database object" -msgid_plural "database objects" -msgstr[0] "database object" -msgstr[1] "database objects" +#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:478 +#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:1327 +#, php-format +msgid "The status of the '%s' survey has changed to '%s'." +msgstr "De status van de vragenlijst '%s' is veranderd naar '%s'." -#: classes/Gems/Default/DatabaseAction.php:278 -msgid "Database object overview" -msgstr "Database object overzicht" +#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:481 +#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:1330 +#, php-format +msgid "The status warning for the '%s' survey was removed." +msgstr "De status waarschuwing voor de vragenlijst '%s' is verdwenen." -#: classes/Gems/Default/DatabaseAction.php:287 -#: classes/Gems/Default/DatabaseAction.php:333 -msgid "Level" -msgstr "Niveau" +#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:487 +#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:1336 +#, php-format +msgid "The name of the '%s' survey has changed to '%s'." +msgstr "De naam van de vragenlijst '%s' is veranderd in '%s'." -#: classes/Gems/Default/DatabaseAction.php:288 -#: classes/Gems/Default/DatabaseAction.php:334 -msgid "Subtype" -msgstr "Subtype" +#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:498 +#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:1346 +#, php-format +msgid "Imported the '%s' survey." +msgstr "De vragenlijst '%s' is geïmporteerd." -#: classes/Gems/Default/DatabaseAction.php:290 -msgid "To be executed" -msgstr "Uit te voeren" +#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:723 +msgid "Submitdate" +msgstr "Invoerdatum" -#: classes/Gems/Default/DatabaseAction.php:291 -#: classes/Gems/Default/DatabaseAction.php:337 -msgid "Executed" -msgstr "Uitgevoerd" +#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:1142 +#, php-format +msgid "Updated %d Gems tokens to new token definition." +msgstr "%d Gems kenmerken zijn aangepast aan de nieuwe kenmerk definitie." -#: classes/Gems/Default/DatabaseAction.php:292 -#: classes/Gems/Default/DatabaseAction.php:338 -msgid "Finished" -msgstr "Afgerond" +#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:1297 +#, php-format +msgid "Updated %d token to new token definition in survey '%s'." +msgid_plural "Updated %d tokens to new token definition in survey '%s'." +msgstr[0] "%d kenmerk in de vragenlijst '%s' is aangepast aan de nieuwe kenmerk definitie." +msgstr[1] "%d kenmerken in de vragenlijst '%s' zijn aangepast aan de nieuwe kenmerk definitie." -#: classes/Gems/Default/DatabaseAction.php:296 -msgid "Create the patch table!" -msgstr "De patch tabel bestaat nog niet!" +#: classes/Gems/Tracker/Form/AskTokenForm.php:78 +#, php-format +msgid "Enter tokens as %s." +msgstr "Kenmerk invoeren als %s." -#: classes/Gems/Default/DatabaseAction.php:298 +#: classes/Gems/Tracker/Form/AskTokenForm.php:98 +msgid "OK" +msgstr "OK" + +#: classes/Gems/Tracker/Snippets/ShowTokenSnippetAbstract.php:164 #, php-format -msgid "%d new or changed patch(es)." -msgstr "%d nieuwe of veranderde patch(es)." +msgid "Token %s not found." +msgstr "Kenmerk %s niet gevonden" -#: classes/Gems/Default/DatabaseAction.php:303 -msgid "Gems build" -msgstr "Gems bouwnummer" +#: classes/Gems/Tracker/Snippets/ShowTokenSnippetAbstract.php:168 +msgid "No token specified." +msgstr "Geen kenmerk opgegeven." -#: classes/Gems/Default/DatabaseAction.php:304 -msgid "Database build" -msgstr "Database versie" +#: classes/Gems/Tracker/Snippets/ShowTrackUsageAbstract.php:149 +msgid "Enter the particulars concerning the assignment to this respondent." +msgstr "Beschrijf de redenen om dit aan deze patiënt toe te wijzen." -#: classes/Gems/Default/DatabaseAction.php:306 -msgid "Execute level" -msgstr "Uit te voeren versie" +#: classes/Gems/Tracker/Snippets/ShowTrackUsageAbstract.php:151 +msgid "Start" +msgstr "Aanvang" -#: classes/Gems/Default/DatabaseAction.php:310 -msgid "Ignore finished" -msgstr "Afgeronde patches overslaan" +#: classes/Gems/Tracker/Snippets/ShowTokenLoopAbstract.php:115 +msgid "We have received your answers today. Thank you!" +msgstr "We hebben uw vragenlijst vandaag ingevuld ontvangen. Dank u wel!" -#: classes/Gems/Default/DatabaseAction.php:311 -msgid "Ignore executed" -msgstr "Uitgevoerde patches overslaan" +#: classes/Gems/Tracker/Snippets/ShowTokenLoopAbstract.php:118 +msgid "We have received your answers yesterday. Thank you!" +msgstr "We hebben uw vragenlijst gisteren ingevuld ontvangen. Dank u wel!" -#: classes/Gems/Default/DatabaseAction.php:312 -msgid "Show patches" -msgstr "Toon patches" +#: classes/Gems/Tracker/Snippets/ShowTokenLoopAbstract.php:121 +msgid "We have received your answers 2 days ago. Thank you." +msgstr "We hebben uw vragenlijst eergisteren ingevuld ontvangen. Dank u wel." -#: classes/Gems/Default/DatabaseAction.php:326 +#: classes/Gems/Tracker/Snippets/ShowTokenLoopAbstract.php:125 #, php-format -msgid "%d patch(es) executed." -msgstr "%d patch(es) uitgevoerd." +msgid "We have received your answers %d days ago. Thank you." +msgstr "We hebben uw vragenlijst %d dagen geleden ingevuld ontvangen. Dank u wel." -#: classes/Gems/Default/DatabaseAction.php:332 -msgid "Patch" -msgstr "Patch" +#: classes/Gems/Tracker/Snippets/ShowTokenLoopAbstract.php:127 +#, php-format +msgid "We have received your answers on %s. " +msgstr "We hebben uw vragenlijst op %s ingevuld ontvangen." -#: classes/Gems/Default/DatabaseAction.php:336 -msgid "Query" -msgstr "Query" +#: classes/Gems/Tracker/Snippets/ShowTokenLoopAbstract.php:140 +msgid "This survey has no set time limit." +msgstr "Deze vragenlijst heeft geen eindtijd." -#: classes/Gems/Default/DatabaseAction.php:339 -msgid "Result" -msgstr "Resultaat" +#: classes/Gems/Tracker/Snippets/ShowTokenLoopAbstract.php:147 +msgid "Warning!!!" +msgstr "Let op!!!" -#: classes/Gems/Default/DatabaseAction.php:364 -msgid "Patch maintenance" -msgstr "Patch onderhoud" +#: classes/Gems/Tracker/Snippets/ShowTokenLoopAbstract.php:147 +msgid "This survey must be answered today!" +msgstr "Deze vragenlijst moet vandaag ingevuld zijn!" -#: classes/Gems/Default/DatabaseAction.php:368 -msgid "Patch overview" -msgstr "Patch overzicht" +#: classes/Gems/Tracker/Snippets/ShowTokenLoopAbstract.php:150 +msgid "Warning!!" +msgstr "Let op!!" -#: classes/Gems/Default/DatabaseAction.php:430 -msgid "This database object does not exist. You cannot create it." -msgstr "Dit database object bestaat niet en kan ook niet aangemaakt worden." +#: classes/Gems/Tracker/Snippets/ShowTokenLoopAbstract.php:150 +msgid "This survey must be answered tomorrow!" +msgstr "Deze vragenlijst moet morgen ingevuld zijn!" -#: classes/Gems/Default/DatabaseAction.php:436 -msgid "This database object has no script. You cannot execute it." -msgstr "Dit database object heeft geen script. Het kan dus ook niet uitgevoerd worden." +#: classes/Gems/Tracker/Snippets/ShowTokenLoopAbstract.php:153 +msgid "Warning! This survey must be answered over 2 days!" +msgstr "Let op! Deze vragenlijst moet overmorgen ingevuld zijn!" -#: classes/Gems/Default/DatabaseAction.php:447 +#: classes/Gems/Tracker/Snippets/ShowTokenLoopAbstract.php:158 #, php-format -msgid "Run %s" -msgstr "Voer %s script uit" +msgid "This survey must be answered in %d days." +msgstr "Deze vragenlijst moet binnen %d dagen ingevuld zijn!" -#: classes/Gems/Default/DatabaseAction.php:468 +#: classes/Gems/Tracker/Snippets/ShowTokenLoopAbstract.php:160 +msgid "This survey can no longer be answered." +msgstr "Deze vragenlijst kan niet langer worden ingevuld!" + +#: classes/Gems/Tracker/Snippets/ShowTokenLoopAbstract.php:163 #, php-format -msgid "Starting %d object creation scripts." -msgstr "Aanvang %d object aanmaak scripts." +msgid "This survey can be answered until %s." +msgstr "Deze vragenlijst moet ingevuld worden voor %s." -#: classes/Gems/Default/DatabaseAction.php:474 +#: classes/Gems/Tracker/Snippets/ShowRoundSnippetAbstract.php:132 #, php-format -msgid "Finished %s creation script for object %d of %d" -msgstr "Klaar %s met aanmaak script voor object %d van %d" +msgid "%s round" +msgstr "%s ronde" -#: classes/Gems/Default/DatabaseAction.php:479 -msgid "All objects exist. Nothing was executed." -msgstr "Alle objects bestaan. Niets was uitgevoerd." +#: classes/Gems/Tracker/Snippets/ShowRoundSnippetAbstract.php:144 +msgid "No round specified." +msgstr "Geen ronde opgegeven." -#: classes/Gems/Default/DatabaseAction.php:486 -msgid "Create not-existing database objects" -msgstr "Aanmaak van database objecten die nog niet bestaan" +#: classes/Gems/Tracker/Snippets/ShowRoundSnippetAbstract.php:163 +msgid "< Previous" +msgstr "< Terug" -#: classes/Gems/Default/DatabaseAction.php:488 +#: classes/Gems/Tracker/Snippets/ShowRoundSnippetAbstract.php:168 +msgid "Next >" +msgstr "Verder >" + +#: classes/Gems/Tracker/Snippets/EditTokenSnippetAbstract.php:141 +msgid "token" +msgid_plural "tokens" +msgstr[0] "kenmerk" +msgstr[1] "kenmerken" + +#: classes/Gems/Tracker/Snippets/EditTrackEngineSnippetGeneric.php:191 +#: classes/Gems/Tracker/Snippets/EditTrackSnippetAbstract.php:170 +msgid "track" +msgid_plural "tracks" +msgstr[0] "traject" +msgstr[1] "trajecten" + +#: classes/Gems/Tracker/Snippets/EditTrackEngineSnippetGeneric.php:201 +#: classes/Gems/Tracker/Snippets/EditTrackEngineSnippetGeneric.php:237 +msgid "Add new track" +msgstr "Voeg traject toe" + +#: classes/Gems/Tracker/Snippets/EditSingleSurveyTokenSnippetAbstract.php:157 +msgid "survey" +msgid_plural "surveys" +msgstr[0] "vragenlijst" +msgstr[1] "vragenlijsten" + +#: classes/Gems/Tracker/Snippets/EditSingleSurveyTokenSnippetAbstract.php:179 +msgid "Add survey" +msgstr "Vragenlijst toevoegen" + +#: classes/Gems/Tracker/Snippets/EditTrackSnippetAbstract.php:180 +#: classes/Gems/Tracker/Snippets/EditTrackSnippetAbstract.php:230 +msgid "Add track" +msgstr "Voeg traject toe" + +#: classes/Gems/Tracker/Snippets/AnswerModelSnippetGeneric.php:149 +msgid "Status" +msgstr "Status" + +#: classes/Gems/Tracker/Snippets/AnswerModelSnippetGeneric.php:153 +msgid "Question" +msgstr "Vraag" + +#: classes/Gems/Tracker/Snippets/AnswerModelSnippetGeneric.php:223 #, php-format -msgid "One database object does not exist." -msgid_plural "These %d database objects do not exist." -msgstr[0] "Één object bestaat nog niet in de database." -msgstr[1] "%d objecten bestaan nog niet in de database." +msgid "%s answers for patient number %s" +msgstr "%s antwoorden voor patientnummer %s" -#: classes/Gems/Default/DatabaseAction.php:489 -msgid "Are you sure you want to create it?" -msgid_plural "Are you sure you want to create them all?" -msgstr[0] "Weet u zeker dat u dit wil aanmaken?" -msgstr[1] "Weet u zeker dat u deze allemaal wil aanmaken?" +#: classes/Gems/Tracker/Snippets/AnswerModelSnippetGeneric.php:226 +#, php-format +msgid "Answers for token %s, patient number %s: %s." +msgstr "Antwoorden voor kenmerk %s, patientnummer %s: %s." -#: classes/Gems/Default/DatabaseAction.php:502 -msgid "All database objects exist. There is nothing to create." -msgstr "Alle database objecten bestaan. Er valt niets te maken." +#: classes/Gems/Tracker/Snippets/AnswerModelSnippetGeneric.php:249 +msgid "Close" +msgstr "Sluiten" -#: classes/Gems/Default/DatabaseAction.php:515 -msgid "Separate multiple commands with semicolons (;)." -msgstr "Scheidt meerdere commando's met punt-comma's (;)." +#: classes/Gems/Tracker/Snippets/AnswerModelSnippetGeneric.php:250 +msgid "Print" +msgstr "Afdrukken" -#: classes/Gems/Default/DatabaseAction.php:522 +#: classes/Gems/Tracker/Snippets/EditRoundSnippetAbstract.php:119 +msgid "round" +msgid_plural "rounds" +msgstr[0] "ronde" +msgstr[1] "rondes" + +#: classes/Gems/Tracker/Snippets/EditRoundSnippetAbstract.php:129 +msgid "Add new round" +msgstr "Nieuwe ronde toevoegen" + +#: classes/Gems/Tracker/Batch/SynchronizeSourcesBatch.php:135 +msgid "No surveys were changed." +msgstr "Geen vragenlijsten veranderd." + +#: classes/Gems/Tracker/Batch/SynchronizeSourcesBatch.php:137 +#, php-format +msgid "%d surveys checked." +msgstr "%d vragenlijsten gecontroleerd" + +#: classes/Gems/Tracker/Batch/SynchronizeSourcesBatch.php:139 +#, php-format +msgid "%d sources checked." +msgstr "%d bronnen gecontroleerd." + +#: classes/Gems/Menu/SubMenuItem.php:380 +msgid "New" +msgstr "Nieuw" + +#: classes/Gems/Menu/SubMenuItem.php:434 +msgid "Export the current data set to Excel" +msgstr "Exporteer de huidige gegevens naar Excel" + +#: classes/Gems/Menu/SubMenuItem.php:438 +msgid "Excel export" +msgstr "Excel export" + +#: classes/Gems/Menu/MenuAbstract.php:247 +msgid "Activity log" +msgstr "Activiteit" + +#: classes/Gems/Menu/MenuAbstract.php:253 +msgid "Automatic mail" +msgstr "Automatische mail" + +#: classes/Gems/Menu/MenuAbstract.php:254 +msgid "Turn Automatic Mail Jobs OFF" +msgstr "Automatische mail opdrachten UITzetten" + +#: classes/Gems/Menu/MenuAbstract.php:255 msgid "Run" msgstr "Uitvoeren" -#: classes/Gems/Default/DatabaseAction.php:531 -msgid "raw" -msgstr "rauw" +#: classes/Gems/Menu/MenuAbstract.php:258 +msgid "Servers" +msgstr "Servers" -#: classes/Gems/Default/DatabaseAction.php:541 +#: classes/Gems/Menu/MenuAbstract.php:262 +msgid "Templates" +msgstr "Sjablonen" + +#: classes/Gems/Menu/MenuAbstract.php:294 +msgid "By period" +msgstr "Per periode" + +#: classes/Gems/Menu/MenuAbstract.php:295 +msgid "By token" +msgstr "Per kenmerk" + +#: classes/Gems/Menu/MenuAbstract.php:296 +msgid "By respondent" +msgstr "Per patiënt" + +#: classes/Gems/Menu/MenuAbstract.php:300 +msgid "Bulk mail" +msgstr "Bulk mail" + +#: classes/Gems/Menu/MenuAbstract.php:318 +msgid "Errors" +msgstr "Foutmeldingen" + +#: classes/Gems/Menu/MenuAbstract.php:319 +msgid "PHP" +msgstr "PHP" + +#: classes/Gems/Menu/MenuAbstract.php:321 +msgid "Session" +msgstr "Sessie" + +#: classes/Gems/Menu/MenuAbstract.php:322 +msgid "Maintenance mode" +msgstr "Onderhoudsmodus" + +#: classes/Gems/Menu/MenuAbstract.php:323 +msgid "Clean cache" +msgstr "Cache opruimen" + +#: classes/Gems/Menu/MenuAbstract.php:390 +msgid "Reset password" +msgstr "Reset wachtwoord" + +#: classes/Gems/Menu/MenuAbstract.php:415 +msgid "Survey Sources" +msgstr "Bronnen" + +#: classes/Gems/Menu/MenuAbstract.php:416 +msgid "Check status" +msgstr "Status controle" + +#: classes/Gems/Menu/MenuAbstract.php:417 +msgid "Synchronize surveys" +msgstr "Synchroniseer vragenlijsten" + +#: classes/Gems/Menu/MenuAbstract.php:418 +#: classes/Gems/Menu/MenuAbstract.php:430 +msgid "Check answers" +msgstr "Antwoord controle" + +#: classes/Gems/Menu/MenuAbstract.php:419 +msgid "Check attributes" +msgstr "Controleer attributen" + +#: classes/Gems/Menu/MenuAbstract.php:420 +msgid "Synchronize all surveys" +msgstr "Synchroniseer alle vragenlijsten" + +#: classes/Gems/Menu/MenuAbstract.php:421 +#: classes/Gems/Menu/MenuAbstract.php:431 +msgid "Check all answers" +msgstr "Controleer alle antwoorden" + +#: classes/Gems/Menu/MenuAbstract.php:427 +msgid "PDF" +msgstr "PDF" + +#: classes/Gems/Menu/MenuAbstract.php:439 +msgid "Fields" +msgstr "Velden" + +#: classes/Gems/Menu/MenuAbstract.php:446 +msgid "Rounds" +msgstr "Rondes" + +#: classes/Gems/Menu/MenuAbstract.php:461 +msgid "Check assignments" +msgstr "Controleer toewijzingen" + +#: classes/Gems/Menu/MenuAbstract.php:464 +msgid "Check all assignments" +msgstr "Controleer alle toewijzingen" + +#: classes/Gems/Selector/DateSelectorAbstract.php:309 +msgid "<<" +msgstr "<<" + +#: classes/Gems/Selector/DateSelectorAbstract.php:311 +msgid ">>" +msgstr ">>" + +#: classes/Gems/Selector/DateSelectorAbstract.php:315 +msgid "<" +msgstr "<" + +#: classes/Gems/Selector/DateSelectorAbstract.php:317 +msgid ">" +msgstr ">" + +#: classes/Gems/Selector/DateSelectorAbstract.php:320 +msgid "Now!" +msgstr "Nu!" + +#: classes/Gems/Selector/DateSelectorAbstract.php:360 +msgid "Show by day" +msgstr "Toon per dag" + +#: classes/Gems/Selector/DateSelectorAbstract.php:361 +msgid "Show by week" +msgstr "Toon per weerk" + +#: classes/Gems/Selector/DateSelectorAbstract.php:362 +msgid "Show by month" +msgstr "Toon per maand" + +#: classes/Gems/Selector/DateSelectorAbstract.php:363 +msgid "Show by year" +msgstr "Toon per jaar" + +#: classes/Gems/Selector/DateSelectorAbstract.php:370 +msgid "D" +msgstr "D" + +#: classes/Gems/Selector/DateSelectorAbstract.php:371 +msgid "W" +msgstr "W" + +#: classes/Gems/Selector/DateSelectorAbstract.php:372 +msgid "M" +msgstr "M" + +#: classes/Gems/Selector/DateSelectorAbstract.php:373 +msgid "Y" +msgstr "J" + +#: classes/Gems/Selector/DateSelectorAbstract.php:605 +msgid "Period" +msgstr "Periode" + +#: classes/Gems/Selector/DateSelectorAbstract.php:633 #, php-format -msgid "Result set %s." -msgstr "Resultaat %s." +msgid "week %s" +msgstr "week %s" -#: classes/Gems/Default/DatabaseAction.php:564 -msgid "Execute raw SQL" -msgstr "SQL direct uitvoeren" +#: classes/Gems/Selector/TokenDateSelector.php:82 +#: classes/Gems/Selector/TokenByGroupDateSelector.php:83 +msgid "for respondents" +msgstr "voor patiënten" -#: classes/Gems/Default/DatabaseAction.php:567 -msgid "Result sets" -msgstr "Resultaten" +#: classes/Gems/Selector/TokenDateSelector.php:83 +#: classes/Gems/Selector/TokenByGroupDateSelector.php:84 +msgid "for staff" +msgstr "voor medewerkers" -#: classes/Gems/Default/DatabaseAction.php:592 -msgid "This database object does not exist. You cannot view it." -msgstr "Dit database object bestaat. Het kan dus ook niet bekeken worden." +#: classes/Gems/Selector/TokenDateSelector.php:86 +msgid "Activated surveys" +msgstr "Geactiveerde vragenlijsten" -#: classes/Gems/Default/DatabaseAction.php:597 +#: classes/Gems/Selector/TokenDateSelector.php:90 +msgid "Unanswered surveys" +msgstr "Onbeantwoorde vragenlijsten" + +#: classes/Gems/Selector/TokenDateSelector.php:94 +#: classes/Gems/Selector/TokenByGroupDateSelector.php:109 +msgid "Partially completed" +msgstr "Gedeeltelijk ingevoerd" + +#: classes/Gems/Selector/TokenDateSelector.php:103 +msgid "Expired surveys" +msgstr "Verlopen vragenlijsten" + +#: classes/Gems/Selector/TokenDateSelector.php:107 +msgid "Answered surveys" +msgstr "Beantwoorde vragenlijsten" + +#: classes/Gems/Selector/TokenByGroupDateSelector.php:87 +msgid "Tokens" +msgstr "Kenmerken" + +#: classes/Gems/Selector/TokenByGroupDateSelector.php:99 +msgid "Todo" +msgstr "Te doen" + +#: classes/Gems/Selector/TokenByGroupDateSelector.php:119 +msgid "Time left in days - average" +msgstr "Tijd over in dagen - gemiddeld" + +#: classes/Gems/Selector/TokenByGroupDateSelector.php:122 +msgid "least time left" +msgstr "de minste tijd over" + +#: classes/Gems/Selector/TokenByGroupDateSelector.php:125 +msgid "most time left" +msgstr "de meeste tijd over" + +#: classes/Gems/Selector/TokenByGroupDateSelector.php:129 +msgid "Missed" +msgstr "Gemist" + +#: classes/Gems/Selector/TokenByGroupDateSelector.php:139 +msgid "Answered" +msgstr "Beantwoord" + +#: classes/Gems/Selector/TokenByGroupDateSelector.php:149 +msgid "Answer time in days - average" +msgstr ... [truncated message content] |
From: <gem...@li...> - 2012-06-01 12:59:35
|
Revision: 731 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=731&view=rev Author: michieltcs Date: 2012-06-01 12:59:24 +0000 (Fri, 01 Jun 2012) Log Message: ----------- Only show groups when at least one token was completed, update translations Modified Paths: -------------- trunk/library/classes/Gems/Default/RespondentExportAction.php trunk/library/languages/default-nl.mo trunk/library/languages/default-nl.po Modified: trunk/library/classes/Gems/Default/RespondentExportAction.php =================================================================== --- trunk/library/classes/Gems/Default/RespondentExportAction.php 2012-06-01 12:10:47 UTC (rev 730) +++ trunk/library/classes/Gems/Default/RespondentExportAction.php 2012-06-01 12:59:24 UTC (rev 731) @@ -179,14 +179,17 @@ ->td(strtoupper($token->getTokenId())) ->td($status); + if (!$token->isCompleted()) { + $token = $token->getNextToken(); + continue; + } + if ($engine->getTrackType() == 'S' || !$groupSurveys) { - if ($token->isCompleted()) { - $this->html->span()->b($token->getSurveyName() . ($token->getRoundDescription() ? ' (' . $token->getRoundDescription() . ')' : '')); - $this->addSnippet($this->_singleSurveySnippet, 'token', $token, 'tokenId', $token->getTokenId(), - 'showHeaders', false, 'showButtons', false, 'showSelected', false, 'showTakeButton', false); - - $this->html->br(); - } + $this->html->span()->b($token->getSurveyName() . ($token->getRoundDescription() ? ' (' . $token->getRoundDescription() . ')' : '')); + $this->addSnippet($this->_singleSurveySnippet, 'token', $token, 'tokenId', $token->getTokenId(), + 'showHeaders', false, 'showButtons', false, 'showSelected', false, 'showTakeButton', false); + + $this->html->br(); } else { if (!isset($surveys[$token->getSurveyId()])) { $surveys[$token->getSurveyId()] = true; @@ -270,7 +273,7 @@ $respondentData = $respondentModel->loadFirst(); if (empty($respondentData)) { - $this->html->p()->b(sprintf('Unknown respondent %s', $respondentId)); + $this->html->p()->b(sprintf($this->_('Unknown respondent %s'), $respondentId)); return; } Modified: trunk/library/languages/default-nl.mo =================================================================== (Binary files differ) Modified: trunk/library/languages/default-nl.po =================================================================== --- trunk/library/languages/default-nl.po 2012-06-01 12:10:47 UTC (rev 730) +++ trunk/library/languages/default-nl.po 2012-06-01 12:59:24 UTC (rev 731) @@ -2,7 +2,7 @@ msgstr "" "Project-Id-Version: GemsTracker NL\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-05-31 22:29+0100\n" +"POT-Creation-Date: 2012-06-01 14:45+0100\n" "PO-Revision-Date: \n" "Last-Translator: Michiel Rook <in...@to...>\n" "Language-Team: Erasmus MGZ <mat...@ma...>\n" @@ -2116,44 +2116,58 @@ msgid "Respondent number" msgstr "Patiënt nummer" -#: classes/Gems/Default/RespondentExportAction.php:75 +#: classes/Gems/Default/RespondentExportAction.php:78 msgid "Separate multiple respondents with a comma (,)" msgstr "Scheid meerdere patienten met een comma (,)" -#: classes/Gems/Default/RespondentExportAction.php:79 +#: classes/Gems/Default/RespondentExportAction.php:84 msgid "Group surveys" msgstr "Groepeer vragenlijsten" -#: classes/Gems/Default/RespondentExportAction.php:88 +#: classes/Gems/Default/RespondentExportAction.php:93 msgid "Output format" msgstr "Uitvoerformaat" -#: classes/Gems/Default/RespondentExportAction.php:125 +#: classes/Gems/Default/RespondentExportAction.php:130 #, php-format msgid "Unable to run PDF conversion: \"%s\"" msgstr "Kan PDF conversie niet starten: \"%s\"" -#: classes/Gems/Default/RespondentExportAction.php:214 +#: classes/Gems/Default/RespondentExportAction.php:162 +msgid "Open" +msgstr "Open" + +#: classes/Gems/Default/RespondentExportAction.php:173 +msgid "Future" +msgstr "Toekomstig" + +#: classes/Gems/Default/RespondentExportAction.php:238 msgid "Track information" msgstr "Traject informatie" -#: classes/Gems/Default/RespondentExportAction.php:258 +#: classes/Gems/Default/RespondentExportAction.php:276 +#, php-format +msgid "Unknown respondent %s" +msgstr "Onbekende patiënt %s" + +#: classes/Gems/Default/RespondentExportAction.php:282 +#: classes/Gems/Default/RespondentExportAction.php:290 msgid "Respondent information" msgstr "Patiënt informatie" -#: classes/Gems/Default/RespondentExportAction.php:286 +#: classes/Gems/Default/RespondentExportAction.php:310 msgid "Respondent report" msgstr "Patiënt rapportage" -#: classes/Gems/Default/RespondentExportAction.php:290 +#: classes/Gems/Default/RespondentExportAction.php:314 msgid "Report information" msgstr "Informatie over rapportage" -#: classes/Gems/Default/RespondentExportAction.php:291 +#: classes/Gems/Default/RespondentExportAction.php:315 msgid "Generated by" msgstr "Aangemaakt door" -#: classes/Gems/Default/RespondentExportAction.php:293 +#: classes/Gems/Default/RespondentExportAction.php:317 msgid "Generated on" msgstr "Aangemaakt op" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |