Commit 958dc737 authored by Dominik Hebeler's avatar Dominik Hebeler
Browse files

Fixed Layout for different screen sizes. Selection is applied when an error occured

parent 12035234
......@@ -96,7 +96,7 @@ class MailController extends Controller
$nachricht = $request->input('Nachricht', '');
# Allow custom amounts
if ($betrag == "custom") {
if ($betrag == "custom" && $request->filled('custom-amount')) {
$betrag = $request->input('custom-amount', '');
$data['betrag'] = $betrag;
}
......@@ -122,10 +122,10 @@ class MailController extends Controller
if (!$iban->Verify()) {
$messageToUser = "Die eingegebene IBAN scheint nicht Korrekt zu sein. Nachricht wurde nicht gesendet";
$messageType = "error";
} else if (!$isSEPA && $bic === '') {
} elseif (!$isSEPA && $bic === '') {
$messageToUser = "Die eingegebene IBAN gehört nicht zu einem Land aus dem SEPA Raum. Für einen Bankeinzug benötigen wir eine BIC von Ihnen.";
$messageType = "error";
} else if (!$validBetrag) {
} elseif (!$validBetrag) {
$messageToUser = "Der eingegebene Spendenbetrag ist ungültig. Bitte korrigieren Sie Ihre Eingabe und versuchen es erneut.\n";
$messageType = "error";
} else {
......@@ -174,7 +174,6 @@ class MailController extends Controller
$data = base64_encode(serialize($data));
return redirect(LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), route("danke", ['data' => $data])));
}
}
#Ueberprueft ob ein bereits vorhandener Eintrag bearbeitet worden ist
......@@ -203,7 +202,6 @@ class MailController extends Controller
$emailAddress = "";
$editedKeys = "";
foreach ($request->all() as $key => $value) {
if ($key === "filename" || $value === "") {
continue;
}
......@@ -216,8 +214,7 @@ class MailController extends Controller
$new++;
$key = substr($key, strpos($key, "_new_") + 5);
$editedKeys = $editedKeys . "\n" . $key;
} else if ($this->isEdited($key, $value, $filename)) {
} elseif ($this->isEdited($key, $value, $filename)) {
$new++;
$editedKeys = $editedKeys . "\n" . $key;
}
......@@ -278,5 +275,4 @@ class MailController extends Controller
return redirect(url('languages/edit', ['from' => $from, 'to' => $to, 'exclude' => $ex, 'email' => $emailAddress]));
}
}
......@@ -10,7 +10,7 @@ return [
'wunschbetrag' => 'Wunschbetrag',
'wunschbetrag.placeholder' => 'Betrag in €',
'frequency' => 'Häufigkeit',
'frequency.1' => 'Einmalig',
......
......@@ -10,7 +10,7 @@ return [
'wunschbetrag' => 'Custom amount',
'wunschbetrag.placeholder' => 'Amount in €',
'frequency' => 'Frequency',
......
......@@ -35,15 +35,14 @@
font-weight:bold;
}
.amount-label {
display: inline-block;
vertical-align: middle;
text-align: center;
margin-bottom: 4px;
margin-top: 4px;
margin-right: 5px;
flex-grow: 1;
display: flex;
align-items: center;
justify-content: center;
font-size: 18px;
font-weight: normal;
width:4em;
width: 4em;
margin-bottom: 0;
border: 2px solid #a6a6a6;
border-radius: 5px;
cursor: pointer;
......@@ -68,40 +67,54 @@
border-radius: 6px;
cursor: pointer;
}
.payment-label {
display: inline-block;
vertical-align: middle;
display: inline-block;
color: @text-color;
margin-top: 5px;
height:45px;
font-weight: normal;
line-height: 40px;
text-align: center;
border: 2px solid #a6a6a6;
width: 150px;
border-radius: 6px;
#payment-methods {
display: flex;
flex-wrap: wrap;
gap: 4px;
.payment-label {
flex-grow: 1;
display: flex;
justify-content: center;
align-items: center;
color: @text-color;
height:45px;
font-weight: normal;
line-height: 40px;
text-align: center;
border: 2px solid #a6a6a6;
width: 150px;
border-radius: 6px;
&.payment-label-selected {
border: 2px solid #f47216;
font-weight: bold;
}
}
}
.amount-row {
display: flex;
justify-content: inherit;
margin-bottom: 8px;
height: 40px;
flex-wrap: wrap;
gap: 4px;
input:checked + label {
font-weight: bold;
}
}
.custom-amount-container {
display: flex;
flex-wrap:wrap;
margin-top: 4px;
gap: 4px;
input:checked + label {
font-weight: bold;
}
}
.amount-custom {
flex-grow: 0;
text-align: center;
display: flex;
justify-content: center;
align-items: center;
line-height: 25px;
margin-right: 4px;
padding-right: 8px;
padding-left: 4px;
height: 30px;
//width: 8em;
flex-grow: 1;
padding: 4px 8px;
font-weight: normal;
border: 2px solid #a6a6a6;
border-radius: 5px;
......@@ -114,6 +127,7 @@
display: none;
height: 30px;
width: 164px;
flex-grow: 1;
}
#amount-custom:checked + label + input{
display: initial;
......@@ -122,8 +136,8 @@
line-height: 21px;
}
input[type=radio]:checked + label, .payment-label-selected {
border: 4px solid #f47216;
input[type=radio]:checked + label {
border: 2px solid #f47216;
}
#donate-button {
......
......@@ -20,10 +20,11 @@
<div class="section">
<h3>{!! trans('spende.headline.5') !!}</h3>
<a class="payment-label" href="?method=debit">{!! trans('spende.head.lastschrift') !!}</a>
<a class="payment-label" href="?method=bank-transfer">{!! trans('spende.ueberweisung') !!}</a>
<a class="payment-label payment-label-selected" href="?method=paypal">{!! trans('spende.paypal') !!}</a>
<div id="payment-methods">
<a class="payment-label" href="?method=debit">{!! trans('spende.head.lastschrift') !!}</a>
<a class="payment-label" href="?method=bank-transfer">{!! trans('spende.ueberweisung') !!}</a>
<a class="payment-label payment-label-selected" href="?method=paypal">{!! trans('spende.paypal') !!}</a>
</div>
<p><br>{!! trans('spende.paypal.1') !!}</p>
<div class="center-wrapper">
......@@ -48,10 +49,11 @@
<form class="col-left" method="post">
<div class="section">
<h3>{!! trans('spende.headline.5') !!}</h3>
<a class="payment-label" href="?method=debit">{!! trans('spende.head.lastschrift') !!}</a>
<a class="payment-label payment-label-selected" href="?method=bank-transfer">{!! trans('spende.ueberweisung') !!}</a>
<a class="payment-label" href="?method=paypal">{!! trans('spende.paypal') !!}</a>
<div id="payment-methods">
<a class="payment-label" href="?method=debit">{!! trans('spende.head.lastschrift') !!}</a>
<a class="payment-label payment-label-selected" href="?method=bank-transfer">{!! trans('spende.ueberweisung') !!}</a>
<a class="payment-label" href="?method=paypal">{!! trans('spende.paypal') !!}</a>
</div>
<p>
<br>{!! trans('spende.bankinfo.1') !!} <br>
<br>{!! trans('spende.bankinfo.2') !!}
......@@ -67,31 +69,28 @@
<div class="section">
<h3>{!! trans('spende.headline.5') !!}</h3>
<a class="payment-label payment-label-selected" href="?method=debit">{!! trans('spende.head.lastschrift') !!}</a>
<a class="payment-label" href="?method=bank-transfer">{!! trans('spende.ueberweisung') !!}</a>
<a class="payment-label" href="?method=paypal">{!! trans('spende.paypal') !!}</a>
<div id="payment-methods">
<a class="payment-label payment-label-selected" href="?method=debit"><nobr>{!! trans('spende.head.lastschrift') !!}</nobr></a>
<a class="payment-label" href="?method=bank-transfer"><nobr>{!! trans('spende.ueberweisung') !!}</nobr></a>
<a class="payment-label" href="?method=paypal"><nobr>{!! trans('spende.paypal') !!}</nobr></a>
</div>
<h3>{!! trans('spende.headline.3') !!}</h3>
<div class="amount-row">
<input type="radio" value="5" class="amount-radio" name="amount" id="amount-5euro" required="required" checked="checked"> <label for="amount-5euro" class="amount-label">5</label>
<input type="radio" value="10" class="amount-radio" name="amount" id="amount-10euro" required="required"><label for="amount-10euro" class="amount-label">10</label>
<input type="radio" value="15" class="amount-radio" name="amount" id="amount-15euro" required="required"><label for="amount-15euro" class="amount-label">15</label>
<input type="radio" value="20" class="amount-radio" name="amount" id="amount-20euro" required="required"><label for="amount-20euro" class="amount-label">20</label>
<input type="radio" value="25" class="amount-radio" name="amount" id="amount-25euro" required="required"><label for="amount-25euro" class="amount-label">25</label> <br>
</div>
<div class="amount-row">
<input type="radio" value="50" class="amount-radio" name="amount" id="amount-50euro" required="required"><label for="amount-50euro" class="amount-label">50</label>
<input type="radio" value="100" class="amount-radio" name="amount" id="amount-100euro" required="required"><label for="amount-100euro" class="amount-label">100</label>
<input type="radio" value="200" class="amount-radio" name="amount" id="amount-200euro" required="required"><label for="amount-200euro" class="amount-label">200</label>
<input type="radio" value="250" class="amount-radio" name="amount" id="amount-250euro" required="required"><label for="amount-250euro" class="amount-label">250</label>
<input type="radio" value="300" class="amount-radio" name="amount" id="amount-300euro" required="required"><label for="amount-300euro" class="amount-label">300</label> <br>
<input type="radio" value="5" class="amount-radio" name="amount" id="amount-5euro" required="required" @if(empty($data) || $data["betrag"] === "5")checked="checked"@endif> <label for="amount-5euro" class="amount-label">5</label>
<input type="radio" value="10" class="amount-radio" name="amount" id="amount-10euro" required="required" @if(!empty($data) && $data["betrag"] === "10")checked="checked"@endif><label for="amount-10euro" class="amount-label">10</label>
<input type="radio" value="15" class="amount-radio" name="amount" id="amount-15euro" required="required" @if(!empty($data) && $data["betrag"] === "15")checked="checked"@endif><label for="amount-15euro" class="amount-label">15</label>
<input type="radio" value="20" class="amount-radio" name="amount" id="amount-20euro" required="required" @if(!empty($data) && $data["betrag"] === "20")checked="checked"@endif><label for="amount-20euro" class="amount-label">20</label>
<input type="radio" value="25" class="amount-radio" name="amount" id="amount-25euro" required="required" @if(!empty($data) && $data["betrag"] === "15")checked="checked"@endif><label for="amount-25euro" class="amount-label">25</label>
<input type="radio" value="50" class="amount-radio" name="amount" id="amount-50euro" required="required" @if(!empty($data) && $data["betrag"] === "50")checked="checked"@endif><label for="amount-50euro" class="amount-label">50</label>
<input type="radio" value="100" class="amount-radio" name="amount" id="amount-100euro" required="required" @if(!empty($data) && $data["betrag"] === "100")checked="checked"@endif><label for="amount-100euro" class="amount-label">100</label>
<input type="radio" value="200" class="amount-radio" name="amount" id="amount-200euro" required="required" @if(!empty($data) && $data["betrag"] === "200")checked="checked"@endif><label for="amount-200euro" class="amount-label">200</label>
<input type="radio" value="250" class="amount-radio" name="amount" id="amount-250euro" required="required" @if(!empty($data) && $data["betrag"] === "250")checked="checked"@endif><label for="amount-250euro" class="amount-label">250</label>
<input type="radio" value="300" class="amount-radio" name="amount" id="amount-300euro" required="required" @if(!empty($data) && $data["betrag"] === "300")checked="checked"@endif><label for="amount-300euro" class="amount-label">300</label>
</div>
<div class="custom-amount-container">
<input type="radio" name="amount" id="amount-custom" value="custom" required="required"><label for="amount-custom" class="amount-custom">{!! trans('spende.wunschbetrag') !!}</label> <input id="custom-amount" type="number" name="custom-amount" min="0" step=".01" placeholder="Betrag in €" value="">
<input type="radio" name="amount" id="amount-custom" value="custom" required="required" @if(!empty($data) && $data["betrag"] === "custom")checked="checked"@endif><label for="amount-custom" class="amount-custom">{!! trans('spende.wunschbetrag') !!}</label> <input id="custom-amount" type="number" name="custom-amount" min="0" step=".01" placeholder="@lang('spende.wunschbetrag.placeholder')" value="">
</div>
<br>
<h3>{!! trans('spende.headline.4') !!}</h3>
<input type="radio" class="frequency-radio" name="frequency" id="once" value="once" required="required" checked="checked"><label class="frequency-label" for="once">{!! trans('spende.frequency.1') !!}</label> <br>
......
Supports Markdown
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