diff --git a/webapp/src/Form/Type/JuryClarificationType.php b/webapp/src/Form/Type/JuryClarificationType.php index 16e3c0bec9..9d41138f84 100644 --- a/webapp/src/Form/Type/JuryClarificationType.php +++ b/webapp/src/Form/Type/JuryClarificationType.php @@ -99,7 +99,6 @@ public function buildForm(FormBuilderInterface $builder, array $options): void ]); $builder->add('message', TextareaType::class, [ - 'label' => false, 'attr' => [ 'rows' => 5, 'cols' => 85, diff --git a/webapp/src/Form/Type/TeamClarificationType.php b/webapp/src/Form/Type/TeamClarificationType.php index b21367a634..804edc754e 100644 --- a/webapp/src/Form/Type/TeamClarificationType.php +++ b/webapp/src/Form/Type/TeamClarificationType.php @@ -10,6 +10,7 @@ use Symfony\Component\Form\Extension\Core\Type\TextareaType; use Symfony\Component\Form\Extension\Core\Type\TextType; use Symfony\Component\Form\FormBuilderInterface; +use Symfony\Component\Validator\Constraints\NotEqualTo; class TeamClarificationType extends AbstractType { @@ -50,7 +51,6 @@ public function buildForm(FormBuilderInterface $builder, array $options): void 'choices' => $subjects, ]); $builder->add('message', TextareaType::class, [ - 'label' => false, 'attr' => [ 'rows' => 5, 'cols' => 85, diff --git a/webapp/templates/jury/partials/clarification_form.html.twig b/webapp/templates/jury/partials/clarification_form.html.twig index 34ae213ff1..fac7ac4897 100644 --- a/webapp/templates/jury/partials/clarification_form.html.twig +++ b/webapp/templates/jury/partials/clarification_form.html.twig @@ -1,25 +1,12 @@ {{ form_start(form) }} {{ form_row(form.recipient) }} {{ form_row(form.subject) }} -
-
-
- -
- {{ form_row(form.message) }} -
-
-
-
- -
-
-
- Start typing to see a preview of your message -
-
+{{ form_row(form.message) }} +
+
+
+ +
Start typing to see a preview of your message
diff --git a/webapp/templates/team/base.html.twig b/webapp/templates/team/base.html.twig index dfd21e1aa5..50ca40bdc4 100644 --- a/webapp/templates/team/base.html.twig +++ b/webapp/templates/team/base.html.twig @@ -16,16 +16,21 @@ return confirm("Send clarification request to Jury?"); }); - $body.on('click', '#clarification-reply-button', function() { + window.replaceClarificationReplyButton = function() { + var $replyButton = $('#clarification-reply-button'); var $submitButton = $(''); - $(this).replaceWith($submitButton); + $replyButton.replaceWith($submitButton); $submitButton.on('click', function() { var $form = $('form[name="team_clarification"]'); if ($form[0].reportValidity()) { $form.submit(); } - }) + }); + } + + $body.on('click', '#clarification-reply-button', function() { + replaceClarificationReplyButton(); }); /* Show the notification options if the browser supports it */ diff --git a/webapp/templates/team/clarification.html.twig b/webapp/templates/team/clarification.html.twig index fe1c087717..ab79ed19be 100644 --- a/webapp/templates/team/clarification.html.twig +++ b/webapp/templates/team/clarification.html.twig @@ -19,6 +19,11 @@ {% block extrafooter %} {% endblock %} diff --git a/webapp/templates/team/clarification_add.html.twig b/webapp/templates/team/clarification_add.html.twig index c5e0828088..5b8ebf6255 100644 --- a/webapp/templates/team/clarification_add.html.twig +++ b/webapp/templates/team/clarification_add.html.twig @@ -10,21 +10,12 @@ {{ form_start(form) }} {{ form_row(form.recipient) }} {{ form_row(form.subject) }} -
-
-
- -
- {{ form_row(form.message) }} -
-
-
-
- -
-
-
Start typing to see a preview of your message
-
+ {{ form_row(form.message) }} +
+
+
+ +
Start typing to see a preview of your message
diff --git a/webapp/templates/team/clarification_add_modal.html.twig b/webapp/templates/team/clarification_add_modal.html.twig index 5570563d5b..a6853507a5 100644 --- a/webapp/templates/team/clarification_add_modal.html.twig +++ b/webapp/templates/team/clarification_add_modal.html.twig @@ -11,23 +11,14 @@