update blog
This commit is contained in:
parent
1a4b5f9bdf
commit
52ae369553
|
@ -31,6 +31,15 @@ class BlogComment
|
|||
#[ORM\Column(type: Types::BOOLEAN, nullable: true)]
|
||||
private ?bool $publish = null;
|
||||
|
||||
#[ORM\Column(length: 255)]
|
||||
private ?string $name = null;
|
||||
|
||||
#[ORM\Column(length: 255)]
|
||||
private ?string $email = null;
|
||||
|
||||
#[ORM\Column(length: 255, nullable: true)]
|
||||
private ?string $website = null;
|
||||
|
||||
public function getId(): ?int
|
||||
{
|
||||
return $this->id;
|
||||
|
@ -95,4 +104,40 @@ class BlogComment
|
|||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getName(): ?string
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
public function setName(string $name): static
|
||||
{
|
||||
$this->name = $name;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getEmail(): ?string
|
||||
{
|
||||
return $this->email;
|
||||
}
|
||||
|
||||
public function setEmail(string $email): static
|
||||
{
|
||||
$this->email = $email;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getWebsite(): ?string
|
||||
{
|
||||
return $this->website;
|
||||
}
|
||||
|
||||
public function setWebsite(?string $website): static
|
||||
{
|
||||
$this->website = $website;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,8 +4,11 @@ namespace App\Form;
|
|||
|
||||
use App\Entity\BlogComment;
|
||||
use Symfony\Component\Form\AbstractType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\EmailType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\TextType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\UrlType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
|
||||
|
@ -14,7 +17,10 @@ class CommentType extends AbstractType
|
|||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
||||
{
|
||||
$builder
|
||||
->add('body',TextType::class,['attr'=>['autocomplete'=>'off']])
|
||||
->add('name',TextType::class)
|
||||
->add('email',EmailType::class)
|
||||
->add('website',UrlType::class)
|
||||
->add('body',TextareaType::class,['attr'=>['autocomplete'=>'off','rows'=>5]])
|
||||
->add('submit',SubmitType::class)
|
||||
;
|
||||
}
|
||||
|
|
|
@ -59,6 +59,22 @@
|
|||
<h5>ارسال دیدگاه</h5>
|
||||
{{ form_start(form) }}
|
||||
{{ form_errors(form) }}
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-12">
|
||||
{{ form_row(form.name) }}
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-6">
|
||||
{{ form_row(form.email) }}
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-6">
|
||||
{{ form_row(form.website) }}
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-12">
|
||||
{{ form_row(form.body) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ form_end(form) }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
|
6005
public_html/css/style.css
Normal file
6005
public_html/css/style.css
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue