From 0b5ce04b31133882f901a019c9d8b89dcb33578e Mon Sep 17 00:00:00 2001 From: Alexis Ragot Date: Mon, 26 Feb 2018 16:03:54 +0100 Subject: [PATCH 01/25] #7267 - default values for the security policy --- data/maarchRM/conf/configuration.ini.default | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/data/maarchRM/conf/configuration.ini.default b/data/maarchRM/conf/configuration.ini.default index d888df82b..bea0be42f 100755 --- a/data/maarchRM/conf/configuration.ini.default +++ b/data/maarchRM/conf/configuration.ini.default @@ -116,10 +116,10 @@ securityPolicy = "{ 'loginAttempts' : 3, 'passwordValidity' : 0, 'newPasswordValidity' : 1, - 'passwordMinLength' : 0, - 'passwordRequiresSpecialChars' : 0, - 'passwordRequiresDigits' : 0, - 'passwordRequiresMixedCase' : 0, + 'passwordMinLength' : 8, + 'passwordRequiresSpecialChars' : 1, + 'passwordRequiresDigits' : 1, + 'passwordRequiresMixedCase' : 1, 'sessionTimeout' : 3600, 'lockDelay' : 30 }" -- GitLab From e4374aad1094674359fd795a53a9778efbada280 Mon Sep 17 00:00:00 2001 From: Alexis Ragot Date: Mon, 26 Feb 2018 16:48:39 +0100 Subject: [PATCH 02/25] #7266 - the feedback message on the the forgot account feature is the same when the values are good on not --- .../auth/Controller/ForgotAccountTrait.php | 45 ++++++++++--------- .../maarchRM/Presenter/auth/user.php | 2 +- .../Resources/locale/fr/auth/messages.po | 4 +- .../auth/userAccount/login/forgotAccount.html | 23 ++++++---- 4 files changed, 43 insertions(+), 31 deletions(-) diff --git a/src/bundle/auth/Controller/ForgotAccountTrait.php b/src/bundle/auth/Controller/ForgotAccountTrait.php index af5f71bb4..d84c310f4 100644 --- a/src/bundle/auth/Controller/ForgotAccountTrait.php +++ b/src/bundle/auth/Controller/ForgotAccountTrait.php @@ -41,35 +41,40 @@ trait ForgotAccountTrait */ public function forgotAccount($username, $email) { - if (!$this->sdoFactory->exists("auth/account", array("accountName" => $username))) { - throw \laabs::newException('auth/authenticationException', 'Invalid username or email.', 401); - } + $result = null; - $userAccount = $this->sdoFactory->read("auth/account", array("accountName" => $username)); + try { + if (!$this->sdoFactory->exists("auth/account", array("accountName" => $username))) { + throw \laabs::newException('auth/authenticationException', 'Invalid username or email.', 401); + } - if ($userAccount->enabled != true) { - throw \laabs::newException('auth/authenticationException', 'User %1$s is disabled', 403, null, array($username)); - } + $userAccount = $this->sdoFactory->read("auth/account", array("accountName" => $username)); - if ($email != $userAccount->emailAddress) { - throw \laabs::newException('auth/authenticationException', 'Invalid username or email.', 401); - } + if ($userAccount->enabled != true) { + throw \laabs::newException('auth/authenticationException', 'User %1$s is disabled', 403, null, array($username)); + } - $data = new \stdClass(); - $data->accountId = $userAccount->accountId; - $data->tokenDate = \laabs::newTimestamp(); + if ($email != $userAccount->emailAddress) { + throw \laabs::newException('auth/authenticationException', 'Invalid username or email.', 401); + } - $userAccount->tokenDate = $data->tokenDate; - $this->sdoFactory->update($userAccount, "auth/account"); + $data = new \stdClass(); + $data->accountId = $userAccount->accountId; + $data->tokenDate = \laabs::newTimestamp(); - $token = $this->generateEncodedToken($data); + $userAccount->tokenDate = $data->tokenDate; + $this->sdoFactory->update($userAccount, "auth/account"); - $message = $this->getForgotAccountMessage($token); + $token = $this->generateEncodedToken($data); - $notificationDependency = \laabs::newService("dependency/notification/Notification"); + $message = $this->getForgotAccountMessage($token); - $title = "Maarch RM - user information"; - $result = $notificationDependency->send($title, $message, array($userAccount->emailAddress)); + $notificationDependency = \laabs::newService("dependency/notification/Notification"); + + $title = "Maarch RM - user information"; + $result = $notificationDependency->send($title, $message, array($userAccount->emailAddress)); + } catch (\bundle\auth\Exception\authenticationException $e) { + } return $result; } diff --git a/src/presentation/maarchRM/Presenter/auth/user.php b/src/presentation/maarchRM/Presenter/auth/user.php index 9a8259714..c161c0a14 100755 --- a/src/presentation/maarchRM/Presenter/auth/user.php +++ b/src/presentation/maarchRM/Presenter/auth/user.php @@ -306,7 +306,7 @@ class user public function forgotAccount() { $json = $this->json; - $json->message = "A reset email has been send"; + $json->message = "If the account exists, a reset email has been send"; $json->message = $this->translator->getText($json->message); return $json->save(); diff --git a/src/presentation/maarchRM/Resources/locale/fr/auth/messages.po b/src/presentation/maarchRM/Resources/locale/fr/auth/messages.po index 24919183d..235c396bc 100755 --- a/src/presentation/maarchRM/Resources/locale/fr/auth/messages.po +++ b/src/presentation/maarchRM/Resources/locale/fr/auth/messages.po @@ -577,8 +577,8 @@ msgstr "Confirmer le mot de passe" msgid "Username and / or password invalid" msgstr "Nom d'utilisateur et / ou mot de passe invalide" -msgid "A reset email has been send" -msgstr "Un courriel de réinitialisation a été envoyé" +msgid "If the account exists, a reset email has been send" +msgstr "Si le compte existe, un courriel de réinitialisation a été envoyé" msgid "Password has been updated" msgstr "Le mot de passe a été mis à jour" diff --git a/src/presentation/maarchRM/Resources/view/auth/userAccount/login/forgotAccount.html b/src/presentation/maarchRM/Resources/view/auth/userAccount/login/forgotAccount.html index 22e11de9e..368206514 100755 --- a/src/presentation/maarchRM/Resources/view/auth/userAccount/login/forgotAccount.html +++ b/src/presentation/maarchRM/Resources/view/auth/userAccount/login/forgotAccount.html @@ -16,7 +16,7 @@
-
+

@@ -31,7 +31,7 @@ - +Email malformed \ No newline at end of file diff --git a/src/presentation/maarchRM/Resources/view/batchProcessing/logScheduling/search.html b/src/presentation/maarchRM/Resources/view/batchProcessing/logScheduling/search.html deleted file mode 100755 index ad9f3c50a..000000000 --- a/src/presentation/maarchRM/Resources/view/batchProcessing/logScheduling/search.html +++ /dev/null @@ -1,349 +0,0 @@ - - -
-
- -
-
-
-
-
-
-
-
-
- - -
-
-
-
-
-
- - -
- -
-
-
-
-
-
-
- - -
-
-
-
- -
-
-
-
-
-
- -
- - -- GitLab From 8bf1c116da705dd2261845e8fbaad987909bbb86 Mon Sep 17 00:00:00 2001 From: Alexandre Morin Date: Wed, 28 Feb 2018 17:33:14 +0100 Subject: [PATCH 07/25] #7264 - MAJ typeahead --- dependency/html/Document.php | 2 +- .../Resources/locale/fr/audit/messages.po | 9 + .../locale/fr/medona/archivalAgreement.po | 3 + .../public/less/dashboard/style.less | 3 - .../maarchRM/Resources/view/audit/search.html | 31 +- .../view/auth/authorization/edit.html | 15 +- .../view/auth/serviceAccount/edit.html | 7 +- .../userAccount/admin/modalsForDisabling.html | 26 +- .../organisationsAdministrationForm.html | 5 +- .../mainScreen/archiveInformation.html | 2 - .../digitalResource/contentType/edit.html | 37 +- .../digitalResource/searchResource.html | 1 - .../view/digitalResource/format/index.html | 1 - .../repository/flawedAddressList.html | 1 - .../view/organization/deleteModal.html | 1 - .../view/organization/userPositionForm.html | 6 +- .../archive/modalAccessRule.html | 1 - .../archive/modalArchiveInfo.html | 1 - .../recordsManagement/archive/search.html | 5 +- web/public/js/typeahead_0.10.2/typeahead.js | 1704 ------------ web/public/js/typeahead_0.11.1/typeahead.js | 2446 +++++++++++++++++ web/public/less/dashboard/style.less | 3 - .../less/typeahead_0.10.2/typeahead.less | 49 - 23 files changed, 2516 insertions(+), 1843 deletions(-) delete mode 100755 web/public/js/typeahead_0.10.2/typeahead.js create mode 100644 web/public/js/typeahead_0.11.1/typeahead.js delete mode 100755 web/public/less/typeahead_0.10.2/typeahead.less diff --git a/dependency/html/Document.php b/dependency/html/Document.php index 7ef173ccf..d4b7e27cc 100755 --- a/dependency/html/Document.php +++ b/dependency/html/Document.php @@ -281,7 +281,7 @@ class Document extends \dependency\xml\Document $this->addScript("/public/js/gritter_1.7.4/gritter.js"); //typeahead - $this->addScript("/public/js/typeahead_0.10.2/typeahead.js"); + $this->addScript("/public/js/typeahead_0.11.1/typeahead.js"); //$this->addScript("/public/js/bootstrap-daterangepicker/moment.min.js"); //$this->addScript("/public/js/bootstrap-daterangepicker/daterangepicker.js"); diff --git a/src/presentation/maarchRM/Resources/locale/fr/audit/messages.po b/src/presentation/maarchRM/Resources/locale/fr/audit/messages.po index 262e17cf9..776164311 100755 --- a/src/presentation/maarchRM/Resources/locale/fr/audit/messages.po +++ b/src/presentation/maarchRM/Resources/locale/fr/audit/messages.po @@ -146,6 +146,15 @@ msgstr "Terme" msgid "Term" msgstr "Terme" +msgid "User" +msgstr "Utilisateur" + +msgid "Service" +msgstr "Compte de service" + +msgid "No account found" +msgstr "Aucun compte trouvé" + msgid "recordsManagement/accessRule/readIndex" msgstr "Lecture des règles de communicabilité" diff --git a/src/presentation/maarchRM/Resources/locale/fr/medona/archivalAgreement.po b/src/presentation/maarchRM/Resources/locale/fr/medona/archivalAgreement.po index b020bc060..9e2bf671b 100755 --- a/src/presentation/maarchRM/Resources/locale/fr/medona/archivalAgreement.po +++ b/src/presentation/maarchRM/Resources/locale/fr/medona/archivalAgreement.po @@ -155,6 +155,9 @@ msgstr "Indexation plein texte" msgid "Media info" msgstr "Information média" +msgid "No format found" +msgstr "Aucun format trouvé" + msgid "Mbytes" msgstr "Mo" diff --git a/src/presentation/maarchRM/Resources/public/less/dashboard/style.less b/src/presentation/maarchRM/Resources/public/less/dashboard/style.less index a8a044122..c4d2ff29a 100755 --- a/src/presentation/maarchRM/Resources/public/less/dashboard/style.less +++ b/src/presentation/maarchRM/Resources/public/less/dashboard/style.less @@ -54,9 +54,6 @@ @import "../dependency/html/public/less/bootstrap_3.1.1/utilities.less"; @import "../dependency/html/public/less/bootstrap_3.1.1/responsive-utilities.less"; -// Typeahead -@import "../dependency/html/public/less/typeahead_0.10.2/typeahead.less"; - // Fontawesome @import "../dependency/html/public/less/font-awesome-4.4.0/variables.less"; @import "../dependency/html/public/less/font-awesome-4.4.0/mixins.less"; diff --git a/src/presentation/maarchRM/Resources/view/audit/search.html b/src/presentation/maarchRM/Resources/view/audit/search.html index 6ceed385c..6c83bc99a 100755 --- a/src/presentation/maarchRM/Resources/view/audit/search.html +++ b/src/presentation/maarchRM/Resources/view/audit/search.html @@ -124,7 +124,11 @@ Select an event - +
+ User + Service + No account found +
\ No newline at end of file diff --git a/src/presentation/maarchRM/Resources/view/batchProcessing/logScheduling/search.html b/src/presentation/maarchRM/Resources/view/batchProcessing/logScheduling/search.html new file mode 100644 index 000000000..ad9f3c50a --- /dev/null +++ b/src/presentation/maarchRM/Resources/view/batchProcessing/logScheduling/search.html @@ -0,0 +1,349 @@ + + +
+
+ +
+
+
+
+
+
+
+
+
+ + +
+
+
+
+
+
+ + +
+ +
+
+
+
+
+
+
+ + +
+
+
+
+ +
+
+
+
+
+
+ +
+ + -- GitLab From f1cabd099ccd3c024ecd2e62d9615c5574030beb Mon Sep 17 00:00:00 2001 From: Alexandre Morin Date: Thu, 1 Mar 2018 17:39:54 +0100 Subject: [PATCH 09/25] Log task --- src/bundle/audit/Observer/logger.php | 2 ++ src/bundle/batchProcessing/Controller/scheduling.php | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/src/bundle/audit/Observer/logger.php b/src/bundle/audit/Observer/logger.php index 43546a0c6..53ef2ab76 100755 --- a/src/bundle/audit/Observer/logger.php +++ b/src/bundle/audit/Observer/logger.php @@ -212,6 +212,8 @@ class logger \laabs::callService( 'audit/event/create', $this->servicePath->getName(), $this->servicePath->variables, $input, $output, true ); + + $this->servicePath = null; } /** diff --git a/src/bundle/batchProcessing/Controller/scheduling.php b/src/bundle/batchProcessing/Controller/scheduling.php index 728600295..77e3f36b4 100755 --- a/src/bundle/batchProcessing/Controller/scheduling.php +++ b/src/bundle/batchProcessing/Controller/scheduling.php @@ -181,18 +181,23 @@ class scheduling $this->changeStatus($schedulingId, "running"); try { + $pathRouter = new \core\Route\PathRouter($task->route); + \core\Observer\Dispatcher::notify(LAABS_SERVICE_PATH,$pathRouter->path); if (!empty($scheduling->parameters)) { $info = \laabs::callServiceArgs($task->route, (array) $scheduling->parameters); } else { $info = \laabs::callService($task->route); } + } catch (\Exception $e) { $this->changeStatus($schedulingId, "error"); $status = false; $info = $e; } + \core\Observer\Dispatcher::notify(LAABS_SERVICE_RETURN, $info); + if ($status) { $scheduling->lastExecution = \laabs::newDateTime(null, 'UTC'); $scheduling->status = "scheduled"; -- GitLab From d6536364b24bb1837b975f486ca6686d6256dc77 Mon Sep 17 00:00:00 2001 From: Correia Lopes Dylan Date: Mon, 26 Feb 2018 16:44:51 +0100 Subject: [PATCH 10/25] remplacement of archive search request contruction --- .../Controller/archiveCommunicationTrait.php | 94 ++++++++++++++++--- 1 file changed, 83 insertions(+), 11 deletions(-) diff --git a/src/bundle/recordsManagement/Controller/archiveCommunicationTrait.php b/src/bundle/recordsManagement/Controller/archiveCommunicationTrait.php index fda6dd314..b5c82bbfb 100755 --- a/src/bundle/recordsManagement/Controller/archiveCommunicationTrait.php +++ b/src/bundle/recordsManagement/Controller/archiveCommunicationTrait.php @@ -98,6 +98,10 @@ trait archiveCommunicationTrait 'depositEndDate' => $depositEndDate, 'originatingDate' => [$originatingStartDate, $originatingEndDate], // [0] startDate, [1] endDate ]; + + $queryParts = array(); + $queryParams = array(); + if (!empty($description) || !empty($text)) { $searchClasses = []; if (!$profileReference) { @@ -119,23 +123,91 @@ trait archiveCommunicationTrait foreach ($searchClasses as $descriptionClass => $descriptionController) { $archives = array_merge($archives, $descriptionController->search($description, $text, $archiveArgs)); } + } else { - $queryString = $this->getArchiveAssert($archiveArgs); + if ($archiveId){ + $queryParts['archiveId'] = "archiveId = :archiveId"; + $queryParams['archiveId'] = $archiveId; + } else { + if ($profileReference){ + $queryParts['archivalProfileReference'] = "archivalProfileReference = :archivalProfileReference"; + $queryParams['archivalProfileReference'] = $profileReference; + } - $originators = array(); - foreach ((array) $this->organizationController->getOrgsByRole('originator') as $originator) { - $originators[$originator->registrationNumber] = $originator; - } + if ($status){ + $queryParts['status'] = "status = :status"; + $queryParams['status'] = $status; + } - $archives = $this->sdoFactory->find('recordsManagement/archive', $queryString, null, false, false, 100); - foreach ($archives as $archive) { - if (!empty($archive->disposalDate) && $archive->disposalDate <= \laabs::newDate()) { - $archive->disposable = true; + if ($retentionRuleCode){ + $queryParts['retentionRuleCode'] = "retentionRuleCode = :retentionRuleCode"; + $queryParams['retentionRuleCode'] = $retentionRuleCode; } - if (isset($originators[$archive->originatorOrgRegNumber])) { - $archive->originator = $originators[$archive->originatorOrgRegNumber]; + if ($originatorOrgRegNumber){ + $queryParts['originatorOrgRegNumber'] = "originatorOrgRegNumber = :originatorOrgRegNumber"; + $queryParams['originatorOrgRegNumber'] = $originatorOrgRegNumber; } + + if ($finalDisposition){ + $queryParts['finalDisposition'] = "finalDisposition = :finalDisposition"; + $queryParams['finalDisposition'] = $finalDisposition; + } + + if ($originatingStartDate && $originatingEndDate) { + $queryParams['originatingStartDate'] = $originatingStartDate; + $queryParams['originatingEndDate'] = $originatingEndDate; + $queryParts['depositDate'] = "originatingDate >= :originatingStartDate AND originatingDate <= :originatingEndDate"; + } elseif ($originatingStartDate) { + $queryParams['originatingStartDate'] = $originatingStartDate; + $queryParts['depositDate'] = "originatingDate >= :depositStartDate"; + + } elseif ($originatingEndDate) { + $queryParams['originatingEndDate'] = $originatingEndDate; + $queryParts['date'] = "originatingDate <= :originatingEndDate"; + } + + if ($depositStartDate && $depositEndDate) { + $queryParams['depositStartDate'] = $depositStartDate; + $queryParams['depositEndDate'] = $depositEndDate; + $queryParts['depositDate'] = "depositDate >= :depositStartDate AND depositDate <= :depositEndDate"; + } elseif ($depositStartDate) { + $queryParams['depositStartDate'] = $depositStartDate; + $queryParts['depositDate'] = "depositDate >= :depositStartDate"; + + } elseif ($depositEndDate) { + $queryParams['depositEndDate'] = $depositEndDate; + $queryParts['date'] = "depositDate <= :depositEndDate"; + } + if($archiveExpired){ + $currentDate = \laabs::newDate(); + $currentDateString = $currentDate->format('Y-m-d'); + if ($archiveExpired == "true") { + + $queryParams['disposalDate'] = $currentDateString; + $queryParts['disposalDate'] = "disposalDate <= :disposalDate"; + }else if($archiveExpired == "false"){ + $queryParams['disposalDate'] = $currentDateString; + $queryParts['disposalDate'] = "disposalDate >= :disposalDate"; + } + } + + if($partialRetentionRule){ + $queryParts['partialRetentionRule'] = "(retentionDuration=NULL OR retentionStartDate=NULL OR retentionRuleCode=NULL)"; + } + + } + $queryString = \laabs\implode(' AND ', $queryParts); + $archives = $this->sdoFactory->find('recordsManagement/archive', $queryString, $queryParams, false, false, 100); + } + + foreach ($archives as $archive) { + if (!empty($archive->disposalDate) && $archive->disposalDate <= \laabs::newDate()) { + $archive->disposable = true; + } + + if (isset($originators[$archive->originatorOrgRegNumber])) { + $archive->originator = $originators[$archive->originatorOrgRegNumber]; } } -- GitLab From 4a03018993d26adfffa2fbb232e7885e28f077de Mon Sep 17 00:00:00 2001 From: Alexandre Morin Date: Fri, 2 Mar 2018 10:17:46 +0100 Subject: [PATCH 11/25] Change .html to .text --- src/presentation/maarchRM/Resources/view/audit/search.html | 2 +- .../maarchRM/Resources/view/auth/authorization/edit.html | 4 ++-- .../maarchRM/Resources/view/auth/serviceAccount/edit.html | 4 ++-- .../Resources/view/auth/userAccount/admin/edit.html | 6 +++--- .../userManagement/organisationsAdministrationForm.html | 2 +- .../Resources/view/contact/manageContact/addressForm.html | 4 ++-- .../view/contact/manageContact/communicationForm.html | 2 +- .../view/contact/manageContact/contactInformationForm.html | 4 ++-- .../view/dashboard/mainScreen/descriptionForm.html | 2 +- .../Resources/view/dashboard/mainScreen/folder.html | 2 +- .../Resources/view/filePlan/archiveAssignmentModal.html | 4 ++-- .../view/filePlan/supressionConfirmationModal.html | 2 +- 12 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/presentation/maarchRM/Resources/view/audit/search.html b/src/presentation/maarchRM/Resources/view/audit/search.html index 6c83bc99a..96d7439db 100755 --- a/src/presentation/maarchRM/Resources/view/audit/search.html +++ b/src/presentation/maarchRM/Resources/view/audit/search.html @@ -215,7 +215,7 @@ }, templates: { empty: function () { - return ""+$('#noAccountFound').html()+""; + return ""+$('#noAccountFound').text()+""; }, suggestion: function (account) { var name = account.displayName; diff --git a/src/presentation/maarchRM/Resources/view/auth/authorization/edit.html b/src/presentation/maarchRM/Resources/view/auth/authorization/edit.html index c9829b231..27038c06d 100755 --- a/src/presentation/maarchRM/Resources/view/auth/authorization/edit.html +++ b/src/presentation/maarchRM/Resources/view/auth/authorization/edit.html @@ -347,7 +347,7 @@ displayKey: 'displayName', templates: { empty: function() { - return ""+$('#noUserFound').html()+""; + return ""+$('#noUserFound').text()+""; }, suggestion: function(user) { var display = @@ -396,7 +396,7 @@ }; if(parameters.role.roleName == "") { - gritter.show($('#empty_text').html(),false); + gritter.show($('#empty_text').text(),false); return false; } diff --git a/src/presentation/maarchRM/Resources/view/auth/serviceAccount/edit.html b/src/presentation/maarchRM/Resources/view/auth/serviceAccount/edit.html index deb5f37b2..81f5e73d9 100755 --- a/src/presentation/maarchRM/Resources/view/auth/serviceAccount/edit.html +++ b/src/presentation/maarchRM/Resources/view/auth/serviceAccount/edit.html @@ -156,7 +156,7 @@ }); if(serviceAccount.displayName == "" || orgId == "") { - gritter.show($('#empty_text').html(),false); + gritter.show($('#empty_text').text(),false); return false; } @@ -254,7 +254,7 @@ displayKey: 'displayName', templates: { empty: function() { - return ""+$('#noServiceFound').html()+""; + return ""+$('#noServiceFound').text()+""; }, suggestion: function(organization) { var display; diff --git a/src/presentation/maarchRM/Resources/view/auth/userAccount/admin/edit.html b/src/presentation/maarchRM/Resources/view/auth/userAccount/admin/edit.html index 1223e7229..8b5f7e509 100755 --- a/src/presentation/maarchRM/Resources/view/auth/userAccount/admin/edit.html +++ b/src/presentation/maarchRM/Resources/view/auth/userAccount/admin/edit.html @@ -113,7 +113,7 @@ var user = serialize(); if (!validateEmail(user.emailAddress)) { - gritter.show($('#invalidEmail_text').html(), false); + gritter.show($('#invalidEmail_text').text(), false); return false; } @@ -124,7 +124,7 @@ if (user.password != user.verification) { - gritter.show($('#badPasswordVerification_text').html(), false); + gritter.show($('#badPasswordVerification_text').text(), false); return; } @@ -134,7 +134,7 @@ } if (user.accountName == "" || user.password == "" || user.verification == "" || user.name == "" || user.email == "") { - gritter.show($('#empty_text').html(), false); + gritter.show($('#empty_text').text(), false); return; } diff --git a/src/presentation/maarchRM/Resources/view/auth/userAccount/userManagement/organisationsAdministrationForm.html b/src/presentation/maarchRM/Resources/view/auth/userAccount/userManagement/organisationsAdministrationForm.html index 5d34db804..d428dc62d 100755 --- a/src/presentation/maarchRM/Resources/view/auth/userAccount/userManagement/organisationsAdministrationForm.html +++ b/src/presentation/maarchRM/Resources/view/auth/userAccount/userManagement/organisationsAdministrationForm.html @@ -50,7 +50,7 @@ displayKey: 'displayName', templates: { empty: function() { - return ""+$('#noServiceFound').html()+""; + return ""+$('#noServiceFound').text()+""; }, suggestion: function(organization) { var display; diff --git a/src/presentation/maarchRM/Resources/view/contact/manageContact/addressForm.html b/src/presentation/maarchRM/Resources/view/contact/manageContact/addressForm.html index 9b7e037aa..fc858a2be 100755 --- a/src/presentation/maarchRM/Resources/view/contact/manageContact/addressForm.html +++ b/src/presentation/maarchRM/Resources/view/contact/manageContact/addressForm.html @@ -155,7 +155,7 @@ var addressObject = ContactAddressForm.serialize(); if(addressObject.purpose == null || addressObject.city == null) { - gritter.show($('#contact_empty_text').html(),false); + gritter.show($('#contact_empty_text').text(),false); return false; } @@ -323,7 +323,7 @@ if (address.citySubDivision) { $('

').addClass('list-group-item-text') - .text(address.citySubDivision + ' ' + $('#contact_text_citySubDivision').html()) + .text(address.citySubDivision + ' ' + $('#contact_text_citySubDivision').text()) .appendTo(a); } diff --git a/src/presentation/maarchRM/Resources/view/contact/manageContact/communicationForm.html b/src/presentation/maarchRM/Resources/view/contact/manageContact/communicationForm.html index c772dad22..27d3a8c34 100755 --- a/src/presentation/maarchRM/Resources/view/contact/manageContact/communicationForm.html +++ b/src/presentation/maarchRM/Resources/view/contact/manageContact/communicationForm.html @@ -124,7 +124,7 @@ var communicationObject = ContactCommunicationForm.serialize(); if(communicationObject.purpose == "" || communicationObject.comMeanCode == "" || communicationObject.value == "") { - gritter.show($('#contact_empty_text').html(),false); + gritter.show($('#contact_empty_text').text(),false); return false; } diff --git a/src/presentation/maarchRM/Resources/view/contact/manageContact/contactInformationForm.html b/src/presentation/maarchRM/Resources/view/contact/manageContact/contactInformationForm.html index 8934aeb45..2548dcdd4 100755 --- a/src/presentation/maarchRM/Resources/view/contact/manageContact/contactInformationForm.html +++ b/src/presentation/maarchRM/Resources/view/contact/manageContact/contactInformationForm.html @@ -208,12 +208,12 @@ if(contactObject.contactType == "person") { if(contactObject.displayName == "" || contactObject.firstName == "" || contactObject.lastName == "") { - gritter.show($('#empty_text').html(),false); + gritter.show($('#empty_text').text(),false); return false; } } else { if(contactObject.displayName == "") { - gritter.show($('#empty_text').html(),false); + gritter.show($('#empty_text').text(),false); return false; } } diff --git a/src/presentation/maarchRM/Resources/view/dashboard/mainScreen/descriptionForm.html b/src/presentation/maarchRM/Resources/view/dashboard/mainScreen/descriptionForm.html index 08d6da870..38f7ffa7f 100755 --- a/src/presentation/maarchRM/Resources/view/dashboard/mainScreen/descriptionForm.html +++ b/src/presentation/maarchRM/Resources/view/dashboard/mainScreen/descriptionForm.html @@ -200,7 +200,7 @@ break; case 'number': field = template.find('input'); - field.attr('type', 'number').attr('placeholder', $('#number_text').html()); + field.attr('type', 'number').attr('placeholder', $('#number_text').text()); if (defaultVal !== null && defaultVal !== undefined && defaultVal !== "") { field.val(defaultVal); } diff --git a/src/presentation/maarchRM/Resources/view/dashboard/mainScreen/folder.html b/src/presentation/maarchRM/Resources/view/dashboard/mainScreen/folder.html index 45626981d..d50cbb554 100755 --- a/src/presentation/maarchRM/Resources/view/dashboard/mainScreen/folder.html +++ b/src/presentation/maarchRM/Resources/view/dashboard/mainScreen/folder.html @@ -239,7 +239,7 @@ .addClass("small newArchive") .data("reference", '') .attr('style', "cursor: pointer;") - .text($('#withoutProfile_text').html()); + .text($('#withoutProfile_text').text()); $("

  • ").append(a).appendTo(dropdown); }; diff --git a/src/presentation/maarchRM/Resources/view/filePlan/archiveAssignmentModal.html b/src/presentation/maarchRM/Resources/view/filePlan/archiveAssignmentModal.html index 51fab3dbc..341aea8e3 100755 --- a/src/presentation/maarchRM/Resources/view/filePlan/archiveAssignmentModal.html +++ b/src/presentation/maarchRM/Resources/view/filePlan/archiveAssignmentModal.html @@ -56,7 +56,7 @@ if (folderName.length > 30) { folderName = folderName.substring(0,27)+'...' } if (archives.length == 1) { - var message = $('#archiveToMove_txt').html(); + var message = $('#archiveToMove_txt').text(); var archiveName = $('#'+archives[0]).find('.archiveName').text(); if (archiveName.length > 30) { archiveName = archiveName.substring(0,27)+'...' } @@ -66,7 +66,7 @@ } else { var messageDiv = $('#archiveToMove'); - var message = $('#archivesToMove_txt').html(); + var message = $('#archivesToMove_txt').text(); message = message.replace("%1$s", ''+ archives.length +'<\/i>'); message = message.replace("%2$s", ''+ folderName +'<\/i>'); diff --git a/src/presentation/maarchRM/Resources/view/filePlan/supressionConfirmationModal.html b/src/presentation/maarchRM/Resources/view/filePlan/supressionConfirmationModal.html index 801af67a1..4dc6e2fa7 100755 --- a/src/presentation/maarchRM/Resources/view/filePlan/supressionConfirmationModal.html +++ b/src/presentation/maarchRM/Resources/view/filePlan/supressionConfirmationModal.html @@ -37,7 +37,7 @@ DeleteConfirmationModal = { var modal = $('#deleteFolderModal'); this.target = FilePlan.selectedNode; - var message = $('#deleteFolderMessage_txt').html(); + var message = $('#deleteFolderMessage_txt').text(); message = message.replace("%1$s", ''+ this.target.find('b:first').text() +'<\/i>'); this.messageDiv.html(message); -- GitLab From 1973bb25fe44e8a0d3791ac47cd956e63e618fea Mon Sep 17 00:00:00 2001 From: Cyril Vazquez Date: Fri, 2 Mar 2018 10:45:12 +0100 Subject: [PATCH 12/25] Fix event type for observer notification when task exec throws an exception --- src/bundle/batchProcessing/Controller/scheduling.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/bundle/batchProcessing/Controller/scheduling.php b/src/bundle/batchProcessing/Controller/scheduling.php index 77e3f36b4..4f8cd323c 100755 --- a/src/bundle/batchProcessing/Controller/scheduling.php +++ b/src/bundle/batchProcessing/Controller/scheduling.php @@ -190,13 +190,13 @@ class scheduling $info = \laabs::callService($task->route); } - } catch (\Exception $e) { + \laabs::notify(LAABS_SERVICE_RETURN, $info); + } catch (\Exception $info) { $this->changeStatus($schedulingId, "error"); $status = false; - $info = $e; - } - - \core\Observer\Dispatcher::notify(LAABS_SERVICE_RETURN, $info); + + \laabs::notify(LAABS_BUSINESS_EXCEPTION, $info); + } if ($status) { $scheduling->lastExecution = \laabs::newDateTime(null, 'UTC'); -- GitLab From cbdd6e77fe96ccd843f082bc030d07bcb531884c Mon Sep 17 00:00:00 2001 From: Alexis Ragot Date: Fri, 2 Mar 2018 10:50:58 +0100 Subject: [PATCH 13/25] notify business exception --- src/bundle/auth/Controller/ForgotAccountTrait.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/bundle/auth/Controller/ForgotAccountTrait.php b/src/bundle/auth/Controller/ForgotAccountTrait.php index d84c310f4..982ed34ac 100644 --- a/src/bundle/auth/Controller/ForgotAccountTrait.php +++ b/src/bundle/auth/Controller/ForgotAccountTrait.php @@ -74,6 +74,7 @@ trait ForgotAccountTrait $title = "Maarch RM - user information"; $result = $notificationDependency->send($title, $message, array($userAccount->emailAddress)); } catch (\bundle\auth\Exception\authenticationException $e) { + \laabs::notify(LAABS_BUSINESS_EXCEPTION, $e); } return $result; -- GitLab From 995e5dfd398a2f1c3a304646307b49fa223db01e Mon Sep 17 00:00:00 2001 From: Alexandre Morin Date: Fri, 2 Mar 2018 11:13:39 +0100 Subject: [PATCH 14/25] Fix : #7268 --- src/presentation/maarchRM/Presenter/Exception.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/presentation/maarchRM/Presenter/Exception.php b/src/presentation/maarchRM/Presenter/Exception.php index 6c665b651..876e4abaf 100755 --- a/src/presentation/maarchRM/Presenter/Exception.php +++ b/src/presentation/maarchRM/Presenter/Exception.php @@ -94,7 +94,11 @@ class Exception if (isset($exception->errors)) { $errors = []; foreach ($exception->errors as $error) { - if (is_object($error)) { + if (is_string($error)) { + $error = new \core\Error($error); + } + + if (is_object($error) && $error instanceof \core\Error) { $error->setMessage($this->translator->getText($error->getFormat())); $variables = []; @@ -108,10 +112,8 @@ class Exception } } $error->setVariables($variables); - } else { - $error = new \core\Error($error); + $errors[] = $error; } - $errors[] = $error; } $this->json->errors = $errors; } -- GitLab From b42f66e8b89fbf1b2cd270a400118e08550fd2c4 Mon Sep 17 00:00:00 2001 From: Alexandre Morin Date: Fri, 2 Mar 2018 15:02:27 +0100 Subject: [PATCH 15/25] Fix : #7264 - CSS Typeahead --- .../maarchRM/Resources/public/css/style.css | 85 ++++++++++--- .../maarchRM/Resources/view/audit/search.html | 7 +- .../view/auth/authorization/edit.html | 3 +- .../organisationsAdministrationForm.html | 2 +- .../digitalResource/contentType/edit.html | 2 +- .../recordsManagement/archive/search.html | 4 +- web/public/js/typeahead_0.11.1/typeahead.js | 2 +- web/public/less/dashboard/style.less | 3 + .../less/typeahead_0.11.1/typeahead.less | 120 ++++++++++++++++++ 9 files changed, 202 insertions(+), 26 deletions(-) create mode 100644 web/public/less/typeahead_0.11.1/typeahead.less diff --git a/src/presentation/maarchRM/Resources/public/css/style.css b/src/presentation/maarchRM/Resources/public/css/style.css index 176aabcf5..e8d05ea1b 100755 --- a/src/presentation/maarchRM/Resources/public/css/style.css +++ b/src/presentation/maarchRM/Resources/public/css/style.css @@ -6140,17 +6140,17 @@ button.close { display: none !important; } } -.tt-wrapper { - position: relative; -} -.tt-wrapper .tt-dropdown-menu { + +.tt-wrapper .tt-menu, +.tt-wrapper .tt-menu { + cursor: pointer; position: absolute; top: 100%; left: 0; z-index: 1000; display: none; float: left; - min-width: 160px; + min-width: 100%; padding: 5px 0; margin: 2px 0 0; list-style: none; @@ -6163,14 +6163,13 @@ button.close { -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175); box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175); background-clip: padding-box; - width: 100%; - max-height: 150px; - overflow-y: auto; } -.tt-wrapper .tt-dropdown-menu .tt-suggestions { - display: block; + +.tt-wrapper { + position: relative; } -.tt-wrapper .tt-dropdown-menu .tt-suggestions .tt-suggestion { + +.tt-wrapper .tt-suggestion { display: block; padding: 3px 20px; clear: both; @@ -6178,12 +6177,68 @@ button.close { line-height: 1.42857143; color: #333333; white-space: nowrap; - cursor: pointer; } -.tt-wrapper .tt-dropdown-menu .tt-suggestions .tt-suggestion.tt-cursor { +.tt-wrapper .tt-suggestion.tt-cursor, +.tt-wrapper .tt-suggestion:hover, +.tt-wrapper .tt-suggestion:focus { + color: #ffffff; text-decoration: none; - color: #262626; - background-color: #f5f5f5; + outline: 0; + background-color: #337ab7; +} +.input-group.input-group-lg .tt-wrapper .form-control { + height: 46px; + padding: 10px 16px; + font-size: 18px; + line-height: 1.3333333; + border-radius: 6px; +} +.input-group.input-group-sm .tt-wrapper .form-control { + height: 30px; + padding: 5px 10px; + font-size: 12px; + line-height: 1.5; + border-radius: 3px; +} +.tt-wrapper { + width: 100%; +} +.input-group .tt-wrapper { + display: block !important; + height: 34px; +} + +.input-group .tt-wrapper .tt-menu { + top: 32px !important; +} +.input-group .tt-wrapper:not(:first-child):not(:last-child) .form-control { + border-radius: 0; +} +.input-group .tt-wrapper:first-child .form-control { + border-top-left-radius: 4px; + border-bottom-left-radius: 4px; + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} +.input-group .tt-wrapper:last-child .form-control { + border-top-left-radius: 0; + border-bottom-left-radius: 0; + border-top-right-radius: 4px; + border-bottom-right-radius: 4px; +} +.input-group.input-group-sm .tt-wrapper { + height: 30px; +} +.input-group.input-group-sm .tt-wrapper .tt-menu, +.input-group.input-group-sm .tt-wrapper .tt-menu { + top: 30px !important; +} +.input-group.input-group-lg .tt-wrapper { + height: 46px; +} +.input-group.input-group-lg .tt-wrapper .tt-menu, +.input-group.input-group-lg .tt-wrapper .tt-menu { + top: 46px !important; } /* FONT PATH * -------------------------- */ diff --git a/src/presentation/maarchRM/Resources/view/audit/search.html b/src/presentation/maarchRM/Resources/view/audit/search.html index 96d7439db..a2a85cf7a 100755 --- a/src/presentation/maarchRM/Resources/view/audit/search.html +++ b/src/presentation/maarchRM/Resources/view/audit/search.html @@ -220,15 +220,14 @@ suggestion: function (account) { var name = account.displayName; if (account.accountType == 'service') { - var type = $('#service_text').html(); + var icone = " "; } else { - var type = $('#user_text').html(); + var icone = " "; } var display = "" + + icone + "" - + type - + " - " + name + "
    "; return display; diff --git a/src/presentation/maarchRM/Resources/view/auth/authorization/edit.html b/src/presentation/maarchRM/Resources/view/auth/authorization/edit.html index 27038c06d..ac11a62b6 100755 --- a/src/presentation/maarchRM/Resources/view/auth/authorization/edit.html +++ b/src/presentation/maarchRM/Resources/view/auth/authorization/edit.html @@ -352,9 +352,10 @@ suggestion: function(user) { var display = "" + + " " + "" + user.displayName - + "
    "; + + "
    "; return display; } }, diff --git a/src/presentation/maarchRM/Resources/view/auth/userAccount/userManagement/organisationsAdministrationForm.html b/src/presentation/maarchRM/Resources/view/auth/userAccount/userManagement/organisationsAdministrationForm.html index d428dc62d..ee603df84 100755 --- a/src/presentation/maarchRM/Resources/view/auth/userAccount/userManagement/organisationsAdministrationForm.html +++ b/src/presentation/maarchRM/Resources/view/auth/userAccount/userManagement/organisationsAdministrationForm.html @@ -62,7 +62,7 @@ + organization.ownerOrgName + " > " + organization.displayName - + "

    "; + + "
    "; } else { display = this.empty(); diff --git a/src/presentation/maarchRM/Resources/view/digitalResource/contentType/edit.html b/src/presentation/maarchRM/Resources/view/digitalResource/contentType/edit.html index 6a290c9d5..e19642a42 100755 --- a/src/presentation/maarchRM/Resources/view/digitalResource/contentType/edit.html +++ b/src/presentation/maarchRM/Resources/view/digitalResource/contentType/edit.html @@ -130,7 +130,7 @@ var display = "" + "" + displayName - + "

    "; + + "
    "; return display; } }, diff --git a/src/presentation/maarchRM/Resources/view/recordsManagement/archive/search.html b/src/presentation/maarchRM/Resources/view/recordsManagement/archive/search.html index a30ab0fad..b0d676f1f 100755 --- a/src/presentation/maarchRM/Resources/view/recordsManagement/archive/search.html +++ b/src/presentation/maarchRM/Resources/view/recordsManagement/archive/search.html @@ -329,9 +329,7 @@ + " > "; } display += organization.displayName - + "" - + "" - + "

    "; + + "
    "; return display; } diff --git a/web/public/js/typeahead_0.11.1/typeahead.js b/web/public/js/typeahead_0.11.1/typeahead.js index 22f00a95e..59ab67522 100644 --- a/web/public/js/typeahead_0.11.1/typeahead.js +++ b/web/public/js/typeahead_0.11.1/typeahead.js @@ -1070,7 +1070,7 @@ wrapper: "tt-wrapper", input: "tt-input", hint: "tt-hint", - menu: "tt-dropdown-menu", + menu: "tt-menu", dataset: "tt-dataset", suggestion: "tt-suggestion", selectable: "tt-selectable", diff --git a/web/public/less/dashboard/style.less b/web/public/less/dashboard/style.less index a1e6eae2f..240b77e82 100755 --- a/web/public/less/dashboard/style.less +++ b/web/public/less/dashboard/style.less @@ -55,6 +55,9 @@ @import "../bootstrap_3.1.1/utilities.less"; @import "../bootstrap_3.1.1/responsive-utilities.less"; +// Typeahead +@import "../typeahead_0.11.1/typeahead.less"; + // Fontawesome @import "../font-awesome-4.7.0/variables.less"; @import "../font-awesome-4.7.0/mixins.less"; diff --git a/web/public/less/typeahead_0.11.1/typeahead.less b/web/public/less/typeahead_0.11.1/typeahead.less new file mode 100644 index 000000000..4a72e5f44 --- /dev/null +++ b/web/public/less/typeahead_0.11.1/typeahead.less @@ -0,0 +1,120 @@ +@color_1: #333333; +@color_2: #ffffff; +@background_color_1: #ffffff; +@background_color_2: #337ab7; + +.tt-wrapper { + .tt-menu { + cursor: pointer; + position: absolute; + top: 100%; + left: 0; + z-index: 1000; + display: none; + float: left; + min-width: 100%; + padding: 5px 0; + margin: 2px 0 0; + list-style: none; + font-size: 14px; + text-align: left; + background-color: @background_color_1; + border: 1px solid #cccccc; + border: 1px solid rgba(0, 0, 0, 0.15); + border-radius: 4px; + -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175); + box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175); + background-clip: padding-box; + } + position: relative; + width: 100%; + .tt-suggestion { + display: block; + padding: 3px 20px; + clear: both; + font-weight: normal; + line-height: 1.42857143; + color: @color_1; + white-space: nowrap; + &:hover { + color: @color_2; + text-decoration: none; + outline: 0; + background-color: @background_color_2; + } + &:focus { + color: @color_2; + text-decoration: none; + outline: 0; + background-color: @background_color_2; + } + } + .tt-suggestion.tt-cursor { + color: @color_2; + text-decoration: none; + outline: 0; + background-color: @background_color_2; + } +} +.input-group.input-group-lg { + .tt-wrapper { + .form-control { + height: 46px; + padding: 10px 16px; + font-size: 18px; + line-height: 1.3333333; + border-radius: 6px; + } + height: 46px; + .tt-menu { + top: 46px !important; + } + } +} +.input-group.input-group-sm { + .tt-wrapper { + .form-control { + height: 30px; + padding: 5px 10px; + font-size: 12px; + line-height: 1.5; + border-radius: 3px; + } + height: 30px; + .tt-menu { + top: 30px !important; + } + } +} +.input-group { + .tt-wrapper { + display: block !important; + height: 34px; + .tt-menu { + top: 32px !important; + } + &:not(:first-child) { + &:not(:last-child) { + .form-control { + border-radius: 0; + } + } + } + &:first-child { + .form-control { + border-top-left-radius: 4px; + border-bottom-left-radius: 4px; + border-top-right-radius: 0; + border-bottom-right-radius: 0; + } + } + &:last-child { + .form-control { + border-top-left-radius: 0; + border-bottom-left-radius: 0; + border-top-right-radius: 4px; + border-bottom-right-radius: 4px; + } + } + } +} -- GitLab From ccf12745c0f779d0bd3bd0b2b146d689bebd0272 Mon Sep 17 00:00:00 2001 From: Alexandre Morin Date: Mon, 5 Mar 2018 10:32:59 +0100 Subject: [PATCH 16/25] fix : #7317 batch processing --- src/bundle/batchProcessing/Controller/scheduling.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/bundle/batchProcessing/Controller/scheduling.php b/src/bundle/batchProcessing/Controller/scheduling.php index 4f8cd323c..9033833e0 100755 --- a/src/bundle/batchProcessing/Controller/scheduling.php +++ b/src/bundle/batchProcessing/Controller/scheduling.php @@ -310,7 +310,7 @@ class scheduling if(!empty($frequency[1])) { $frequency[1] -= $H_Offset; } - if(!empty($frequency[8])) { + if(!empty($frequency[8] && $frequency[8] != "00")) { $frequency[8] -= $H_Offset; } @@ -319,7 +319,7 @@ class scheduling $timeAdd = strtoupper("PT".$frequency[5].$frequency[6]); $currentDate->add(new \DateInterval($timeAdd)); - if ($frequency[7] != "" && $frequency[8] != "") { + if (($frequency[7] != "" && $frequency[8] != "") && ($frequency[7] != "00" && $frequency[8] != "00")) { $endDate->setTime($frequency[8], $frequency[7], "0"); } else { $endDate->add(new \DateInterval("P1D")); @@ -341,7 +341,7 @@ class scheduling $daysWeek = explode(",", $frequency[2]); $timeAdd = strtoupper("PT".$frequency[5].$frequency[6]); $currentDate->add(new \DateInterval($timeAdd)); - if ($frequency[7] != "" && $frequency[8] != "") { + if ($frequency[7] != "" && $frequency[8] != "" && ($frequency[7] != "00" && $frequency[8] != "00")) { $endDate->setTime($frequency[8], $frequency[7], "0"); } else { $endDate->add(new \DateInterval("P1D")); @@ -367,7 +367,7 @@ class scheduling $timeAdd = strtoupper("PT".$frequency[5].$frequency[6]); $currentDate->add(new \DateInterval($timeAdd)); - if ($frequency[7] != "" && $frequency[8] != "") { + if ($frequency[7] != "" && $frequency[8] != "" && ($frequency[7] != "00" && $frequency[8] != "00")) { $endDate->setTime($frequency[8], $frequency[7], "0"); } else { $endDate->add(new \DateInterval("P1M")); -- GitLab From 969c98a4b373acfa0ba56edcfb0f1f196b6c3c56 Mon Sep 17 00:00:00 2001 From: Correia Lopes Dylan Date: Mon, 5 Mar 2018 14:39:06 +0100 Subject: [PATCH 17/25] 7265- Query construction modification --- .../Controller/archiveAccessTrait.php | 64 ++++++++----- .../Controller/archiveCommunicationTrait.php | 95 +++---------------- .../Controller/description.php | 4 +- 3 files changed, 58 insertions(+), 105 deletions(-) diff --git a/src/bundle/recordsManagement/Controller/archiveAccessTrait.php b/src/bundle/recordsManagement/Controller/archiveAccessTrait.php index ed37b70d2..83b114209 100755 --- a/src/bundle/recordsManagement/Controller/archiveAccessTrait.php +++ b/src/bundle/recordsManagement/Controller/archiveAccessTrait.php @@ -191,7 +191,7 @@ trait archiveAccessTrait * * @return string Query */ - public function getArchiveAssert($args) + public function getArchiveAssert($args,&$queryParams) { // Args on archive $currentDate = \laabs::newDate(); @@ -202,37 +202,47 @@ trait archiveAccessTrait $queryParts[] = "archiveName='*".$args['archiveName']."*'"; } if (!empty($args['profileReference'])) { - $queryParts[] = "archivalProfileReference='".$args['profileReference']."'"; + $queryParts['archivalProfileReference'] = "archivalProfileReference = :archivalProfileReference"; + $queryParams['archivalProfileReference']=$args['profileReference']; } if (!empty($args['agreementReference'])) { - $queryParts[] = "archivalAgreementReference='".$args['agreementReference']."'"; + $queryParts['archivalAgreementReference'] = "archivalAgreementReference=:archivalAgreementReference"; + $queryParts['archivalAgreementReference'] = $args['agreementReference']; } if (!empty($args['archiveId'])) { - $queryParts[] = "archiveId='".$args['archiveId']."'"; + $queryParts['archiveId'] = "archiveId=:archiveId"; + $queryParams['archiveId'] = $args['archiveId']; } if (!empty($args['status'])) { - $queryParts[] = "status='".$args['status']."'"; + $queryParts['status'] = "status=:status"; + $queryParams['status'] = $args['status']; } if (!empty($args['retentionRuleCode'])) { - $queryParts[] = "retentionRuleCode='".$args['retentionRuleCode']."'"; + $queryParts[] = "retentionRuleCode=:retentionRuleCode"; + $queryParams['retentionRuleCode'] = $args['retentionRuleCode']; } if (!empty($args['archiveExpired']) && $args['archiveExpired'] == "true") { - $queryParts[] = "disposalDate<='".$currentDateString."'"; + $queryParts['disposalDate'] = "disposalDate<= :disposalDate"; + $queryParams['disposalDate'] = $currentDateString; } if (!empty($args['archiveExpired']) && $args['archiveExpired'] == "false") { - $queryParts[] = "disposalDate>='".$currentDateString."'"; + $queryParts['disposalDate'] = "disposalDate>= :disposalDate"; + $queryParams['disposalDate'] = $currentDateString; } if (!empty($args['partialRetentionRule']) && $args['partialRetentionRule'] == "true") { - $queryParts[] = "(retentionDuration=NULL OR retentionStartDate=NULL OR retentionRuleCode=NULL)"; + $queryParts['partialRetentionRule'] = "(retentionDuration=NULL OR retentionStartDate=NULL OR retentionRuleCode=NULL)"; } if (!empty($args['finalDisposition'])) { - $queryParts[] = "finalDisposition='".$args['finalDisposition']."'"; + $queryParts['finalDisposition'] = "finalDisposition= :finalDisposition"; + $queryParams['finalDisposition'] =$args['finalDisposition']; } if (!empty($args['originatorOrgRegNumber'])) { - $queryParts[] = "originatorOrgRegNumber='".$args['originatorOrgRegNumber']."'"; + $queryParts[] = "originatorOrgRegNumber= :originatorOrgRegNumber"; + $queryParams['originatorOrgRegNumber'] = $args['originatorOrgRegNumber']; } if (!empty($args['originatorArchiveId'])) { - $queryParts[] = "originatorArchiveId='".$args['originatorArchiveId']."'"; + $queryParts['originatorArchiveId'] = "originatorArchiveId= :originatorArchiveId"; + $queryParams['originatorArchiveId'] = $args['originatorArchiveId']; } if (!empty($args['originatingDate'])) { if (!empty($args['originatingDate'][0]) && is_string($args['originatingDate'][0])) { @@ -244,11 +254,13 @@ trait archiveAccessTrait if (!empty($args['originatingDate'][0])) { // originatingStartDate $args['originatingDate'][0] = $args['originatingDate'][0]->format('Y-m-d'); - $queryParts[] = "originatingDate>='".$args['originatingDate'][0]."'"; + $queryParts['originatingDate'] = "originatingDate>= :originatingDate"; + $queryParams['originatingDate'] =$args['originatingDate'][0]; } - if (!empty($args['originatingDate'][1])) { // originatingEndDate + if (!empty($args['originatingDate'][1])) { // originatingEndDate; $args['originatingDate'][1] = $args['originatingDate'][1]->format('Y-m-d'); - $queryParts[] = "originatingDate<='".$args['originatingDate'][1]."'"; + $queryParts['originatingDate'] = "originatingDate<= :originatingDate"; + $queryParams['originatingDate'] = $args['originatingDate'][1]; } } @@ -262,30 +274,38 @@ trait archiveAccessTrait if (!empty($args['depositStartDate']) && !empty($args['depositEndDate'])) { $args['depositStartDate'] = $args['depositStartDate']->format('Y-m-d').'T00:00:00'; $args['depositEndDate'] = $args['depositEndDate']->format('Y-m-d').'T23:59:59'; - $queryParts[] = "depositDate <= '".$args['depositEndDate']."' AND depositDate >= '".$args['depositStartDate']."'"; + $queryParts['depositDate'] = "depositDate <= :depositEndDate AND depositDate >= :depositStartDate"; + $queryParams['depositEndDate'] = $args['depositEndDate']; + $queryParams['depositStartDate'] = $args['depositStartDate']; + } elseif (!empty($args['depositStartDate'])) { $args['depositStartDate'] = $args['depositStartDate']->format('Y-m-d').'T00:00:00'; - $queryParts[] = "depositDate >= '".$args['depositStartDate']."'"; + $queryParts['depositDate'] = "depositDate >= :depositStartDate"; + $queryParams['depositStartDate'] = $args['depositStartDate']; } elseif (!empty($args['depositEndDate'])) { $args['depositEndDate'] = $args['depositEndDate']->format('Y-m-d').'T23:59:59'; - $queryParts[] = "depositDate <= '".$args['depositEndDate']."'"; + $queryParts['depositDate'] = "depositDate <= :depositEndDate"; + $queryParams['depositEndDate'] = $args['depositEndDate']; } if (!empty($args['depositorOrgRegNumber'])) { - $queryParts[] = "depositorOrgRegNumber='".$args['depositorOrgRegNumber']."'"; + $queryParts['depositorOrgRegNumber'] = "depositorOrgRegNumber= :depositorOrgRegNumber"; + $queryParams['depositorOrgRegNumber'] = $args['depositorOrgRegNumber']; } if (!empty($args['filePlanPosition'])) { - $queryParts[] = "filePlanPosition='".$args['filePlanPosition']."'"; + $queryParts['filePlanPosition'] = "filePlanPosition= :filePlanPosition"; + $queryParams['filePlanPosition'] = $args['filePlanPosition']; } if ($args['hasParent'] == true) { - $queryParts[] = "parentArchiveId!=null"; + $queryParts['parentArchiveId'] = "parentArchiveId!=null"; } if ($args['hasParent'] === false) { - $queryParts[] = "parentArchiveId=null"; + $queryParts['hasParent'] = "parentArchiveId=null"; } $accessRuleAssert = $this->getAccessRuleAssert($currentDateString); + if ($accessRuleAssert) { $queryParts[] = $accessRuleAssert; } diff --git a/src/bundle/recordsManagement/Controller/archiveCommunicationTrait.php b/src/bundle/recordsManagement/Controller/archiveCommunicationTrait.php index b5c82bbfb..3d25c72c8 100755 --- a/src/bundle/recordsManagement/Controller/archiveCommunicationTrait.php +++ b/src/bundle/recordsManagement/Controller/archiveCommunicationTrait.php @@ -99,13 +99,13 @@ trait archiveCommunicationTrait 'originatingDate' => [$originatingStartDate, $originatingEndDate], // [0] startDate, [1] endDate ]; - $queryParts = array(); $queryParams = array(); if (!empty($description) || !empty($text)) { + $searchClasses = []; if (!$profileReference) { - $searchClasses['recordsManagement/description'] = $this->useDescriptionController('recordsManagement/description'); + $searchClasses['recordsManagement/description'] = $this->useDescriptionController('recordsManagement/description'); $descriptionClassController = \laabs::newController('recordsManagement/descriptionClass'); @@ -123,97 +123,30 @@ trait archiveCommunicationTrait foreach ($searchClasses as $descriptionClass => $descriptionController) { $archives = array_merge($archives, $descriptionController->search($description, $text, $archiveArgs)); } - } else { - if ($archiveId){ - $queryParts['archiveId'] = "archiveId = :archiveId"; - $queryParams['archiveId'] = $archiveId; - } else { - if ($profileReference){ - $queryParts['archivalProfileReference'] = "archivalProfileReference = :archivalProfileReference"; - $queryParams['archivalProfileReference'] = $profileReference; - } - - if ($status){ - $queryParts['status'] = "status = :status"; - $queryParams['status'] = $status; - } - - if ($retentionRuleCode){ - $queryParts['retentionRuleCode'] = "retentionRuleCode = :retentionRuleCode"; - $queryParams['retentionRuleCode'] = $retentionRuleCode; - } - - if ($originatorOrgRegNumber){ - $queryParts['originatorOrgRegNumber'] = "originatorOrgRegNumber = :originatorOrgRegNumber"; - $queryParams['originatorOrgRegNumber'] = $originatorOrgRegNumber; - } + $queryString = $this->getArchiveAssert($archiveArgs,$queryParams); - if ($finalDisposition){ - $queryParts['finalDisposition'] = "finalDisposition = :finalDisposition"; - $queryParams['finalDisposition'] = $finalDisposition; - } - - if ($originatingStartDate && $originatingEndDate) { - $queryParams['originatingStartDate'] = $originatingStartDate; - $queryParams['originatingEndDate'] = $originatingEndDate; - $queryParts['depositDate'] = "originatingDate >= :originatingStartDate AND originatingDate <= :originatingEndDate"; - } elseif ($originatingStartDate) { - $queryParams['originatingStartDate'] = $originatingStartDate; - $queryParts['depositDate'] = "originatingDate >= :depositStartDate"; - - } elseif ($originatingEndDate) { - $queryParams['originatingEndDate'] = $originatingEndDate; - $queryParts['date'] = "originatingDate <= :originatingEndDate"; - } - - if ($depositStartDate && $depositEndDate) { - $queryParams['depositStartDate'] = $depositStartDate; - $queryParams['depositEndDate'] = $depositEndDate; - $queryParts['depositDate'] = "depositDate >= :depositStartDate AND depositDate <= :depositEndDate"; - } elseif ($depositStartDate) { - $queryParams['depositStartDate'] = $depositStartDate; - $queryParts['depositDate'] = "depositDate >= :depositStartDate"; - - } elseif ($depositEndDate) { - $queryParams['depositEndDate'] = $depositEndDate; - $queryParts['date'] = "depositDate <= :depositEndDate"; - } - if($archiveExpired){ - $currentDate = \laabs::newDate(); - $currentDateString = $currentDate->format('Y-m-d'); - if ($archiveExpired == "true") { + $originators = array(); + foreach ((array) $this->organizationController->getOrgsByRole('originator') as $originator) { + $originators[$originator->registrationNumber] = $originator; + } - $queryParams['disposalDate'] = $currentDateString; - $queryParts['disposalDate'] = "disposalDate <= :disposalDate"; - }else if($archiveExpired == "false"){ - $queryParams['disposalDate'] = $currentDateString; - $queryParts['disposalDate'] = "disposalDate >= :disposalDate"; - } + $archives = $this->sdoFactory->find('recordsManagement/archive', $queryString, $queryParams, false, false, 100); + foreach ($archives as $archive) { + if (!empty($archive->disposalDate) && $archive->disposalDate <= \laabs::newDate()) { + $archive->disposable = true; } - if($partialRetentionRule){ - $queryParts['partialRetentionRule'] = "(retentionDuration=NULL OR retentionStartDate=NULL OR retentionRuleCode=NULL)"; + if (isset($originators[$archive->originatorOrgRegNumber])) { + $archive->originator = $originators[$archive->originatorOrgRegNumber]; } - - } - $queryString = \laabs\implode(' AND ', $queryParts); - $archives = $this->sdoFactory->find('recordsManagement/archive', $queryString, $queryParams, false, false, 100); - } - - foreach ($archives as $archive) { - if (!empty($archive->disposalDate) && $archive->disposalDate <= \laabs::newDate()) { - $archive->disposable = true; - } - - if (isset($originators[$archive->originatorOrgRegNumber])) { - $archive->originator = $originators[$archive->originatorOrgRegNumber]; } } return $archives; } + /** * Restitute an archive * @param string $archiveId The idetifier of the archive diff --git a/src/bundle/recordsManagement/Controller/description.php b/src/bundle/recordsManagement/Controller/description.php index 807008728..d08ce1f63 100755 --- a/src/bundle/recordsManagement/Controller/description.php +++ b/src/bundle/recordsManagement/Controller/description.php @@ -136,7 +136,7 @@ class description implements \bundle\recordsManagement\Controller\archiveDescrip $queryParams = []; $queryParts = ['description!=null and text!=null']; - $queryParts[] = \laabs::newController('recordsManagement/archive')->getArchiveAssert($archiveArgs); + $queryParts[] = \laabs::newController('recordsManagement/archive')->getArchiveAssert($archiveArgs,$queryParams); // Json if (!empty($description)) { @@ -170,7 +170,7 @@ class description implements \bundle\recordsManagement\Controller\archiveDescrip $queryString = \laabs\implode(' and ', $queryParts); - $archiveUnits = $this->sdoFactory->find('recordsManagement/archiveUnit', $queryString); + $archiveUnits = $this->sdoFactory->find('recordsManagement/archiveUnit', $queryString,$queryParams); foreach ($archiveUnits as $archiveUnit) { $archiveUnit->descriptionObject = json_decode($archiveUnit->description); -- GitLab From c4ec7a21153ae6ef0e63d2ed6620f29942eed499 Mon Sep 17 00:00:00 2001 From: Alexandre Morin Date: Mon, 5 Mar 2018 17:05:17 +0100 Subject: [PATCH 18/25] #7332 - country format --- .../organization/Controller/orgContact.php | 11 + .../Resources/countries-codes.json | 1247 +++++++++++++++++ .../organization/orgContactInterface.php | 7 + .../Presenter/organization/orgTree.php | 2 + .../Resources/locale/fr/contact/contact.po | 2 + .../locale/fr/organization/messages.po | 1 - .../contact/manageContact/addressForm.html | 17 +- 7 files changed, 1284 insertions(+), 3 deletions(-) create mode 100644 src/bundle/organization/Resources/countries-codes.json diff --git a/src/bundle/organization/Controller/orgContact.php b/src/bundle/organization/Controller/orgContact.php index 8cc8e7f0a..f49ed2240 100755 --- a/src/bundle/organization/Controller/orgContact.php +++ b/src/bundle/organization/Controller/orgContact.php @@ -98,4 +98,15 @@ class orgContact return true; } + public function loadCountriesCodes() + { + $filename = 'organization'.LAABS_URI_SEPARATOR. 'countries-codes.json'; + $router = new \core\Route\ResourceRouter($filename); + $file = file_get_contents($router->getResource()->getRealPath()); + + $countriesCodes = json_decode($file); + + return $countriesCodes; + } + } diff --git a/src/bundle/organization/Resources/countries-codes.json b/src/bundle/organization/Resources/countries-codes.json new file mode 100644 index 000000000..f29dd7f28 --- /dev/null +++ b/src/bundle/organization/Resources/countries-codes.json @@ -0,0 +1,1247 @@ +[ + { + "name": "Afghanistan", + "alpha2": "AF", + "country-code": "004" + }, + { + "name": "Åland Islands", + "alpha2": "AX", + "country-code": "248" + }, + { + "name": "Albania", + "alpha2": "AL", + "country-code": "008" + }, + { + "name": "Algeria", + "alpha2": "DZ", + "country-code": "012" + }, + { + "name": "American Samoa", + "alpha2": "AS", + "country-code": "016" + }, + { + "name": "Andorra", + "alpha2": "AD", + "country-code": "020" + }, + { + "name": "Angola", + "alpha2": "AO", + "country-code": "024" + }, + { + "name": "Anguilla", + "alpha2": "AI", + "country-code": "660" + }, + { + "name": "Antarctica", + "alpha2": "AQ", + "country-code": "010" + }, + { + "name": "Antigua and Barbuda", + "alpha2": "AG", + "country-code": "028" + }, + { + "name": "Argentina", + "alpha2": "AR", + "country-code": "032" + }, + { + "name": "Armenia", + "alpha2": "AM", + "country-code": "051" + }, + { + "name": "Aruba", + "alpha2": "AW", + "country-code": "533" + }, + { + "name": "Australia", + "alpha2": "AU", + "country-code": "036" + }, + { + "name": "Austria", + "alpha2": "AT", + "country-code": "040" + }, + { + "name": "Azerbaijan", + "alpha2": "AZ", + "country-code": "031" + }, + { + "name": "Bahamas", + "alpha2": "BS", + "country-code": "044" + }, + { + "name": "Bahrain", + "alpha2": "BH", + "country-code": "048" + }, + { + "name": "Bangladesh", + "alpha2": "BD", + "country-code": "050" + }, + { + "name": "Barbados", + "alpha2": "BB", + "country-code": "052" + }, + { + "name": "Belarus", + "alpha2": "BY", + "country-code": "112" + }, + { + "name": "Belgium", + "alpha2": "BE", + "country-code": "056" + }, + { + "name": "Belize", + "alpha2": "BZ", + "country-code": "084" + }, + { + "name": "Benin", + "alpha2": "BJ", + "country-code": "204" + }, + { + "name": "Bermuda", + "alpha2": "BM", + "country-code": "060" + }, + { + "name": "Bhutan", + "alpha2": "BT", + "country-code": "064" + }, + { + "name": "Bolivia (Plurinational State of)", + "alpha2": "BO", + "country-code": "068" + }, + { + "name": "Bonaire, Sint Eustatius and Saba", + "alpha2": "BQ", + "country-code": "535" + }, + { + "name": "Bosnia and Herzegovina", + "alpha2": "BA", + "country-code": "070" + }, + { + "name": "Botswana", + "alpha2": "BW", + "country-code": "072" + }, + { + "name": "Bouvet Island", + "alpha2": "BV", + "country-code": "074" + }, + { + "name": "Brazil", + "alpha2": "BR", + "country-code": "076" + }, + { + "name": "British Indian Ocean Territory", + "alpha2": "IO", + "country-code": "086" + }, + { + "name": "Brunei Darussalam", + "alpha2": "BN", + "country-code": "096" + }, + { + "name": "Bulgaria", + "alpha2": "BG", + "country-code": "100" + }, + { + "name": "Burkina Faso", + "alpha2": "BF", + "country-code": "854" + }, + { + "name": "Burundi", + "alpha2": "BI", + "country-code": "108" + }, + { + "name": "Cambodia", + "alpha2": "KH", + "country-code": "116" + }, + { + "name": "Cameroon", + "alpha2": "CM", + "country-code": "120" + }, + { + "name": "Canada", + "alpha2": "CA", + "country-code": "124" + }, + { + "name": "Cabo Verde", + "alpha2": "CV", + "country-code": "132" + }, + { + "name": "Cayman Islands", + "alpha2": "KY", + "country-code": "136" + }, + { + "name": "Central African Republic", + "alpha2": "CF", + "country-code": "140" + }, + { + "name": "Chad", + "alpha2": "TD", + "country-code": "148" + }, + { + "name": "Chile", + "alpha2": "CL", + "country-code": "152" + }, + { + "name": "China", + "alpha2": "CN", + "country-code": "156" + }, + { + "name": "Christmas Island", + "alpha2": "CX", + "country-code": "162" + }, + { + "name": "Cocos (Keeling) Islands", + "alpha2": "CC", + "country-code": "166" + }, + { + "name": "Colombia", + "alpha2": "CO", + "country-code": "170" + }, + { + "name": "Comoros", + "alpha2": "KM", + "country-code": "174" + }, + { + "name": "Congo", + "alpha2": "CG", + "country-code": "178" + }, + { + "name": "Congo (Democratic Republic of the)", + "alpha2": "CD", + "country-code": "180" + }, + { + "name": "Cook Islands", + "alpha2": "CK", + "country-code": "184" + }, + { + "name": "Costa Rica", + "alpha2": "CR", + "country-code": "188" + }, + { + "name": "Côte d'Ivoire", + "alpha2": "CI", + "country-code": "384" + }, + { + "name": "Croatia", + "alpha2": "HR", + "country-code": "191" + }, + { + "name": "Cuba", + "alpha2": "CU", + "country-code": "192" + }, + { + "name": "Curaçao", + "alpha2": "CW", + "country-code": "531" + }, + { + "name": "Cyprus", + "alpha2": "CY", + "country-code": "196" + }, + { + "name": "Czech Republic", + "alpha2": "CZ", + "country-code": "203" + }, + { + "name": "Denmark", + "alpha2": "DK", + "country-code": "208" + }, + { + "name": "Djibouti", + "alpha2": "DJ", + "country-code": "262" + }, + { + "name": "Dominica", + "alpha2": "DM", + "country-code": "212" + }, + { + "name": "Dominican Republic", + "alpha2": "DO", + "country-code": "214" + }, + { + "name": "Ecuador", + "alpha2": "EC", + "country-code": "218" + }, + { + "name": "Egypt", + "alpha2": "EG", + "country-code": "818" + }, + { + "name": "El Salvador", + "alpha2": "SV", + "country-code": "222" + }, + { + "name": "Equatorial Guinea", + "alpha2": "GQ", + "country-code": "226" + }, + { + "name": "Eritrea", + "alpha2": "ER", + "country-code": "232" + }, + { + "name": "Estonia", + "alpha2": "EE", + "country-code": "233" + }, + { + "name": "Ethiopia", + "alpha2": "ET", + "country-code": "231" + }, + { + "name": "Falkland Islands (Malvinas)", + "alpha2": "FK", + "country-code": "238" + }, + { + "name": "Faroe Islands", + "alpha2": "FO", + "country-code": "234" + }, + { + "name": "Fiji", + "alpha2": "FJ", + "country-code": "242" + }, + { + "name": "Finland", + "alpha2": "FI", + "country-code": "246" + }, + { + "name": "France", + "alpha2": "FR", + "country-code": "250" + }, + { + "name": "French Guiana", + "alpha2": "GF", + "country-code": "254" + }, + { + "name": "French Polynesia", + "alpha2": "PF", + "country-code": "258" + }, + { + "name": "French Southern Territories", + "alpha2": "TF", + "country-code": "260" + }, + { + "name": "Gabon", + "alpha2": "GA", + "country-code": "266" + }, + { + "name": "Gambia", + "alpha2": "GM", + "country-code": "270" + }, + { + "name": "Georgia", + "alpha2": "GE", + "country-code": "268" + }, + { + "name": "Germany", + "alpha2": "DE", + "country-code": "276" + }, + { + "name": "Ghana", + "alpha2": "GH", + "country-code": "288" + }, + { + "name": "Gibraltar", + "alpha2": "GI", + "country-code": "292" + }, + { + "name": "Greece", + "alpha2": "GR", + "country-code": "300" + }, + { + "name": "Greenland", + "alpha2": "GL", + "country-code": "304" + }, + { + "name": "Grenada", + "alpha2": "GD", + "country-code": "308" + }, + { + "name": "Guadeloupe", + "alpha2": "GP", + "country-code": "312" + }, + { + "name": "Guam", + "alpha2": "GU", + "country-code": "316" + }, + { + "name": "Guatemala", + "alpha2": "GT", + "country-code": "320" + }, + { + "name": "Guernsey", + "alpha2": "GG", + "country-code": "831" + }, + { + "name": "Guinea", + "alpha2": "GN", + "country-code": "324" + }, + { + "name": "Guinea-Bissau", + "alpha2": "GW", + "country-code": "624" + }, + { + "name": "Guyana", + "alpha2": "GY", + "country-code": "328" + }, + { + "name": "Haiti", + "alpha2": "HT", + "country-code": "332" + }, + { + "name": "Heard Island and McDonald Islands", + "alpha2": "HM", + "country-code": "334" + }, + { + "name": "Holy See", + "alpha2": "VA", + "country-code": "336" + }, + { + "name": "Honduras", + "alpha2": "HN", + "country-code": "340" + }, + { + "name": "Hong Kong", + "alpha2": "HK", + "country-code": "344" + }, + { + "name": "Hungary", + "alpha2": "HU", + "country-code": "348" + }, + { + "name": "Iceland", + "alpha2": "IS", + "country-code": "352" + }, + { + "name": "India", + "alpha2": "IN", + "country-code": "356" + }, + { + "name": "Indonesia", + "alpha2": "ID", + "country-code": "360" + }, + { + "name": "Iran (Islamic Republic of)", + "alpha2": "IR", + "country-code": "364" + }, + { + "name": "Iraq", + "alpha2": "IQ", + "country-code": "368" + }, + { + "name": "Ireland", + "alpha2": "IE", + "country-code": "372" + }, + { + "name": "Isle of Man", + "alpha2": "IM", + "country-code": "833" + }, + { + "name": "Israel", + "alpha2": "IL", + "country-code": "376" + }, + { + "name": "Italy", + "alpha2": "IT", + "country-code": "380" + }, + { + "name": "Jamaica", + "alpha2": "JM", + "country-code": "388" + }, + { + "name": "Japan", + "alpha2": "JP", + "country-code": "392" + }, + { + "name": "Jersey", + "alpha2": "JE", + "country-code": "832" + }, + { + "name": "Jordan", + "alpha2": "JO", + "country-code": "400" + }, + { + "name": "Kazakhstan", + "alpha2": "KZ", + "country-code": "398" + }, + { + "name": "Kenya", + "alpha2": "KE", + "country-code": "404" + }, + { + "name": "Kiribati", + "alpha2": "KI", + "country-code": "296" + }, + { + "name": "Korea (Democratic People's Republic of)", + "alpha2": "KP", + "country-code": "408" + }, + { + "name": "Korea (Republic of)", + "alpha2": "KR", + "country-code": "410" + }, + { + "name": "Kuwait", + "alpha2": "KW", + "country-code": "414" + }, + { + "name": "Kyrgyzstan", + "alpha2": "KG", + "country-code": "417" + }, + { + "name": "Lao People's Democratic Republic", + "alpha2": "LA", + "country-code": "418" + }, + { + "name": "Latvia", + "alpha2": "LV", + "country-code": "428" + }, + { + "name": "Lebanon", + "alpha2": "LB", + "country-code": "422" + }, + { + "name": "Lesotho", + "alpha2": "LS", + "country-code": "426" + }, + { + "name": "Liberia", + "alpha2": "LR", + "country-code": "430" + }, + { + "name": "Libya", + "alpha2": "LY", + "country-code": "434" + }, + { + "name": "Liechtenstein", + "alpha2": "LI", + "country-code": "438" + }, + { + "name": "Lithuania", + "alpha2": "LT", + "country-code": "440" + }, + { + "name": "Luxembourg", + "alpha2": "LU", + "country-code": "442" + }, + { + "name": "Macao", + "alpha2": "MO", + "country-code": "446" + }, + { + "name": "Macedonia (the former Yugoslav Republic of)", + "alpha2": "MK", + "country-code": "807" + }, + { + "name": "Madagascar", + "alpha2": "MG", + "country-code": "450" + }, + { + "name": "Malawi", + "alpha2": "MW", + "country-code": "454" + }, + { + "name": "Malaysia", + "alpha2": "MY", + "country-code": "458" + }, + { + "name": "Maldives", + "alpha2": "MV", + "country-code": "462" + }, + { + "name": "Mali", + "alpha2": "ML", + "country-code": "466" + }, + { + "name": "Malta", + "alpha2": "MT", + "country-code": "470" + }, + { + "name": "Marshall Islands", + "alpha2": "MH", + "country-code": "584" + }, + { + "name": "Martinique", + "alpha2": "MQ", + "country-code": "474" + }, + { + "name": "Mauritania", + "alpha2": "MR", + "country-code": "478" + }, + { + "name": "Mauritius", + "alpha2": "MU", + "country-code": "480" + }, + { + "name": "Mayotte", + "alpha2": "YT", + "country-code": "175" + }, + { + "name": "Mexico", + "alpha2": "MX", + "country-code": "484" + }, + { + "name": "Micronesia (Federated States of)", + "alpha2": "FM", + "country-code": "583" + }, + { + "name": "Moldova (Republic of)", + "alpha2": "MD", + "country-code": "498" + }, + { + "name": "Monaco", + "alpha2": "MC", + "country-code": "492" + }, + { + "name": "Mongolia", + "alpha2": "MN", + "country-code": "496" + }, + { + "name": "Montenegro", + "alpha2": "ME", + "country-code": "499" + }, + { + "name": "Montserrat", + "alpha2": "MS", + "country-code": "500" + }, + { + "name": "Morocco", + "alpha2": "MA", + "country-code": "504" + }, + { + "name": "Mozambique", + "alpha2": "MZ", + "country-code": "508" + }, + { + "name": "Myanmar", + "alpha2": "MM", + "country-code": "104" + }, + { + "name": "Namibia", + "alpha2": "NA", + "country-code": "516" + }, + { + "name": "Nauru", + "alpha2": "NR", + "country-code": "520" + }, + { + "name": "Nepal", + "alpha2": "NP", + "country-code": "524" + }, + { + "name": "Netherlands", + "alpha2": "NL", + "country-code": "528" + }, + { + "name": "New Caledonia", + "alpha2": "NC", + "country-code": "540" + }, + { + "name": "New Zealand", + "alpha2": "NZ", + "country-code": "554" + }, + { + "name": "Nicaragua", + "alpha2": "NI", + "country-code": "558" + }, + { + "name": "Niger", + "alpha2": "NE", + "country-code": "562" + }, + { + "name": "Nigeria", + "alpha2": "NG", + "country-code": "566" + }, + { + "name": "Niue", + "alpha2": "NU", + "country-code": "570" + }, + { + "name": "Norfolk Island", + "alpha2": "NF", + "country-code": "574" + }, + { + "name": "Northern Mariana Islands", + "alpha2": "MP", + "country-code": "580" + }, + { + "name": "Norway", + "alpha2": "NO", + "country-code": "578" + }, + { + "name": "Oman", + "alpha2": "OM", + "country-code": "512" + }, + { + "name": "Pakistan", + "alpha2": "PK", + "country-code": "586" + }, + { + "name": "Palau", + "alpha2": "PW", + "country-code": "585" + }, + { + "name": "Palestine, State of", + "alpha2": "PS", + "country-code": "275" + }, + { + "name": "Panama", + "alpha2": "PA", + "country-code": "591" + }, + { + "name": "Papua New Guinea", + "alpha2": "PG", + "country-code": "598" + }, + { + "name": "Paraguay", + "alpha2": "PY", + "country-code": "600" + }, + { + "name": "Peru", + "alpha2": "PE", + "country-code": "604" + }, + { + "name": "Philippines", + "alpha2": "PH", + "country-code": "608" + }, + { + "name": "Pitcairn", + "alpha2": "PN", + "country-code": "612" + }, + { + "name": "Poland", + "alpha2": "PL", + "country-code": "616" + }, + { + "name": "Portugal", + "alpha2": "PT", + "country-code": "620" + }, + { + "name": "Puerto Rico", + "alpha2": "PR", + "country-code": "630" + }, + { + "name": "Qatar", + "alpha2": "QA", + "country-code": "634" + }, + { + "name": "Réunion", + "alpha2": "RE", + "country-code": "638" + }, + { + "name": "Romania", + "alpha2": "RO", + "country-code": "642" + }, + { + "name": "Russian Federation", + "alpha2": "RU", + "country-code": "643" + }, + { + "name": "Rwanda", + "alpha2": "RW", + "country-code": "646" + }, + { + "name": "Saint Barthélemy", + "alpha2": "BL", + "country-code": "652" + }, + { + "name": "Saint Helena, Ascension and Tristan da Cunha", + "alpha2": "SH", + "country-code": "654" + }, + { + "name": "Saint Kitts and Nevis", + "alpha2": "KN", + "country-code": "659" + }, + { + "name": "Saint Lucia", + "alpha2": "LC", + "country-code": "662" + }, + { + "name": "Saint Martin (French part)", + "alpha2": "MF", + "country-code": "663" + }, + { + "name": "Saint Pierre and Miquelon", + "alpha2": "PM", + "country-code": "666" + }, + { + "name": "Saint Vincent and the Grenadines", + "alpha2": "VC", + "country-code": "670" + }, + { + "name": "Samoa", + "alpha2": "WS", + "country-code": "882" + }, + { + "name": "San Marino", + "alpha2": "SM", + "country-code": "674" + }, + { + "name": "Sao Tome and Principe", + "alpha2": "ST", + "country-code": "678" + }, + { + "name": "Saudi Arabia", + "alpha2": "SA", + "country-code": "682" + }, + { + "name": "Senegal", + "alpha2": "SN", + "country-code": "686" + }, + { + "name": "Serbia", + "alpha2": "RS", + "country-code": "688" + }, + { + "name": "Seychelles", + "alpha2": "SC", + "country-code": "690" + }, + { + "name": "Sierra Leone", + "alpha2": "SL", + "country-code": "694" + }, + { + "name": "Singapore", + "alpha2": "SG", + "country-code": "702" + }, + { + "name": "Sint Maarten (Dutch part)", + "alpha2": "SX", + "country-code": "534" + }, + { + "name": "Slovakia", + "alpha2": "SK", + "country-code": "703" + }, + { + "name": "Slovenia", + "alpha2": "SI", + "country-code": "705" + }, + { + "name": "Solomon Islands", + "alpha2": "SB", + "country-code": "090" + }, + { + "name": "Somalia", + "alpha2": "SO", + "country-code": "706" + }, + { + "name": "South Africa", + "alpha2": "ZA", + "country-code": "710" + }, + { + "name": "South Georgia and the South Sandwich Islands", + "alpha2": "GS", + "country-code": "239" + }, + { + "name": "South Sudan", + "alpha2": "SS", + "country-code": "728" + }, + { + "name": "Spain", + "alpha2": "ES", + "country-code": "724" + }, + { + "name": "Sri Lanka", + "alpha2": "LK", + "country-code": "144" + }, + { + "name": "Sudan", + "alpha2": "SD", + "country-code": "729" + }, + { + "name": "Suriname", + "alpha2": "SR", + "country-code": "740" + }, + { + "name": "Svalbard and Jan Mayen", + "alpha2": "SJ", + "country-code": "744" + }, + { + "name": "Swaziland", + "alpha2": "SZ", + "country-code": "748" + }, + { + "name": "Sweden", + "alpha2": "SE", + "country-code": "752" + }, + { + "name": "Switzerland", + "alpha2": "CH", + "country-code": "756" + }, + { + "name": "Syrian Arab Republic", + "alpha2": "SY", + "country-code": "760" + }, + { + "name": "Taiwan, Province of China", + "alpha2": "TW", + "country-code": "158" + }, + { + "name": "Tajikistan", + "alpha2": "TJ", + "country-code": "762" + }, + { + "name": "Tanzania, United Republic of", + "alpha2": "TZ", + "country-code": "834" + }, + { + "name": "Thailand", + "alpha2": "TH", + "country-code": "764" + }, + { + "name": "Timor-Leste", + "alpha2": "TL", + "country-code": "626" + }, + { + "name": "Togo", + "alpha2": "TG", + "country-code": "768" + }, + { + "name": "Tokelau", + "alpha2": "TK", + "country-code": "772" + }, + { + "name": "Tonga", + "alpha2": "TO", + "country-code": "776" + }, + { + "name": "Trinidad and Tobago", + "alpha2": "TT", + "country-code": "780" + }, + { + "name": "Tunisia", + "alpha2": "TN", + "country-code": "788" + }, + { + "name": "Turkey", + "alpha2": "TR", + "country-code": "792" + }, + { + "name": "Turkmenistan", + "alpha2": "TM", + "country-code": "795" + }, + { + "name": "Turks and Caicos Islands", + "alpha2": "TC", + "country-code": "796" + }, + { + "name": "Tuvalu", + "alpha2": "TV", + "country-code": "798" + }, + { + "name": "Uganda", + "alpha2": "UG", + "country-code": "800" + }, + { + "name": "Ukraine", + "alpha2": "UA", + "country-code": "804" + }, + { + "name": "United Arab Emirates", + "alpha2": "AE", + "country-code": "784" + }, + { + "name": "United Kingdom of Great Britain and Northern Ireland", + "alpha2": "GB", + "country-code": "826" + }, + { + "name": "United States of America", + "alpha2": "US", + "country-code": "840" + }, + { + "name": "United States Minor Outlying Islands", + "alpha2": "UM", + "country-code": "581" + }, + { + "name": "Uruguay", + "alpha2": "UY", + "country-code": "858" + }, + { + "name": "Uzbekistan", + "alpha2": "UZ", + "country-code": "860" + }, + { + "name": "Vanuatu", + "alpha2": "VU", + "country-code": "548" + }, + { + "name": "Venezuela (Bolivarian Republic of)", + "alpha2": "VE", + "country-code": "862" + }, + { + "name": "Viet Nam", + "alpha2": "VN", + "country-code": "704" + }, + { + "name": "Virgin Islands (British)", + "alpha2": "VG", + "country-code": "092" + }, + { + "name": "Virgin Islands (U.S.)", + "alpha2": "VI", + "country-code": "850" + }, + { + "name": "Wallis and Futuna", + "alpha2": "WF", + "country-code": "876" + }, + { + "name": "Western Sahara", + "alpha2": "EH", + "country-code": "732" + }, + { + "name": "Yemen", + "alpha2": "YE", + "country-code": "887" + }, + { + "name": "Zambia", + "alpha2": "ZM", + "country-code": "894" + }, + { + "name": "Zimbabwe", + "alpha2": "ZW", + "country-code": "716" + } +] \ No newline at end of file diff --git a/src/bundle/organization/orgContactInterface.php b/src/bundle/organization/orgContactInterface.php index 25314eec0..8c19fef14 100755 --- a/src/bundle/organization/orgContactInterface.php +++ b/src/bundle/organization/orgContactInterface.php @@ -56,4 +56,11 @@ interface orgContactInterface * @action organization/orgContact/create */ public function deleteOrgcontact($orgContact); + + /** + * Get countries codes + * + * @action organization/orgContact/loadCountriesCodes + */ + public function readCountriesCodes(); } diff --git a/src/presentation/maarchRM/Presenter/organization/orgTree.php b/src/presentation/maarchRM/Presenter/organization/orgTree.php index 9b95e4df2..81a973cad 100755 --- a/src/presentation/maarchRM/Presenter/organization/orgTree.php +++ b/src/presentation/maarchRM/Presenter/organization/orgTree.php @@ -71,6 +71,7 @@ class orgTree { $this->view->addContentFile("organization/organizationIndex.html"); $communicationMeans = \laabs::callService("contact/communicationMean/readIndex"); + $countriesCodes = \laabs::callService("organization/orgContact/readCountriesCodes"); $archivalProfile = \laabs::callService('recordsManagement/archivalProfile/readIndex'); $serviceLevel = \laabs::callService('recordsManagement/serviceLevel/readIndex'); @@ -90,6 +91,7 @@ class orgTree $this->view->setSource("orgType", $orgType); $this->view->setSource("orgRole", $orgRole); $this->view->setSource("communicationMeans", $communicationMeans); + $this->view->setSource("countriesCodes", $countriesCodes); $this->view->setSource("archivalProfile", $archivalProfile); $this->view->setSource("serviceLevel", $serviceLevel); $this->view->merge(); diff --git a/src/presentation/maarchRM/Resources/locale/fr/contact/contact.po b/src/presentation/maarchRM/Resources/locale/fr/contact/contact.po index a18f463d3..ea8354d21 100755 --- a/src/presentation/maarchRM/Resources/locale/fr/contact/contact.po +++ b/src/presentation/maarchRM/Resources/locale/fr/contact/contact.po @@ -182,3 +182,5 @@ msgstr "Une adresse portant cette désignation existe déjà." msgid "A communication mean with this purpose already exist." msgstr "Un moyen de communication portant cette désignation existe déjà." +msgid "Select a language" +msgstr "Choisissez un langage" diff --git a/src/presentation/maarchRM/Resources/locale/fr/organization/messages.po b/src/presentation/maarchRM/Resources/locale/fr/organization/messages.po index 1c127a72c..ae9cd57d7 100755 --- a/src/presentation/maarchRM/Resources/locale/fr/organization/messages.po +++ b/src/presentation/maarchRM/Resources/locale/fr/organization/messages.po @@ -351,4 +351,3 @@ msgstr "Niveaux de service par défaut" msgid "Service level" msgstr "Niveaux de service " - diff --git a/src/presentation/maarchRM/Resources/view/contact/manageContact/addressForm.html b/src/presentation/maarchRM/Resources/view/contact/manageContact/addressForm.html index fc858a2be..434f0d59d 100755 --- a/src/presentation/maarchRM/Resources/view/contact/manageContact/addressForm.html +++ b/src/presentation/maarchRM/Resources/view/contact/manageContact/addressForm.html @@ -87,8 +87,17 @@
    - - +
    +
    @@ -214,6 +223,10 @@ } }); + if ($('#country')) { + address['country'] = $('#country').val(); + } + return address; }, -- GitLab From dbc7d5508cdb8b5249393578dbd36fe87a955b0f Mon Sep 17 00:00:00 2001 From: Alexis Ragot Date: Tue, 6 Mar 2018 08:48:10 +0100 Subject: [PATCH 19/25] fixed the hide event modal action --- .../recordsManagement/archive/modalModification.html | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/presentation/maarchRM/Resources/view/recordsManagement/archive/modalModification.html b/src/presentation/maarchRM/Resources/view/recordsManagement/archive/modalModification.html index 806356128..55af0b385 100755 --- a/src/presentation/maarchRM/Resources/view/recordsManagement/archive/modalModification.html +++ b/src/presentation/maarchRM/Resources/view/recordsManagement/archive/modalModification.html @@ -293,8 +293,13 @@ success : function (response) { gritter.show(response.message, response.status, response.errors); if (response.status) { - $('#archive_search').click(); ModificationModal.close(); + ModificationModal.modal.one('hidden.bs.modal', function () { + console.log("passage"); + //$('#modificationModal').modal();* + $('#archive_search').click(); + }); + } }, error : function(response) { @@ -304,8 +309,8 @@ }, close: function() { - this.modal.find('input, textarea').val(''); - this.modal.modal('hide'); + ModificationModal.modal.find('input, textarea').val(''); + ModificationModal.modal.modal('hide'); }, loadAccessCode: function() { -- GitLab From dfad591050a08709002808e85f81aea932d02b3d Mon Sep 17 00:00:00 2001 From: Correia Lopes Dylan Date: Wed, 7 Mar 2018 10:54:11 +0100 Subject: [PATCH 20/25] #7318 hide button organization if the user it's not owner or superadmin --- .../maarchRM/Presenter/organization/orgTree.php | 7 +++++++ .../Resources/view/organization/organizationIndex.html | 1 + 2 files changed, 8 insertions(+) diff --git a/src/presentation/maarchRM/Presenter/organization/orgTree.php b/src/presentation/maarchRM/Presenter/organization/orgTree.php index 9b95e4df2..85b3bc50f 100755 --- a/src/presentation/maarchRM/Presenter/organization/orgTree.php +++ b/src/presentation/maarchRM/Presenter/organization/orgTree.php @@ -79,6 +79,12 @@ class orgTree return strcmp($a->reference, $b->reference); }); + if(\laabs::getToken("ORGANIZATION")){ + $addOrganizationRight = in_array('owner',\laabs::getToken("ORGANIZATION")->orgRoleCodes); + } else { + $addOrganizationRight = true; + } + $adminOrg = \laabs::callService('auth/userAccount/readHasprivilege', "adminFunc/adminOrganization"); $adminUser = \laabs::callService('auth/userAccount/readHasprivilege', "adminFunc/adminOrgUser"); $adminContact = \laabs::callService('auth/userAccount/readHasprivilege', "adminFunc/adminOrgContact"); @@ -92,6 +98,7 @@ class orgTree $this->view->setSource("communicationMeans", $communicationMeans); $this->view->setSource("archivalProfile", $archivalProfile); $this->view->setSource("serviceLevel", $serviceLevel); + $this->view->setSource("addOrganizationRight", $addOrganizationRight); $this->view->merge(); $this->view->translate(); diff --git a/src/presentation/maarchRM/Resources/view/organization/organizationIndex.html b/src/presentation/maarchRM/Resources/view/organization/organizationIndex.html index 687a25825..df26d72d6 100755 --- a/src/presentation/maarchRM/Resources/view/organization/organizationIndex.html +++ b/src/presentation/maarchRM/Resources/view/organization/organizationIndex.html @@ -18,6 +18,7 @@
    + -- GitLab From 324c00289c1176101a87bd819378086768c3548f Mon Sep 17 00:00:00 2001 From: Alexandre Morin Date: Wed, 7 Mar 2018 16:43:23 +0100 Subject: [PATCH 21/25] #7314 - Changing checkRights function --- src/bundle/recordsManagement/Controller/archive.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/bundle/recordsManagement/Controller/archive.php b/src/bundle/recordsManagement/Controller/archive.php index 86940b561..f37009a4e 100755 --- a/src/bundle/recordsManagement/Controller/archive.php +++ b/src/bundle/recordsManagement/Controller/archive.php @@ -610,7 +610,7 @@ class archive $currentOrganization = \laabs::getToken("ORGANIZATION"); - $userOrgList = []; + //$userOrgList = []; $positionController = null; if (!$currentOrganization) { @@ -621,15 +621,15 @@ class archive return true; } - if ($account->accountType == "user") { + /*if ($account->accountType == "user") { $positionController = $this->userPositionController; } else { $positionController = $this->servicePositionController; } - $userOrgList = $positionController->listMyServices(); + $userOrgList = $positionController->listMyServices();*/ - if (!(in_array($archive->originatorOrgRegNumber, $userOrgList) || in_array($archive->archiverOrgRegNumber, $userOrgList))) { + if (($archive->originatorOrgRegNumber != $currentOrganization->registrationNumber) || ($archive->archiverOrgRegNumber == $currentOrganization->registrationNumber)) { throw \laabs::newException('recordsManagement/accessDeniedException', "Permission denied"); } -- GitLab From a3e28df8ce31818a2e7158ece965544d4b1cb6d1 Mon Sep 17 00:00:00 2001 From: Alexandre Morin Date: Wed, 7 Mar 2018 17:07:45 +0100 Subject: [PATCH 22/25] #7368 - Scheduling --- .../view/batchProcessing/scheduling/schedulingForm.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/presentation/maarchRM/Resources/view/batchProcessing/scheduling/schedulingForm.html b/src/presentation/maarchRM/Resources/view/batchProcessing/scheduling/schedulingForm.html index fb8e1ab41..065322f01 100755 --- a/src/presentation/maarchRM/Resources/view/batchProcessing/scheduling/schedulingForm.html +++ b/src/presentation/maarchRM/Resources/view/batchProcessing/scheduling/schedulingForm.html @@ -612,9 +612,9 @@ let route = $('#taskId').find('option:selected').data('route'); $('#serviceAccountId option').each(function(key, value) { - let privileges = $(this).data('privilege'); + var privileges = $(this).data('privilege'); - if (!privileges || $.inArray(route, privileges) === -1) { + if (!privileges || ($.inArray(route, privileges) === -1 && $.inArray("*", privileges) === -1)) { $(this).addClass('hide'); } else { $(this).removeClass('hide'); -- GitLab From 6ee6c436feaeb2aa1ff2461d485f42ef739405c4 Mon Sep 17 00:00:00 2001 From: Alexandre Morin Date: Thu, 8 Mar 2018 12:05:50 +0100 Subject: [PATCH 23/25] #7368 - Path in lowercase --- .../batchProcessing/scheduling/schedulingForm.html | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/presentation/maarchRM/Resources/view/batchProcessing/scheduling/schedulingForm.html b/src/presentation/maarchRM/Resources/view/batchProcessing/scheduling/schedulingForm.html index 065322f01..11f3a34c8 100755 --- a/src/presentation/maarchRM/Resources/view/batchProcessing/scheduling/schedulingForm.html +++ b/src/presentation/maarchRM/Resources/view/batchProcessing/scheduling/schedulingForm.html @@ -609,11 +609,17 @@ }, checkServiceAccount: function() { - let route = $('#taskId').find('option:selected').data('route'); + var route = $('#taskId').find('option:selected').data('route').toLowerCase(); - $('#serviceAccountId option').each(function(key, value) { + $('#serviceAccountId option').each(function() { var privileges = $(this).data('privilege'); + if (privileges) { + for (var i = 0; i < privileges.length; i++) { + privileges[i] = privileges[i].toLowerCase(); + } + } + if (!privileges || ($.inArray(route, privileges) === -1 && $.inArray("*", privileges) === -1)) { $(this).addClass('hide'); } else { -- GitLab From f1597a612485c4a6ff2e6af35611d9460cac16be Mon Sep 17 00:00:00 2001 From: Alexandre Morin Date: Fri, 16 Mar 2018 10:46:03 +0100 Subject: [PATCH 24/25] Fix : #7344 - Change of name and disposition --- .../maarchRM/Resources/locale/fr/medona/messages.po | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/presentation/maarchRM/Resources/locale/fr/medona/messages.po b/src/presentation/maarchRM/Resources/locale/fr/medona/messages.po index b91d0a401..affb9df07 100755 --- a/src/presentation/maarchRM/Resources/locale/fr/medona/messages.po +++ b/src/presentation/maarchRM/Resources/locale/fr/medona/messages.po @@ -621,6 +621,6 @@ msgid "Code" msgstr "Nom de la règle" msgctxt "meta-data" -msgid "Default originator" -msgstr "Service producteur par défaut" +msgid "Default control authority" +msgstr "Autorité de contrôle par défaut" -- GitLab From 7c0533b4594229f47629175224ab9545ef3e222f Mon Sep 17 00:00:00 2001 From: esomeblad Date: Fri, 16 Mar 2018 11:08:19 +0100 Subject: [PATCH 25/25] translations' edition --- src/presentation/maarchRM/Resources/locale/fr/auth/messages.po | 2 +- .../Resources/locale/fr/digitalResource/conversionRule.po | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/presentation/maarchRM/Resources/locale/fr/auth/messages.po b/src/presentation/maarchRM/Resources/locale/fr/auth/messages.po index 235c396bc..de17df26c 100755 --- a/src/presentation/maarchRM/Resources/locale/fr/auth/messages.po +++ b/src/presentation/maarchRM/Resources/locale/fr/auth/messages.po @@ -476,7 +476,7 @@ msgid "Service account created" msgstr "Compte de service créé" msgid "Service already exist" -msgstr "Le service existe déjà." +msgstr "Le compte existe déjà." msgid "Last login date" msgstr "Date de la dernière connexion" diff --git a/src/presentation/maarchRM/Resources/locale/fr/digitalResource/conversionRule.po b/src/presentation/maarchRM/Resources/locale/fr/digitalResource/conversionRule.po index eff0b455f..098142fac 100755 --- a/src/presentation/maarchRM/Resources/locale/fr/digitalResource/conversionRule.po +++ b/src/presentation/maarchRM/Resources/locale/fr/digitalResource/conversionRule.po @@ -21,7 +21,7 @@ msgid "Select a format" msgstr "Sélectionnez un format" msgid "Edit a new conversion rule" -msgstr "Éditer une nouvelle règle de conversion" +msgstr "Créer une nouvelle règle de conversion" msgid "Puid is empty" msgstr "Le PuID est vide" -- GitLab