return show_nationality_country_text
git-svn-id: http://78.47.251.156/svn/dev/sterntours-3@3480 f459cee4-fb09-11de-96c3-f9c5f16c3c76
This commit is contained in:
parent
7ad52c8b89
commit
645dbaf77e
2 changed files with 15 additions and 7 deletions
|
|
@ -63,22 +63,32 @@ class BookingController extends Controller
|
||||||
|
|
||||||
public function indexAction(Page $travelProgramPage, $action, Request $request)
|
public function indexAction(Page $travelProgramPage, $action, Request $request)
|
||||||
{
|
{
|
||||||
|
|
||||||
if($action == '/show_nationality_country_text')
|
if($action == '/show_nationality_country_text')
|
||||||
{
|
{
|
||||||
$ret = "";
|
$ret = "";
|
||||||
$nationality_id = $request->request->get('nationality_id');
|
$nationality_id = $request->request->get('nationality_id');
|
||||||
$country_ids = $request->request->get('country_ids');
|
$country_ids = $request->request->get('country_ids');
|
||||||
|
|
||||||
|
|
||||||
foreach ($country_ids as $country_id){
|
foreach ($country_ids as $country_id){
|
||||||
|
|
||||||
$country = $this->getEntityManager()->getRepository('AppBundle:TravelCountry')
|
$country = $this->getEntityManager()->getRepository('AppBundle:TravelCountry')->findOneBy(['id' => $country_id]);
|
||||||
->findOneBy(['id' => $country_id]);
|
|
||||||
$req = $this->getDoctrine()->getRepository('AppBundle:TravelNationalityRequirement')->findOneByCountryAndNationality($country_id, $nationality_id);
|
$req = $this->getDoctrine()->getRepository('AppBundle:TravelNationalityRequirement')->findOneByCountryAndNationality($country_id, $nationality_id);
|
||||||
|
|
||||||
|
|
||||||
if($req && $country){
|
if($req && $country){
|
||||||
$ret .= "<h2>".$country->getName()."</h2>";
|
|
||||||
$ret .= "<p>".$req->getText()."</p>";
|
$setC = !empty($country->getName()) ? $country->getName() : "Einreiseland";
|
||||||
|
$setT = !empty($req->getText()) ? $req->getText() : "Die Einreisebestimmungen erhalten Sie nach der Bestätigung Ihrer Anfrage.";
|
||||||
|
$ret .= "<h2>".$setC."</h2>";
|
||||||
|
$ret .= "<p>".$setT."</p>";
|
||||||
$ret .= "<hr>";
|
$ret .= "<hr>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
echo $ret;
|
||||||
|
die();
|
||||||
}
|
}
|
||||||
|
|
||||||
$travelProgram = $travelProgramPage->getTravelProgram();
|
$travelProgram = $travelProgramPage->getTravelProgram();
|
||||||
|
|
|
||||||
|
|
@ -92,10 +92,8 @@ $(document).ready(function() {
|
||||||
$(obj).find('.accordion-toggle').click();
|
$(obj).find('.accordion-toggle').click();
|
||||||
toggle_first[ele.val()] = true;
|
toggle_first[ele.val()] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}, function() {
|
}, function() {
|
||||||
summary$.html('Aufgrund eines Fehlers konnte kein Angebot ermittelt werden.');
|
summary$.html('Aufgrund eines Fehlers konnte keine Anfrage übermittel werden.');
|
||||||
});
|
});
|
||||||
}else{
|
}else{
|
||||||
$(obj).hide();
|
$(obj).hide();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue