File tree Expand file tree Collapse file tree 1 file changed +10
-9
lines changed
templates/pages/assistance/planning Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change 7171 max : 50 * constant (' HOUR_TIMESTAMP' ),
7272 value : default_delay ,
7373 emptylabel : display_dates ? __(' Specify an end date' ) : constant (' Dropdown::EMPTY_VALUE' ),
74+ rand : rand ,
7475 }]) %}
7576 {% else %}
7677 {{ fields.hiddenField (' plan[_duration]' , default_delay ) }}
9394 </script >
9495 {% endif %}
9596 <script >
96- {% set event_params = {
97- duration : ' __VALUE__ ' ,
98- end : end ,
99- name : ' plan[ end] ' ,
100- global_begin : config( ' planning_begin ' ) ,
101- global_end : config(' planning_end ' ) ,
102- } %}
103- $ ( ' #dropdown_plan[_duration]{{ rand }} ' ). on ( ' change ' , () => {
104- $ (' #date_end{{ rand }}' ).load (' {{ path(' ajax/ planningend .php ' )|e(' js' ) }}' , {{ event_params| json_encode | raw }} );
97+ $ ( ' #dropdown_plan__duration_{{ rand }} ' ). on ( ' change ' , () => {
98+ const event_params = {
99+ duration : $ ( ' #dropdown_plan__duration_{{ rand }} ' ). val () ,
100+ end : ' {{ end|e( ' js ' ) }} ' ,
101+ name : ' plan[end] ' ,
102+ global_begin : ' {{ config(' planning_begin ' )|e( ' js ' ) }} ' ,
103+ global_end : ' {{ config( ' planning_end ' )|e( ' js ' ) }} ' ,
104+ };
105+ $ (' #date_end{{ rand }}' ).load (' {{ path(' ajax/ planningend .php ' )|e(' js' ) }}' , event_params);
105106 });
106107 </script >
107108 {% endif %}
You can’t perform that action at this time.
0 commit comments