1 | {% load staticfiles %} |
---|
2 | <link href="{% static 'bootstrap-3/css/bootstrap-toggle.min.css'%}" rel="stylesheet"> |
---|
3 | <link rel="stylesheet" href="{% static 'plugins/datepicker/datepicker3.css' %}"> |
---|
4 | <link rel="stylesheet" href="{% static 'plugins/datepicker/datepicker3.css' %}"> |
---|
5 | <link rel="stylesheet" href="{% static 'css/checked_img.css' %}"> |
---|
6 | <link rel="stylesheet" href="{% static 'plugins/bootstrap-fileinput/css/fileinput.min.css' %}"> |
---|
7 | |
---|
8 | <script src="{% static 'plugins/bootstrap-fileinput/js/fileinput.min.js' %}"></script> |
---|
9 | <script src="{% static 'bootstrap-3/js/bootstrap-toggle.min.js'%}"></script> |
---|
10 | <script src="{% static 'plugins/datepicker/moment-with-locales.js' %}"></script> |
---|
11 | <!-- bootstrap datepicker --> |
---|
12 | <script src="{% static 'plugins/datepicker/bootstrap-datepicker.js' %}"></script> |
---|
13 | |
---|
14 | {% csrf_token %} |
---|
15 | <p> |
---|
16 | {{ form.definir_meta.label }} |
---|
17 | {{ form.definir_meta }} |
---|
18 | </p> |
---|
19 | <p> |
---|
20 | {{ form.numero.label }} |
---|
21 | {{ form.numero }} |
---|
22 | </p> |
---|
23 | <p> |
---|
24 | {{ form.unidad_medida.label }} |
---|
25 | {{ form.unidad_medida }} |
---|
26 | </p> |
---|
27 | <p> |
---|
28 | {{ form.porcentaje.label }} |
---|
29 | {{ form.porcentaje }} |
---|
30 | </p> |
---|
31 | <p> |
---|
32 | {{ form.certificado.label }} |
---|
33 | {{ form.certificado }} |
---|
34 | </p> |
---|
35 | <p> |
---|
36 | {{ form.culmino.label }} |
---|
37 | {{ form.culmino }} |
---|
38 | </p> |
---|
39 | |
---|
40 | {% load staticfiles %} |
---|
41 | <link href="{% static 'bootstrap-3/css/bootstrap-toggle.min.css'%}" rel="stylesheet"> |
---|
42 | <link rel="stylesheet" href="{% static 'plugins/datepicker/datepicker3.css' %}"> |
---|
43 | <link rel="stylesheet" href="{% static 'css/checked_img.css' %}"> |
---|
44 | <link rel="stylesheet" href="{% static 'plugins/bootstrap-fileinput/css/fileinput.min.css' %}"> |
---|
45 | |
---|
46 | <script src="{% static 'plugins/bootstrap-fileinput/js/fileinput.min.js' %}"></script> |
---|
47 | <script src="{% static 'bootstrap-3/js/bootstrap-toggle.min.js'%}"></script> |
---|
48 | <script src="{% static 'plugins/datepicker/moment-with-locales.js' %}"></script> |
---|
49 | <!-- bootstrap datepicker --> |
---|
50 | <script src="{% static 'plugins/datepicker/bootstrap-datepicker.js' %}"></script> |
---|
51 | |
---|
52 | <script type="text/javascript"> |
---|
53 | |
---|
54 | $(document).ready(function (){ |
---|
55 | |
---|
56 | function addMeta(fase) { |
---|
57 | var valid = true; |
---|
58 | if (valid) { |
---|
59 | var selectedList = "meta_set-"+fase; |
---|
60 | console.log(selectedList) |
---|
61 | var boxList = $("#meta_set-"+fase); |
---|
62 | var nombre_meta = $('#id_definir_meta').val(); |
---|
63 | boxList.append("<p>nombre_meta<p>"); |
---|
64 | |
---|
65 | } |
---|
66 | return valid; |
---|
67 | } |
---|
68 | |
---|
69 | $("#id_certificado").fileinput({ |
---|
70 | showCaption: true, |
---|
71 | previewFileType: "image", |
---|
72 | browseClass: "btn btn-info", |
---|
73 | browseLabel: "Subir documento", |
---|
74 | removeLabel: "Eliminar", |
---|
75 | uploadLabel:"Actualizar", |
---|
76 | }); |
---|
77 | |
---|
78 | |
---|
79 | $('#form_meta').on("submit", function(event){ |
---|
80 | event.preventDefault(); |
---|
81 | var form = $('#form_meta')[0]; |
---|
82 | var data = new FormData(form); |
---|
83 | $.ajax({ |
---|
84 | url: "{% url 'projects:crear_meta_tablero' proyectos.pk sub_proy.pk fases.pk %}", |
---|
85 | type: "POST", |
---|
86 | data: data, |
---|
87 | processData: false, // Important! |
---|
88 | contentType: false, |
---|
89 | dataType: 'html', |
---|
90 | success: function(data) { |
---|
91 | $('#dialog-meta').modal('hide'); |
---|
92 | addMeta("{{fases.pk}}"); |
---|
93 | } |
---|
94 | }); |
---|
95 | }); |
---|
96 | }); |
---|
97 | </script> |
---|