Fix templates + add public wanted reason
This commit is contained in:
@@ -19,7 +19,7 @@ class TemplateController extends AbstractController
|
||||
/**
|
||||
* @var Array $templates
|
||||
*/
|
||||
$templates = $TemplateRepository->listForUser($this->getUser())->getResult();
|
||||
$templates = $TemplateRepository->listForUser($this->getUser())->archive(false)->getResult();
|
||||
$json = [];
|
||||
|
||||
foreach ($templates as $template) {
|
||||
|
||||
@@ -427,6 +427,12 @@ class Directory
|
||||
*/
|
||||
private $wantedPublicDisplay = false;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="boolean", options={"default":"0"})
|
||||
* @Gedmo\Versioned
|
||||
*/
|
||||
private $wantedPublicReason = false;
|
||||
|
||||
/**
|
||||
* @ORM\OneToMany(targetEntity=Infringement::class, mappedBy="directory", orphanRemoval=true)
|
||||
* @ORM\OrderBy({"createdAt" = "DESC"})
|
||||
@@ -1376,6 +1382,18 @@ class Directory
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getWantedPublicReason(): ?bool
|
||||
{
|
||||
return $this->wantedPublicReason;
|
||||
}
|
||||
|
||||
public function setWantedPublicReason(bool $wantedPublicReason): self
|
||||
{
|
||||
$this->wantedPublicReason = $wantedPublicReason;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Collection|Infringement[]
|
||||
*/
|
||||
|
||||
@@ -69,6 +69,7 @@ class DirectoryType extends AbstractType
|
||||
->add('wantedReason', null, ['label' => 'form_label_wantedReason', 'help' => 'form_help_wantedReason'])
|
||||
->add('wantedDisplay', null, ['label' => 'form_label_wantedDisplay'])
|
||||
->add('wantedPublicDisplay', null, ['label' => 'form_label_wantedPublicDisplay'])
|
||||
->add('wantedPublicReason', null, ['label' => 'form_label_wantedPublicReason'])
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user