Ejemplo n.º 1
0
def exit(message,table_data=None,db=None,display_login=1):

    if display_login:
        pmt_utils.usernamePasswordDisplay(username)
    pmt_utils.alertsArea(form, message);

    create_priv=0

    #url='/%s/html/sprsum.html' % db_name
    #pmt_utils.queryFunctionButtons(create_priv, url)
    print '<HR>'
    print '<TABLE><TR>'
    java="return goto_url ('doc_maintenance.pyc')"
    html='<INPUT TYPE="button" NAME="return_to_menu" VALUE=" Listing " '
    html=html+'onClick="%s">' % java
    pmt_utils.tableColumn(html)
    print '</TR></TABLE>'

    pmt_utils.textbox(None, 'key_id', '', '10', '10', None, None, 'hidden')
    pmt_utils.textbox(None, 'action', '', '10', '10', None, None, 'hidden')
    pmt_utils.textbox(None, 'item_no', '', '8', '8', None, None, 'hidden')
    
    if table_data!=None and db!=None:
        pageEnd(table_data,db)
    sys.exit()
Ejemplo n.º 2
0
def editFunctionButtons(db_key, menu_name, help_pdf=None):
    print '<HR>'
    print '<TABLE>'
    print '<TR>'

    java = "return execute('save','%s')" % db_key
    html = '<INPUT NAME="save" type="button" value=" Save " onClick="%s">' % java
    pmt_utils.tableColumn(html)

    java = "return execute('delete','%s')" % db_key
    html = '<INPUT NAME="delete" type="button" value=" Delete " '
    html = html + 'onClick="%s">' % java
    pmt_utils.tableColumn(html)

    java = "return execute('view', '%s')" % db_key
    html = '<INPUT NAME="view" type="button" value=" View " onClick="%s">' % java
    pmt_utils.tableColumn(html)

    java = "return goto_url('%s')" % menu_name
    html = '<INPUT TYPE="button" NAME="return_to_menu" VALUE=" Listing " '
    html = html + 'onClick="%s">' % java
    pmt_utils.tableColumn(html)

    java = "return goto_url('%s')" % help_pdf
    html = '<INPUT TYPE="button" NAME="help" VALUE=" Help " onClick="%s">' % java
    pmt_utils.tableColumn(html)
    print '</TR>'
    print '</TABLE>'
Ejemplo n.º 3
0
def queryFunctionButtons(priv=0, loginOk=0, help_pdf=None):
    print '<HR>'
    print '<TABLE>'
    print '<TR>'
    java = "return execute('query')"
    html = '<INPUT NAME="query" type="button" value=" Query " onClick="%s">' % java
    pmt_utils.tableColumn(html)
    if priv == 1:
        java = "return execute('create')"
        html = '<INPUT NAME="create" type="button" value=" Create " '
        html = html + 'onClick="%s">' % java
        pmt_utils.tableColumn(html)
    if loginOk == 1:
        java = "return execute('csv')"
        html = '<INPUT NAME="csv" type="button" value=" Export " '
        html = html + 'onClick="%s">' % java
        pmt_utils.tableColumn(html)

    java = "return goto_url ('%s')" % help_pdf
    html = '<INPUT TYPE="button" NAME="help" VALUE=" Help " onClick="%s">' % java
    pmt_utils.tableColumn(html)
    print '</TR>'
    print '</TABLE>'
Ejemplo n.º 4
0
def emailButton(key, menu_name, help_pdf):
    link = '/%s-cgi-bin/email.pyc' % declarations.pmt_info['db_name']
    link = link + '?table=spr&key=%s' % key
    print '<HR>'
    print '<TABLE>'
    print '<TR>'
    java = "return goto_url('%s')" % menu_name
    html = '<INPUT TYPE="button" NAME="return_to_menu" VALUE=" Listing " '
    html = html + 'onClick="%s">' % java
    pmt_utils.tableColumn(html)
    java = "return popup('%s','Email_Problem_Report',600,500)" % link
    html = '<input type="button" name="email" value="Email" onClick="%s">' % java
    pmt_utils.tableColumn(html)
    java = "return goto_url ('%s')" % help_pdf
    html = '<INPUT TYPE="button" NAME="help" VALUE=" Help " onClick="%s">' % java
    pmt_utils.tableColumn(html)
    print '</TR>'
    print '</TABLE>'
Ejemplo n.º 5
0
def emailButton(username, key, menu_name, help_pdf):
    link = '/%s-cgi-bin/email.pyc' % db_name
    link = link + '?table=pai&key=%s&username=%s' % (key, username)
    print '<HR><TABLE><TR>'

    java = "return goto_url('%s')" % menu_name
    html = '<INPUT TYPE="button" NAME="return_to_menu" VALUE=" Listing " '
    html = html + 'onClick="%s">' % java
    pmt_utils.tableColumn(html)
    if username != None:
        java = "return popup('%s','Email_Project_Action_Item',600,500)" % link
        html = '<input type="button" name="email" value=Email onClick="%s">' % java
        pmt_utils.tableColumn(html)

    java = "return goto_url('%s')" % help_pdf
    html = '<INPUT TYPE="button" NAME="help" VALUE=" Help " onClick="%s">' % java
    pmt_utils.tableColumn(html)
    print '</TR></TABLE>'
Ejemplo n.º 6
0
def project_adminButtons(button_name):
    print '<HR>'
    print '<TABLE>'
    print '<TR>'
    if button_name == 'edit':
        parms = "'edit','1'"
        html_text = '<INPUT NAME="edit" type="button" value=" Edit " '
        html_text = html_text + 'onClick="return execute(' + parms + ')">'
        pmt_utils.tableColumn(html_text)
    elif button_name == 'save':
        parms = "'save','1'"
        html_text = '<INPUT NAME="save" type="button" value=" Save " '
        html_text = html_text + 'onClick="return execute(' + parms + ')">'
        pmt_utils.tableColumn(html_text)
    help_url = "'%s'" % declarations.pmt_info['help_file']
    html_text = '<INPUT TYPE="button" NAME="help" VALUE=" Help " '
    html_text = html_text + 'onClick="return goto_url (' + help_url + ')">'
    pmt_utils.tableColumn(html_text)
    print '</TR>'
    print '</TABLE>'