This repository has been archived by the owner on May 27, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
EZP-26037: As an user, I want to be able to register
- Loading branch information
Showing
10 changed files
with
256 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<div class="user-menu dropdown hidden-xs"> | ||
{% if app.user %} | ||
{% set user = app.user.getAPIUser().content %} | ||
|
||
<button type="button" data-toggle="dropdown"> | ||
{% if not ez_is_field_empty(user, 'image') %} | ||
{% set imageAlias = ez_image_alias(user.getField('image'), user.versionInfo, 'platformui_profileview') %} | ||
|
||
<img src="{{ imageAlias.uri }}" title="{{ ez_content_name(user) }}" class="img-circle avatar" /> | ||
{% else %} | ||
<span class="icon-user avatar"></span> | ||
{% endif %} | ||
|
||
<br class="visible-xs" /> | ||
<span class="caret"></span> | ||
</button> | ||
<ul class="dropdown-menu"> | ||
<li class="username">{{ ez_content_name(user) }}</li> | ||
<li><a href="{{ path('logout') }}" title="{{ 'logout'|trans }}">{{ 'logout'|trans }}</a></li> | ||
</ul> | ||
{% else %} | ||
<button type="button" data-toggle="dropdown"> | ||
<span class="icon-user avatar"></span> | ||
<br class="visible-xs"> | ||
<span class="caret"></span> | ||
</button> | ||
|
||
<ul class="dropdown-menu"> | ||
<li><a href="{{ path('login') }}" title="{{ 'login'|trans }}">{{ 'login'|trans }}</a></li> | ||
<li><a href="{{ path('ez_user_register') }}" title="{{ 'register'|trans }}">{{ 'register'|trans }}</a></li> | ||
</ul> | ||
{% endif %} | ||
</div> |
25 changes: 25 additions & 0 deletions
25
app/Resources/views/user/registration_confirmation.html.twig
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,25 @@ | ||
{% extends pagelayout %} | ||
|
||
{% block page_head %} | ||
{% set title = 'Registerstration complete'|trans %} | ||
|
||
{{ parent() }} | ||
{% endblock %} | ||
|
||
{% block content %} | ||
<div class="container"> | ||
<section class="user-form-confirmation col-md-4 col-md-offset-4"> | ||
<h2>{{ 'Registration completed'|trans }}</h2> | ||
|
||
<div class="row confirmation-label"> | ||
{{ 'You are all set up and ready to go'|trans }} | ||
</div> | ||
|
||
<div class="row"> | ||
<div class="col-md-4 col-md-offset-4"> | ||
<button type="button" class="btn btn-block btn-primary" onclick="window.location='{{ path('login') }}';">{{ 'Log in'|trans }}</button> | ||
</div> | ||
</div> | ||
</section> | ||
</div> | ||
{% endblock %} |
47 changes: 47 additions & 0 deletions
47
app/Resources/views/user/registration_content_form.html.twig
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 @@ | ||
{% macro display_form(form) %} | ||
{{ form_start(form) }} | ||
|
||
{% for fieldForm in form.fieldsData %} | ||
{% set fieldIdentifier = fieldForm.vars.data.fieldDefinition.identifier %} | ||
|
||
{% if fieldIdentifier == 'first_name' or fieldIdentifier == 'last_name' %} | ||
{% if fieldIdentifier == 'first_name' %} | ||
<div class="row"> | ||
{% endif %} | ||
<div class="col-md-6"> | ||
<div class="field-name"> | ||
<label class="required">{{ fieldForm.children.value.vars.label }}:</label> | ||
</div> | ||
{{ form_errors(fieldForm.value) }} | ||
{{ form_widget(fieldForm.value, { | ||
'contentData': form.vars.data | ||
}) }} | ||
</div> | ||
{% if fieldIdentifier == 'last_name' %} | ||
</div> | ||
{% endif %} | ||
{% endif %} | ||
|
||
{% if fieldIdentifier == 'user_account' %} | ||
<div class="row"> | ||
<div class="col-md-6"> | ||
{{ form_widget(fieldForm.value, { | ||
'contentData': form.vars.data | ||
}) }} | ||
</div> | ||
</div> | ||
{% endif %} | ||
|
||
{%- do fieldForm.setRendered() -%} | ||
{% endfor %} | ||
|
||
<div class="row"> | ||
<div class="col-md-4 col-md-offset-4"> | ||
{{ form_widget(form.publish, {'attr': { | ||
'class': 'btn btn-block btn-primary' | ||
}}) }} | ||
</div> | ||
</div> | ||
|
||
{{ form_end(form) }} | ||
{% endmacro %} |
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,20 @@ | ||
{% extends pagelayout %} | ||
|
||
{% block page_head %} | ||
{% set title = 'Register user'|trans %} | ||
|
||
{{ parent() }} | ||
{% endblock %} | ||
|
||
{% block content %} | ||
{% import 'user/registration_content_form.html.twig' as registrationForm %} | ||
|
||
<div class="container"> | ||
<section class="user-form col-md-6 col-md-offset-3"> | ||
<h2>{{ 'Member Registration'|trans }}</h2> | ||
<div class="legend">* {{ 'All fields are required'|trans }}</div> | ||
|
||
{{ registrationForm.display_form(form) }} | ||
</section> | ||
</div> | ||
{% endblock %} |
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