-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from Darkenend/develop
Develop
- Loading branch information
Showing
5 changed files
with
146 additions
and
4 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 |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<?php | ||
|
||
namespace App\Form; | ||
|
||
use App\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\SubmitType; | ||
use Symfony\Component\Form\Extension\Core\Type\TextType; | ||
use Symfony\Component\Form\FormBuilderInterface; | ||
use Symfony\Component\OptionsResolver\OptionsResolver; | ||
|
||
class RegisterType extends AbstractType | ||
{ | ||
public function buildForm(FormBuilderInterface $builder, array $options) | ||
{ | ||
$builder | ||
->add('email', EmailType::class) | ||
->add('password', PasswordType::class) | ||
->add('name', TextType::class, [ | ||
'attr' => [ | ||
'maxlength' => '64' | ||
] | ||
]) | ||
->add('lastname', TextType::class, [ | ||
'attr' => [ | ||
'maxlength' => '128' | ||
] | ||
]) | ||
->add('steamid', TextType::class, [ | ||
'label' => 'Your SteamID64', | ||
'attr' => [ | ||
'maxlength' => '18' | ||
] | ||
]) | ||
->add('submit', SubmitType::class) | ||
; | ||
} | ||
|
||
public function configureOptions(OptionsResolver $resolver) | ||
{ | ||
$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
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,49 @@ | ||
{% extends 'base.html.twig' %} | ||
|
||
{% block title %}RLM | Register{% endblock %} | ||
|
||
{% block body %} | ||
<div class="row text-center"> | ||
<div class="col"> | ||
<h1 class="display-1"> | ||
Registration | ||
</h1> | ||
</div> | ||
</div> | ||
{{ form_start(form) }} | ||
<div class="row"> | ||
<div class="col col-md-6 col-lg-3 offset-lg-2"> | ||
{{ form_row(form.name)}} | ||
</div> | ||
<div class="col col-md-6 col-lg-3 offset-lg-2"> | ||
{{ form_row(form.lastname)}} | ||
</div> | ||
</div> | ||
<div class="row"> | ||
<div class="col col-md-6 col-lg-3 offset-lg-2"> | ||
{{ form_row(form.email)}} | ||
</div> | ||
<div class="col col-md-6 col-lg-3 offset-lg-2"> | ||
{{ form_row(form.password)}} | ||
</div> | ||
</div> | ||
<div class="row"> | ||
<div class="col col-md-6 col-lg-3 offset-lg-2"> | ||
{{ form_row(form.steamid)}} | ||
</div> | ||
<div class="col col-md-6 col-lg-3 offset-lg-2 my-auto"> | ||
If you don't know where to find your SteamID64, you can go <a href="https://steamidfinder.com">here</a>, and search for your profile. | ||
</div> | ||
</div> | ||
<div class="row text-center"> | ||
<div class="col-12"> | ||
{{ form_row(form.submit) }} | ||
</div> | ||
<div class="col-12"> | ||
<a href="{{ path('slash') }}"> | ||
Go back to the homepage | ||
</a> | ||
</div> | ||
</div> | ||
{{ form_end(form) }} | ||
{% endblock %} |