I have two forms, each form has multiple hidden fields and a submit button.
My goal is to align those forms with two other normal buttons horizontally (inline) using bootstrap.
Here's what I've tried so far:
<div class="container">
<div class="row">
<div class="col-xs-6">
<a class="btn btn-primary" href="/employees/new">Add new Employee</a>
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#myModal">Search</button>
<form class="form-inline" action="../reports/pdf/employees" method="GET">
<input type="hidden" id="column" th:if="${param.column !=null}" name="column" th:value="${param.column}">
<input type="hidden" th:if="${param.sort == null}" id="sort" name="sort" value="ASC">
<input type="hidden" th:if="${param.sort != null}" id="sort" name="sort" th:value="${param.sort}">
<input type="hidden" th:if="${param.name!=null}" name="name" id="id" th:value="${param.name}">
<input type="hidden" th:if="${param.surname!=null}" name="surname" id="surname" th:value="${param.surname}">
<input type="hidden" th:if="${param.hiredate!=null}" name="hiredate" id="hiredate" th:value="${param.hiredate}">
<input type="hidden" th:if="${param.birthdate!=null}" name="birthdate" id="birthdate" th:value="${param.birthdate}">
<input type="hidden" th:if="${param.email!=null}" name="email" id="email" th:value="${param.email}">
<input type="hidden" th:if="${param.address!=null}" name="address" id="address" th:value="${param.address}">
<input type="hidden" th:if="${param.phone!=null}" name="phone" id="phone" th:value="${param.phone}">
<button class="btn btn-primary" type="submit">Print pdf report</button>
</form>
<form action="../reports/csv/employees" method="GET">
<input type="hidden" id="column" th:if="${param.column !=null}" name="column" th:value="${param.column}">
<input type="hidden" th:if="${param.sort == null}" id="sort" name="sort" value="ASC">
<input type="hidden" th:if="${param.sort != null}" id="sort" name="sort" th:value="${param.sort}">
<input type="hidden" th:if="${param.name!=null}" name="name" id="id" th:value="${param.name}">
<input type="hidden" th:if="${param.surname!=null}" name="surname" id="surname" th:value="${param.surname}">
<input type="hidden" th:if="${param.hiredate!=null}" name="hiredate" id="hiredate" th:value="${param.hiredate}">
<input type="hidden" th:if="${param.birthdate!=null}" name="birthdate" id="birthdate" th:value="${param.birthdate}">
<input type="hidden" th:if="${param.email!=null}" name="email" id="email" th:value="${param.email}">
<input type="hidden" th:if="${param.address!=null}" name="address" id="address" th:value="${param.address}">
<input type="hidden" th:if="${param.phone!=null}" name="phone" id="phone" th:value="${param.phone}">
<button class="btn btn-primary" type="submit">Print csv report</button>
</form>
</div>
fix: add form-inline to second form
NB:
forms are block items - change to inline-block via css or style.
buttons still wrap, may need to change col-xs-6 to something wider
form.form-inline {
display: inline-block
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" />
<div class="container">
<div class="row">
<div class="col-xs-12">
<a class="btn btn-primary" href="/employees/new">Add new Employee</a>
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#myModal">Search</button>
<form class="form-inline" action="../reports/pdf/employees" method="GET">
<input type="hidden" id="column" th:if="${param.column !=null}" name="column" th:value="${param.column}">
<input type="hidden" th:if="${param.sort == null}" id="sort" name="sort" value="ASC">
<input type="hidden" th:if="${param.sort != null}" id="sort" name="sort" th:value="${param.sort}">
<input type="hidden" th:if="${param.name!=null}" name="name" id="id" th:value="${param.name}">
<input type="hidden" th:if="${param.surname!=null}" name="surname" id="surname" th:value="${param.surname}">
<input type="hidden" th:if="${param.hiredate!=null}" name="hiredate" id="hiredate" th:value="${param.hiredate}">
<input type="hidden" th:if="${param.birthdate!=null}" name="birthdate" id="birthdate" th:value="${param.birthdate}">
<input type="hidden" th:if="${param.email!=null}" name="email" id="email" th:value="${param.email}">
<input type="hidden" th:if="${param.address!=null}" name="address" id="address" th:value="${param.address}">
<input type="hidden" th:if="${param.phone!=null}" name="phone" id="phone" th:value="${param.phone}">
<button class="btn btn-primary" type="submit">Print pdf report</button>
</form>
<form class="form-inline" action="../reports/csv/employees" method="GET">
<input type="hidden" id="column" th:if="${param.column !=null}" name="column" th:value="${param.column}">
<input type="hidden" th:if="${param.sort == null}" id="sort" name="sort" value="ASC">
<input type="hidden" th:if="${param.sort != null}" id="sort" name="sort" th:value="${param.sort}">
<input type="hidden" th:if="${param.name!=null}" name="name" id="id" th:value="${param.name}">
<input type="hidden" th:if="${param.surname!=null}" name="surname" id="surname" th:value="${param.surname}">
<input type="hidden" th:if="${param.hiredate!=null}" name="hiredate" id="hiredate" th:value="${param.hiredate}">
<input type="hidden" th:if="${param.birthdate!=null}" name="birthdate" id="birthdate" th:value="${param.birthdate}">
<input type="hidden" th:if="${param.email!=null}" name="email" id="email" th:value="${param.email}">
<input type="hidden" th:if="${param.address!=null}" name="address" id="address" th:value="${param.address}">
<input type="hidden" th:if="${param.phone!=null}" name="phone" id="phone" th:value="${param.phone}">
<button class="btn btn-primary" type="submit">Print csv report</button>
</form>
</div>
</div>
</div>
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!-->
<html class="no-js">
<!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title></title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<!-- jQuery library -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<!-- Latest compiled JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<style>
form.form-inline {
display: inline-block
}
</style>
</head>
<body>
<!--[if lt IE 7]>
<p class="browsehappy">You are using an <strong>outdated</strong> browser. Please upgrade your browser to improve your experience.</p>
<![endif]-->
<div class="container">
<div class="row">
<div class="col-xs-12">
<a class="btn btn-primary" href="/employees/new">Add new Employee</a>
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#myModal">Search</button>
<form class="form-inline" action="../reports/pdf/employees" method="GET">
<input type="hidden" id="column" th:if="${param.column !=null}" name="column" th:value="${param.column}">
<input type="hidden" th:if="${param.sort == null}" id="sort" name="sort" value="ASC">
<input type="hidden" th:if="${param.sort != null}" id="sort" name="sort" th:value="${param.sort}">
<input type="hidden" th:if="${param.name!=null}" name="name" id="id" th:value="${param.name}">
<input type="hidden" th:if="${param.surname!=null}" name="surname" id="surname" th:value="${param.surname}">
<input type="hidden" th:if="${param.hiredate!=null}" name="hiredate" id="hiredate" th:value="${param.hiredate}">
<input type="hidden" th:if="${param.birthdate!=null}" name="birthdate" id="birthdate" th:value="${param.birthdate}">
<input type="hidden" th:if="${param.email!=null}" name="email" id="email" th:value="${param.email}">
<input type="hidden" th:if="${param.address!=null}" name="address" id="address" th:value="${param.address}">
<input type="hidden" th:if="${param.phone!=null}" name="phone" id="phone" th:value="${param.phone}">
<button class="btn btn-primary" type="submit">Print pdf report</button>
</form>
<form class="form-inline"action="../reports/csv/employees" method="GET">
<input type="hidden" id="column" th:if="${param.column !=null}" name="column" th:value="${param.column}">
<input type="hidden" th:if="${param.sort == null}" id="sort" name="sort" value="ASC">
<input type="hidden" th:if="${param.sort != null}" id="sort" name="sort" th:value="${param.sort}">
<input type="hidden" th:if="${param.name!=null}" name="name" id="id" th:value="${param.name}">
<input type="hidden" th:if="${param.surname!=null}" name="surname" id="surname" th:value="${param.surname}">
<input type="hidden" th:if="${param.hiredate!=null}" name="hiredate" id="hiredate" th:value="${param.hiredate}">
<input type="hidden" th:if="${param.birthdate!=null}" name="birthdate" id="birthdate" th:value="${param.birthdate}">
<input type="hidden" th:if="${param.email!=null}" name="email" id="email" th:value="${param.email}">
<input type="hidden" th:if="${param.address!=null}" name="address" id="address" th:value="${param.address}">
<input type="hidden" th:if="${param.phone!=null}" name="phone" id="phone" th:value="${param.phone}">
<button class="btn btn-primary" type="submit">Print csv report</button>
</form>
</div>
<script src="" async defer></script>
</body>
</html>
see it ijn full screen
Related
I want to test sandbox payment from local using 3d secure 2 https://pay.sandbox.realexpayments.com/pay . I used same hash options given in the link https://developer.globalpay.com/hpp/3d-secure-two
<form method="POST" action="https://pay.sandbox.realexpayments.com/pay" target="iframe">
<input type="hidden" name="TIMESTAMP" value="20230210123417">
<input type="hidden" name="MERCHANT_ID" value="marchantid">
<input type="hidden" name="ACCOUNT" value="internet">
<input type="hidden" name="ORDER_ID" value="TO100223120442">
<input type="hidden" name="AMOUNT" value="62000">
<input type="hidden" name="CURRENCY" value="EUR">
<input type="hidden" name="AUTO_SETTLE_FLAG" value="1">
<input type="hidden" name="SHA1HASH" value="customsha1">
<input type="hidden" name="CHANNEL" value="ECOM">
<input type="hidden" name="SHIPPING_CODE" value="K67E2V4">
<input type="hidden" name="CUST_NUM" value="8724">
<input type="hidden" name="VAR_REF" value="TO100223120442">
<input type="hidden" name="PROD_ID" value="1">
<input type="hidden" name="HPP_VERSION" value="2">
<input type="hidden" name="HPP_CHANNEL" value="ECOM">
<input type="hidden" name="HPP_LANG" value="en">
<input type="hidden" name="MERCHANT_RESPONSE_URL" value="http://127.0.0.1:8000//success">
<!-- Begin 3D Secure 2 Mandatory and Recommended Fields -->
<input type="hidden" name="HPP_CUSTOMER_EMAIL" value="prati22#gmail.com">
<input type="hidden" name="HPP_CUSTOMER_PHONENUMBER_MOBILE" value="045533000">
<input type="hidden" name="HPP_BILLING_STREET1" value="THE KILDARE 36 SWORDS MANOR">
<input type="hidden" name="HPP_BILLING_STREET2" value="GROVE SWORDS CO. DUBLIN">
<input type="hidden" name="HPP_BILLING_CITY" value="Kildare">
<input type="hidden" name="HPP_BILLING_POSTALCODE" value="K67E2V4">
<input type="hidden" name="HPP_BILLING_COUNTRY" value="353">
<input type="hidden" name="HPP_SHIPPING_STREET1" value="THE KILDARE 36 SWORDS MANOR">
<input type="hidden" name="HPP_SHIPPING_STREET2" value="GROVE SWORDS CO. DUBLIN">
<input type="hidden" name="HPP_SHIPPING_CITY" value="Kildare">
<input type="hidden" name="HPP_SHIPPING_POSTALCODE" value="K67E2V4">
<input type="hidden" name="HPP_SHIPPING_COUNTRY" value="353">
<input type="hidden" name="HPP_ADDRESS_MATCH_INDICATOR" value="FALSE">
<input type="hidden" name="HPP_CHALLENGE_REQUEST_INDICATOR" value="NO_PREFERENCE">
<!-- End 3D Secure 2 Mandatory and Recommended Fields -->
<input type="submit" class="tougher-button" style="font-size: 19px; padding: 1em; height: 3em; line-height: 1;" value="Click To Pay">
</form>
We are reviewing how we implement our global payment solution. Currently we are using HPP and message handlers to capture the response from global payment. This works fine apart from some edge cases which are rare. Is it possible to use both the HPP_Response_Url and the Merchant_Response_Url to capture the responses. Are they mutually exclusive.
Regards
Following is our hpp
<form action="https://pay.sandbox.realexpayments.com/pay" method="POST" target="iframe">
<input type="hidden" name="TIMESTAMP" value="20221122112307">
<input type="hidden" name="MERCHANT_ID" value="XXX">
<input type="hidden" name="ACCOUNT" value="internet">
<input type="hidden" name="ORDER_ID" value="N3qsk4kYRZihmPrTXWYS6g">
<input type="hidden" name="AMOUNT" value="4">
<input type="hidden" name="CURRENCY" value="EUR">
<input type="hidden" name="AUTO_SETTLE_FLAG" value="1">
<input type="hidden" name="HPP_VERSION" value="2">
<input type="hidden" name="HPP_CUSTOMER_COUNTRY" value="DE">
<input type="hidden" name="HPP_CUSTOMER_FIRSTNAME" value="James">
<input type="hidden" name="HPP_CUSTOMER_LASTNAME" value="Mason">
<input type="hidden" name="MERCHANT_RESPONSE_URL" value="https://localhost:44369/api/payment/processresponse">
<input type="hidden" name="HPP_TX_STATUS_URL" value="https://localhost:44369/api/payment/processresponse">
<input type="hidden" name="HPP_POST_RESPONSE" value="https://localhost:44369/api/payment/processresponse">
<!-- APMs Mandatory Fields -->
<input type="hidden" name="SHA1HASH" value="edfd9ff20b616e6e5c3fb195bbf51288390e50e6">
<input type="submit" value="Click To Pay">
</form>
I have a html file as described in the picture : kegg mapper result
and I would like to build a table with three columns :"pathway" , "KO" and "Query":
The "Pathway" columns will contain "01100 Metabolic pathway", the "KO" column should contain "K00166" and the "Query" should contain "Trinity_GG_60253_c0_g1_i9.p2"
Here is the html source file
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- saved from url=(0050)https://www.genome.jp/kegg-bin/find_pathway_object -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=windows-1252"><title>KEGG Mapper Reconstruction Result</title>
<meta name="http-equiv" content="Content-Type">
<script type="text/javascript" src="./KEGGResult_files/jquery.min.js.download"></script>
<script type="text/javascript" src="./KEGGResult_files/jquery-ui.min.js.download"></script>
<link rel="stylesheet" type="text/css" href="./KEGGResult_files/jquery-ui.css">
<link rel="stylesheet" type="text/css" href="./KEGGResult_files/mapper2.css">
<script language="JavaScript">
<!---
</style></head>
<body>
<h3>KEGG Mapper Reconstruction Result</h3>
<div class="box1">
<ul class="menu">
<form method="POST" name="form2">
<li class="on">Pathway (4)</li>
<li class="off">Brite (2)</li>
<li class="off">Brite Table (1)</li>
<li class="off">Module (0)</li>
<input type="hidden" name="uploadfile" value="1631631910128046/mapper.args">
<input type="hidden" name="module_complete_file" value="1631631910128046/module_complete.list">
<input type="hidden" name="target" value="">
<input type="hidden" name="pathway_count" value="4">
<input type="hidden" name="brite_count" value="2">
<input type="hidden" name="brite_table_count" value="1">
<input type="hidden" name="module_count" value="0">
<input type="hidden" name="pathway_module_count" value="0">
</form>
</ul>
</div>
<div class="box2">
<form method="POST" name="form1" action="https://www.genome.jp/kegg-bin/find_pathway_object">
<input type="hidden" name="uploadfile" value="1631631910128046/mapper.args">
<input type="hidden" name="module_complete_file" value="1631631910128046/module_complete.list">
<input type="hidden" name="sort" value="object">
<input type="hidden" name="target" value="">
<input type="hidden" name="pathway_count" value="4">
<input type="hidden" name="brite_count" value="2">
<input type="hidden" name="brite_table_count" value="1">
<input type="hidden" name="module_count" value="0">
<input type="hidden" name="pathway_module_count" value="0">
</form>
<p>
</p><div id="all_status">Hide matched objects</div>
<p>
</p><div id="list">
<!-- -->
<b>Metabolism</b>
<ul>
Global and overview maps
<ul>
<li>01100 Metabolic pathways (1)
<div id="objectmap01100" class="object" style="display: inline;"><p>
</p><dl>
<dt>K00166</dt>
<dd>Trinity_GG_60253_c0_g1_i9.p2</dd>
</dl>
</div></li><li>01110 Biosynthesis of secondary metabolites (1)
<div id="objectmap01110" class="object" style="display: inline;"><p>
</p><dl>
<dt>K00166</dt>
<dd>Trinity_GG_60253_c0_g1_i9.p2</dd>
</dl>
</div></li> </ul>
Carbohydrate metabolism
<ul>
<li>00640 Propanoate metabolism (1)
<div id="objectmap00640" class="object" style="display: inline;"><p>
</p><dl>
<dt>K00166</dt>
<dd>Trinity_GG_60253_c0_g1_i9.p2</dd>
</dl>
</div></li> </ul>
Amino acid metabolism
<ul>
<li>00280 Valine, leucine and isoleucine degradation (1)
<div id="objectmap00280" class="object" style="display: inline;"><p>
</p><dl>
<dt>K00166</dt>
<dd>Trinity_GG_60253_c0_g1_i9.p2</dd>
</dl>
</div></li></ul></ul></div></div>
</body></html>
I have taken your data as HTML and find text according to tag wise
first one Metabolic... it is outside tag so i have find out next tag for it and then previous text from the methods
soup=BeautifulSoup(html,"lxml")
data=soup.find_all("li")
lst=[]
for i in data:
data_lst=[]
data_lst.append(i.find("a").find_next().previous.replace("("," "))
data_lst.append(i.find("dt").get_text())
data_lst.append(i.find("dd").get_text())
lst.append(data_lst)
import pandas as pd
df=pd.DataFrame(columns=["Pathway","KO","Query"],data=lst)
Output:
Pathway KO Query
0 Metabolic pathways K00166 Trinity_GG_60253_c0_g1_i9.p2
1 Biosynthesis of secondary metabolites K00166 Trinity_GG_60253_c0_g1_i9.p2
2 Propanoate metabolism K00166 Trinity_GG_60253_c0_g1_i9.p2
3 Valine, leucine and isoleucine degradation K00166 Trinity_GG_60253_c0_g1_i9.p2
i am trying to implement a hpp full redirect to realex payment from Odoo, the transaction is successful but it does not redirect to my website neither giving any response. Here is my code:
<template id="global_form">
<input type="hidden" name="data_set" t-att-data-action-url="tx_url" data-remove-me=""/>
<input type="hidden" name="TIMESTAMP" t-att-value="timestamp"/>
<input type="hidden" name="MERCHANT_ID" t-att-value="merchant_id"/>
<input type="hidden" name="ACCOUNT" t-att-value="account_id"/>
<input type="hidden" name="shared_secret" t-att-value="shared_secret"/>
<input type="hidden" name="ORDER_ID" t-att-value="order_id"/>
<input type="hidden" name="AMOUNT" t-att-value="global_amount"/>
<input type="hidden" name="CURRENCY" value="CAD"/>
<input type="hidden" name="AUTO_SETTLE_FLAG" value="1"/>
<input type="hidden" name="COMMENT1" value="Mobile Channel"/>
<input type="hidden" name="HPP_VERSION" value="2"/>
<input type="hidden" name="HPP_CHANNEL" value="ECOM"/>
<input type="hidden" name="HPP_LANG" value="en"/>
<input type="hidden" name="SHA1HASH" t-att-value="SHA1HASH"/>
<input type="hidden" name="HPP_POST_RESPONSE" value="http://localhost:8069"/>
<input type="hidden" name="MERCHANT_RESPONSE_URL" value="http://localhost:8069/">
</template>
This how it works using Odoo, I ma not getting any response with any of HPP_POST_RESPONSE or MERCHANT_RESPONSE_URL. Note that i have full acces to the merchant site in globalpaymnet.
Thanks.
I would like to use rebol to download an xml backup of my blog from
http://reboltutorial.com/wp-admin/export.php
the form is
<form action="" method="get">
<h3>Options</h3>
<table class="form-table">
<tr>
<th><label for="author">Restrict Author</label></th>
<td>
<select name="author" id="author">
<option value="all" selected="selected">All Authors</option>
<option value='1'>admin</option></select>
</td>
</tr>
</table>
<p class="submit"><input type="submit" name="submit" class="button" value="Download Export File" />
<input type="hidden" name="download" value="true" />
</p>
</form>
I guess I would first need to log in http://reboltutorial.com/login/ and then what after ?
Any code example to do similar stuff (getting the cookie, ...) ?
<form name="loginform" id="loginform" action="" method="post">
<p>
<label>Username<br />
<input type="text" name="log" id="user_login" class="input" value="" size="20" /></label>
</p>
<p>
<label>Password<br />
<input type="password" name="pwd" id="user_pass" class="input" value="" size="20" /></label>
</p>
<p class="forgetmenot"><label><input name="rememberme" type="checkbox" id="rememberme" value="forever" /> Remember Me</label></p>
<p class="submit">
<input type="hidden" name="post-from" id="post-from" value="page" />
<input type="hidden" name="action" id="action" value="login" />
<input type="submit" name="wp-submit" id="wp-submit" value="Log In" />
<input type="hidden" name="redirect_to" value="http://reboltutorial.com/wp-admin/" />
<input type="hidden" name="testcookie" value="1" />
</p>
</form>
Try this
http://rebol.wik.is/Protocols/Http