From fd01254e8f390f51e187002da121f4a4a3a1d49b Mon Sep 17 00:00:00 2001 From: uli Date: Thu, 2 Nov 2017 08:56:48 +0000 Subject: [PATCH] #1352 git-svn-id: http://78.47.251.156/svn/dev/sterntours-3@3357 f459cee4-fb09-11de-96c3-f9c5f16c3c76 --- .../Resources/views/default/admin/lodgingsEdit.html.twig | 2 +- .../app/Resources/views/default/admin/lodgingsNew.html.twig | 2 +- .../default/pages/cms/calendarLodgingProgram.html.twig | 2 +- trunk/src/AppBundle/Controller/FewoBookingController.php | 6 +++--- trunk/src/AppBundle/Form/FewoLodgingType.php | 2 -- trunk/src/AppBundle/Listener/KernelControllerListener.php | 5 +++-- trunk/src/AppBundle/Resources/public/js/fewoBooking.js | 2 +- 7 files changed, 10 insertions(+), 11 deletions(-) diff --git a/trunk/app/Resources/views/default/admin/lodgingsEdit.html.twig b/trunk/app/Resources/views/default/admin/lodgingsEdit.html.twig index 0a5d41f7..4e461392 100644 --- a/trunk/app/Resources/views/default/admin/lodgingsEdit.html.twig +++ b/trunk/app/Resources/views/default/admin/lodgingsEdit.html.twig @@ -24,7 +24,7 @@ {{ form_row(form.city, {'label': 'Ort'}) }} {{ form_row(form.maximumPersons, {'label': 'Maximale Personenanzahl'}) }} {{ form_row(form.deposit, {'label': 'Kaution'}) }} - {#{{ form_row(form.onlyWeekday, {'label': 'Exklusiver Wochentag'}) }}#} + {{ form_row(form.onlyWeekday, {'label': 'Exklusiver Wochentag'}) }} {#
diff --git a/trunk/app/Resources/views/default/admin/lodgingsNew.html.twig b/trunk/app/Resources/views/default/admin/lodgingsNew.html.twig index 6b52113c..988a6400 100644 --- a/trunk/app/Resources/views/default/admin/lodgingsNew.html.twig +++ b/trunk/app/Resources/views/default/admin/lodgingsNew.html.twig @@ -24,7 +24,7 @@ {{ form_row(form.city, {label: 'Ort'}) }} {{ form_row(form.maximumPersons, {label: 'Maximale Personenanzahl'}) }} {{ form_row(form.deposit, {label: 'Kaution'}) }} - {#{{ form_row(form.onlyWeekday, {label: 'Exklusiver Wochentag'}) }}#} + {{ form_row(form.onlyWeekday, {label: 'Exklusiver Wochentag'}) }} {#
diff --git a/trunk/app/Resources/views/default/pages/cms/calendarLodgingProgram.html.twig b/trunk/app/Resources/views/default/pages/cms/calendarLodgingProgram.html.twig index 93c48f44..58446db5 100644 --- a/trunk/app/Resources/views/default/pages/cms/calendarLodgingProgram.html.twig +++ b/trunk/app/Resources/views/default/pages/cms/calendarLodgingProgram.html.twig @@ -43,7 +43,7 @@ {% if dayState.isBookable and not is_past_date %} - diff --git a/trunk/src/AppBundle/Controller/FewoBookingController.php b/trunk/src/AppBundle/Controller/FewoBookingController.php index b660fdae..575b4922 100644 --- a/trunk/src/AppBundle/Controller/FewoBookingController.php +++ b/trunk/src/AppBundle/Controller/FewoBookingController.php @@ -129,7 +129,7 @@ class FewoBookingController extends Controller $perDayTotalPrice = $this->calculatePerDayTotalPrice($fewoBookingRequest, $price); $fewoBookingRequest->setTotalPrice($totalPrice); - if($action == '/fewo-buchen') + if($action == '/buchen') { if ($request->getMethod() == 'POST' && $form->isValid()) @@ -211,7 +211,7 @@ class FewoBookingController extends Controller ]); } - elseif($action == '/fewo-berechne-gesamtpreis') + elseif($action == '/berechne-gesamtpreis') { return $this->render('default/components/booking/fewoSummary.html.twig', [ 'base_dir' => realpath($this->getParameter('kernel.root_dir').'/..').DIRECTORY_SEPARATOR, @@ -223,7 +223,7 @@ class FewoBookingController extends Controller ]); } - throw new \Exception('Unknow FewoBookingController action: '. $action); + throw new \Exception('Unknown FewoBookingController action: '. $action); } public function calculatePrice(FewoBookingRequest $fewoBookingRequest, FewoLodging $fewoLodging, FewoPrice $fewoPrice) diff --git a/trunk/src/AppBundle/Form/FewoLodgingType.php b/trunk/src/AppBundle/Form/FewoLodgingType.php index 246ba900..165b4b97 100644 --- a/trunk/src/AppBundle/Form/FewoLodgingType.php +++ b/trunk/src/AppBundle/Form/FewoLodgingType.php @@ -65,14 +65,12 @@ class FewoLodgingType extends AbstractType ->add('deposit', null, [ 'required' => true, ]) - /* ->add('onlyWeekday', ChoiceType::class, [ 'choices' => self::$WEEKDAY_CHOICES, 'constraints' => [ new Choice(['choices' => self::$WEEKDAY_CHOICES]) ] ]) - */ //->add('calendarVisible') ->add('type', EntityType::class, [ 'placeholder' => '(Bitte wählen) *', diff --git a/trunk/src/AppBundle/Listener/KernelControllerListener.php b/trunk/src/AppBundle/Listener/KernelControllerListener.php index 1fb9a026..445367a0 100644 --- a/trunk/src/AppBundle/Listener/KernelControllerListener.php +++ b/trunk/src/AppBundle/Listener/KernelControllerListener.php @@ -124,7 +124,7 @@ class KernelControllerListener $request->attributes->set('page', $node); - if ($restOfPath && $node->getTravelProgram() != null && ( + if ($node->getTravelProgram() != null && ( $restOfPath == '/buchen' || $restOfPath == '/berechne-gesamtpreis')) { // Special case: Booking actions @@ -145,7 +145,8 @@ class KernelControllerListener } $request->attributes->set('_controller', 'AppBundle:Cms:travelProgram'); } - elseif ($node->getFewoLodging() != null && ($restOfPath == '/fewo-buchen' || $restOfPath == '/fewo-berechne-gesamtpreis')) + elseif ($node->getFewoLodging() != null && + ($restOfPath == '/buchen' || $restOfPath == '/berechne-gesamtpreis')) { $request->attributes->set('fewoTravelProgramPage', $node); $request->attributes->set('action', $restOfPath); diff --git a/trunk/src/AppBundle/Resources/public/js/fewoBooking.js b/trunk/src/AppBundle/Resources/public/js/fewoBooking.js index 1c5be351..2f603c5a 100644 --- a/trunk/src/AppBundle/Resources/public/js/fewoBooking.js +++ b/trunk/src/AppBundle/Resources/public/js/fewoBooking.js @@ -11,7 +11,7 @@ $(document).ready(function() { var tmp = location.href.split('?'); var tmp2 = tmp[0].split('/'); tmp2.pop(); - var url = tmp2.join('/') + '/fewo-berechne-gesamtpreis'; + var url = tmp2.join('/') + '/berechne-gesamtpreis'; if (tmp[1]) { url += '?'+ tmp[1];