Merge branch 'master' of https://github.com/thelia/thelia
Conflicts: templates/admin/default/categories.html templates/admin/default/includes/add-category-dialog.html templates/admin/default/includes/delete-category-dialog.html
This commit is contained in:
@@ -43,12 +43,31 @@ abstract class BaseDescForm extends BaseForm
|
||||
->add("title", "text", array(
|
||||
"constraints" => array(
|
||||
new NotBlank()
|
||||
),
|
||||
"label" => "Title",
|
||||
"label_attr" => array(
|
||||
"for" => "title"
|
||||
)
|
||||
)
|
||||
)
|
||||
->add("chapo", "text", array())
|
||||
->add("description", "text", array())
|
||||
->add("postscriptum", "text", array())
|
||||
->add("chapo", "text", array(
|
||||
"label" => "Summary",
|
||||
"label_attr" => array(
|
||||
"for" => "summary"
|
||||
)
|
||||
))
|
||||
->add("description", "text", array(
|
||||
"label" => "Detailed description",
|
||||
"label_attr" => array(
|
||||
"for" => "detailed_description"
|
||||
)
|
||||
))
|
||||
->add("postscriptum", "text", array(
|
||||
"label" => "Conclusion",
|
||||
"label_attr" => array(
|
||||
"for" => "conclusion"
|
||||
)
|
||||
))
|
||||
;
|
||||
}
|
||||
}
|
||||
@@ -141,6 +141,8 @@ abstract class BaseForm
|
||||
public function createView()
|
||||
{
|
||||
$this->view = $this->form->createView();
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getView()
|
||||
@@ -159,6 +161,8 @@ abstract class BaseForm
|
||||
public function setError($has_error = true)
|
||||
{
|
||||
$this->has_error = $has_error;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -180,6 +184,8 @@ abstract class BaseForm
|
||||
{
|
||||
$this->setError(true);
|
||||
$this->error_message = $message;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -32,6 +32,10 @@ class CategoryCreationForm extends BaseForm
|
||||
->add("title", "text", array(
|
||||
"constraints" => array(
|
||||
new NotBlank()
|
||||
),
|
||||
"label" => "Category title *",
|
||||
"label_attr" => array(
|
||||
"for" => "title"
|
||||
)
|
||||
))
|
||||
->add("parent", "integer", array(
|
||||
|
||||
@@ -40,11 +40,19 @@ class ConfigCreationForm extends BaseForm
|
||||
|
||||
$this->formBuilder
|
||||
->add("name", "text", array(
|
||||
"constraints" => $name_constraints
|
||||
"constraints" => $name_constraints,
|
||||
"label" => "Name *",
|
||||
"label_attr" => array(
|
||||
"for" => "name"
|
||||
)
|
||||
))
|
||||
->add("title", "text", array(
|
||||
"constraints" => array(
|
||||
new Constraints\NotBlank()
|
||||
),
|
||||
"label" => "Purpose *",
|
||||
"label_attr" => array(
|
||||
"for" => "purpose"
|
||||
)
|
||||
))
|
||||
->add("locale", "hidden", array(
|
||||
@@ -52,9 +60,16 @@ class ConfigCreationForm extends BaseForm
|
||||
new Constraints\NotBlank()
|
||||
)
|
||||
))
|
||||
->add("value", "text", array())
|
||||
->add("value", "text", array(
|
||||
"label" => "Value *",
|
||||
"label_attr" => array(
|
||||
"for" => "value"
|
||||
)
|
||||
))
|
||||
->add("hidden", "hidden", array())
|
||||
->add("secured", "hidden", array())
|
||||
->add("secured", "hidden", array(
|
||||
"label" => "Prevent variable modification or deletion, except for super-admin"
|
||||
))
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
@@ -44,11 +44,22 @@ class ConfigModificationForm extends BaseDescForm
|
||||
->add("name", "text", array(
|
||||
"constraints" => array(
|
||||
new NotBlank()
|
||||
),
|
||||
"label" => "Name",
|
||||
"label_attr" => array(
|
||||
"for" => "name"
|
||||
)
|
||||
))
|
||||
->add("value", "text", array(
|
||||
"label" => "Value",
|
||||
"label_attr" => array(
|
||||
"for" => "value"
|
||||
)
|
||||
))
|
||||
->add("value", "text", array())
|
||||
->add("hidden", "hidden", array())
|
||||
->add("secured", "hidden", array())
|
||||
->add("secured", "hidden", array(
|
||||
"label" => "Prevent variable modification or deletion, except for super-admin"
|
||||
))
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
@@ -40,11 +40,19 @@ class MessageCreationForm extends BaseForm
|
||||
|
||||
$this->formBuilder
|
||||
->add("name", "text", array(
|
||||
"constraints" => $name_constraints
|
||||
"constraints" => $name_constraints,
|
||||
"label" => "Name *",
|
||||
"label_attr" => array(
|
||||
"for" => "name"
|
||||
)
|
||||
))
|
||||
->add("title", "text", array(
|
||||
"constraints" => array(
|
||||
new Constraints\NotBlank()
|
||||
),
|
||||
"label" => "Purpose *",
|
||||
"label_attr" => array(
|
||||
"for" => "purpose"
|
||||
)
|
||||
))
|
||||
->add("locale", "hidden", array(
|
||||
|
||||
@@ -33,13 +33,43 @@ class MessageModificationForm extends BaseForm
|
||||
{
|
||||
$this->formBuilder
|
||||
->add("id" , "hidden", array("constraints" => array(new GreaterThan(array('value' => 0)))))
|
||||
->add("name" , "text" , array("constraints" => array(new NotBlank())))
|
||||
->add("secured" , "text" , array())
|
||||
->add("name" , "text" , array(
|
||||
"constraints" => array(new NotBlank()),
|
||||
"label" => "Name *",
|
||||
"label_attr" => array(
|
||||
"for" => "name"
|
||||
)
|
||||
))
|
||||
->add("secured" , "text" , array(
|
||||
"label" => "Prevent mailing template modification or deletion, except for super-admin"
|
||||
))
|
||||
->add("locale" , "text" , array())
|
||||
->add("title" , "text" , array("constraints" => array(new NotBlank())))
|
||||
->add("subject" , "text" , array("constraints" => array(new NotBlank())))
|
||||
->add("html_message" , "text" , array())
|
||||
->add("text_message" , "text" , array())
|
||||
->add("title" , "text" , array(
|
||||
"constraints" => array(new NotBlank()),
|
||||
"label" => "Title *",
|
||||
"label_attr" => array(
|
||||
"for" => "title"
|
||||
)
|
||||
))
|
||||
->add("subject" , "text" , array(
|
||||
"constraints" => array(new NotBlank()),
|
||||
"label" => "Message subject *",
|
||||
"label_attr" => array(
|
||||
"for" => "subject"
|
||||
)
|
||||
))
|
||||
->add("html_message" , "text" , array(
|
||||
"label" => "HTML Message",
|
||||
"label_attr" => array(
|
||||
"for" => "html_message"
|
||||
)
|
||||
))
|
||||
->add("text_message" , "text" , array(
|
||||
"label" => "Text Message",
|
||||
"label_attr" => array(
|
||||
"for" => "text_message"
|
||||
)
|
||||
))
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user