diff --git a/data/maarchRM/conf/configuration.ini.default b/data/maarchRM/conf/configuration.ini.default index d888df82b113e3509daab16a6f42abe2b719fac9..bea0be42fc124b8a336693eb5116d227a9bda068 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 }" diff --git a/dependency/html/Document.php b/dependency/html/Document.php index 7ef173ccf75ee5f310f0feac5e43f2b090e62ef2..d4b7e27ccf4f62b665eb6daf165ece6a9822074f 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/bundle/audit/Observer/logger.php b/src/bundle/audit/Observer/logger.php index 43546a0c69c696d5347910f9e0ecb81dd39cf558..53ef2ab762dd54517a1ffa501ac34367af41b718 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/auth/Controller/ForgotAccountTrait.php b/src/bundle/auth/Controller/ForgotAccountTrait.php index af5f71bb481bfc240a8b82e3bde2c09c3f010d69..982ed34aca8c76bf3e548a5e94fb6270cfad31e3 100644 --- a/src/bundle/auth/Controller/ForgotAccountTrait.php +++ b/src/bundle/auth/Controller/ForgotAccountTrait.php @@ -41,35 +41,41 @@ 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) { + \laabs::notify(LAABS_BUSINESS_EXCEPTION, $e); + } return $result; } diff --git a/src/bundle/auth/Message/newUserAccount.php b/src/bundle/auth/Message/newUserAccount.php index c19a7ed779ae1d9bcd0e5524e6d7374a88a88f2f..c8107fc6950e5c19274b77f15dd7662fc2bc5f2a 100755 --- a/src/bundle/auth/Message/newUserAccount.php +++ b/src/bundle/auth/Message/newUserAccount.php @@ -31,7 +31,7 @@ class newUserAccount { /** * @var string - * @pattern #^[A-Za-z][A-Za-z0-9_.@-]*[A-Za-z]$# + * @pattern #^[A-Za-z][A-Za-z0-9_.@-]*$# * @notempty */ public $accountName; diff --git a/src/bundle/auth/Message/userAccountUpdate.php b/src/bundle/auth/Message/userAccountUpdate.php index e2d34efbd6206fb75f61732587ad209252aaf722..29b5c57d4809e72d4a49cc0676f949764e6bbf4b 100755 --- a/src/bundle/auth/Message/userAccountUpdate.php +++ b/src/bundle/auth/Message/userAccountUpdate.php @@ -39,7 +39,7 @@ class userAccountUpdate /** * @var string - * @pattern #^[A-Za-z][A-Za-z0-9_.@-]*[A-Za-z]$# + * @pattern #^[A-Za-z][A-Za-z0-9_.@-]*$# * @notempty */ public $accountName; diff --git a/src/bundle/batchProcessing/Controller/scheduling.php b/src/bundle/batchProcessing/Controller/scheduling.php index 7286002952cd83435093f5c73723b5920def898d..9033833e0883ff3dd573bf133bac6ca1677fce6b 100755 --- a/src/bundle/batchProcessing/Controller/scheduling.php +++ b/src/bundle/batchProcessing/Controller/scheduling.php @@ -181,17 +181,22 @@ 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) { + + \laabs::notify(LAABS_SERVICE_RETURN, $info); + } catch (\Exception $info) { $this->changeStatus($schedulingId, "error"); $status = false; - $info = $e; - } + + \laabs::notify(LAABS_BUSINESS_EXCEPTION, $info); + } if ($status) { $scheduling->lastExecution = \laabs::newDateTime(null, 'UTC'); @@ -305,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; } @@ -314,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")); @@ -336,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")); @@ -362,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")); diff --git a/src/bundle/organization/Controller/orgContact.php b/src/bundle/organization/Controller/orgContact.php index 8cc8e7f0ae4eee84c79ed3e8bd95b8741b483ffd..f49ed2240724d4ae8fbcb94dbd8dfce023bcb4c1 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 0000000000000000000000000000000000000000..f29dd7f282e696dca93813da335bdcba55f88b06 --- /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 25314eec0267283385fb3a7b64cd770ddeb59ad9..8c19fef149b9ad996a46fc788fa9e6768dc0cfeb 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/bundle/recordsManagement/Controller/archive.php b/src/bundle/recordsManagement/Controller/archive.php index 86940b561e7577555ad0c73295515a6538d603f9..f37009a4ec9cdc99ede0b687523e6ae90d2f9249 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"); } diff --git a/src/bundle/recordsManagement/Controller/archiveAccessTrait.php b/src/bundle/recordsManagement/Controller/archiveAccessTrait.php index ed37b70d2b8bac4fadd388e78e65a1c389560298..83b114209bb670074365e853ffd7702fc2e3d776 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 b5c82bbfb1450ebe812a00fd32882ddeca087873..3b280d1919b71eab3e1e1145b7be4efdeec584f4 100755 --- a/src/bundle/recordsManagement/Controller/archiveCommunicationTrait.php +++ b/src/bundle/recordsManagement/Controller/archiveCommunicationTrait.php @@ -103,9 +103,10 @@ trait archiveCommunicationTrait $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'); @@ -214,6 +215,7 @@ trait archiveCommunicationTrait 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 8070087288c0aec7b6e94f821e54b7e932d0b705..d08ce1f63e9e86653f9f8d925c7291d470dd16fa 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); diff --git a/src/bundle/recordsManagement/Message/archivalProfile.php b/src/bundle/recordsManagement/Message/archivalProfile.php index a1d6f0e0e9e0ebf0a05354245e1e005f5d21f1e8..97fa2c5199c9b4f108c4e33e1f6be9804afdb701 100755 --- a/src/bundle/recordsManagement/Message/archivalProfile.php +++ b/src/bundle/recordsManagement/Message/archivalProfile.php @@ -38,7 +38,7 @@ class archivalProfile * The reference * * @var string - * @pattern #^[A-Za-z][A-Za-z0-9_.@-]*[A-Za-z]$# + * @pattern #^[A-Za-z][A-Za-z0-9_.@-]*$# * @notempty */ public $reference; diff --git a/src/presentation/maarchRM/Presenter/Exception.php b/src/presentation/maarchRM/Presenter/Exception.php index b1441e9012cd67e03010cf7124f18d4b7f74b0fa..876e4abafd365085564bca4bf1d390c69ae2e149 100755 --- a/src/presentation/maarchRM/Presenter/Exception.php +++ b/src/presentation/maarchRM/Presenter/Exception.php @@ -94,21 +94,26 @@ class Exception if (isset($exception->errors)) { $errors = []; foreach ($exception->errors as $error) { - $error->setMessage($this->translator->getText($error->getFormat())); + 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 = []; + $variables = []; - $errorVariables = $error->getVariables(); - if (is_array($errorVariables)) { - foreach ($errorVariables as $name => $value) { - $name = $this->translator->getText($name); - $value = $this->translator->getText($value); - $variables[$name] = $value; + $errorVariables = $error->getVariables(); + if (is_array($errorVariables)) { + foreach ($errorVariables as $name => $value) { + $name = $this->translator->getText($name); + $value = $this->translator->getText($value); + $variables[$name] = $value; + } } + $error->setVariables($variables); + $errors[] = $error; } - $error->setVariables($variables); - - $errors[] = $error; } $this->json->errors = $errors; } diff --git a/src/presentation/maarchRM/Presenter/auth/user.php b/src/presentation/maarchRM/Presenter/auth/user.php index 9a82597140d5356c948c6940cabe8e1b74a7f805..c161c0a14d3edb6b59e9f4a09c3fdaeaf493ac79 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/Presenter/organization/orgTree.php b/src/presentation/maarchRM/Presenter/organization/orgTree.php index 9b95e4df245146a079549086c0b1f773bb137c56..7dbbf06684bc710bfbe8d7c236586f55499993e0 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'); @@ -79,6 +80,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"); @@ -90,8 +97,10 @@ 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->setSource("addOrganizationRight", $addOrganizationRight); $this->view->merge(); $this->view->translate(); diff --git a/src/presentation/maarchRM/Resources/locale/fr/audit/messages.po b/src/presentation/maarchRM/Resources/locale/fr/audit/messages.po index 262e17cf94d067e408ab726e4537c49a56dfac1d..7761643110c3d6bea680fc1a0788ee69b8abc3ac 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/auth/messages.po b/src/presentation/maarchRM/Resources/locale/fr/auth/messages.po index 24919183d388cfd30f9e5431c914a6d436261494..de17df26c4320f776846728355906c9203947ae6 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" @@ -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/locale/fr/contact/contact.po b/src/presentation/maarchRM/Resources/locale/fr/contact/contact.po index a18f463d3f5f0d7673a172532ac4f71654faa6ad..ea8354d215e1b00e557ae430848fdee55ae5184b 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/digitalResource/conversionRule.po b/src/presentation/maarchRM/Resources/locale/fr/digitalResource/conversionRule.po index eff0b455f30202ea5f15389f7a41042f41343b4d..098142facaf8dc8ad38e9eb4995d86b7ebe17db2 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" diff --git a/src/presentation/maarchRM/Resources/locale/fr/medona/archivalAgreement.po b/src/presentation/maarchRM/Resources/locale/fr/medona/archivalAgreement.po index b020bc06066ae3b0c01a308a9a3d569a9d815d3b..9e2bf671b50062c9d7fd9cb60b7f1420d6e72f23 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/locale/fr/medona/messages.po b/src/presentation/maarchRM/Resources/locale/fr/medona/messages.po index b91d0a40157feb4e025750e8461151671e8616ff..affb9df0785e3f80652f9e1909540bfe79af24f1 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" diff --git a/src/presentation/maarchRM/Resources/locale/fr/organization/messages.po b/src/presentation/maarchRM/Resources/locale/fr/organization/messages.po index 1c127a72ce91c9c84b01edf8b365e889ac59cabe..ae9cd57d77302918d3d17641d0eb716fb2dc97ce 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/public/css/style.css b/src/presentation/maarchRM/Resources/public/css/style.css index 176aabcf528169dc894c0e2bd5634e228bdd703c..e8d05ea1b3b2288e99998144849f64e9c6ca1fa5 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/public/less/dashboard/style.less b/src/presentation/maarchRM/Resources/public/less/dashboard/style.less index a8a0441227d4ff0dde487413840ce7defbd056c8..c4d2ff29aeee499e2e0c97bcba4dbfadd74da78c 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 6ceed385c99de322c56f218af6b23f2c38b999ac..a2a85cf7a3c9debb58f04b235aa32cf1b426e5ae 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 +