Bonsoir
j'ai essayé d'afficher un modal en bootstrap mais rien ne ce passe a l'affichage
voici le code base.twig.html
et le fichier test.twig.html
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13 <!DOCTYPE html> <html> <head> <meta charset="UTF-8" /> <title>{% block title %}Welcome!{% endblock %}</title> {% block stylesheets %}{% endblock %} <link rel="icon" type="image/x-icon" href="{{ asset('favicon.ico') }}" /> </head> <body> {% block body %}{% endblock %} {% block javascripts %}{% endblock %} </body> </html>
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47 {% extends "::Base.html.twig" %} {% block head %} {% block stylesheets %} <link rel="stylesheet" href="{{ asset('bundles/gestion/css/reset.css') }}" type="text/css" media="screen"> <link href="{{asset('bundles/gestion/css/bootstrap.css')}}" rel="stylesheet"> {% endblock %} {% endblock %} {% block body %} <body> <a data-toggle="modal" href="#myModal" class="btn btn-primary btn-large">Launch demo modal</a> <div id="myModal" class="modal hide" "> <div class="modal-header"> <button class="close" data-dismiss="modal">×</button> <h3>Modal Heading</h3> </div> <div class="modal-body"> <h4>Text in a modal</h4> </div> <div class="modal-footer"> <a href="#" class="btn" data-dismiss="modal">Close</a> <a href="#" class="btn btn-primary">Save changes</a> </div> </div> {% endblock %} <!-- JavaScript --> {% block javascript %} <script src="{{asset('bundles/gestionessat/js/jquery-1.10.2.js')}}"></script> <script src="{{asset('bundles/gestionessat/js/bootstrap.js')}}"></script> <script src="{{asset('bundles/gestionessat/js/bootstrap.min.js')}}"></script> <script type="text/javascript"> $(document).ready(function(){ $("#myModal").modal('show'); }); </script> {% endblock %} </body>
Partager