diff options
Diffstat (limited to '')
-rw-r--r-- | server/templates/server/doc_list.html | 3 | ||||
-rw-r--r-- | server/views.py | 30 | ||||
-rw-r--r-- | version.txt | 2 |
3 files changed, 16 insertions, 19 deletions
diff --git a/server/templates/server/doc_list.html b/server/templates/server/doc_list.html index 023cf54..06c8893 100644 --- a/server/templates/server/doc_list.html +++ b/server/templates/server/doc_list.html @@ -17,7 +17,7 @@ </a> </li> <li><a class="tooltipped modal-trigger" href="#modal2" data-position="top" data-tooltip="Archivia selezionati"><i class="material-icons">archive</i></a></li> - <li><a class="tooltipped" data-position="top" data-tooltip="Dearchivia selezionati" Onclick="send('unarchive')"><i class="material-icons">unarchive</i></a></li> + <!--<li><a class="tooltipped" data-position="top" data-tooltip="Dearchivia selezionati" Onclick="send('unarchive')"><i class="material-icons">unarchive</i></a></li>--> <li><a class="tooltipped modal-trigger" href="#modal3" data-position="top" data-tooltip="Scarica selezionati" Onclick="send('download')"><i class="material-icons">file_download</i></a></li> {% if settings.DEBUG %} <li><a class="tooltipped" data-position="top" data-tooltip="Approva selezionati" Onclick="send('approve')"><i class="material-icons left">check</i>DEBUG</a></li> @@ -38,6 +38,7 @@ <div class="modal-content"> <h4>Attenzione</h4> <p> + Una volta archiviato un documento non potrà più essere dearchiviato.<br> Se il documento contine dati medici quando archiviato tutti i dati medici verranno eliminati. </p> </div> diff --git a/server/views.py b/server/views.py index fb4af8a..89c66b2 100644 --- a/server/views.py +++ b/server/views.py @@ -1118,23 +1118,19 @@ def doclist(request): docc.status = 'ok'
docc.save()
elif request.POST["action"] == 'archive':
- if docc.status == 'ok':
- docc.status = 'archive'
- if docc.medical_data:
- docc.medical_data.delete()
- docc.medical_data.save()
- docc.medical_data = None
- docc.save()
- else:
- error = True
- error_text = "Non puoi archiviare un documento non approvato"
- elif request.POST["action"] == 'unarchive':
- if docc.status == 'archive':
- docc.status = 'ok'
- docc.save()
- else:
- error = True
- error_text = "Non puoi dearchiviare un documento non archiviato"
+ docc.status = 'archive'
+ if docc.medical_data:
+ docc.medical_data.delete()
+ docc.medical_data.save()
+ docc.medical_data = None
+ docc.save()
+ #elif request.POST["action"] == 'unarchive':
+ # if docc.status == 'archive':
+ # docc.status = 'ok'
+ # docc.save()
+ # else:
+ # error = True
+ # error_text = "Non puoi dearchiviare un documento non archiviato"
# get filter values
hidden = "filter_hidden" in request.POST
diff --git a/version.txt b/version.txt index 13d18eb..9736897 100644 --- a/version.txt +++ b/version.txt @@ -1,2 +1,2 @@ version=0.6 -rev=12 +rev=13 |