diff --git a/src/Form/ComposeType.php b/src/Form/ComposeType.php index 352cbee..3f059b2 100644 --- a/src/Form/ComposeType.php +++ b/src/Form/ComposeType.php @@ -11,6 +11,7 @@ namespace App\Form; use App\SocialEntity\Compose; use Symfony\Component\Form\AbstractType; +use Symfony\Component\Form\Extension\Core\Type\CheckboxType; use Symfony\Component\Form\Extension\Core\Type\CollectionType; use Symfony\Component\Form\Extension\Core\Type\FileType; use Symfony\Component\Form\Extension\Core\Type\TextareaType; @@ -44,6 +45,7 @@ class ComposeType extends AbstractType { 'status.visibility.direct' => 'direct', ] ]); + $builder->add('sensitive', CheckboxType::class); $builder->add('scheduled_at', \Symfony\Component\Form\Extension\Core\Type\DateTimeType::class,[ 'widget' => 'single_text', ]); diff --git a/src/SocialEntity/Compose.php b/src/SocialEntity/Compose.php index 5edf960..a9bfe3a 100644 --- a/src/SocialEntity/Compose.php +++ b/src/SocialEntity/Compose.php @@ -27,6 +27,8 @@ class Compose private $sent_at; + private $sensitive; + private $social_account; private $in_reply_to_id; @@ -91,6 +93,24 @@ class Compose return $this; } + + + /** + * @return boolean + */ + public function getSensitive() + { + return $this->sensitive; + } + + /** + * @param mixed $sensitive + */ + public function setSensitive(bool $sensitive): void + { + $this->sensitive = $sensitive; + } + /** * @return Collection|Media[] */ diff --git a/templates/fediplan/schedule.html.twig b/templates/fediplan/schedule.html.twig index 4a07e08..737418d 100644 --- a/templates/fediplan/schedule.html.twig +++ b/templates/fediplan/schedule.html.twig @@ -48,6 +48,7 @@ +