diff --git a/app/Resources/views/admin/booking/_partial/bucket_modal.html.twig b/app/Resources/views/admin/booking/_partial/bucket_modal.html.twig
index d04690ae7..4972675f8 100644
--- a/app/Resources/views/admin/booking/_partial/bucket_modal.html.twig
+++ b/app/Resources/views/admin/booking/_partial/bucket_modal.html.twig
@@ -97,39 +97,25 @@ It use the materialize modal class https://materializecss.com/modals.html
-
+ {{ form_end(shift_book_forms[shift.id]) }}
{% endif %}
diff --git a/app/Resources/views/admin/booking/index.html.twig b/app/Resources/views/admin/booking/index.html.twig
index 32f8cdb75..8cf17aed2 100644
--- a/app/Resources/views/admin/booking/index.html.twig
+++ b/app/Resources/views/admin/booking/index.html.twig
@@ -83,7 +83,7 @@
{% include "admin/booking/_partial/bucket_calendar.html.twig" with { bucketsByDay: bucketsByDay } %}
-
@@ -106,29 +106,17 @@
}
})
.trigger('change');
- $('.modal').modal({
+ $('#modal-bucket').modal({
onCloseEnd: function() {
- $('.modal-content').html('');
+ $('#modal-bucket-content').html('');
},
onOpenStart: function(modal, trigger) {
var url = $(trigger).attr('data-source');
$.get(url, function( data ) {
- $('.modal-content').html(data);
+ $('#modal-bucket-content').html(data);
$('.collapsible').collapsible();
- $('input.autocomplete').autocomplete({
- data: {
- {% for beneficiary in beneficiaries %}
- "{{ beneficiary.displayNameWithMemberNumber }}": null,
- {% endfor %}
- },
- limit: 10,
- onAutocomplete: function (val) {
- // Callback function when value is autocomplete.
- $('button.add').removeAttr('disabled');
- },
- minLength: 2,
- });
$('select').formSelect();
+ eval($('#modal-bucket-content script').html());
});
}
});
diff --git a/app/Resources/views/admin/commission/edit.html.twig b/app/Resources/views/admin/commission/edit.html.twig
index 871a2e672..6a5d74131 100644
--- a/app/Resources/views/admin/commission/edit.html.twig
+++ b/app/Resources/views/admin/commission/edit.html.twig
@@ -132,13 +132,20 @@
var data = $form.serialize();
$.ajax($form.attr('action'),{
data: data,
- method: 'post'
- }).success(function (d) {
- //console.log(d);
- if (d.success){
- Materialize.toast(d.message,2500,'green');
- }else{
- Materialize.toast(d.message,2500,'red');
+ method: 'post',
+ success: function (d) {
+ M.toast({
+ html: d.message,
+ displayLength: 2500,
+ classes: 'green'
+ });
+ },
+ error: function (d) {
+ M.toast({
+ html: d.message,
+ displayLength: 2500,
+ classes: 'red'
+ });
}
});
}
@@ -149,15 +156,23 @@
var data = $form.serialize();
$.ajax($form.attr('action'),{
data: data,
- method: 'post'
- }).success(function (d) {
- if (d.success){
- Materialize.toast(d.message,2500,'green');
+ method: 'post',
+ success: function (d) {
+ M.toast({
+ html: d.message,
+ displayLength: 2500,
+ classes: 'green'
+ });
$('#users .chips').append(d.html);
- }else{
- Materialize.toast(d.message,2500,'red');
+ $('#form_beneficiary').val('');
+ },
+ error: function (d) {
+ M.toast({
+ html: d.message,
+ displayLength: 2500,
+ classes: 'red'
+ });
}
- $('#form_beneficiary').val('');
});
});
});
diff --git a/app/Resources/views/admin/mail/edit.html.twig b/app/Resources/views/admin/mail/edit.html.twig
deleted file mode 100644
index 640500108..000000000
--- a/app/Resources/views/admin/mail/edit.html.twig
+++ /dev/null
@@ -1,109 +0,0 @@
-{% extends 'layout.html.twig' %}
-
-{% block content %}
-{{ form_start(form) }}
-
-
-
- {{ form_widget(form.from) }}
- {{ form_label(form.from) }}
-
-
- {{ form_widget(form.template) }}
- {{ form_label(form.template) }}
-
-
-
-
Non-membre(s) en copie
-
-
-
-
- {{ form_widget(form.subject) }}
- {{ form_label(form.subject) }}
-
-
- {{ form_label(form.message) }}
- {{ form_widget(form.message) }}
-
-
- prénom :
-
-
-
-
send Envoyer
- {{ form_widget(form) }}
-{{ form_end(form) }}
-{% endblock %}
-
-{% block javascripts %}
-
-
-{% endblock %}
diff --git a/app/Resources/views/admin/mail/send.html.twig b/app/Resources/views/admin/mail/send.html.twig
new file mode 100644
index 000000000..09dc0ea43
--- /dev/null
+++ b/app/Resources/views/admin/mail/send.html.twig
@@ -0,0 +1,67 @@
+{% extends 'layout.html.twig' %}
+
+{% block content %}
+{{ form_start(form) }}
+
+
+
+ {{ form_widget(form.from) }}
+ {{ form_label(form.from) }}
+
+
+ {{ form_widget(form.template) }}
+ {{ form_label(form.template) }}
+
+
+ {{ form_label(form.to) }}
+ {{ form_widget(form.to) }}
+
+
+
Non-membre(s) en copie
+
+
+
+
+ {{ form_widget(form.subject) }}
+ {{ form_label(form.subject) }}
+
+
+ {{ form_label(form.message) }}
+ {{ form_widget(form.message) }}
+
+
+ prénom :
+
+
+
+
send Envoyer
+ {{ form_widget(form) }}
+{{ form_end(form) }}
+{% endblock %}
+
+{% block javascripts %}
+
+
+{% endblock %}
diff --git a/app/Resources/views/admin/member/join.html.twig b/app/Resources/views/admin/member/join.html.twig
index 9b5614434..ce811053c 100644
--- a/app/Resources/views/admin/member/join.html.twig
+++ b/app/Resources/views/admin/member/join.html.twig
@@ -25,11 +25,17 @@
{{ form_start(form) }}
+ {{ form_start(pp_book_forms[position.id]) }}
-
+ {{ form_end(pp_book_forms[position.id]) }}
{% endif %}
@@ -131,55 +134,3 @@
{{ form_end(position_form) }}
{% endblock %}
-
-{% block javascripts %}
-
-{% endblock %}
diff --git a/app/Resources/views/booking/_partial/home_shift_contactform.html.twig b/app/Resources/views/booking/_partial/home_shift_contactform.html.twig
index ab8cfb562..e1f163693 100644
--- a/app/Resources/views/booking/_partial/home_shift_contactform.html.twig
+++ b/app/Resources/views/booking/_partial/home_shift_contactform.html.twig
@@ -9,9 +9,8 @@
{{ form_errors(form.to) }}
- {{ form_widget(form.to) }}
{{ form_label(form.to) }}
-
+ {{ form_widget(form.to) }}
+ {% for child in form %}
+ {{ form_widget(child) }}
+ {% endfor %}
+
+ {% endspaceless %}
+