From e6e452915cf0701e0ac343f55e52d8323b31c4ab Mon Sep 17 00:00:00 2001 From: Gusa Date: Sun, 16 Dec 2012 05:07:44 +0100 Subject: [PATCH] Edit ad, not show 'new' field when all languages If the current ad has a description for every available language in the system do not show the new field. --- lib/form/doctrine/AdForm.class.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/form/doctrine/AdForm.class.php b/lib/form/doctrine/AdForm.class.php index ab3c8b6..c3105d6 100644 --- a/lib/form/doctrine/AdForm.class.php +++ b/lib/form/doctrine/AdForm.class.php @@ -81,13 +81,13 @@ class AdForm extends BaseAdForm //i18n (Internationalization) $this->widgetSchema->getFormFormatter()->setTranslationCatalogue('ad_form'); - // Ad creation form - $adDescription = new AdDescription(); - $adDescription->Ad = $this->getObject(); - $newAdDescriptionForm = new AdDescriptionForm($adDescription); if (!$this->isTheLanguageInformationComplete()) { + // Ad creation form + $adDescription = new AdDescription(); + $adDescription->Ad = $this->getObject(); + $newAdDescriptionForm = new AdDescriptionForm($adDescription); $this->embedForm('new', $newAdDescriptionForm); } -- 2.1.4