Fix form validators in admin application.
This commit is contained in:
@@ -34,14 +34,14 @@ def editlanguagefile(path,file):
|
||||
def file_upload_form(location):
|
||||
form=FORM(T("upload file:")," ",
|
||||
INPUT(_type="file",_name="file")," ",T("and rename it:")," ",
|
||||
INPUT(_type="text",_name="filename",requires=IS_NOT_EMPTY),
|
||||
INPUT(_type="text",_name="filename",requires=IS_NOT_EMPTY()),
|
||||
INPUT(_type="hidden",_name="location",_value=location),
|
||||
INPUT(_type="hidden",_name="sender",_value=URL('design',args=app)),
|
||||
INPUT(_type="submit",_value=T("upload")),_action=URL('upload_file'))
|
||||
return form
|
||||
def file_create_form(location):
|
||||
form=FORM(T("create file with filename:")," ",
|
||||
INPUT(_type="text",_name="filename",requires=IS_NOT_EMPTY),
|
||||
INPUT(_type="text",_name="filename",requires=IS_NOT_EMPTY()),
|
||||
INPUT(_type="hidden",_name="location",_value=location),
|
||||
INPUT(_type="hidden",_name="sender",_value=URL('design',args=app)))
|
||||
return form
|
||||
|
||||
@@ -35,14 +35,14 @@ def editlanguagefile(path,file):
|
||||
def file_upload_form(location):
|
||||
form=FORM(T("upload file:")," ",
|
||||
INPUT(_type="file",_name="file")," ",T("and rename it:")," ",
|
||||
INPUT(_type="text",_name="filename",requires=IS_NOT_EMPTY),
|
||||
INPUT(_type="text",_name="filename",requires=IS_NOT_EMPTY()),
|
||||
INPUT(_type="hidden",_name="location",_value=location),
|
||||
INPUT(_type="hidden",_name="sender",_value=URL('design/'+app)),
|
||||
INPUT(_type="submit",_value=T("submit")),_action=URL('upload_file'))
|
||||
return form
|
||||
def file_create_form(location):
|
||||
form=FORM(T("create file with filename:")," ",
|
||||
INPUT(_type="text",_name="filename",requires=IS_NOT_EMPTY),
|
||||
INPUT(_type="text",_name="filename",requires=IS_NOT_EMPTY()),
|
||||
INPUT(_type="hidden",_name="location",_value=location),
|
||||
INPUT(_type="hidden",_name="sender",_value=URL('design/'+app)),
|
||||
INPUT(_type="submit",_value=T("submit")),_action=URL('create_file'))
|
||||
|
||||
@@ -25,7 +25,7 @@ def file_upload_form(location, anchor=None):
|
||||
LABEL(T("upload file:")),
|
||||
INPUT(_type="file",_name="file"),
|
||||
LABEL(T("and rename it:")),
|
||||
INPUT(_type="text",_name="filename",requires=IS_NOT_EMPTY,_class=""),
|
||||
INPUT(_type="text",_name="filename",requires=IS_NOT_EMPTY(),_class=""),
|
||||
DIV(TAG['BUTTON'](T("Upload"),_type="submit",_class="btn"),_class="controls"),
|
||||
INPUT(_type="hidden",_name="location",_value=location),
|
||||
INPUT(_type="hidden",_name="token",_value=session.token),
|
||||
@@ -36,7 +36,7 @@ def file_upload_form(location, anchor=None):
|
||||
def file_create_form(location, anchor=None, helptext=""):
|
||||
form=FORM(
|
||||
LABEL(T("create file with filename:")),
|
||||
INPUT(_type="text",_name="filename",requires=IS_NOT_EMPTY,_class=''),
|
||||
INPUT(_type="text",_name="filename",requires=IS_NOT_EMPTY(),_class=''),
|
||||
TAG['SMALL'](helptext,_class="help-block"),
|
||||
DIV(TAG['BUTTON'](T("Create"),_type="submit",_class="btn"),_class="controls"),
|
||||
INPUT(_type="hidden",_name="location",_value=location),
|
||||
|
||||
@@ -20,7 +20,7 @@ def editlanguagefile(path,file):
|
||||
def file_upload_form(location):
|
||||
form=FORM(T("upload file:")," ",
|
||||
INPUT(_type="file",_name="file")," ",T("and rename it:")," ",
|
||||
INPUT(_type="text",_name="filename",requires=IS_NOT_EMPTY),
|
||||
INPUT(_type="text",_name="filename",requires=IS_NOT_EMPTY()),
|
||||
INPUT(_type="hidden",_name="location",_value=location),
|
||||
INPUT(_type="hidden",_name="token",_value=session.token),
|
||||
INPUT(_type="hidden",_name="sender",_value=URL('design/'+app)),
|
||||
@@ -28,7 +28,7 @@ def file_upload_form(location):
|
||||
return form
|
||||
def file_create_form(location):
|
||||
form=FORM(T("create file with filename:")," ",
|
||||
INPUT(_type="text",_name="filename",requires=IS_NOT_EMPTY),
|
||||
INPUT(_type="text",_name="filename",requires=IS_NOT_EMPTY()),
|
||||
INPUT(_type="hidden",_name="location",_value=location),
|
||||
INPUT(_type="hidden",_name="token",_value=session.token),
|
||||
INPUT(_type="hidden",_name="sender",_value=URL('design/'+app)),
|
||||
|
||||
Reference in New Issue
Block a user