diff --git a/trunk/src/AppBundle/Controller/BookingController.php b/trunk/src/AppBundle/Controller/BookingController.php index 2dd599bb..51d92abf 100644 --- a/trunk/src/AppBundle/Controller/BookingController.php +++ b/trunk/src/AppBundle/Controller/BookingController.php @@ -63,22 +63,32 @@ class BookingController extends Controller public function indexAction(Page $travelProgramPage, $action, Request $request) { + if($action == '/show_nationality_country_text') { $ret = ""; $nationality_id = $request->request->get('nationality_id'); $country_ids = $request->request->get('country_ids'); + + foreach ($country_ids as $country_id){ - $country = $this->getEntityManager()->getRepository('AppBundle:TravelCountry') - ->findOneBy(['id' => $country_id]); + $country = $this->getEntityManager()->getRepository('AppBundle:TravelCountry')->findOneBy(['id' => $country_id]); + $req = $this->getDoctrine()->getRepository('AppBundle:TravelNationalityRequirement')->findOneByCountryAndNationality($country_id, $nationality_id); + + if($req && $country){ - $ret .= "
".$req->getText()."
"; + + $setC = !empty($country->getName()) ? $country->getName() : "Einreiseland"; + $setT = !empty($req->getText()) ? $req->getText() : "Die Einreisebestimmungen erhalten Sie nach der Bestätigung Ihrer Anfrage."; + $ret .= "".$setT."
"; $ret .= "