-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7135800
commit 1f2fd59
Showing
7 changed files
with
124 additions
and
2 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
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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?php | ||
|
||
namespace CodedMonkey\Conductor\Form; | ||
|
||
use CodedMonkey\Conductor\Doctrine\Entity\User; | ||
use Symfony\Component\Form\AbstractType; | ||
use Symfony\Component\Form\Extension\Core\Type\EmailType; | ||
use Symfony\Component\Form\Extension\Core\Type\PasswordType; | ||
use Symfony\Component\Form\Extension\Core\Type\TextType; | ||
use Symfony\Component\Form\FormBuilderInterface; | ||
use Symfony\Component\OptionsResolver\OptionsResolver; | ||
|
||
class RegistrationFormType extends AbstractType | ||
{ | ||
public function buildForm(FormBuilderInterface $builder, array $options): void | ||
{ | ||
$builder | ||
->add('name', TextType::class, [ | ||
'required' => true, | ||
]) | ||
->add('email', EmailType::class, [ | ||
'required' => true, | ||
]) | ||
->add('plainPassword', PasswordType::class, [ | ||
'label' => 'Password', | ||
'required' => true, | ||
]); | ||
} | ||
|
||
public function configureOptions(OptionsResolver $resolver): void | ||
{ | ||
$resolver->setDefaults([ | ||
'data_class' => User::class, | ||
]); | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{% extends ea.templatePath('layout') %} | ||
|
||
{% block page_title ea.dashboardTitle|raw %} | ||
|
||
{% block body_class 'page-login' %} | ||
|
||
{% block wrapper_wrapper %} | ||
<div class="login-wrapper"> | ||
<header class="main-header"> | ||
<div id="header-logo"> | ||
<a href="{{ path('dashboard') }}" class="logo logo-long"> | ||
{{ block('page_title') }} | ||
</a> | ||
</div> | ||
</header> | ||
|
||
<section class="content"> | ||
<p class="lead">Register an account.</p> | ||
{{ form_start(form) }} | ||
{{ form_row(form.name) }} | ||
{{ form_row(form.email) }} | ||
{{ form_row(form.plainPassword) }} | ||
|
||
<div class="form-group"> | ||
<button class="btn btn-primary">Create account</button> | ||
</div> | ||
{{ form_end(form) }} | ||
</section> | ||
</div> | ||
|
||
<script src="{{ asset('login.js', constant('EasyCorp\\Bundle\\EasyAdminBundle\\Asset\\AssetPackage::PACKAGE_NAME')) }}"></script> | ||
{% endblock wrapper_wrapper %} |