From 7ffa8c9bcaf8d76560869b23724e1108a9fa0f2a Mon Sep 17 00:00:00 2001 From: Ahonen Mika J Date: Tue, 2 Mar 2021 17:10:56 +0200 Subject: [PATCH 1/5] Sends a feedback with a Subject field. Next steps: language support/unittests --- controller/WebController.php | 15 +++++---------- resource/js/docready.js | 2 +- view/feedback.twig | 2 ++ 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/controller/WebController.php b/controller/WebController.php index 0b41b6ecd..c7708b0f0 100644 --- a/controller/WebController.php +++ b/controller/WebController.php @@ -213,18 +213,16 @@ public function invokeFeedbackForm($request) } $feedbackName = $request->getQueryParamPOST('name'); $feedbackEmail = $request->getQueryParamPOST('email'); + $msgSubject = $request->getQueryParamPOST('msgsubject'); $feedbackVocab = $request->getQueryParamPOST('vocab'); - $feedbackVocabEmail = ($feedbackVocab !== null && $feedbackVocab !== '') ? $this->model->getVocabulary($feedbackVocab)->getConfig()->getFeedbackRecipient() : null; - // if the hidden field has been set a value we have found a spam bot // and we do not actually send the message. if ($this->honeypot->validateHoneypot($request->getQueryParamPOST('item-description')) && $this->honeypot->validateHoneytime($request->getQueryParamPOST('user-captcha'), $this->model->getConfig()->getHoneypotTime())) { - $this->sendFeedback($request, $feedbackMsg, $feedbackName, $feedbackEmail, $feedbackVocab, $feedbackVocabEmail); + $this->sendFeedback($request, $feedbackMsg, $feedbackName, $feedbackEmail, $feedbackVocab, $feedbackVocabEmail, $msgSubject); } - echo $template->render( array( 'languages' => $this->languages, @@ -245,7 +243,6 @@ private function createFeedbackHeaders($fromName, $fromEmail, $toMail, $sender) if (!empty($fromEmail)) { $headers .= "Reply-To: $fromName <$fromEmail>\r\n"; } - $service = $this->model->getConfig()->getServiceName(); return $headers . "From: $fromName via $service <$sender>"; } @@ -253,11 +250,12 @@ private function createFeedbackHeaders($fromName, $fromEmail, $toMail, $sender) /** * Sends the user entered message through the php's mailer. * @param string $message only required parameter is the actual message. + * @param string $messageSubject from the sender. * @param string $fromName senders own name. * @param string $fromEmail senders email address. * @param string $fromVocab which vocabulary is the feedback related to. */ - public function sendFeedback($request, $message, $fromName = null, $fromEmail = null, $fromVocab = null, $toMail = null) + public function sendFeedback($request, $message, $fromName = null, $fromEmail = null, $fromVocab = null, $toMail = null, $messageSubject) { $toAddress = ($toMail) ? $toMail : $this->model->getConfig()->getFeedbackAddress(); if ($fromVocab !== null && $fromVocab !== '') { @@ -265,7 +263,6 @@ public function sendFeedback($request, $message, $fromName = null, $fromEmail = } $envelopeSender = $this->model->getConfig()->getFeedbackEnvelopeSender(); - $subject = $this->model->getConfig()->getServiceName() . " feedback"; // determine the sender address of the message $sender = $this->model->getConfig()->getFeedbackSender(); if (empty($sender)) $sender = $envelopeSender; @@ -273,10 +270,8 @@ public function sendFeedback($request, $message, $fromName = null, $fromEmail = // determine sender name - default to "anonymous user" if not given by user if (empty($fromName)) $fromName = "anonymous user"; - $headers = $this->createFeedbackHeaders($fromName, $fromEmail, $toMail, $sender); $params = empty($envelopeSender) ? '' : "-f $envelopeSender"; - // adding some information about the user for debugging purposes. $message = $message . "

Debugging information:" . "
Timestamp: " . date(DATE_RFC2822) @@ -284,7 +279,7 @@ public function sendFeedback($request, $message, $fromName = null, $fromEmail = . "
Referer: " . $request->getServerConstant('HTTP_REFERER'); try { - mail($toAddress, $subject, $message, $headers, $params); + mail($toAddress, $messageSubject, $message, $headers, $params); } catch (Exception $e) { header("HTTP/1.0 404 Not Found"); $template = $this->twig->loadTemplate('error-page.twig'); diff --git a/resource/js/docready.js b/resource/js/docready.js index 2300065e3..bf662f386 100644 --- a/resource/js/docready.js +++ b/resource/js/docready.js @@ -712,7 +712,7 @@ $(function() { // DOCUMENT READY // changes the response so it can be easily displayed in the handlebars template. filter: function(data) { // looping the matches to see if there are hits where the concept has been hit by a property other than hiddenLabel - var hasNonHiddenMatch = {}; + var hasNonHiddenMatch = {feedback}; for (var i = 0; i < data.results.length; i++) { var hit = data.results[i]; if (!hit.hiddenLabel) { diff --git a/view/feedback.twig b/view/feedback.twig index f5869e9be..f385aae95 100644 --- a/view/feedback.twig +++ b/view/feedback.twig @@ -35,6 +35,8 @@

{% trans %}E-mail:{% endtrans %}

+

{% trans %}Subject:{% endtrans %}

+

{% trans %}Message:{% endtrans %} *

{{ honeypot.generate('item-description', 'user-captcha')|raw }} From 96fd12fec412cc9e36854892b41fe64235ff5a25 Mon Sep 17 00:00:00 2001 From: Ahonen Mika J Date: Wed, 3 Mar 2021 11:32:49 +0200 Subject: [PATCH 2/5] Language support for Finnish, English and Swedish added. Next stepes: Unittests and review --- .../translations/en/LC_MESSAGES/skosmos.mo | Bin 13102 -> 13184 bytes .../translations/fi/LC_MESSAGES/skosmos.mo | Bin 13384 -> 13461 bytes resource/translations/skosmos_en.po | 6 ++++++ resource/translations/skosmos_fi.po | 6 ++++++ resource/translations/skosmos_sv.po | 6 ++++++ .../translations/sv/LC_MESSAGES/skosmos.mo | Bin 13258 -> 13338 bytes view/feedback.twig | 2 +- 7 files changed, 19 insertions(+), 1 deletion(-) diff --git a/resource/translations/en/LC_MESSAGES/skosmos.mo b/resource/translations/en/LC_MESSAGES/skosmos.mo index e0701302490141b43c661981086faf2c207ecefc..265d0a24e1293933283a5c53a30fe5776ef23a16 100644 GIT binary patch delta 4344 zcmZYA3v5@_0mtzJw53#PUqfI_M|s#nTfh!PAb@dJ?|dQ4p-+Vld#8O|uTVEOWt4Gp$)PVf%jjKTVeGroaE^oO|#8Jn#K? z|NJ!z5{+_1JdWI#2o1?Xco*Aq;g5I~Ucw&u59BXo(^?+(K*kboMDH7g-EeX| ze-ApaHE4%xqkFL{_48;ypI{FChcDuVG+KA0-SK)HfF)Rgj<^~-<3_aOUFb|-!W2A? zF52tp{b#WVFW?Yt_l@L=499Dzmt#lz4+|(1U?sZ5&tWm1kLUk`eW@383ZXwvLTB&@ zGWM_@?eKYY=DW}>*^Adg^7I7cUXv5VjeWq2Izpe>EM)LH1j`k?ofB7fm#KHRb?omu~HQ>f%bDQ-rW@-1`=-ocg; zqkHZXMjs&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paZN!>#s$h zmCa~>yHoij946t@{yGlF)97(4U^*`8VD$bNw4=#54i_NLRXC1=@FPsa{649rzZ&hh zCOQFIUu@_WFTyO(e?5r~6l{t&wxJ_!LOX6j_v&Qyee6j7BlLUcqyI(+5c;O-r(=7v z-O!cHL)$HiR$v$U4?{`V;AphL+tH4vVkex3-mi-$Xv3?~dh28US#*zgpffy)ws!`7 zNY7z9{s&tJO66oE1?eQt;aIezYMwYN3`OdO5$K-HNAIt|Y1n`_;3wD_OL^iPPzAbm zH=_f&1ATVpqNi*%I-nh8tiKOeGX=cF!aLXnFQ9w-6*}UA^3;q=&@Yyu0~~^$=UdR3 zPKxEz(51c`ZSNtpodli0O8f%Xm9zd9JbG3ZsLNcUQPIdM`Tg24v-jh0P?YDAb=O|^bp6OQ5I#1pabC9EfU6VJx7-!|4~7L|-4=R@x`K1FyGUm<*E z_7F!JPi5vOFOd2JF_rNA93;G^6E4k*1gjLb5zi106K$7!S4Z4L+(Fz-+)8+TGesDM z?)ie4_pDDQe9iKLNy1a{Mlrf4za}n^WwM5NFy?ng+gL$jF|m$#fY?p6U0X(CBz|OAJKMwhs2zi`3;uDbS)kyt|d0avO94i zv6iUvAQii=s`TUiC;BvZ{vRc8 BhlKzD diff --git a/resource/translations/fi/LC_MESSAGES/skosmos.mo b/resource/translations/fi/LC_MESSAGES/skosmos.mo index 91a1cdb81a631ad2472f6859d8e5c36c01e65e41..2c265d006f6422b3951ce1833e0be99badc15f63 100644 GIT binary patch delta 4331 zcmYk;dvwob0LSr%ZT8!2cEf}+m)WqnESK7BtE0J%Hg`2-%h(i#sZf2zTpQAih)Lv< z%P_e$Oj9GBIi{ofgItc&Ip}mjIz{#V?ECDTzQ<>;=lR~A>vwY|r#RQS66#%SIL?xm zWI_XD0_z#GJ3wcRxf*OtTfBxn&?m$gFHArmOh$i9!Dg6_ewd4)I1__#5k}$~^k6x1 zpJTps3+6ofa^VMTh}W$lxG3qs_ zcJ5#Z?VEe{LId8eo+AY4R1q@^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myv4T>jTiH^Z#{% trans %}E-mail:{% endtrans %}

{% trans %}Subject:{% endtrans %}

- +

{% trans %}Message:{% endtrans %} *

{{ honeypot.generate('item-description', 'user-captcha')|raw }} From f35050c20b1bd8b3ac43d4d0e9279674cf958a95 Mon Sep 17 00:00:00 2001 From: Ahonen Mika J Date: Wed, 3 Mar 2021 18:39:18 +0200 Subject: [PATCH 3/5] Some WCAG 2.1 AA level improvements added to the feedback form --- controller/WebController.php | 3 ++- resource/css/styles.css | 18 ++++++++----- resource/js/docready.js | 2 +- .../translations/en/LC_MESSAGES/skosmos.mo | Bin 13184 -> 13248 bytes .../translations/fi/LC_MESSAGES/skosmos.mo | Bin 13461 -> 13530 bytes resource/translations/skosmos_en.po | 3 +++ resource/translations/skosmos_fi.po | 3 +++ resource/translations/skosmos_sv.po | 3 +++ .../translations/sv/LC_MESSAGES/skosmos.mo | Bin 13338 -> 13403 bytes tests/testconfig-fordefaults.ttl | 3 +-- view/feedback.twig | 25 +++++++++++------- 11 files changed, 39 insertions(+), 21 deletions(-) diff --git a/controller/WebController.php b/controller/WebController.php index c7708b0f0..11e5f3894 100644 --- a/controller/WebController.php +++ b/controller/WebController.php @@ -213,7 +213,8 @@ public function invokeFeedbackForm($request) } $feedbackName = $request->getQueryParamPOST('name'); $feedbackEmail = $request->getQueryParamPOST('email'); - $msgSubject = $request->getQueryParamPOST('msgsubject'); + $msgSubject = $this->model->getConfig()->getServiceName() . ": "; + $msgSubject .= $request->getQueryParamPOST('msgsubject'); $feedbackVocab = $request->getQueryParamPOST('vocab'); $feedbackVocabEmail = ($feedbackVocab !== null && $feedbackVocab !== '') ? $this->model->getVocabulary($feedbackVocab)->getConfig()->getFeedbackRecipient() : null; diff --git a/resource/css/styles.css b/resource/css/styles.css index cb28d3dc9..5ec7f9508 100644 --- a/resource/css/styles.css +++ b/resource/css/styles.css @@ -5,6 +5,10 @@ li, td > a { font-size: 14px; } +label { + font-weight: normal; +} + h1, .prefLabel, .prefLabelLang, .notation { font-family: 'Fira Sans', sans-serif; font-size: 24px; @@ -667,7 +671,7 @@ span.xl-pref-label > img { .welcome-box, .right-box, #vocabulary-list { vertical-align: top; } - + .welcome-box { background-color: #ffffff; display: inline-block; @@ -2000,7 +2004,7 @@ body, .versal, h1, h2, h3, p, .versal-bold { margin: 2px 0 0 0; line-height: 30px; } - + .concept-main > .row > .property-label-pref { margin-top: 10px; line-height: 20px; @@ -2022,7 +2026,7 @@ body, .versal, h1, h2, h3, p, .versal-bold { margin: 0; width: 100%; } - + .headerbar-coloured { overflow: hidden; } @@ -2034,7 +2038,7 @@ body, .versal, h1, h2, h3, p, .versal-bold { } @media (max-width: 800px) { - + .twitter-typeahead { width: 100%; } @@ -2103,7 +2107,7 @@ body, .versal, h1, h2, h3, p, .versal-bold { .right-box { display: inline; } - + .voclist-wide > .right-box { left: 0; top: 425px; @@ -2161,12 +2165,12 @@ body, .versal, h1, h2, h3, p, .versal-bold { .frontpage > .welcome-box, .frontpage > .right-box { width: 200px; } - + .voclist #vocabulary-list { margin-left: 20px; width: calc(100% - 225px); } - + .voclist-right #vocabulary-list { margin-left: 20px; width: auto; diff --git a/resource/js/docready.js b/resource/js/docready.js index bf662f386..2300065e3 100644 --- a/resource/js/docready.js +++ b/resource/js/docready.js @@ -712,7 +712,7 @@ $(function() { // DOCUMENT READY // changes the response so it can be easily displayed in the handlebars template. filter: function(data) { // looping the matches to see if there are hits where the concept has been hit by a property other than hiddenLabel - var hasNonHiddenMatch = {feedback}; + var hasNonHiddenMatch = {}; for (var i = 0; i < data.results.length; i++) { var hit = data.results[i]; if (!hit.hiddenLabel) { diff --git a/resource/translations/en/LC_MESSAGES/skosmos.mo b/resource/translations/en/LC_MESSAGES/skosmos.mo index 265d0a24e1293933283a5c53a30fe5776ef23a16..a7cf4c9c83fa4569790d9da8b7d95d7715b02016 100644 GIT binary patch delta 4359 zcmZYAd6ZUV0mtzN7=~?znE@G=AsE@0VG#vHbIAZ9Ap}{=l9z$d7=&14k-UIFfRHl7 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4L-0 zJ8}tK;|#u8>v`z)v1o_xL_0JCU805Pdn(ZZuEtaRZK*~-@7V*H{{jkY_^so2UyttQ zL(xX0&2Su@f%E8Q`v*GGbpAlNIeVcE7or^-htAYA^tpxTZ^mUf1XrLPuN#y|PE~!p z;TZa&7IfF1jW_-cZO}i3Hjsrwt;YHkbZRTm4n2%^yc&Jq%jh4YH?a`Up#$xnpgZj& zK&Pq@y-FWORyWpbgK%F}ML8;Spq3!%1}QFQ6Ux0!LzhTGuH^+hHYoJyA!& z9vwkHp9|>jzJzuporUUxJ<*QzM)$yAbS6sBj+e*l3y?NLC8l64djD2*CJv!X(~Mnd zKb)oDCj0=M;>+mTq%zEJ;5BGN_o7QuiFW8I^!{g&?GU!(bUcbae|3Ix#Cb?Vp&WhB zY)r$Y?XvzWDcGa6=u~b&N3;`t;1H(a@6qdL(6w$ur}}er#<~ql&QO0$rJj%8Ux?js zET-e_Xov2yPWz#pLK@CRd%g%A>7!^zHlZVa0ljZ`Jij0P%$nl$lW2$DMejS0K7SEy z@CpvVl;O!G8G;FK98bX!O+2YsLdXX0W!k4@^K;FntX5bg1mcw=T^a&7yf501kOoQ(7(Oh-Gq8n419 z(GJwa^Lt{wKGu&%PojISwUGHwr*M%IPVv9c7hS=ln8r6_gDvPUo>ug8{REwfPNR}* zn}M0sbI{M~I<$cjycK7m@2x>rA?!f+)`teO1VP^Fu8Ke{=0dA81Kl2p^+U ze;J*^&a`5^7_Co48(NE$UMS-M#681hu>ZgvX`(d;YIR1d4zNv z85ABR#bge-jri-+ix-CAE#ys-63@MX)nsX`?~Zn` zj>3<~Pe>(snRFa=6n;g%NBpcj?kBUz2J$f3O#7jPf`=Q&9LZG zA}!=rvbE+wkKDv!O81f)@+4s!w|^LAm`h$Ghe*eC*6Cuk!4MNkcbf{STGE BkCgxb diff --git a/resource/translations/skosmos_en.po b/resource/translations/skosmos_en.po index cda4767ca..0ddbf8457 100644 --- a/resource/translations/skosmos_en.po +++ b/resource/translations/skosmos_en.po @@ -845,3 +845,6 @@ msgstr "Subject:" msgid "Write a subject" msgstr "Write a subject" + +msgid "Select a vocabulary" +msgstr "You can select a vocabulary" diff --git a/resource/translations/skosmos_fi.po b/resource/translations/skosmos_fi.po index a9bab240f..5208799cc 100644 --- a/resource/translations/skosmos_fi.po +++ b/resource/translations/skosmos_fi.po @@ -844,3 +844,6 @@ msgstr "Aihe:" msgid "Write a subject" msgstr "Kirjoita aihe" + +msgid "Select a vocabulary" +msgstr "Voit valita halutessasi sanaston" diff --git a/resource/translations/skosmos_sv.po b/resource/translations/skosmos_sv.po index 833c585ec..a70425192 100644 --- a/resource/translations/skosmos_sv.po +++ b/resource/translations/skosmos_sv.po @@ -842,3 +842,6 @@ msgstr "Ämne:" msgid "Write a subject" msgstr "Skriv ett ämne" + +msgid "Select a vocabulary" +msgstr "Du kan välja ett vokabulär" diff --git a/resource/translations/sv/LC_MESSAGES/skosmos.mo b/resource/translations/sv/LC_MESSAGES/skosmos.mo index 4a063c55fe38b6920c242d2a8ba3623b66fa3282..fe85b4eb6944ea7f81292c100b534b58644a5b85 100644 GIT binary patch delta 4356 zcmYM$3v`!r9LMo*+LqPUw$@g&E`MD%)mFO9N{Cb{Wg-co|0Yda7qwOqPo;}RXlv=Z zE-D+{R8pC+5E(~TPK1+HoH&G#Q-}BG|NO@9^!>knzvuZqzx(s7Ww~GGdS5pRD>c#q zq8X7NVHRD-tTIYh&3=hBYmMhH0~6xR>f)^!j#*eA@4}`y5+iXMHo~Vc1{Y&n+<=#3 zHB!&BqkhJ|!Ft^I0UO{sY=xJQe-@y%cY#9=-(WnuZViPPwb-WWb(<%(ZYSf|~MAiQqJK!1Yf$@#~ z6&Z|)lt*F|{o52WsW=<8#2YaUPrBcKP4Ur|ea2~{tg>1fXzqZ(>~ z8bF%!I(L5%s=Z;T_Oe}hENUXtTzRhNGR3Hd%TNuLyYenn$5p6?4m!U=b#Ml?w7+5K zRJ;3OSNKaGgBoZ%RQs8zmAeVGV%~5vY9J5QU;(n)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j1kSXQzoCf<95+pY(ckKZjPP{;5>P2epZhYX(z)8daSAGop5!1Jy zh&>!0mp>|}AP@``j?W2ZPtFfcoVI;aVvpEneI^I;g5v^(`_|=;2?j=7k11b?wiVabbi!uT?GcGDw#p7o% zo#U-I4qMO)I#Q@Zoq;y&3iQ5GATJ5W*Ssxi65vki*1!eGppFb?AN5v8`Nms%n!a!a8>B`HN^z_r&8vXbVrEJ^26~ z!jI7V{uPf?SlYZ{Arrm-ab2+K}_; z9CzcL^*9f`J_>EnM6^LSqf;~&EoULx!DV=i|1GQV3XZ4uWBdoQQ_EM!_kKHiadhZH8C zAA#0W(I)eM8#}h}F0{Z$(VnbBN1_p}uo+$T`;b>Zyo2`qGqh(NSkfNnpl?He^tmFm zydmgFj)}+PyiWb0f*l{6iWXFbUGaf<{0LgmnrH)heG(h$m$Kl$^UOtIM^Id zIMEy8z9qZeO8knrJwhBRw-w|dY4(8aW^z5Tg>K&=-)-A#`^gW7@W(dA1P2$KetlLdV!gAbAoT07cKz(a^-^5Goy-sEkzeszD+icyCh^yA^4l)kKl84EQ {% endif %}

{% trans "feedback_enter_name_email" %}

- -

{% trans %}Name:{% endtrans %}

- -

{% trans %}E-mail:{% endtrans %}

- -

{% trans %}Subject:{% endtrans %}

- -

{% trans %}Message:{% endtrans %} *

+

+ + +

+

+ + +

+

+ + +

+ {{ honeypot.generate('item-description', 'user-captcha')|raw }} - + {% endif %} From 038e4a307e242220cbc2c985ad8abf90510349e7 Mon Sep 17 00:00:00 2001 From: Ahonen Mika J Date: Thu, 4 Mar 2021 10:17:09 +0200 Subject: [PATCH 4/5] Some WCAG 2.1 AA level improvements added to the feedback form + changed argument order in the method WebController.php/sendFeecback --- controller/WebController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/controller/WebController.php b/controller/WebController.php index 11e5f3894..b815eca7c 100644 --- a/controller/WebController.php +++ b/controller/WebController.php @@ -222,7 +222,7 @@ public function invokeFeedbackForm($request) // and we do not actually send the message. if ($this->honeypot->validateHoneypot($request->getQueryParamPOST('item-description')) && $this->honeypot->validateHoneytime($request->getQueryParamPOST('user-captcha'), $this->model->getConfig()->getHoneypotTime())) { - $this->sendFeedback($request, $feedbackMsg, $feedbackName, $feedbackEmail, $feedbackVocab, $feedbackVocabEmail, $msgSubject); + $this->sendFeedback($request, $feedbackMsg, $msgSubject, $feedbackName, $feedbackEmail, $feedbackVocab, $feedbackVocabEmail); } echo $template->render( array( @@ -256,7 +256,7 @@ private function createFeedbackHeaders($fromName, $fromEmail, $toMail, $sender) * @param string $fromEmail senders email address. * @param string $fromVocab which vocabulary is the feedback related to. */ - public function sendFeedback($request, $message, $fromName = null, $fromEmail = null, $fromVocab = null, $toMail = null, $messageSubject) + public function sendFeedback($request, $message, $messageSubject, $fromName = null, $fromEmail = null, $fromVocab = null, $toMail = null) { $toAddress = ($toMail) ? $toMail : $this->model->getConfig()->getFeedbackAddress(); if ($fromVocab !== null && $fromVocab !== '') { From f67a739757d00d39540cbe1583902dfbcf194013 Mon Sep 17 00:00:00 2001 From: Ahonen Mika J Date: Thu, 4 Mar 2021 17:34:17 +0200 Subject: [PATCH 5/5] Change requests in draft pull request (https://github.com/NatLibFi/Skosmos/pull/1130#pullrequestreview-604120061) checked and fixed --- controller/WebController.php | 9 ++++----- resource/translations/skosmos_sv.po | 2 +- .../translations/sv/LC_MESSAGES/skosmos.mo | Bin 13403 -> 13402 bytes view/feedback.twig | 2 +- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/controller/WebController.php b/controller/WebController.php index b815eca7c..cca6e1c54 100644 --- a/controller/WebController.php +++ b/controller/WebController.php @@ -213,8 +213,7 @@ public function invokeFeedbackForm($request) } $feedbackName = $request->getQueryParamPOST('name'); $feedbackEmail = $request->getQueryParamPOST('email'); - $msgSubject = $this->model->getConfig()->getServiceName() . ": "; - $msgSubject .= $request->getQueryParamPOST('msgsubject'); + $msgSubject = $request->getQueryParamPOST('msgsubject'); $feedbackVocab = $request->getQueryParamPOST('vocab'); $feedbackVocabEmail = ($feedbackVocab !== null && $feedbackVocab !== '') ? $this->model->getVocabulary($feedbackVocab)->getConfig()->getFeedbackRecipient() : null; @@ -250,8 +249,8 @@ private function createFeedbackHeaders($fromName, $fromEmail, $toMail, $sender) /** * Sends the user entered message through the php's mailer. - * @param string $message only required parameter is the actual message. - * @param string $messageSubject from the sender. + * @param string $message content given by user. + * @param string $messageSubject subject line given by user. * @param string $fromName senders own name. * @param string $fromEmail senders email address. * @param string $fromVocab which vocabulary is the feedback related to. @@ -259,10 +258,10 @@ private function createFeedbackHeaders($fromName, $fromEmail, $toMail, $sender) public function sendFeedback($request, $message, $messageSubject, $fromName = null, $fromEmail = null, $fromVocab = null, $toMail = null) { $toAddress = ($toMail) ? $toMail : $this->model->getConfig()->getFeedbackAddress(); + $messageSubject = "[" . $this->model->getConfig()->getServiceName() . "] " . $messageSubject; if ($fromVocab !== null && $fromVocab !== '') { $message = 'Feedback from vocab: ' . strtoupper($fromVocab) . "
" . $message; } - $envelopeSender = $this->model->getConfig()->getFeedbackEnvelopeSender(); // determine the sender address of the message $sender = $this->model->getConfig()->getFeedbackSender(); diff --git a/resource/translations/skosmos_sv.po b/resource/translations/skosmos_sv.po index a70425192..4c501d76c 100644 --- a/resource/translations/skosmos_sv.po +++ b/resource/translations/skosmos_sv.po @@ -844,4 +844,4 @@ msgid "Write a subject" msgstr "Skriv ett ämne" msgid "Select a vocabulary" -msgstr "Du kan välja ett vokabulär" +msgstr "Du kan välja en vokabulär" diff --git a/resource/translations/sv/LC_MESSAGES/skosmos.mo b/resource/translations/sv/LC_MESSAGES/skosmos.mo index fe85b4eb6944ea7f81292c100b534b58644a5b85..ca12018b82bb7aba5f17b7632ac225c62bc5983b 100644 GIT binary patch delta 1097 zcmXZbPe@cz6vy!sX*s?b|232LRLt_vSpLh5frQASawS2vY17ccTxcyMT132D7zl0z z7a>v&1QSFd*dL@-L`8+93z5oAO+gSugbTxz zW>(y67Q-eyh~2myFX0Znfm`qnmSPqw@hP6h_gH}qNwXeI;bt5`&A)gx`&z>txQ<$I0)3oDCGr@_ z-Ga9?%4n>)2Ze2B?6&z>j7L#B((lI8sIwkNRX&3XJd29+&W*34690uNY#pocFM610 z&leO}J&gzhP51~qQD^oImFW-ELe>!mj5}*Ef9Y@+k5i~b&f-42jGC84?btKaj^$97 zZv)%7e^%KUR(cHi*-8GC=_o3|G}hxo*Iz^>_7!*HAJh){tSVbk?;pY_rg1+GqvmCh zQ?e)MvA%twL6PzBd xUAhaXOL+|s)X~V$D8=WfGh0G(u@9)*?sfCYVH_*)#N2!|?Qgm`SKWL#_8+XVbb|l@ delta 1098 zcmXZbO-R&17{~Fa7hl%>uWz-R?rJZVty^toCP@l~iP%X3@zSBBgL^4DEYTtQmxltW zi_jrNvV~xS=mn!JIz?1eLUjl+yx0~5K}2{k4Ep}|KOlZ)=0Eey^UTc7XTD?}TrKw- z%&a157QrMQzz&Sz8LY=ESc3iG%DXK)ZdU@bPcm~~+%uE8v7{W3r4VN*BmNHYKF|5RPtic}FAH)#-lc;s4Q1P-@f)`!?vim-cigP37 z2Z8bogcx{+3j7ik=(BSHwV;6I_{X_|>*$y42r8^cCA=NAz8kmVVN_uwsFOaAnm6Xt zSW9CHb!4}(5%1tEzQ!`VzB8CNiJZ3OP*?C4wb3FT#~-*KkL(Ig;1X)XYZ%7~R3eX& z+|7SSqngH&`%s!TTO?>Y}C2|bg@GNRw9(7{RQ72YF zJ-!u8^Zu-EPf%$e@@Gf+r%Xpt0VZ$@-go_vsKmbEX8emfp#;0iG;01q^l%v4@ib~( z4!I?Jf?@WzuQVvqeql9k+#6KZireV-U>}a4D!7N5{|fapUBXKA*d>AqY{nGoZ46)y z4xt`h2K6W}V8TGs8o;(!!52;^t Aga7~l diff --git a/view/feedback.twig b/view/feedback.twig index 2af2c11ec..eb370ff3e 100644 --- a/view/feedback.twig +++ b/view/feedback.twig @@ -45,7 +45,7 @@ {{ honeypot.generate('item-description', 'user-captcha')|raw }} - + {% endif %}