forked from sahana/eden
-
Notifications
You must be signed in to change notification settings - Fork 1
/
_ocr_page_upload.html
13 lines (13 loc) · 1.32 KB
/
_ocr_page_upload.html
1
2
3
4
5
6
7
8
9
10
11
12
13
{{extend "layout.html"}}
{{=H2(T("Scanned Forms Upload"))}}
{{inputBoxList = []}}
{{if uploadformat == "image":}}
{{for eachpage in xrange(1, numpages + 1):}}
{{inputBoxList.append(TR(TD(T("Page")," %s" % eachpage), TD(INPUT(_type="file", _name="page%s" % eachpage, _class="required")), TD(DIV(_class="tooltip", _title="Comments|Upload pages in ascending order, all fields are required. Pages can be of any image format viz. (png, jpg, gif, bmp). Each image represent a single page."))))}}
{{pass}}
{{elif uploadformat == "pdf":}}
{{inputBoxList.append(TR(TD(T("PDF File")), TD(INPUT(_type="file", _name="pdffile", _class="required")), TD(DIV(_class="tooltip", _title="Comments|Upload a single PDF file which contains all the pages of the form in ascending order."))))}}
{{pass}}
{{=DIV(FORM(INPUT(_type="hidden", _name="formuuid", _value=formuuid), INPUT(_type="hidden", _name="numpages", _value=numpages), INPUT(_type="hidden", _name="uploadformat", _value=uploadformat), TABLE(inputBoxList, TR(TD(),TD(INPUT(_type="submit"), _style="text-align:right"))), _action=posturl, _method="post", _class="cmxform", _id="pageuploadForm"), _id="rheader")}}
<script type="text/javascript" src="/{{=appname}}/static/scripts/jquery.validate.js"></script>
<script type="text/javascript">$(document).ready(function(){$('#pageuploadForm').validate()})</script>