-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Change intl twig dependencies (#71) * change intl twig dependance * add intl twig dependance * add contact page * better inputs spacing by default * fix footer * fix footer * fix error display --------- Co-authored-by: Alexandre Nozière <[email protected]>
- Loading branch information
Showing
12 changed files
with
185 additions
and
121 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.FieldInput--textArea { | ||
.FieldInput-input { | ||
min-height: 200px; | ||
} | ||
} |
51 changes: 51 additions & 0 deletions
51
components/Molecules/Fields/FieldTextArea/FieldTextArea.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,51 @@ | ||
{% set classes = classes|default('') %} | ||
{% set success = success|default(false) %} | ||
{% set size = size|default(false) %} | ||
{% set disabled = disabled|default(false) %} | ||
{% set optional = optional|default(false) %} | ||
{% set tooltip = tooltip|default(false) %} | ||
{% set name = name|default('') %} | ||
{% set label = label|default('') %} | ||
{% set value = value|default(null) %} | ||
{% set placeholder = placeholder|default(null) %} | ||
{% set button = button|default(null) %} | ||
{% set errors = errors|default(null) %} | ||
|
||
|
||
{% if errors %} | ||
{% set classes = classes ~ ' FieldInput--error' %} | ||
{% endif %} | ||
{% if success %} | ||
{% set classes = classes ~ ' FieldInput--success' %} | ||
{% endif %} | ||
|
||
|
||
<div class='FieldInput FieldInput--textArea{{ classes }}' {% if disabled %} disabled {% endif %}> | ||
<div class='FieldInput-header'> | ||
<label for='{{ name }}' class='FieldInput-label'> | ||
{{ label }} | ||
{% if optional and label %} | ||
({{'optional' | trans}}) | ||
{% endif %} | ||
</label> | ||
{% if tooltip %} | ||
{% include '../../Tooltip/Tooltip.html.twig' with {tooltip: tooltip, position: 'bottom'} %} | ||
{% endif %} | ||
</div> | ||
<div class='FieldInput-blockInput'> | ||
<textarea | ||
class='FieldInput-input' | ||
name='{{ name }}' | ||
id='{{ name }}' | ||
{% if value %} value='{{ value }}' {% endif %} | ||
{% if not optional %} required {% endif %} | ||
{% if placeholder %} placeholder='{{ placeholder }}{% if optional and not label %} ({{'optional' | trans}}){% endif %}' {% endif %} | ||
></textarea> | ||
</div> | ||
|
||
{% if errors %} | ||
{% for error in errors %} | ||
<span class='FieldInput-error'>{{ error }}</span> | ||
{% endfor %} | ||
{% endif %} | ||
</div> |
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,13 @@ | ||
{% extends 'contact.html.twig' %} | ||
|
||
{% block contactFormTitle %} | ||
<div class="my-12 mb-12 text-center"> | ||
<h2 class="mb-4 h2">{{ 'Thanks !' | trans }}</h2> | ||
</div> | ||
{% endblock %} | ||
|
||
{% block contactForm %} | ||
<div class="my-12 mb-12 text-center"> | ||
<p class="text-lg font-medium">{{'Thanks for your message, we will contact as soon as possible.'|trans}}</p> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{% extends 'base.html.twig' %} | ||
|
||
{% block title %}{{ 'Contact Us' | trans }}{% endblock %} | ||
|
||
{% block body %} | ||
<div class="max-w-[400px] mx-auto w-full px-[25px] pt-[30px] pb-[54px] lg:px-0 lg:pt-[50px] lg:pb-[120px] "> | ||
{% set form = getForm("thelia.front.contact") %} | ||
|
||
{% block contactFormTitle %} | ||
<h2 class="mb-4 h2">{{ 'Contact Us' | trans }}</h2> | ||
{% endblock %} | ||
|
||
{% block contactForm %} | ||
|
||
{{ form_start(form) }} | ||
|
||
{{form_rest(form)}} | ||
|
||
{{ form_errors(form) }} | ||
|
||
|
||
{% include "@components/Molecules/Button/Button.html.twig" with { text: 'Send' | trans, classes: "w-max mt-6", type: "submit" } %} | ||
|
||
{{ form_end(form) }} | ||
{% endblock %} | ||
|
||
</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
Oops, something went wrong.