File tree 5 files changed +29
-11
lines changed
5 files changed +29
-11
lines changed Original file line number Diff line number Diff line change 178
178
{% trans %}sheet.daily.add-stools{% endtrans %}
179
179
</button >
180
180
{% endif %}
181
+
182
+ <hr ><br >
183
+ <button type =" button" name =" addSheet" id =" addSheet" data-modal =" success_modal" class =" btn bg-green d-block mb-2" >{% trans %}sheet.daily.add{% endtrans %}</button >
181
184
</div >
182
185
</div >
183
186
</div >
187
190
{% include ' sheet_view/daily-add-meal-modal.html.twig' %}
188
191
{% include ' sheet_view/daily-add-sleep-modal.html.twig' %}
189
192
{% include ' sheet_view/daily-add-stools-modal.html.twig' %}
193
+ {% include ' utils/success-modal.html.twig' with {success_message : ' sheet.daily.add.validation' |trans(), removeJS : true } %}
190
194
{% include ' utils/validation-modal.html.twig' with { validation_message : ' sheet.daily.remove.validation' |trans()} %}
191
195
{% endif %}
192
196
196
200
{{ parent () }}
197
201
198
202
{% if not readonly %}
199
-
200
203
<script type =" application/javascript" >
201
-
202
- let removeType = undefined ;
203
- let removeTimestamp = undefined ;
204
+ let removeType, removeTimestamp = undefined ;
204
205
205
206
$ (' [data-modal="validate_modal"]' ).on (' click' , function () {
206
207
removeType = $ (this ).find (' [name="type"]' ).val ();
235
236
e .preventDefault ();
236
237
});
237
238
238
- $ (' input' ).on (' change' , function () {
239
- setTimeout ( function (){
240
- $ (" #dailySheetForm" ).submit ();
241
- } , 1000 );
239
+ $ (' #addSheet' ).on (' click' , function () {
240
+ $ (" #dailySheetForm" ).submit ();
242
241
});
243
242
244
243
window .onbeforeunload = function () {
Original file line number Diff line number Diff line change 8
8
</div >
9
9
</section >
10
10
11
+ {% if removeJS is not defined or removeJS == false %}
11
12
<script type =" application/javascript" >
12
13
(function () {
13
14
var body = document .getElementsByTagName (' body' )[0 ];
49
50
}
50
51
})();
51
52
</script >
53
+ {% endif %}
Original file line number Diff line number Diff line change 9
9
</div >
10
10
</section >
11
11
12
-
12
+ {% if removeJS is not defined or removeJS == false %}
13
13
<script type =" application/javascript" >
14
14
(function () {
15
15
var body = document .getElementsByTagName (' body' )[0 ];
51
51
}
52
52
})();
53
53
</script >
54
+ {% endif %}
Original file line number Diff line number Diff line change 405
405
<source >sheet.daily.stool</source >
406
406
<target >Stool</target >
407
407
</trans-unit >
408
- <trans-unit id =" XU2GowO " resname =" sheet.daily.stool.soft" >
408
+ <trans-unit id =" rdWeWy5 " resname =" sheet.daily.stool.soft" >
409
409
<source >sheet.daily.stool.soft</source >
410
410
<target >soft</target >
411
411
</trans-unit >
481
481
<source >sheet.daily.modal.add-meal</source >
482
482
<target >Add a meal</target >
483
483
</trans-unit >
484
+ <trans-unit id =" 6dzNxl9" resname =" sheet.daily.add" >
485
+ <source >sheet.daily.add</source >
486
+ <target >Update the sheet</target >
487
+ </trans-unit >
488
+ <trans-unit id =" fyzIugU" resname =" sheet.daily.add.validation" >
489
+ <source >sheet.daily.add.validation</source >
490
+ <target >The sheet has been updated!</target >
491
+ </trans-unit >
484
492
</body >
485
493
</file >
486
494
</xliff >
Original file line number Diff line number Diff line change 405
405
<source >sheet.daily.stool</source >
406
406
<target >Selle</target >
407
407
</trans-unit >
408
- <trans-unit id =" XU2GowO " resname =" sheet.daily.stool.soft" >
408
+ <trans-unit id =" rdWeWy5 " resname =" sheet.daily.stool.soft" >
409
409
<source >sheet.daily.stool.soft</source >
410
410
<target >molle</target >
411
411
</trans-unit >
481
481
<source >sheet.daily.modal.add-meal</source >
482
482
<target >Ajouter un repas</target >
483
483
</trans-unit >
484
+ <trans-unit id =" 6dzNxl9" resname =" sheet.daily.add" >
485
+ <source >sheet.daily.add</source >
486
+ <target >Mettre à jour la fiche</target >
487
+ </trans-unit >
488
+ <trans-unit id =" fyzIugU" resname =" sheet.daily.add.validation" >
489
+ <source >sheet.daily.add.validation</source >
490
+ <target >La fiche journalière a bien été mise à jour !</target >
491
+ </trans-unit >
484
492
</body >
485
493
</file >
486
494
</xliff >
You can’t perform that action at this time.
0 commit comments