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)
|
||||
{
|
||||
|
||||
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 .= "<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>";
|
||||
}
|
||||
}
|
||||
echo $ret;
|
||||
die();
|
||||
}
|
||||
|
||||
$travelProgram = $travelProgramPage->getTravelProgram();
|
||||
|
|
|
|||
|
|
@ -92,10 +92,8 @@ $(document).ready(function() {
|
|||
$(obj).find('.accordion-toggle').click();
|
||||
toggle_first[ele.val()] = true;
|
||||
}
|
||||
|
||||
|
||||
}, function() {
|
||||
summary$.html('Aufgrund eines Fehlers konnte kein Angebot ermittelt werden.');
|
||||
summary$.html('Aufgrund eines Fehlers konnte keine Anfrage übermittel werden.');
|
||||
});
|
||||
}else{
|
||||
$(obj).hide();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue