fix wrong url 53/6253/4
authorlombardof <flombardo@cnit.it>
Thu, 7 Jun 2018 13:50:03 +0000 (15:50 +0200)
committerlombardof <flombardo@cnit.it>
Tue, 12 Jun 2018 15:38:19 +0000 (17:38 +0200)
Change-Id: I3f757d835adadf9ce3a36334e07fe553cb22029e
Signed-off-by: lombardof <flombardo@cnit.it>
projecthandler/template/project/osm/descriptor/descriptor_new.html
projecthandler/template/project/osm/osm_project_descriptors.html
static/src/projecthandler/onboard_package.js

index ff93ce0..460d8ca 100644 (file)
@@ -52,6 +52,7 @@ Onboard new {{ descriptor_type }} package
 <script>
     var descr_list_url = '{% url "projects:list_descriptors"  project_id=project_id descriptor_type=descriptor_type%}';
     var csrf_token = '{{csrf_token}}';
+    var new_desc_url ="{% url 'projects:new_descriptor' project_id=project_id descriptor_type=descriptor_type %}"
 
     function cancel(id) {
         window.location.href = descr_list_url
index 1e35c7c..51dc3f5 100644 (file)
@@ -48,6 +48,7 @@
     <script>
     var csrf_token = '{{csrf_token}}';
     var descr_list_url = '{% url "projects:list_descriptors"  project_id=project_id descriptor_type=descriptor_type%}';
+    var new_desc_url ="{% url 'projects:new_descriptor' project_id=project_id descriptor_type=descriptor_type %}"
     </script>
     <script src="/static/bower_components/select2/dist/js/select2.js"></script>
     <script src="/static/src/instancehandler/instance_create.js"></script>
index 801acf2..3d519a6 100644 (file)
@@ -53,7 +53,7 @@ function create(fs, dropzone) {
     data.append('id', '{{descriptor_id}}');
     console.log(text);
     $.ajax({
-        url: "new",
+        url: new_desc_url,
         type: 'POST',
         data: data,
         cache: false,