diff --git a/standards/templates/standards/standards_add.html b/standards/templates/standards/standards_add.html index 1869892..e3f2d5f 100644 --- a/standards/templates/standards/standards_add.html +++ b/standards/templates/standards/standards_add.html @@ -1182,6 +1182,7 @@ function replaceFileDirectChoice(filetodo, choice){ doUploadAction(filetodo_ex, choice); } + function uploadAction(filetodo){ filetodo_ex = filetodo; @@ -1189,7 +1190,7 @@ function uploadAction(filetodo){ $.ajax( { type: "GET", - url: "{% url 'cloud-adddir' parentid %}", + url: "{% url 'cloud-adddir' 0 %}", data:{ action : "check_doublefile", name : filetodo.name diff --git a/standards/views.py b/standards/views.py index bc8d987..c5325b4 100644 --- a/standards/views.py +++ b/standards/views.py @@ -315,7 +315,7 @@ def StandardAdd(request, id=False): 'agencygroups' : AgencyGroup.objects.filter(agency=request.user.profile.agency), 'usersofagency' : User.objects.filter(profile__agency=request.user.profile.agency), 'files' : possibleFilesByVisible, - 'parentid' : list(DataDir.objects.filter(agency=request.user.profile.agency, is_root=True))[0].pk, + #'parentid' : list(DataDir.objects.filter(agency=request.user.profile.agency, is_root=True))[0].pk, 'standards' : Standards.objects.filter(agency=request.user.profile.agency, public=True), 'quicklinks' : QuickLinks.objects.filter(agency=request.user.profile.agency), 'contacts' : AGContacts.objects.filter(agency=request.user.profile.agency), @@ -728,7 +728,8 @@ def StandardAdd(request, id=False): 'possible_contacts' : possible_contacts, 'agencynetworks' : agencynetworks, 'agencygroups' : AgencyGroup.objects.filter(agency=request.user.profile.agency), - 'parentid' : list(DataDir.objects.filter(agency=request.user.profile.agency, is_root=True))[0].pk, + #'parentid' : list(DataDir.objects.filter(agency=request.user.profile.agency, is_root=True))[0].pk, + 'parentid' : 0, 'active_link' : 'standards', 'update' : True, 'aggroups' : AgencyGroup.objects.filter(agency=request.user.profile.agency) @@ -887,7 +888,7 @@ def CopyStandard(request, pk): new_standard.save() - datadir_parentid = list(DataDir.objects.filter(is_defaultstandard=True, agency__pk=request.user.profile.agency.pk))[0] + #datadir_parentid = list(DataDir.objects.filter(is_defaultstandard=True, agency__pk=request.user.profile.agency.pk))[0] for f in sc.addedfiles_nc.all(): tempdatafile = NCFile(agency=request.user.profile.agency, nc_id=f.nc_id) tempdatafile.save() diff --git a/users/templates/users/nclog.html b/users/templates/users/nclog.html index d90c566..9a3dcd3 100644 --- a/users/templates/users/nclog.html +++ b/users/templates/users/nclog.html @@ -1,11 +1 @@ -