This file contains hidden or 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
| if [ -f .env ] | |
| then | |
| export $(grep -v '^#' .env | xargs) | |
| fi |
This file contains hidden or 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
| <?php | |
| class FormErrorsSerializer { | |
| public function serializeFormErrors(\Symfony\Component\Form\Form $form, $flat_array = false, $add_form_name = false, $glue_keys = '_') | |
| { | |
| $errors = array(); | |
| $errors['global'] = array(); | |
| $errors['fields'] = array(); | |
| foreach ($form->getErrors() as $error) { |
This file contains hidden or 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
| // HTML form part | |
| // < form class="form" action="{{ path('...') }}" method="POST" onsubmit="form_callback(this); return false;" > | |
| function form_callback(target) | |
| { | |
| target = $(target); | |
| $.ajax({ | |
| url: target.attr('action'), | |
| type: target.attr('method'), | |
| data: target.serialize(), |