From 691403063360d8bee8eaf911807492930ea2c483 Mon Sep 17 00:00:00 2001 From: Gustavo Martin Morcuende Date: Sun, 3 Jun 2012 19:35:47 +0200 Subject: [PATCH] Company category: create and edit --- .../modules/category/templates/_form.php | 86 +++++++++++++++++++--- .../CompanyCategoryDescriptionForm.class.php | 2 + 2 files changed, 77 insertions(+), 11 deletions(-) diff --git a/apps/companyfront/modules/category/templates/_form.php b/apps/companyfront/modules/category/templates/_form.php index ada3fd8..47c8792 100644 --- a/apps/companyfront/modules/category/templates/_form.php +++ b/apps/companyfront/modules/category/templates/_form.php @@ -5,19 +5,83 @@ getObject()->isNew()): ?> +
+ - - - - - - renderGlobalErrors(false) ?> - + renderRow(array('class' => 'validate-selection')) ?> + renderError() ?> + renderRow(array('class' => 'validate-selection')) ?> + renderError() ?>
- renderHiddenFields(false) ?> -   - -
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ render(array('class' => 'validate-selection')) ?> + renderError() ?> + + render(array('class' => 'required')) ?> + renderError() ?> + render(array('class' => 'required')) ?> + renderError() ?> + + renderError() ?> +
+ render(array('class' => 'validate-selection')) ?> + renderError() ?> + + render(array('class' => 'required')) ?> + renderError() ?> + render(array('class' => 'required')) ?> + renderError() ?> + + + renderError() ?> + + renderError() ?> +
+ renderHiddenFields(false) ?> +
+   + + + + + + + +
+ + + +
diff --git a/lib/form/doctrine/CompanyCategoryDescriptionForm.class.php b/lib/form/doctrine/CompanyCategoryDescriptionForm.class.php index 6b0c289..a8e4dbc 100644 --- a/lib/form/doctrine/CompanyCategoryDescriptionForm.class.php +++ b/lib/form/doctrine/CompanyCategoryDescriptionForm.class.php @@ -14,6 +14,8 @@ class CompanyCategoryDescriptionForm extends BaseCompanyCategoryDescriptionForm { unset($this['company_categ_id']); + $this->widgetSchema['company_categ_description'] = new sfWidgetFormTextarea(); + if ($this->object->exists()) { $this->widgetSchema['delete'] = new sfWidgetFormInputCheckbox(); -- 2.1.4