Merge branch 'Xbird/FixDirectoryFields' into 'main'

Fix fields and add warning on content too long

See merge request gamexperience/vision!48
This commit is contained in:
Xbird
2022-10-01 22:55:58 +00:00
30 changed files with 681 additions and 597 deletions

1060
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,37 @@
<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20221001221659 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE criminal CHANGE content content TEXT NOT NULL');
$this->addSql('ALTER TABLE folder CHANGE content content TEXT NOT NULL');
$this->addSql('ALTER TABLE gang CHANGE content content TEXT NOT NULL');
$this->addSql('ALTER TABLE stolenvehicle CHANGE content content TEXT NOT NULL');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE criminal CHANGE content content LONGTEXT CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`');
$this->addSql('ALTER TABLE folder CHANGE content content LONGTEXT CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`');
$this->addSql('ALTER TABLE gang CHANGE content content LONGTEXT CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`');
$this->addSql('ALTER TABLE stolenvehicle CHANGE content content LONGTEXT CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`');
}
}

View File

@@ -26,13 +26,13 @@ function Raptor() {
skin: 'oxide-dark', skin: 'oxide-dark',
content_css: 'dark', content_css: 'dark',
language: 'fr_FR', language: 'fr_FR',
plugins: 'advlist autolink autosave code fullscreen hr image link lists paste quickbars searchreplace table template', plugins: 'advlist autolink autosave code fullscreen hr image link lists paste quickbars searchreplace table template wordcount',
menubar: 'edit insert view format table tools link', menubar: 'edit insert view format table tools link',
setup: function(ed) { setup: function(ed) {
ed.on('init', function(e) { ed.save(); }); ed.on('init', function(e) { ed.save(); });
ed.on('change', function(e) { ed.save(); }); ed.on('change', function(e) { ed.save(); });
}, },
toolbar: 'undo redo | bold italic underline | formatselect | alignleft aligncenter alignright alignjustify | outdent indent | numlist bullist | forecolor backcolor removeformat | link image template | fullscreen', toolbar: 'undo redo | bold italic underline | formatselect | alignleft aligncenter alignright alignjustify | outdent indent | numlist bullist | forecolor backcolor removeformat | link image template | fullscreen | wordcount',
toolbar_mode: 'wrap', toolbar_mode: 'wrap',
browser_spellcheck: true, browser_spellcheck: true,
contextmenu: false, contextmenu: false,

View File

@@ -4,6 +4,7 @@ namespace App\Command;
use App\Entity\User; use App\Entity\User;
use App\Entity\Group; use App\Entity\Group;
use App\Entity\Rank;
use Doctrine\ORM\Query; use Doctrine\ORM\Query;
use App\Repository\GroupRepository; use App\Repository\GroupRepository;
use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\EntityManagerInterface;
@@ -143,7 +144,7 @@ class AddUserCommand extends Command
/** /**
* @var RankRepository $rankRepository * @var RankRepository $rankRepository
*/ */
$rankRepository = $this->entityManager->getRepository("App:Rank"); $rankRepository = $this->entityManager->getRepository(Rank::class);
if ($rankid && null === $rankRepository->find($rankid)) { if ($rankid && null === $rankRepository->find($rankid)) {
$rankid = ''; $rankid = '';
@@ -163,7 +164,7 @@ class AddUserCommand extends Command
); );
} }
global $groupRepository; global $groupRepository;
if (null === $this->entityManager->getRepository("App:Rank")->find($answer)) { if (null === $this->entityManager->getRepository(Rank::class)->find($answer)) {
throw new \RuntimeException( throw new \RuntimeException(
'No rank find for this id' 'No rank find for this id'
); );

View File

@@ -181,6 +181,8 @@ class AdminController extends AbstractController
$this->addFlash('danger', 'alert_error_saving_user'); $this->addFlash('danger', 'alert_error_saving_user');
return $this->redirectToRoute('admin_user_edit', ['id' => $User->getId()]); return $this->redirectToRoute('admin_user_edit', ['id' => $User->getId()]);
} }
} elseif ($form->isSubmitted() && !$form->isValid()) {
$this->addFlash('warning', 'alert_error_form_post');
} }
return $this->render('admin/user_edit.html.twig', [ return $this->render('admin/user_edit.html.twig', [
@@ -284,6 +286,8 @@ class AdminController extends AbstractController
} }
$this->addFlash('danger', 'alert_error_creating_group'); $this->addFlash('danger', 'alert_error_creating_group');
} }
} elseif ($form->isSubmitted() && !$form->isValid()) {
$this->addFlash('warning', 'alert_error_form_post');
} }
return $this->render('admin/group_add.html.twig', [ return $this->render('admin/group_add.html.twig', [
@@ -314,6 +318,8 @@ class AdminController extends AbstractController
} }
$this->addFlash('danger', 'alert_error_editing_group'); $this->addFlash('danger', 'alert_error_editing_group');
} }
} elseif ($form->isSubmitted() && !$form->isValid()) {
$this->addFlash('warning', 'alert_error_form_post');
} }
return $this->render('admin/group_edit.html.twig', [ return $this->render('admin/group_edit.html.twig', [
@@ -377,6 +383,8 @@ class AdminController extends AbstractController
} }
$this->addFlash('danger', 'alert_error_editing_rank'); $this->addFlash('danger', 'alert_error_editing_rank');
} }
} elseif ($form->isSubmitted() && !$form->isValid()) {
$this->addFlash('warning', 'alert_error_form_post');
} }
return $this->render('admin/group_rank_edit.html.twig', [ return $this->render('admin/group_rank_edit.html.twig', [
@@ -411,6 +419,8 @@ class AdminController extends AbstractController
} }
$this->addFlash('danger', 'alert_error_creating_rank'); $this->addFlash('danger', 'alert_error_creating_rank');
} }
} elseif ($form->isSubmitted() && !$form->isValid()) {
$this->addFlash('warning', 'alert_error_form_post');
} }
return $this->render('admin/group_rank_add.html.twig', [ return $this->render('admin/group_rank_add.html.twig', [
@@ -496,6 +506,8 @@ class AdminController extends AbstractController
} }
$this->addFlash('danger', 'alert_error_editing_subgroup'); $this->addFlash('danger', 'alert_error_editing_subgroup');
} }
} elseif ($form->isSubmitted() && !$form->isValid()) {
$this->addFlash('warning', 'alert_error_form_post');
} }
return $this->render('admin/group_subgroup_edit.html.twig', [ return $this->render('admin/group_subgroup_edit.html.twig', [
@@ -530,6 +542,8 @@ class AdminController extends AbstractController
} }
$this->addFlash('danger', 'alert_error_creating_subgroup'); $this->addFlash('danger', 'alert_error_creating_subgroup');
} }
} elseif ($form->isSubmitted() && !$form->isValid()) {
$this->addFlash('warning', 'alert_error_form_post');
} }
return $this->render('admin/group_subgroup_add.html.twig', [ return $this->render('admin/group_subgroup_add.html.twig', [

View File

@@ -51,6 +51,8 @@ class CommentController extends AbstractController
$this->addFlash('success', 'alert_success_creating_comment'); $this->addFlash('success', 'alert_success_creating_comment');
return $this->redirectToRoute('document_view', ['id' => $Document->getId()]); return $this->redirectToRoute('document_view', ['id' => $Document->getId()]);
} elseif ($form->isSubmitted() && !$form->isValid()) {
$this->addFlash('warning', 'alert_error_form_post');
} }
return $this->redirectToRoute('document_view', ['id' => $Document->getId()]); return $this->redirectToRoute('document_view', ['id' => $Document->getId()]);
@@ -109,6 +111,8 @@ class CommentController extends AbstractController
$this->addFlash('success', 'alert_success_editing_comment'); $this->addFlash('success', 'alert_success_editing_comment');
return $this->redirectToRoute('document_view', ['id' => $Comment->getDocument()->getId()]); return $this->redirectToRoute('document_view', ['id' => $Comment->getDocument()->getId()]);
} elseif ($form->isSubmitted() && !$form->isValid()) {
$this->addFlash('warning', 'alert_error_form_post');
} }
return $this->render('comment/edit.html.twig', [ return $this->render('comment/edit.html.twig', [

View File

@@ -144,7 +144,10 @@ class DirectoryController extends AbstractController
$this->addFlash('success', 'alert_success_creating_directory'); $this->addFlash('success', 'alert_success_creating_directory');
return $this->redirectToRoute('directory_view', ['id' => $Directory->getId()]); return $this->redirectToRoute('directory_view', ['id' => $Directory->getId()]);
} elseif ($form->isSubmitted() && !$form->isValid()) {
$this->addFlash('warning', 'alert_error_form_post');
} }
return $this->render('directory/create.html.twig', [ return $this->render('directory/create.html.twig', [
'controller_name' => 'DirectoryController', 'controller_name' => 'DirectoryController',
'directory' => $Directory, 'directory' => $Directory,
@@ -177,7 +180,10 @@ class DirectoryController extends AbstractController
$this->addFlash('success', 'alert_success_editing_directory'); $this->addFlash('success', 'alert_success_editing_directory');
return $this->redirectToRoute('directory_view', ['id' => $Directory->getId()]); return $this->redirectToRoute('directory_view', ['id' => $Directory->getId()]);
} elseif ($form->isSubmitted() && !$form->isValid()) {
$this->addFlash('warning', 'alert_error_form_post');
} }
return $this->render('directory/edit.html.twig', [ return $this->render('directory/edit.html.twig', [
'controller_name' => 'DirectoryController', 'controller_name' => 'DirectoryController',
'directory' => $Directory, 'directory' => $Directory,

View File

@@ -140,6 +140,7 @@ class DocumentController extends AbstractController
if ($form->isSubmitted() && $form->isValid()) { if ($form->isSubmitted() && $form->isValid()) {
/** /**
* @var User $loggedUser * @var User $loggedUser
*/ */
@@ -176,6 +177,8 @@ class DocumentController extends AbstractController
$this->addFlash('success', 'alert_success_creating_document'); $this->addFlash('success', 'alert_success_creating_document');
return $this->redirectToRoute('document_view', ['id' => $Document->getId()]); return $this->redirectToRoute('document_view', ['id' => $Document->getId()]);
} elseif ($form->isSubmitted() && !$form->isValid()) {
$this->addFlash('warning', 'alert_error_form_post');
} }
return $this->render('document/create.html.twig', [ return $this->render('document/create.html.twig', [
@@ -199,8 +202,6 @@ class DocumentController extends AbstractController
$form = $this->getFormByDocumentType($Document); $form = $this->getFormByDocumentType($Document);
$form->handleRequest($request); $form->handleRequest($request);
if ($form->isSubmitted() && $form->isValid()) { if ($form->isSubmitted() && $form->isValid()) {
/** /**
@@ -253,6 +254,8 @@ class DocumentController extends AbstractController
$this->addFlash('success', 'alert_success_editing_document'); $this->addFlash('success', 'alert_success_editing_document');
return $this->redirectToRoute('document_view', ['id' => $Document->getId()]); return $this->redirectToRoute('document_view', ['id' => $Document->getId()]);
} elseif ($form->isSubmitted() && !$form->isValid()) {
$this->addFlash('warning', 'alert_error_form_post');
} }
return $this->render('document/edit.html.twig', [ return $this->render('document/edit.html.twig', [
'controller_name' => 'DocumentController', 'controller_name' => 'DocumentController',

View File

@@ -58,6 +58,8 @@ class GroupController extends AbstractController
} }
$this->addFlash('danger', 'alert_error_editing_motd'); $this->addFlash('danger', 'alert_error_editing_motd');
} }
} elseif ($form->isSubmitted() && !$form->isValid()) {
$this->addFlash('warning', 'alert_error_form_post');
} }
return $this->render('group/index.html.twig', [ return $this->render('group/index.html.twig', [
@@ -203,6 +205,8 @@ class GroupController extends AbstractController
} }
$this->addFlash('danger', 'alert_error_editing_employee'); $this->addFlash('danger', 'alert_error_editing_employee');
} }
} elseif ($form->isSubmitted() && !$form->isValid()) {
$this->addFlash('warning', 'alert_error_form_post');
} }
return $this->render('group/employee.html.twig', [ return $this->render('group/employee.html.twig', [

View File

@@ -54,6 +54,8 @@ class MeController extends AbstractController
$this->addFlash('success', 'alert_success_editing_profile'); $this->addFlash('success', 'alert_success_editing_profile');
$request->getSession()->set('_locale', $user->getLocale()); $request->getSession()->set('_locale', $user->getLocale());
return $this->redirectToRoute('me_index'); return $this->redirectToRoute('me_index');
} elseif ($form->isSubmitted() && !$form->isValid()) {
$this->addFlash('warning', 'alert_error_form_post');
} }
@@ -104,6 +106,8 @@ class MeController extends AbstractController
$this->addFlash('success', 'alert_success_editing_password'); $this->addFlash('success', 'alert_success_editing_password');
$request->getSession()->set('_locale', $user->getLocale()); $request->getSession()->set('_locale', $user->getLocale());
return $this->redirectToRoute('me_index'); return $this->redirectToRoute('me_index');
} elseif ($form->isSubmitted() && !$form->isValid()) {
$this->addFlash('warning', 'alert_error_form_post');
} }

View File

@@ -6,6 +6,7 @@ use App\Entity\Document;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
use App\Repository\AnnounceRepository; use App\Repository\AnnounceRepository;
use Gedmo\Mapping\Annotation as Gedmo; use Gedmo\Mapping\Annotation as Gedmo;
use Symfony\Component\Validator\Constraints as Assert;
/** /**
* @ORM\Entity(repositoryClass=AnnounceRepository::class) * @ORM\Entity(repositoryClass=AnnounceRepository::class)
@@ -13,8 +14,12 @@ use Gedmo\Mapping\Annotation as Gedmo;
class Announce extends Document class Announce extends Document
{ {
/** /**
* @ORM\Column(type="text") * @ORM\Column(type="text", length=65535)
* @Gedmo\Versioned * @Gedmo\Versioned
* @Assert\Length(
* max=65535,
* maxMessage="Content too long : {{ limit }} max"
* )
*/ */
private $content; private $content;

View File

@@ -5,6 +5,7 @@ namespace App\Entity;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo; use Gedmo\Mapping\Annotation as Gedmo;
use App\Repository\CertificateRepository; use App\Repository\CertificateRepository;
use Symfony\Component\Validator\Constraints as Assert;
/** /**
* @ORM\Entity(repositoryClass=CertificateRepository::class) * @ORM\Entity(repositoryClass=CertificateRepository::class)
@@ -12,8 +13,12 @@ use App\Repository\CertificateRepository;
class Certificate extends Document class Certificate extends Document
{ {
/** /**
* @ORM\Column(type="text") * @ORM\Column(type="text", length=65535)
* @Gedmo\Versioned * @Gedmo\Versioned
* @Assert\Length(
* max=65535,
* maxMessage="Content too long : {{ limit }} max"
* )
*/ */
private $content; private $content;

View File

@@ -5,6 +5,7 @@ namespace App\Entity;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
use App\Repository\CommentRepository; use App\Repository\CommentRepository;
use Gedmo\Mapping\Annotation as Gedmo; use Gedmo\Mapping\Annotation as Gedmo;
use Symfony\Component\Validator\Constraints as Assert;
/** /**
* @ORM\Entity(repositoryClass=CommentRepository::class) * @ORM\Entity(repositoryClass=CommentRepository::class)
@@ -20,8 +21,12 @@ class Comment
private $id; private $id;
/** /**
* @ORM\Column(type="text") * @ORM\Column(type="text", length=65535)
* @Gedmo\Versioned * @Gedmo\Versioned
* @Assert\Length(
* max=65535,
* maxMessage="Content too long : {{ limit }} max"
* )
*/ */
private $content; private $content;

View File

@@ -6,6 +6,7 @@ use App\Entity\Document;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo; use Gedmo\Mapping\Annotation as Gedmo;
use App\Repository\ComplaintRepository; use App\Repository\ComplaintRepository;
use Symfony\Component\Validator\Constraints as Assert;
/** /**
* @ORM\Entity(repositoryClass=ComplaintRepository::class) * @ORM\Entity(repositoryClass=ComplaintRepository::class)
@@ -19,8 +20,12 @@ class Complaint extends Document
private $directory; private $directory;
/** /**
* @ORM\Column(type="text") * @ORM\Column(type="text", length=65535)
* @Gedmo\Versioned * @Gedmo\Versioned
* @Assert\Length(
* max=65535,
* maxMessage="Content too long : {{ limit }} max"
* )
*/ */
private $content; private $content;

View File

@@ -6,6 +6,7 @@ use App\Entity\Document;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
use App\Repository\CriminalRepository; use App\Repository\CriminalRepository;
use Gedmo\Mapping\Annotation as Gedmo; use Gedmo\Mapping\Annotation as Gedmo;
use Symfony\Component\Validator\Constraints as Assert;
/** /**
* @ORM\Entity(repositoryClass=CriminalRepository::class) * @ORM\Entity(repositoryClass=CriminalRepository::class)
@@ -31,8 +32,12 @@ class Criminal extends Document
private $amountTime; private $amountTime;
/** /**
* @ORM\Column(type="text", nullable=true) * @ORM\Column(type="text", length=65535)
* @Gedmo\Versioned * @Gedmo\Versioned
* @Assert\Length(
* max=65535,
* maxMessage="Content too long : {{ limit }} max"
* )
*/ */
private $content; private $content;

View File

@@ -8,6 +8,7 @@ use App\Repository\FolderRepository;
use Gedmo\Mapping\Annotation as Gedmo; use Gedmo\Mapping\Annotation as Gedmo;
use Doctrine\Common\Collections\Collection; use Doctrine\Common\Collections\Collection;
use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\ArrayCollection;
use Symfony\Component\Validator\Constraints as Assert;
/** /**
* @ORM\Entity(repositoryClass=FolderRepository::class) * @ORM\Entity(repositoryClass=FolderRepository::class)
@@ -15,8 +16,12 @@ use Doctrine\Common\Collections\ArrayCollection;
class Folder extends Document class Folder extends Document
{ {
/** /**
* @ORM\Column(type="text", nullable=true) * @ORM\Column(type="text", length=65535)
* @Gedmo\Versioned * @Gedmo\Versioned
* @Assert\Length(
* max=65535,
* maxMessage="Content too long : {{ limit }} max"
* )
*/ */
private $content; private $content;

View File

@@ -8,6 +8,7 @@ use App\Repository\GangRepository;
use Gedmo\Mapping\Annotation as Gedmo; use Gedmo\Mapping\Annotation as Gedmo;
use Doctrine\Common\Collections\Collection; use Doctrine\Common\Collections\Collection;
use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\ArrayCollection;
use Symfony\Component\Validator\Constraints as Assert;
/** /**
* @ORM\Entity(repositoryClass=GangRepository::class) * @ORM\Entity(repositoryClass=GangRepository::class)
@@ -23,8 +24,12 @@ class Gang extends Document
} }
/** /**
* @ORM\Column(type="text", nullable=true) * @ORM\Column(type="text", length=65535)
* @Gedmo\Versioned * @Gedmo\Versioned
* @Assert\Length(
* max=65535,
* maxMessage="Content too long : {{ limit }} max"
* )
*/ */
private $content; private $content;

View File

@@ -5,6 +5,7 @@ namespace App\Entity;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo; use Gedmo\Mapping\Annotation as Gedmo;
use App\Repository\InfringementRepository; use App\Repository\InfringementRepository;
use Symfony\Component\Validator\Constraints as Assert;
/** /**
* @ORM\Entity(repositoryClass=InfringementRepository::class) * @ORM\Entity(repositoryClass=InfringementRepository::class)
@@ -12,8 +13,12 @@ use App\Repository\InfringementRepository;
class Infringement extends Document class Infringement extends Document
{ {
/** /**
* @ORM\Column(type="text") * @ORM\Column(type="text", length=65535)
* @Gedmo\Versioned * @Gedmo\Versioned
* @Assert\Length(
* max=65535,
* maxMessage="Content too long : {{ limit }} max"
* )
*/ */
private $content; private $content;

View File

@@ -8,6 +8,7 @@ use App\Entity\Document;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
use App\Repository\JailRepository; use App\Repository\JailRepository;
use Gedmo\Mapping\Annotation as Gedmo; use Gedmo\Mapping\Annotation as Gedmo;
use Symfony\Component\Validator\Constraints as Assert;
/** /**
* @ORM\Entity(repositoryClass=JailRepository::class) * @ORM\Entity(repositoryClass=JailRepository::class)
@@ -33,8 +34,12 @@ class Jail extends Document
private $directory; private $directory;
/** /**
* @ORM\Column(type="text") * @ORM\Column(type="text", length=65535)
* @Gedmo\Versioned * @Gedmo\Versioned
* @Assert\Length(
* max=65535,
* maxMessage="Content too long : {{ limit }} max"
* )
*/ */
private $content; private $content;

View File

@@ -6,6 +6,7 @@ use App\Entity\Document;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
use App\Repository\MedicalRepository; use App\Repository\MedicalRepository;
use Gedmo\Mapping\Annotation as Gedmo; use Gedmo\Mapping\Annotation as Gedmo;
use Symfony\Component\Validator\Constraints as Assert;
/** /**
* @ORM\Entity(repositoryClass=MedicalRepository::class) * @ORM\Entity(repositoryClass=MedicalRepository::class)
@@ -19,8 +20,12 @@ class Medical extends Document
private $directory; private $directory;
/** /**
* @ORM\Column(type="text") * @ORM\Column(type="text", length=65535)
* @Gedmo\Versioned * @Gedmo\Versioned
* @Assert\Length(
* max=65535,
* maxMessage="Content too long : {{ limit }} max"
* )
*/ */
private $content; private $content;

View File

@@ -5,6 +5,7 @@ namespace App\Entity;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo; use Gedmo\Mapping\Annotation as Gedmo;
use App\Repository\NotificationRepository; use App\Repository\NotificationRepository;
use Symfony\Component\Validator\Constraints as Assert;
/** /**
* @ORM\Entity(repositoryClass=NotificationRepository::class) * @ORM\Entity(repositoryClass=NotificationRepository::class)
@@ -35,7 +36,11 @@ class Notification
private $icon; private $icon;
/** /**
* @ORM\Column(type="text") * @ORM\Column(type="text", length=65535)
* @Assert\Length(
* max=65535,
* maxMessage="Content too long : {{ limit }} max"
* )
*/ */
private $content; private $content;

View File

@@ -6,6 +6,7 @@ use App\Entity\Document;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
use App\Repository\ReportRepository; use App\Repository\ReportRepository;
use Gedmo\Mapping\Annotation as Gedmo; use Gedmo\Mapping\Annotation as Gedmo;
use Symfony\Component\Validator\Constraints as Assert;
/** /**
* @ORM\Entity(repositoryClass=ReportRepository::class) * @ORM\Entity(repositoryClass=ReportRepository::class)
@@ -13,8 +14,12 @@ use Gedmo\Mapping\Annotation as Gedmo;
class Report extends Document class Report extends Document
{ {
/** /**
* @ORM\Column(type="text") * @ORM\Column(type="text", length=65535)
* @Gedmo\Versioned * @Gedmo\Versioned
* @Assert\Length(
* max=65535,
* maxMessage="Content too long : {{ limit }} max"
* )
*/ */
private $content; private $content;

View File

@@ -5,6 +5,7 @@ namespace App\Entity;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
use App\Repository\SanctionRepository; use App\Repository\SanctionRepository;
use Gedmo\Mapping\Annotation as Gedmo; use Gedmo\Mapping\Annotation as Gedmo;
use Symfony\Component\Validator\Constraints as Assert;
/** /**
* @ORM\Entity(repositoryClass=SanctionRepository::class) * @ORM\Entity(repositoryClass=SanctionRepository::class)
@@ -12,8 +13,12 @@ use Gedmo\Mapping\Annotation as Gedmo;
class Sanction extends Document class Sanction extends Document
{ {
/** /**
* @ORM\Column(type="text") * @ORM\Column(type="text", length=65535)
* @Gedmo\Versioned * @Gedmo\Versioned
* @Assert\Length(
* max=65535,
* maxMessage="Content too long : {{ limit }} max"
* )
*/ */
private $content; private $content;

View File

@@ -6,6 +6,7 @@ use App\Entity\Document;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo; use Gedmo\Mapping\Annotation as Gedmo;
use App\Repository\StolenvehicleRepository; use App\Repository\StolenvehicleRepository;
use Symfony\Component\Validator\Constraints as Assert;
/** /**
* @ORM\Entity(repositoryClass=StolenvehicleRepository::class) * @ORM\Entity(repositoryClass=StolenvehicleRepository::class)
@@ -31,8 +32,12 @@ class Stolenvehicle extends Document
private $model; private $model;
/** /**
* @ORM\Column(type="text", nullable=true) * @ORM\Column(type="text", length=65535)
* @Gedmo\Versioned * @Gedmo\Versioned
* @Assert\Length(
* max=65535,
* maxMessage="Content too long : {{ limit }} max"
* )
*/ */
private $content; private $content;

View File

@@ -6,6 +6,7 @@ use App\Entity\Document;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
use App\Repository\TemplateRepository; use App\Repository\TemplateRepository;
use Gedmo\Mapping\Annotation as Gedmo; use Gedmo\Mapping\Annotation as Gedmo;
use Symfony\Component\Validator\Constraints as Assert;
/** /**
* @ORM\Entity(repositoryClass=TemplateRepository::class) * @ORM\Entity(repositoryClass=TemplateRepository::class)
@@ -18,8 +19,12 @@ class Template extends Document
} }
/** /**
* @ORM\Column(type="text") * @ORM\Column(type="text", length=65535)
* @Gedmo\Versioned * @Gedmo\Versioned
* @Assert\Length(
* max=65535,
* maxMessage="Content too long : {{ limit }} max"
* )
*/ */
private $content; private $content;

View File

@@ -4,7 +4,7 @@ namespace App\Form\Type;
use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\AbstractType;
use Symfony\Component\OptionsResolver\OptionsResolver; use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\Form\Extension\Core\Type\TextType; use Symfony\Component\Form\Extension\Core\Type\NumberType;
class HeightType extends AbstractType class HeightType extends AbstractType
{ {
@@ -20,6 +20,6 @@ class HeightType extends AbstractType
public function getParent(): string public function getParent(): string
{ {
return TextType::class; return NumberType::class;
} }
} }

View File

@@ -4,7 +4,7 @@ namespace App\Form\Type;
use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\AbstractType;
use Symfony\Component\OptionsResolver\OptionsResolver; use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\Form\Extension\Core\Type\TextType; use Symfony\Component\Form\Extension\Core\Type\NumberType;
class WeightType extends AbstractType class WeightType extends AbstractType
{ {
@@ -20,6 +20,6 @@ class WeightType extends AbstractType
public function getParent(): string public function getParent(): string
{ {
return TextType::class; return NumberType::class;
} }
} }

View File

@@ -36,6 +36,7 @@ alert_error_editing_password: Error while editing password
alert_error_editing_profile: Error while editing profile alert_error_editing_profile: Error while editing profile
alert_error_editing_rank: Error while editing rank alert_error_editing_rank: Error while editing rank
alert_error_fire_employee: Error while fireing employee alert_error_fire_employee: Error while fireing employee
alert_error_form_post: Error while sending form, check red messages on fields
alert_error_merging_directory: Error while merging directories alert_error_merging_directory: Error while merging directories
alert_error_problem_validating_reset_request: Error while validating reset request, contact an administrator alert_error_problem_validating_reset_request: Error while validating reset request, contact an administrator
alert_error_removing_from_folder: Error while removing item from folder alert_error_removing_from_folder: Error while removing item from folder
@@ -258,7 +259,7 @@ form_help_firstname: First name
form_help_gang: Select an associated group form_help_gang: Select an associated group
form_help_gender: Indicate the person's gender form_help_gender: Indicate the person's gender
form_help_group: Choose a group to join form_help_group: Choose a group to join
form_help_height: Indicate the size form_help_height: Indicate the size in centimeter (digits only)
form_help_jailed_at: Enter the celling date form_help_jailed_at: Enter the celling date
form_help_lastname: Last name form_help_lastname: Last name
form_help_medical_alcohol: Medical information on alcohol form_help_medical_alcohol: Medical information on alcohol
@@ -278,7 +279,7 @@ form_help_until: Indicate the date on which the permit can be surrendered
form_help_versus: Indicate against whom the complaint is made (X if unknown) form_help_versus: Indicate against whom the complaint is made (X if unknown)
form_help_wanted: Declare the deceased individual, remember to make a death certificate form_help_wanted: Declare the deceased individual, remember to make a death certificate
form_help_wantedReason: indicate here the reason, and the related document (s) form_help_wantedReason: indicate here the reason, and the related document (s)
form_help_weight: Indicate the weight form_help_weight: Indicate the weight in kg (digits only)
form_label_accessorySentence: Accessory penalty form_label_accessorySentence: Accessory penalty
form_label_address: Residence address form_label_address: Residence address
form_label_allowedgroups: Authorized groups form_label_allowedgroups: Authorized groups
@@ -367,12 +368,12 @@ form_placeholder_gang: Associated group
form_placeholder_gender: Male, Female, Undefined, ... form_placeholder_gender: Male, Female, Undefined, ...
form_placeholder_group_and_rank: No Rank form_placeholder_group_and_rank: No Rank
form_placeholder_group: Group form_placeholder_group: Group
form_placeholder_height: 175 cm form_placeholder_height: 175
form_placeholder_lastname: Last name form_placeholder_lastname: Last name
form_placeholder_password_repeat: Repeat password form_placeholder_password_repeat: Repeat password
form_placeholder_password: Password form_placeholder_password: Password
form_placeholder_phone: 123456 form_placeholder_phone: 123456
form_placeholder_weight: 80 kg form_placeholder_weight: 80
go_back_to_home: Back to home go_back_to_home: Back to home
go_back_to_referer: Go back to previous page go_back_to_referer: Go back to previous page
granted_not_allowed_administrate_group: You are not allowed to administrate your group granted_not_allowed_administrate_group: You are not allowed to administrate your group

View File

@@ -36,6 +36,7 @@ alert_error_editing_password: Erreur lors de l'édition du mot de passe
alert_error_editing_profile: Erreur lors de l'édition du profil alert_error_editing_profile: Erreur lors de l'édition du profil
alert_error_editing_rank: Erreur lors de l'édition du rang alert_error_editing_rank: Erreur lors de l'édition du rang
alert_error_fire_employee: Erreur lors du renvoi de l'employé alert_error_fire_employee: Erreur lors du renvoi de l'employé
alert_error_form_post: Erreur lors de l'envoi du formulaire, regardez les messages rouges sur les champs
alert_error_merging_directory: Erreur lors de la fusion des fiches alert_error_merging_directory: Erreur lors de la fusion des fiches
alert_error_problem_validating_reset_request: Erreur lors de la validation de la requête de reset, contacter un administrateur alert_error_problem_validating_reset_request: Erreur lors de la validation de la requête de reset, contacter un administrateur
alert_error_removing_from_folder: Erreur lors du retrait de l'élément du dossier alert_error_removing_from_folder: Erreur lors du retrait de l'élément du dossier
@@ -258,7 +259,7 @@ form_help_firstname: Prénom
form_help_gang: Séléctionnez un groupe associé a cette personne form_help_gang: Séléctionnez un groupe associé a cette personne
form_help_gender: Indiquez le genre de la personne form_help_gender: Indiquez le genre de la personne
form_help_group: Choisir un groupe à rejoindre form_help_group: Choisir un groupe à rejoindre
form_help_height: Indiquez la taille form_help_height: Indiquez la taille en centimetres (chiffres uniquement)
form_help_jailed_at: Entrez la date de mise en cellule form_help_jailed_at: Entrez la date de mise en cellule
form_help_lastname: Nom de Famille form_help_lastname: Nom de Famille
form_help_medical_alcohol: Informations médicales sur l'alcool form_help_medical_alcohol: Informations médicales sur l'alcool
@@ -278,7 +279,7 @@ form_help_until: Indiquez la date à laquelle le permis peut être redonné
form_help_versus: Indiquez contre qui la plainte est déposée (X si inconnu) form_help_versus: Indiquez contre qui la plainte est déposée (X si inconnu)
form_help_wanted: Déclarer l'individu décédé, pensez à faire un Acte de décès form_help_wanted: Déclarer l'individu décédé, pensez à faire un Acte de décès
form_help_wantedReason: indiquez ici la raison, et le/les document(s) lié(s) form_help_wantedReason: indiquez ici la raison, et le/les document(s) lié(s)
form_help_weight: Indiquez le poids form_help_weight: Indiquez le poids en kg (chiffres uniquement)
form_label_accessorySentence: Peine Accessoire form_label_accessorySentence: Peine Accessoire
form_label_address: Adresse de résidence form_label_address: Adresse de résidence
form_label_allowedgroups: Groupes autorisés form_label_allowedgroups: Groupes autorisés
@@ -367,12 +368,12 @@ form_placeholder_gang: Groupe Associé
form_placeholder_gender: Homme, Femme, non défini,... form_placeholder_gender: Homme, Femme, non défini,...
form_placeholder_group_and_rank: Pas de Rang form_placeholder_group_and_rank: Pas de Rang
form_placeholder_group: Groupe form_placeholder_group: Groupe
form_placeholder_height: 175 cm form_placeholder_height: 175
form_placeholder_lastname: Nom de famille form_placeholder_lastname: Nom de famille
form_placeholder_password_repeat: Répéter le mot de passe form_placeholder_password_repeat: Répéter le mot de passe
form_placeholder_password: Mot de passe form_placeholder_password: Mot de passe
form_placeholder_phone: 123456 form_placeholder_phone: 123456
form_placeholder_weight: 80 kg form_placeholder_weight: 80
go_back_to_home: retourner à l'accueil go_back_to_home: retourner à l'accueil
go_back_to_referer: retourner à la page précédente go_back_to_referer: retourner à la page précédente
granted_not_allowed_administrate_group: Vous n'êtes pas autorisé à gérer le groupe granted_not_allowed_administrate_group: Vous n'êtes pas autorisé à gérer le groupe

View File

@@ -1,3 +1,3 @@
{ {
"version": "0.2.13" "version": "0.2.14"
} }