-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Due to data minimization, users should not be required to enter their email address or website to use the Site Package Builder. The vendor many ppl use is not the same as the company name. Also, not everyone works in a company (freelancers, universities, ...) and some customers or organizations want their own vendor no matter who created the site package. Make vendor its own field.
- Loading branch information
Showing
7 changed files
with
52 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,21 +30,18 @@ | |
*/ | ||
class Author implements \JsonSerializable | ||
{ | ||
#[Assert\NotBlank(message: "Please enter the authors' name.")] | ||
#[Assert\Length(min: 3)] | ||
#[OA\Property(type: 'string', example: 'J. Doe')] | ||
private string $name; | ||
|
||
#[Assert\NotBlank(message: "Please enter the authors' email address.")] | ||
#[OA\Property(type: 'string', example: '[email protected]')] | ||
#[Assert\Email(message: "The email '{{ value }}' is not a valid email.")] | ||
private string $email; | ||
|
||
#[Assert\NotBlank(message: "Please enter the authors' company.")] | ||
#[Assert\Length(min: 3)] | ||
#[Assert\Regex(pattern: '/^[A-Za-z0-9\x7f-\xff .:&-]+$/', message: 'Only letters, numbers and spaces are allowed')] | ||
#[Assert\Regex(pattern: '/^[\p{L}\p{N} .:&-]+$/u', message: 'Invalid characters in company name.')] | ||
#[OA\Property(type: 'string', example: 'TYPO3')] | ||
private string $company; | ||
|
||
#[Assert\NotBlank(message: "Please enter the authors' homepage URL.")] | ||
#[Assert\Url] | ||
#[OA\Property(type: 'string', example: 'https://typo3.com')] | ||
private string $homepage; | ||
|
||
public function getName(): string | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,6 +36,8 @@ public function buildForm(FormBuilderInterface $builder, array $options) | |
{ | ||
$builder | ||
->add('name', TextType::class, [ | ||
'required' => false, | ||
'empty_data' => '', | ||
'attr' => [ | ||
'autocomplete' => 'off', | ||
'placeholder' => 'John Doe', | ||
|
@@ -45,6 +47,8 @@ public function buildForm(FormBuilderInterface $builder, array $options) | |
], | ||
]) | ||
->add('email', EmailType::class, [ | ||
'required' => false, | ||
'empty_data' => '', | ||
'attr' => [ | ||
'autocomplete' => 'off', | ||
'placeholder' => '[email protected]', | ||
|
@@ -54,6 +58,8 @@ public function buildForm(FormBuilderInterface $builder, array $options) | |
], | ||
]) | ||
->add('company', TextType::class, [ | ||
'required' => false, | ||
'empty_data' => '', | ||
'attr' => [ | ||
'autocomplete' => 'off', | ||
'placeholder' => 'Company Inc.', | ||
|
@@ -63,6 +69,8 @@ public function buildForm(FormBuilderInterface $builder, array $options) | |
], | ||
]) | ||
->add('homepage', TextType::class, [ | ||
'required' => false, | ||
'empty_data' => '', | ||
'attr' => [ | ||
'autocomplete' => 'off', | ||
'placeholder' => 'https://www.example.com', | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters