diff --git a/assets/styles/_base.scss b/assets/styles/_base.scss index a10ab0d..263cbad 100644 --- a/assets/styles/_base.scss +++ b/assets/styles/_base.scss @@ -50,3 +50,9 @@ p { margin-top: $size-spacer-lg; } } + +ol { + li { + margin: 1em 0; + } +} diff --git a/assets/styles/_form.scss b/assets/styles/_form.scss index 18b2ca5..b122a26 100644 --- a/assets/styles/_form.scss +++ b/assets/styles/_form.scss @@ -4,10 +4,9 @@ form { display: grid; gap: $size-spacer-md; - // Form groups (label + input) - > div > div { + > div { display: grid; - gap: $size-spacer-sm; + gap: $size-spacer-md; } // Used for errors in forms @@ -40,6 +39,16 @@ form { font-weight: bolder; display: block; } + + .radio { + + input { + vertical-align: center; + display: inline-block; + width: auto; + } + + } } button, .btn { diff --git a/config/packages/twig.yaml b/config/packages/twig.yaml index 42ea0af..ba60fb5 100644 --- a/config/packages/twig.yaml +++ b/config/packages/twig.yaml @@ -1,6 +1,6 @@ twig: default_path: '%kernel.project_dir%/templates' - form_themes: [ 'foundation_6_layout.html.twig' ] + form_themes: [ 'bootstrap_3_layout.html.twig' ] globals: report_email: '%env(REPORT_EMAIL)%' app_name: '%env(APP_NAME)%' diff --git a/migrations/Version20240609192945.php b/migrations/Version20240609192945.php new file mode 100644 index 0000000..959ddc1 --- /dev/null +++ b/migrations/Version20240609192945.php @@ -0,0 +1,51 @@ +addSql('CREATE TABLE complaint (id UUID NOT NULL, status_id UUID NOT NULL, email VARCHAR(200) NOT NULL, created_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, money_sent DOUBLE PRECISION DEFAULT NULL, country VARCHAR(100) NOT NULL, code VARCHAR(200) NOT NULL, PRIMARY KEY(id))'); + $this->addSql('CREATE INDEX IDX_5F2732B56BF700BD ON complaint (status_id)'); + $this->addSql('COMMENT ON COLUMN complaint.id IS \'(DC2Type:uuid)\''); + $this->addSql('COMMENT ON COLUMN complaint.status_id IS \'(DC2Type:uuid)\''); + $this->addSql('COMMENT ON COLUMN complaint.created_at IS \'(DC2Type:datetime_immutable)\''); + $this->addSql('CREATE TABLE complaint_report (id UUID NOT NULL, complaint_id UUID NOT NULL, report_id UUID NOT NULL, PRIMARY KEY(id))'); + $this->addSql('CREATE INDEX IDX_E66CBA46EDAE188E ON complaint_report (complaint_id)'); + $this->addSql('CREATE UNIQUE INDEX UNIQ_E66CBA464BD2A4C0 ON complaint_report (report_id)'); + $this->addSql('COMMENT ON COLUMN complaint_report.id IS \'(DC2Type:uuid)\''); + $this->addSql('COMMENT ON COLUMN complaint_report.complaint_id IS \'(DC2Type:uuid)\''); + $this->addSql('COMMENT ON COLUMN complaint_report.report_id IS \'(DC2Type:uuid)\''); + $this->addSql('CREATE TABLE complaint_status (id UUID NOT NULL, name VARCHAR(100) NOT NULL, has_replied BOOLEAN NOT NULL, has_sent_sensitive_data BOOLEAN NOT NULL, has_sent_money BOOLEAN NOT NULL, PRIMARY KEY(id))'); + $this->addSql('COMMENT ON COLUMN complaint_status.id IS \'(DC2Type:uuid)\''); + $this->addSql('ALTER TABLE complaint ADD CONSTRAINT FK_5F2732B56BF700BD FOREIGN KEY (status_id) REFERENCES complaint_status (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE complaint_report ADD CONSTRAINT FK_E66CBA46EDAE188E FOREIGN KEY (complaint_id) REFERENCES complaint (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE complaint_report ADD CONSTRAINT FK_E66CBA464BD2A4C0 FOREIGN KEY (report_id) REFERENCES report (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + } + + public function down(Schema $schema): void + { + // this down() migration is auto-generated, please modify it to your needs + $this->addSql('ALTER TABLE complaint DROP CONSTRAINT FK_5F2732B56BF700BD'); + $this->addSql('ALTER TABLE complaint_report DROP CONSTRAINT FK_E66CBA46EDAE188E'); + $this->addSql('ALTER TABLE complaint_report DROP CONSTRAINT FK_E66CBA464BD2A4C0'); + $this->addSql('DROP TABLE complaint'); + $this->addSql('DROP TABLE complaint_report'); + $this->addSql('DROP TABLE complaint_status'); + } +} diff --git a/src/Controller/ComplaintController.php b/src/Controller/ComplaintController.php new file mode 100644 index 0000000..ec423c8 --- /dev/null +++ b/src/Controller/ComplaintController.php @@ -0,0 +1,67 @@ +createForm(NewComplaintType::class, $complaint); + $complaintForm->handleRequest($request); + + if ($complaintForm->isSubmitted() && $complaintForm->isValid()) { + + $element = $complaintForm->get('element'); + $report = $domainService->getReport($element->getData()); + + if($report->isSafe()){ + $element->addError(new FormError("This is not a fraudulent element.")); + }else{ + + $complaintReport = new ComplaintReport($complaint, $report); + + $em->persist($complaintReport); + $em->flush(); + + return $this->redirectToRoute('complaint_edit', [ + 'id' => $complaint->getId(), + 'code' => $complaint->getCode() + ]); + + + } + } + + return $this->renderForm('complaint/index.html.twig', [ + 'complaintForm' => $complaintForm, + ]); + } + + + #[Route('/{id}/{code}/edit', name: 'edit')] + public function edit(Complaint $complaint, $code): Response + { + if($complaint->getCode() !== $code) { + throw $this->createNotFoundException('The code is not valid'); + } + + return $this->renderForm('complaint/show.html.twig', [ + 'complaint' => $complaint, + ]); + } +} diff --git a/src/DataFixtures/ComplaintFixtures.php b/src/DataFixtures/ComplaintFixtures.php new file mode 100644 index 0000000..48c462f --- /dev/null +++ b/src/DataFixtures/ComplaintFixtures.php @@ -0,0 +1,66 @@ +complaintStatusRepository->findAll(); + $countries = Countries::getCountryCodes(); + $domains = $this->domainRepository->findAll(); + + + $letters = range("a", "z"); + foreach ($letters as $letter) { + + $complaint = new Complaint(); + $complaint->setCountry($countries[array_rand($countries)]); + + $complaint->setEmail("$letter@example.com"); + + $complaint->setStatus($statuses[array_rand($statuses)]); + + shuffle($domains); + for ($i = 0; $i < rand(1, 5); $i++) { + + $domain = $domains[$i]; + + $report = $this->domainService->getReport("http://$domain"); + $complaintReport = new ComplaintReport($complaint, $report); + $manager->persist($complaintReport); + + } + + $manager->persist($complaint); + } + + $manager->flush(); + } + + public function getDependencies() + { + return [ + DomainFixtures::class, + ComplaintStatusFixtures::class, + ]; + } +} diff --git a/src/DataFixtures/ComplaintStatusFixtures.php b/src/DataFixtures/ComplaintStatusFixtures.php new file mode 100644 index 0000000..e674fed --- /dev/null +++ b/src/DataFixtures/ComplaintStatusFixtures.php @@ -0,0 +1,34 @@ + "Got contacted", + 1 => "Got contacted, replied", + 2 => "Got contacted, replied, sent sensitive data", + 3 => "Got contacted, replied, sent sensitive data, sent money", + ]; + + foreach ($statuses as $index => $name) { + $status = new ComplaintStatus(); + $status->setName($name); + + $status->setHasReplied($index > 0); + $status->setHasSentSensitiveData($index > 1); + $status->setHasSentMoney($index > 2); + + $manager->persist($status); + } + + $manager->flush(); + } +} diff --git a/src/Entity/Complaint/Complaint.php b/src/Entity/Complaint/Complaint.php new file mode 100644 index 0000000..b958cbf --- /dev/null +++ b/src/Entity/Complaint/Complaint.php @@ -0,0 +1,159 @@ +setCreatedAt(new \DateTimeImmutable('now')); + $this->resetCode(); + $this->complaintReports = new ArrayCollection(); + } + + public function getEmail(): ?string + { + return $this->email; + } + + public function setEmail(string $email): static + { + $this->email = $email; + + return $this; + } + + public function getMoneySent(): ?float + { + return $this->moneySent; + } + + public function setMoneySent(?float $moneySent): static + { + $this->moneySent = $moneySent; + + return $this; + } + + public function getCountry(): ?string + { + return $this->country; + } + + public function setCountry(string $country): static + { + $this->country = $country; + + return $this; + } + + public function getCode(): ?string + { + return $this->code; + } + + public function resetCode(): static + { + + $this->code = bin2hex(random_bytes(16)); + + return $this; + } + + public function getCreatedAt(): ?\DateTimeImmutable + { + return $this->createdAt; + } + + private function setCreatedAt(\DateTimeImmutable $createdAt): static + { + $this->createdAt = $createdAt; + + return $this; + } + + public function getStatus(): ?ComplaintStatus + { + return $this->status; + } + + public function setStatus(?ComplaintStatus $status): static + { + $this->status = $status; + + return $this; + } + + /** + * @return Collection + */ + public function getComplaintReports(): Collection + { + return $this->complaintReports; + } + + public function addComplaintReport(ComplaintReport $complaintReport): static + { + if (!$this->complaintReports->contains($complaintReport)) { + $this->complaintReports->add($complaintReport); + $complaintReport->setComplaint($this); + } + + return $this; + } + + public function removeComplaintReport(ComplaintReport $complaintReport): static + { + if ($this->complaintReports->removeElement($complaintReport)) { + // set the owning side to null (unless already changed) + if ($complaintReport->getComplaint() === $this) { + $complaintReport->setComplaint(null); + } + } + + return $this; + } + + public function getReports(): Collection + { + return $this->complaintReports->map(fn($complaintReport) => $complaintReport->getReport()); + } +} diff --git a/src/Entity/Complaint/ComplaintReport.php b/src/Entity/Complaint/ComplaintReport.php new file mode 100644 index 0000000..a5ec47d --- /dev/null +++ b/src/Entity/Complaint/ComplaintReport.php @@ -0,0 +1,52 @@ +setComplaint($complaint); + $this->setReport($report); + } + + public function getComplaint(): ?Complaint + { + return $this->complaint; + } + + public function setComplaint(?Complaint $complaint): static + { + $this->complaint = $complaint; + + return $this; + } + + public function getReport(): ?Report + { + return $this->report; + } + + public function setReport(Report $report): static + { + $this->report = $report; + + return $this; + } +} diff --git a/src/Entity/Complaint/ComplaintStatus.php b/src/Entity/Complaint/ComplaintStatus.php new file mode 100644 index 0000000..1c98a69 --- /dev/null +++ b/src/Entity/Complaint/ComplaintStatus.php @@ -0,0 +1,119 @@ +getName() ?? ''; + } + + public function __construct() + { + $this->complaints = new ArrayCollection(); + } + + public function getName(): ?string + { + return $this->name; + } + + public function setName(string $name): static + { + $this->name = $name; + + return $this; + } + + public function isHasReplied(): ?bool + { + return $this->hasReplied; + } + + public function setHasReplied(bool $hasReplied): static + { + $this->hasReplied = $hasReplied; + + return $this; + } + + public function isHasSentSensitiveData(): ?bool + { + return $this->hasSentSensitiveData; + } + + public function setHasSentSensitiveData(bool $hasSentSensitiveData): static + { + $this->hasSentSensitiveData = $hasSentSensitiveData; + + return $this; + } + + public function isHasSentMoney(): ?bool + { + return $this->hasSentMoney; + } + + public function setHasSentMoney(bool $hasSentMoney): static + { + $this->hasSentMoney = $hasSentMoney; + + return $this; + } + + /** + * @return Collection + */ + public function getComplaints(): Collection + { + return $this->complaints; + } + + public function addComplaint(Complaint $complaint): static + { + if (!$this->complaints->contains($complaint)) { + $this->complaints->add($complaint); + $complaint->setStatus($this); + } + + return $this; + } + + public function removeComplaint(Complaint $complaint): static + { + if ($this->complaints->removeElement($complaint)) { + // set the owning side to null (unless already changed) + if ($complaint->getStatus() === $this) { + $complaint->setStatus(null); + } + } + + return $this; + } +} diff --git a/src/Entity/Report.php b/src/Entity/Report.php index 56fb4ee..8c46a2f 100644 --- a/src/Entity/Report.php +++ b/src/Entity/Report.php @@ -2,6 +2,8 @@ namespace App\Entity; +use App\Entity\Complaint\Complaint; +use App\Entity\Complaint\ComplaintReport; use App\Entity\Traits\UUIDTrait; use App\Repository\ReportRepository; use Doctrine\ORM\Mapping as ORM; @@ -26,6 +28,9 @@ class Report #[ORM\Column(type: 'datetime_immutable')] private $createdAt; + #[ORM\OneToOne(mappedBy: 'report', cascade: ['persist', 'remove'])] + private ?ComplaintReport $complaintReport = null; + public function __construct($value, $domain) { $this @@ -76,4 +81,36 @@ public function isAnalysed(): bool { return !!$this->getDomain()->getAnalysis(); } + + public function getComplaintReport(): ?ComplaintReport + { + return $this->complaintReport; + } + + public function setComplaintReport(ComplaintReport $complaintReport): static + { + // set the owning side of the relation if necessary + if ($complaintReport->getReport() !== $this) { + $complaintReport->setReport($this); + } + + $this->complaintReport = $complaintReport; + + return $this; + } + + public function getComplaint(): ?Complaint + { + return $this->getComplaintReport()?->getComplaint(); + } + + public function isDangerous(): ?bool + { + return $this->getDomain()->isDangerous(); + } + + public function isSafe(): ?bool + { + return $this->getDomain()->isSafe(); + } } diff --git a/src/Form/NewCheckType.php b/src/Form/NewCheckType.php index a7b6eae..9c589f3 100644 --- a/src/Form/NewCheckType.php +++ b/src/Form/NewCheckType.php @@ -17,19 +17,7 @@ class NewCheckType extends AbstractType public function buildForm(FormBuilderInterface $builder, array $options): void { $builder - ->add('element', UrlType::class, [ - 'label' => "Enter an email address or an url", - 'attr' => [ - 'placeholder' => "https://unops.org, hr@unicef.org, ..." - ], - 'required' => true, - 'constraints' => [ - new AtLeastOneOf([ - new Email(), - new Url() - ]) - ] - ]) + ->add('element', ReportElementType::class) ; } diff --git a/src/Form/NewComplaintType.php b/src/Form/NewComplaintType.php new file mode 100644 index 0000000..6aacbe2 --- /dev/null +++ b/src/Form/NewComplaintType.php @@ -0,0 +1,46 @@ +add('element', ReportElementType::class, options: [ + 'label' => 'What do you want to report?', + 'attr' => [ + 'placeholder' => 'scammer@example.com, fakejobs.example.com, etc.', + ], + ]) + ->add('status', options: [ + 'label' => 'Which of the following best describes your situation?', + 'required' => true, + 'expanded' => true, + ]) + ->add('country', CountryType::class, options: [ + 'label' => 'What is your citizenship or residency?', + 'required' => true, + 'placeholder' => 'Choose a country', + ]) + ->add('email', options: [ + 'label' => 'What is your email address?', + 'required' => true, + ]) + ; + } + + public function configureOptions(OptionsResolver $resolver): void + { + $resolver->setDefaults([ + 'data_class' => Complaint::class, + ]); + } +} diff --git a/src/Form/ReportElementType.php b/src/Form/ReportElementType.php new file mode 100644 index 0000000..f4c8885 --- /dev/null +++ b/src/Form/ReportElementType.php @@ -0,0 +1,37 @@ +setDefaults([ + 'label' => "Enter an email address or an url", + 'attr' => [ + 'placeholder' => "https://unops.org, hr@unicef.org, ..." + ], + 'mapped' => false, + 'required' => true, + 'constraints' => [ + new AtLeastOneOf([ + new Email(), + new Url() + ]) + ] + ]); + } +} diff --git a/src/Repository/Complaint/ComplaintReportRepository.php b/src/Repository/Complaint/ComplaintReportRepository.php new file mode 100644 index 0000000..d7a7b55 --- /dev/null +++ b/src/Repository/Complaint/ComplaintReportRepository.php @@ -0,0 +1,66 @@ + + * + * @method ComplaintReport|null find($id, $lockMode = null, $lockVersion = null) + * @method ComplaintReport|null findOneBy(array $criteria, array $orderBy = null) + * @method ComplaintReport[] findAll() + * @method ComplaintReport[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null) + */ +class ComplaintReportRepository extends ServiceEntityRepository +{ + public function __construct(ManagerRegistry $registry) + { + parent::__construct($registry, ComplaintReport::class); + } + + public function save(ComplaintReport $entity, bool $flush = false): void + { + $this->getEntityManager()->persist($entity); + + if ($flush) { + $this->getEntityManager()->flush(); + } + } + + public function remove(ComplaintReport $entity, bool $flush = false): void + { + $this->getEntityManager()->remove($entity); + + if ($flush) { + $this->getEntityManager()->flush(); + } + } + +// /** +// * @return ComplaintReport[] Returns an array of ComplaintReport objects +// */ +// public function findByExampleField($value): array +// { +// return $this->createQueryBuilder('c') +// ->andWhere('c.exampleField = :val') +// ->setParameter('val', $value) +// ->orderBy('c.id', 'ASC') +// ->setMaxResults(10) +// ->getQuery() +// ->getResult() +// ; +// } + +// public function findOneBySomeField($value): ?ComplaintReport +// { +// return $this->createQueryBuilder('c') +// ->andWhere('c.exampleField = :val') +// ->setParameter('val', $value) +// ->getQuery() +// ->getOneOrNullResult() +// ; +// } +} diff --git a/src/Repository/Complaint/ComplaintRepository.php b/src/Repository/Complaint/ComplaintRepository.php new file mode 100644 index 0000000..c1e1d8d --- /dev/null +++ b/src/Repository/Complaint/ComplaintRepository.php @@ -0,0 +1,66 @@ + + * + * @method Complaint|null find($id, $lockMode = null, $lockVersion = null) + * @method Complaint|null findOneBy(array $criteria, array $orderBy = null) + * @method Complaint[] findAll() + * @method Complaint[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null) + */ +class ComplaintRepository extends ServiceEntityRepository +{ + public function __construct(ManagerRegistry $registry) + { + parent::__construct($registry, Complaint::class); + } + + public function save(Complaint $entity, bool $flush = false): void + { + $this->getEntityManager()->persist($entity); + + if ($flush) { + $this->getEntityManager()->flush(); + } + } + + public function remove(Complaint $entity, bool $flush = false): void + { + $this->getEntityManager()->remove($entity); + + if ($flush) { + $this->getEntityManager()->flush(); + } + } + +// /** +// * @return Complaint[] Returns an array of Complaint objects +// */ +// public function findByExampleField($value): array +// { +// return $this->createQueryBuilder('c') +// ->andWhere('c.exampleField = :val') +// ->setParameter('val', $value) +// ->orderBy('c.id', 'ASC') +// ->setMaxResults(10) +// ->getQuery() +// ->getResult() +// ; +// } + +// public function findOneBySomeField($value): ?Complaint +// { +// return $this->createQueryBuilder('c') +// ->andWhere('c.exampleField = :val') +// ->setParameter('val', $value) +// ->getQuery() +// ->getOneOrNullResult() +// ; +// } +} diff --git a/src/Repository/Complaint/ComplaintStatusRepository.php b/src/Repository/Complaint/ComplaintStatusRepository.php new file mode 100644 index 0000000..2f3fefc --- /dev/null +++ b/src/Repository/Complaint/ComplaintStatusRepository.php @@ -0,0 +1,66 @@ + + * + * @method ComplaintStatus|null find($id, $lockMode = null, $lockVersion = null) + * @method ComplaintStatus|null findOneBy(array $criteria, array $orderBy = null) + * @method ComplaintStatus[] findAll() + * @method ComplaintStatus[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null) + */ +class ComplaintStatusRepository extends ServiceEntityRepository +{ + public function __construct(ManagerRegistry $registry) + { + parent::__construct($registry, ComplaintStatus::class); + } + + public function save(ComplaintStatus $entity, bool $flush = false): void + { + $this->getEntityManager()->persist($entity); + + if ($flush) { + $this->getEntityManager()->flush(); + } + } + + public function remove(ComplaintStatus $entity, bool $flush = false): void + { + $this->getEntityManager()->remove($entity); + + if ($flush) { + $this->getEntityManager()->flush(); + } + } + +// /** +// * @return ComplaintStatus[] Returns an array of ComplaintStatus objects +// */ +// public function findByExampleField($value): array +// { +// return $this->createQueryBuilder('c') +// ->andWhere('c.exampleField = :val') +// ->setParameter('val', $value) +// ->orderBy('c.id', 'ASC') +// ->setMaxResults(10) +// ->getQuery() +// ->getResult() +// ; +// } + +// public function findOneBySomeField($value): ?ComplaintStatus +// { +// return $this->createQueryBuilder('c') +// ->andWhere('c.exampleField = :val') +// ->setParameter('val', $value) +// ->getQuery() +// ->getOneOrNullResult() +// ; +// } +} diff --git a/templates/complaint/index.html.twig b/templates/complaint/index.html.twig new file mode 100644 index 0000000..a22832a --- /dev/null +++ b/templates/complaint/index.html.twig @@ -0,0 +1,35 @@ +{% extends 'base.html.twig' %} + +{% block title %}Create a new report{% endblock %} + +{% block body %} + +

{{ block('title') }}

+ +

+ {{ app_name }} is an independent platform. + In case you are a victim of a scam, you must also contact your local police department. +

+ +

+ This page allows the collection of evidence of fraudulent activities + that can be used by law enforcement and organizations in case of an investigation. + All data provided here will be stored and may be used for further analysis, including by third parties. +

+ +
+ + {% if report_email %} +

+ You can also report an email by forwarding it to {{ report_email }}. +

+ {% endif %} + + {{ form_start(complaintForm) }} + {{ form_widget(complaintForm) }} + + {{ form_end(complaintForm) }} + +
+ +{% endblock %} diff --git a/templates/complaint/show.html.twig b/templates/complaint/show.html.twig new file mode 100644 index 0000000..2fd88bf --- /dev/null +++ b/templates/complaint/show.html.twig @@ -0,0 +1,88 @@ +{% extends 'base.html.twig' %} + +{% block title %}Complaint by {{ complaint.email }}{% endblock %} + +{% block body %} + +

{{ block('title') }}

+ +

+ +

+ +
+ +

What to do?

+ +
    + +
  1. + Ignore the sender
    + {% if complaint.status.hasReplied %} + Cut all communication with the sender. + Do not reply to any email. + Do not click on any links or download any attachments. + {% else %} + Do not reply to the email. + {% endif %} + Do not click on any links or download any attachments. +
  2. + + {% if complaint.status.hasSentMoney %} +
  3. + Try to cancel the payment
    + Regarding the money you sent, contact your bank or credit card company immediately. + They might be able to cancel the transfer. + If you sent money through a service like Western Union, MoneyGram or PayPal, contact them as well. + There is a chance that the money has not been picked up yet, but you need to act quickly. +
  4. + {% endif %} + + {% if complaint.status.hasSentSensitiveData %} +
  5. + Protect your identity
    + If you sent your ID, Social Security Number, or any other sensitive information that might expose you to identity theft, + contact your local police department. You should also contact your bank and credit card companies regarding that matter. +
  6. + {% endif %} + +
  7. + Collect proofs
    + Add any other information you have to this report. + {% if complaint.status.hasSentSensitiveData or complaint.status.hasSentMoney%} + Only take the time to do it once you have taken the necessary steps to protect yourself. + {% endif %} +
  8. + +
+ + +
+ +

Reported

+ + + {% for report in complaint.reports %} + + + + + {% endfor %} +
{{ report.value }} + + {{ report.domain }} + +
+ + + {% if report_email %} +

Report your emails

+

+ If you received a potential scam, fraudulent activity, or any other concerning behavior, please report it immediately by forwarding it to {{ report_email }}. +

+ {% endif %} + +{% endblock %} diff --git a/templates/domain/show.html.twig b/templates/domain/show.html.twig index 8030f3d..13c9faa 100644 --- a/templates/domain/show.html.twig +++ b/templates/domain/show.html.twig @@ -50,10 +50,14 @@

{% endif %} - {% if domain.isDangerous and report_email %} -

Report your emails

+ {% if domain.isDangerous %} +

Were you targeted by {{ domain }}?

- If you received a potential scam, fraudulent activity, or any other concerning behavior, please report it immediately by forwarding it to {{ report_email }}. + If you suspect or have encountered a scam or fraudulent activity involving {{ domain }}, + please report it immediately: +

+

+ Report {{ domain }}

{% endif %} @@ -81,7 +85,7 @@

This domain has been checked {{ reports|length }} times. {% if domain.analysis.rating.isDangerous %} - This number can potentially correspond to the number of uncovered fraud schemes commited via {{ domain }}. + This number can potentially correspond to the number of uncovered fraud schemes committed via {{ domain }}. {% endif %}