Commit 18fc904b authored by Dominik Hebeler's avatar Dominik Hebeler
Browse files

Merge branch '3-kontaktformular' into 'master'

Bug fixes

1. Alertbox beim absenden des Formulars entfernt
2. Kontaktformular kann nun auch wieder ohne angabe einer Email-Adresse abgesendet werden.
3. Bug im Template gefixt bei dem es zu einem Error kam, wenn kein Javascript zum einbinden üebrgeben wurde

closes #3 fixes #3 

See merge request !10
parents f7c800d2 9da90b98
......@@ -19,12 +19,18 @@ class MailController extends Controller
# Nachricht, die wir an den Nutzer weiterleiten:
$messageType = ""; # [success|error]
$returnMessage = '';
if(!$request->has('email') || !$request->has('message')){
$replyTo = $request->input('email', 'noreply@metager.de');
if($replyTo === ""){
$replyTo = "noreply@metager.de";
}else{
$replyTo = $request->input('email');
}
if(!$request->has('message')){
$messageType = "error";
$returnMessage = "Tut uns leid, aber leider haben wir mit Ihrer Kontaktanfrage keine Daten erhalten. Die Email wurde nicht versand";
}else{
# Wir versenden die Mail des Benutzers an uns:
$replyTo = $request->input('email');
$message = $request->input('message');
if( Mail::send(['text' => 'kontakt.mail'], ['messageText'=>$message], function($message) use($replyTo){
......
......@@ -1219,7 +1219,7 @@
},
{
"name": "symfony/console",
"version": "v3.0.5",
"version": "v3.0.6",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
......@@ -1279,7 +1279,7 @@
},
{
"name": "symfony/debug",
"version": "v3.0.5",
"version": "v3.0.6",
"source": {
"type": "git",
"url": "https://github.com/symfony/debug.git",
......@@ -1336,16 +1336,16 @@
},
{
"name": "symfony/event-dispatcher",
"version": "v3.0.5",
"version": "v3.0.6",
"source": {
"type": "git",
"url": "https://github.com/symfony/event-dispatcher.git",
"reference": "17b04e6b1ede45b57d3ad5146abe50df6c3968b4"
"reference": "807dde98589f9b2b00624dca326740380d78dbbc"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/17b04e6b1ede45b57d3ad5146abe50df6c3968b4",
"reference": "17b04e6b1ede45b57d3ad5146abe50df6c3968b4",
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/807dde98589f9b2b00624dca326740380d78dbbc",
"reference": "807dde98589f9b2b00624dca326740380d78dbbc",
"shasum": ""
},
"require": {
......@@ -1392,11 +1392,11 @@
],
"description": "Symfony EventDispatcher Component",
"homepage": "https://symfony.com",
"time": "2016-04-12 18:09:53"
"time": "2016-05-05 06:56:13"
},
{
"name": "symfony/finder",
"version": "v3.0.5",
"version": "v3.0.6",
"source": {
"type": "git",
"url": "https://github.com/symfony/finder.git",
......@@ -1445,7 +1445,7 @@
},
{
"name": "symfony/http-foundation",
"version": "v3.0.5",
"version": "v3.0.6",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-foundation.git",
......@@ -1498,16 +1498,16 @@
},
{
"name": "symfony/http-kernel",
"version": "v3.0.5",
"version": "v3.0.6",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-kernel.git",
"reference": "1aa25588241f915cf176b7c371e5d629dfff8b43"
"reference": "6a5010978edf0a9646342232531e53bfc7abbcd3"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/http-kernel/zipball/1aa25588241f915cf176b7c371e5d629dfff8b43",
"reference": "1aa25588241f915cf176b7c371e5d629dfff8b43",
"url": "https://api.github.com/repos/symfony/http-kernel/zipball/6a5010978edf0a9646342232531e53bfc7abbcd3",
"reference": "6a5010978edf0a9646342232531e53bfc7abbcd3",
"shasum": ""
},
"require": {
......@@ -1576,7 +1576,7 @@
],
"description": "Symfony HttpKernel Component",
"homepage": "https://symfony.com",
"time": "2016-05-03 05:58:27"
"time": "2016-05-09 22:13:13"
},
{
"name": "symfony/polyfill-mbstring",
......@@ -1747,7 +1747,7 @@
},
{
"name": "symfony/process",
"version": "v3.0.5",
"version": "v3.0.6",
"source": {
"type": "git",
"url": "https://github.com/symfony/process.git",
......@@ -1796,16 +1796,16 @@
},
{
"name": "symfony/routing",
"version": "v3.0.5",
"version": "v3.0.6",
"source": {
"type": "git",
"url": "https://github.com/symfony/routing.git",
"reference": "6ab6fd5ee754fb53a303a5621ae35f3afd5970ac"
"reference": "a6cd168310066176599442aa21f5da86c3f8e0b3"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/routing/zipball/6ab6fd5ee754fb53a303a5621ae35f3afd5970ac",
"reference": "6ab6fd5ee754fb53a303a5621ae35f3afd5970ac",
"url": "https://api.github.com/repos/symfony/routing/zipball/a6cd168310066176599442aa21f5da86c3f8e0b3",
"reference": "a6cd168310066176599442aa21f5da86c3f8e0b3",
"shasum": ""
},
"require": {
......@@ -1867,11 +1867,11 @@
"uri",
"url"
],
"time": "2016-04-28 09:48:42"
"time": "2016-05-03 12:23:49"
},
{
"name": "symfony/translation",
"version": "v3.0.5",
"version": "v3.0.6",
"source": {
"type": "git",
"url": "https://github.com/symfony/translation.git",
......@@ -1935,7 +1935,7 @@
},
{
"name": "symfony/var-dumper",
"version": "v3.0.5",
"version": "v3.0.6",
"source": {
"type": "git",
"url": "https://github.com/symfony/var-dumper.git",
......@@ -3112,7 +3112,7 @@
},
{
"name": "symfony/css-selector",
"version": "v3.0.5",
"version": "v3.0.6",
"source": {
"type": "git",
"url": "https://github.com/symfony/css-selector.git",
......@@ -3165,7 +3165,7 @@
},
{
"name": "symfony/dom-crawler",
"version": "v3.0.5",
"version": "v3.0.6",
"source": {
"type": "git",
"url": "https://github.com/symfony/dom-crawler.git",
......@@ -3221,7 +3221,7 @@
},
{
"name": "symfony/yaml",
"version": "v3.0.5",
"version": "v3.0.6",
"source": {
"type": "git",
"url": "https://github.com/symfony/yaml.git",
......
......@@ -19,7 +19,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/
function encrypt() {
if (window.crypto && window.crypto.getRandomValues) {
var message = document.getElementById("message");
console.log(message);
if (message.value.indexOf("-----BEGIN PGP MESSAGE-----") !== -1 && message.value.indexOf("-----END PGP MESSAGE-----") !== -1) {
// encryption done
} else {
......@@ -27,7 +26,6 @@ function encrypt() {
var plaintext = message.value;
var ciphertext = openpgp.encryptMessage([pub_key],plaintext);
message.value = ciphertext;
alert(message.value);
return true;
}
} else {
......
......@@ -164,9 +164,11 @@
<script type="text/javascript" src="/js/jquery.js"></script>
<script type="text/javascript" src="/js/bootstrap.js"></script>
<script type="text/javascript" src="/js/scriptStartPage.js"></script>
@foreach ($js as $script)
<script type="text/javascript" src="/js/{{ $script }}"></script>
@endforeach
@if (isset($js))
@foreach ($js as $script)
<script type="text/javascript" src="/js/{{ $script }}"></script>
@endforeach
@endif
<!--[if lte IE 8]><script type="text/javascript" src="/js/html5shiv.min.js"></script><![endif]-->
</body>
</html>
\ No newline at end of file
</html>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment