mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2025-12-14 23:47:11 +00:00
Bigger buttons, phone compatible
This commit is contained in:
@@ -200,8 +200,7 @@ def ajax_test(request):
|
||||
|
||||
|
||||
|
||||
class MyForm(forms.Form): # not a model-form
|
||||
title = forms.CharField(max_length=20)
|
||||
class MyForm(forms.Form): # not a model-form, just a form-form
|
||||
scanfiles = forms.FileField()
|
||||
|
||||
@login_required_if_public
|
||||
@@ -218,8 +217,13 @@ def scanupload(request, wallet=None):
|
||||
wallet = "2021:01" # improve this later
|
||||
|
||||
year = wallet[:4]
|
||||
if int(year) < 1977:
|
||||
year = "1977"
|
||||
if int(year) > 2050:
|
||||
year = "2050"
|
||||
nexty = f'{int(year)+1}'
|
||||
prevy = f'{int(year)-1}'
|
||||
|
||||
wnumber = wallet[5:]
|
||||
next = f'{int(wnumber)+1:02d}'
|
||||
prev = f'{int(wnumber)-1:02d}'
|
||||
@@ -235,11 +239,9 @@ def scanupload(request, wallet=None):
|
||||
if request.method == 'POST':
|
||||
form = MyForm(request.POST,request.FILES)
|
||||
if form.is_valid():
|
||||
#form.save() # comment out so nothing saved in MEDIA_ROOT/fileuploads
|
||||
f = request.FILES["scanfiles"]
|
||||
w = request.POST["title"]
|
||||
multiple = request.FILES.getlist('scanfiles')
|
||||
fs = FileSystemStorage(os.path.join(settings.SURVEY_SCANS, year, w))
|
||||
fs = FileSystemStorage(os.path.join(settings.SURVEY_SCANS, year, wallet))
|
||||
|
||||
actual_saved = []
|
||||
if multiple:
|
||||
|
||||
Reference in New Issue
Block a user