Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Kunto
/
backoffice
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit d01d060b
authored
Jan 07, 2020
by
yasir
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
update tampilan
1 parent
a070cbce
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
62 deletions
src/agratek/api/merchant/views/pay.py
src/agratek/api/merchant/views/templates/pay.pt
src/agratek/api/merchant/views/pay.py
View file @
d01d060
...
@@ -58,8 +58,8 @@ ems = [
...
@@ -58,8 +58,8 @@ ems = [
class
VaSchema
(
colander
.
Schema
):
class
VaSchema
(
colander
.
Schema
):
va_opt
=
colander
.
SchemaNode
(
colander
.
String
(),
title
=
"Pilih Layanan"
,
missing
=
colander
.
drop
)
va_opt
=
colander
.
SchemaNode
(
colander
.
String
(),
title
=
"Pilih Layanan"
,
missing
=
colander
.
drop
)
va_valid_date
=
colander
.
SchemaNode
(
colander
.
String
(),
title
=
"Tanggal Valid"
,
missing
=
colander
.
drop
)
va_valid_date
=
colander
.
SchemaNode
(
colander
.
String
(),
title
=
"Tanggal Valid"
,
missing
=
colander
.
drop
,
widget
=
widget
.
HiddenWidget
()
)
va_valid_time
=
colander
.
SchemaNode
(
colander
.
String
(),
title
=
"Jam Valid"
,
missing
=
colander
.
drop
)
va_valid_time
=
colander
.
SchemaNode
(
colander
.
String
(),
title
=
"Jam Valid"
,
missing
=
colander
.
drop
,
widget
=
widget
.
HiddenWidget
()
)
class
CcSchema
(
colander
.
Schema
):
class
CcSchema
(
colander
.
Schema
):
cc_instmnt_type
=
colander
.
SchemaNode
(
colander
.
String
(),
title
=
"Installment type"
,
missing
=
colander
.
drop
)
cc_instmnt_type
=
colander
.
SchemaNode
(
colander
.
String
(),
title
=
"Installment type"
,
missing
=
colander
.
drop
)
...
@@ -90,10 +90,10 @@ class EmSchema(colander.Schema):
...
@@ -90,10 +90,10 @@ class EmSchema(colander.Schema):
class
FormSchema
(
colander
.
Schema
):
class
FormSchema
(
colander
.
Schema
):
pay_method
=
colander
.
SchemaNode
(
colander
.
String
(),
title
=
"Metode Pembayaran"
,
missing
=
colander
.
drop
)
pay_method
=
colander
.
SchemaNode
(
colander
.
String
(),
title
=
"Metode Pembayaran"
,
missing
=
colander
.
drop
,
widget
=
widget
.
HiddenWidget
()
)
biller_name
=
colander
.
SchemaNode
(
colander
.
String
(),
title
=
"Biller"
,
missing
=
colander
.
drop
)
biller_name
=
colander
.
SchemaNode
(
colander
.
String
(),
title
=
"Biller"
,
missing
=
colander
.
drop
,
widget
=
widget
.
HiddenWidget
()
)
amount_tot
=
colander
.
SchemaNode
(
colander
.
String
(),
title
=
"Amount"
,
missing
=
colander
.
drop
)
amount_tot
=
colander
.
SchemaNode
(
colander
.
String
(),
title
=
"Amount"
,
missing
=
colander
.
drop
,
widget
=
widget
.
HiddenWidget
()
)
customer_name
=
colander
.
SchemaNode
(
colander
.
String
(),
title
=
"Customer"
,
missing
=
colander
.
drop
)
customer_name
=
colander
.
SchemaNode
(
colander
.
String
(),
title
=
"Customer"
,
missing
=
colander
.
drop
,
widget
=
widget
.
HiddenWidget
()
)
def
encode_to_json
(
form_request_data
,
parsed_produks
):
def
encode_to_json
(
form_request_data
,
parsed_produks
):
decoded_dict
=
{}
decoded_dict
=
{}
...
@@ -294,6 +294,7 @@ class view_pay(BaseView):
...
@@ -294,6 +294,7 @@ class view_pay(BaseView):
loans
=
loans
,
loans
=
loans
,
cps
=
cps
,
cps
=
cps
,
ems
=
ems
,
ems
=
ems
,
formData
=
data_form
,
produks
=
produks
,
produks
=
produks
,
...
...
src/agratek/api/merchant/views/templates/pay.pt
View file @
d01d060
...
@@ -54,6 +54,9 @@ td, th {
...
@@ -54,6 +54,9 @@ td, th {
<input
type=
"hidden"
name=
"_charset_"
>
<input
type=
"hidden"
name=
"_charset_"
>
<input
type=
"hidden"
value=
"deform"
name=
"__formid__"
>
<input
type=
"hidden"
value=
"deform"
name=
"__formid__"
>
${structure:form['biller_name'].serialize()}
${structure:form['amount_tot'].serialize()}
${structure:form['customer_name'].serialize()}
<!-- Tampilan untuk general error -->
<!-- Tampilan untuk general error -->
<div
tal:define=
"field form"
class=
"alert alert-danger"
tal:condition=
"field.error"
>
<div
tal:define=
"field form"
class=
"alert alert-danger"
tal:condition=
"field.error"
>
...
@@ -63,37 +66,9 @@ td, th {
...
@@ -63,37 +66,9 @@ td, th {
<p
class=
"errorMsg"
>
${field.errormsg}
</p>
<p
class=
"errorMsg"
>
${field.errormsg}
</p>
</div>
</div>
<!-- END Tampilan untuk general error -->
<!-- END Tampilan untuk general error -->
<div
class=
"col-md-12 col-sm-12 col-xs-12 panel-heading"
>
<div
style=
" padding: 5px; "
class=
"col-md-12"
>
<h3
class=
"panel-title"
>
List Produk :
</h3>
<div
tal:define=
"fieldItem form['biller_name']"
class=
"col-md-12"
id=
"item-${fieldItem.oid}"
style=
"margin-bottom: 5px;"
>
</div>
<label
for=
"${fieldItem.oid}"
class=
"control-label col-md-4"
id=
"req-${fieldItem.oid}"
>
${fieldItem.title}
</label>
<div
class=
"col-md-8"
>
${structure:fieldItem.serialize()}
<p
id=
"error-${fieldItem.oid}"
class=
"help-block"
tal:condition=
"fieldItem.error"
tal:repeat=
"error fieldItem.error.messages()"
>
${error}
</p>
</div>
</div>
<div
tal:define=
"fieldItem form['amount_tot']"
class=
"col-md-12"
id=
"item-${fieldItem.oid}"
style=
"margin-bottom: 5px;"
>
<label
for=
"${fieldItem.oid}"
class=
"control-label col-md-4"
id=
"req-${fieldItem.oid}"
>
${fieldItem.title}
</label>
<div
class=
"col-md-8"
>
${structure:fieldItem.serialize()}
<p
id=
"error-${fieldItem.oid}"
class=
"help-block"
tal:condition=
"fieldItem.error"
tal:repeat=
"error fieldItem.error.messages()"
>
${error}
</p>
</div>
</div>
<div
tal:define=
"fieldItem form['customer_name']"
class=
"col-md-12"
id=
"item-${fieldItem.oid}"
style=
"margin-bottom: 5px;"
>
<label
for=
"${fieldItem.oid}"
class=
"control-label col-md-4"
id=
"req-${fieldItem.oid}"
>
${fieldItem.title}
</label>
<div
class=
"col-md-8"
>
${structure:fieldItem.serialize()}
<p
id=
"error-${fieldItem.oid}"
class=
"help-block"
tal:condition=
"fieldItem.error"
tal:repeat=
"error fieldItem.error.messages()"
>
${error}
</p>
</div>
</div>
<div
class=
"col-md-12 col-sm-12 col-xs-12 panel-heading"
>
<h3
class=
"panel-title"
>
List Produk :
</h3>
</div>
<div
tal:repeat=
"prod produks"
class=
"col-md-12 col-sm-12 col-xs-12"
style=
"text-align: center; margin-bottom: 5px; margin-top: 5px;"
>
<div
tal:repeat=
"prod produks"
class=
"col-md-12 col-sm-12 col-xs-12"
style=
"text-align: center; margin-bottom: 5px; margin-top: 5px;"
>
<div
class=
"col-md-4 col-sm-4 col-xs-4"
style=
"padding: 0px;"
>
<div
class=
"col-md-4 col-sm-4 col-xs-4"
style=
"padding: 0px;"
>
<img
width=
"100px"
src=
"${prod['img_url']}"
>
<img
width=
"100px"
src=
"${prod['img_url']}"
>
...
@@ -102,16 +77,15 @@ td, th {
...
@@ -102,16 +77,15 @@ td, th {
<label
class=
"col-md-12 col-sm-12 col-xs-12"
style=
"padding: 0px; padding-left: 2px;"
>
${prod['goods_name']}
</label>
<label
class=
"col-md-12 col-sm-12 col-xs-12"
style=
"padding: 0px; padding-left: 2px;"
>
${prod['goods_name']}
</label>
<label
class=
"col-md-12 col-sm-12 col-xs-12"
style=
"padding: 0px; padding-left: 2px; font-size: 0.8em;"
>
@${prod['goods_amt']} x ${prod['qty']}
</label>
<label
class=
"col-md-12 col-sm-12 col-xs-12"
style=
"padding: 0px; padding-left: 2px; font-size: 0.8em;"
>
@${prod['goods_amt']} x ${prod['qty']}
</label>
</div>
</div>
<div
class=
"col-md-4 col-sm-4 col-xs-4"
style=
"padding: 0px;"
>
<div
class=
"col-md-4 col-sm-4 col-xs-4"
style=
"padding: 0px;
text-align: right;
"
>
<label
style=
"font-weight: bold;"
>
${prod['subtotal']}
</label>
<label
style=
"font-weight: bold;
"
>
${prod['subtotal']}
</label>
</div>
</div>
</div>
</div>
<!-- <div style="padding: 0px; padding-bottom: 5px; width: 100%; height: 350px; overflow-y: scroll;" class="col-md-12 panel panel-default">
</div> -->
<div
class=
"col-md-12 col-sm-12 col-xs-12"
>
<label
tal:content=
"formData['amount_tot']"
class=
"col-md-4 col-sm-4 col-xs-4 pull-right"
style=
"text-align: right; padding: 0px;"
></label>
<label
class=
"col-md-4 col-sm-4 col-xs-4 pull-right"
style=
"text-align: left; padding: 0px;"
>
Total Bayar :
</label>
</div>
<!-- Looping Semua Field-->
<!-- Looping Semua Field-->
<div
tal:define=
"fieldItem form['pay_method']"
class=
"col-md-12"
id=
"item-${fieldItem.oid}"
style=
"margin-bottom: 5px;"
>
<div
tal:define=
"fieldItem form['pay_method']"
class=
"col-md-12"
id=
"item-${fieldItem.oid}"
style=
"margin-bottom: 5px;"
>
...
@@ -125,8 +99,6 @@ td, th {
...
@@ -125,8 +99,6 @@ td, th {
</div>
</div>
</div>
</div>
<hr
class=
"col-md-12"
>
<div
id=
"va_box"
class=
"col-md-12"
style=
"padding: 0px; display: none;"
>
<div
id=
"va_box"
class=
"col-md-12"
style=
"padding: 0px; display: none;"
>
<div
tal:define=
"fieldItem formVa['va_opt']"
class=
"col-md-12"
id=
"item-${fieldItem.oid}"
style=
"margin-bottom: 5px;"
>
<div
tal:define=
"fieldItem formVa['va_opt']"
class=
"col-md-12"
id=
"item-${fieldItem.oid}"
style=
"margin-bottom: 5px;"
>
<label
for=
"${fieldItem.oid}"
class=
"control-label col-md-4"
id=
"req-${fieldItem.oid}"
>
<label
for=
"${fieldItem.oid}"
class=
"control-label col-md-4"
id=
"req-${fieldItem.oid}"
>
...
@@ -140,20 +112,14 @@ td, th {
...
@@ -140,20 +112,14 @@ td, th {
</div>
</div>
<div
tal:define=
"fieldItem formVa['va_valid_date']"
class=
"col-md-12"
id=
"item-${fieldItem.oid}"
style=
"margin-bottom: 5px;"
>
<div
tal:define=
"fieldItem formVa['va_valid_date']"
class=
"col-md-12"
id=
"item-${fieldItem.oid}"
style=
"margin-bottom: 5px;"
>
<label
for=
"${fieldItem.oid}"
class=
"control-label col-md-4"
id=
"req-${fieldItem.oid}"
>
${fieldItem.title}
</label>
<div
class=
"col-md-8"
>
<div
class=
"col-md-8"
>
<input
type=
"text"
class=
"form-control"
id=
"${fieldItem.name}-cnt"
name=
"${fieldItem.name}-cnt"
value=
""
style=
"width: 150px"
>
${structure:fieldItem.serialize()}
<p
id=
"error-${fieldItem.oid}"
class=
"help-block"
tal:condition=
"fieldItem.error"
tal:repeat=
"error fieldItem.error.messages()"
>
${error}
</p>
</div>
</div>
</div>
</div>
<div
tal:define=
"fieldItem formVa['va_valid_time']"
class=
"col-md-12"
id=
"item-${fieldItem.oid}"
style=
"margin-bottom: 5px;"
>
<div
tal:define=
"fieldItem formVa['va_valid_time']"
class=
"col-md-12"
id=
"item-${fieldItem.oid}"
style=
"margin-bottom: 5px;"
>
<label
for=
"${fieldItem.oid}"
class=
"control-label col-md-4"
id=
"req-${fieldItem.oid}"
>
${fieldItem.title}
</label>
<div
class=
"col-md-8"
>
<div
class=
"col-md-8"
>
<input
type=
"text"
class=
"form-control"
id=
"${fieldItem.name}-cnt"
name=
"${fieldItem.name}-cnt"
value=
""
style=
"width: 150px"
>
${structure:fieldItem.serialize()}
<p
id=
"error-${fieldItem.oid}"
class=
"help-block"
tal:condition=
"fieldItem.error"
tal:repeat=
"error fieldItem.error.messages()"
>
${error}
</p>
</div>
</div>
</div>
</div>
...
@@ -315,18 +281,12 @@ td, th {
...
@@ -315,18 +281,12 @@ td, th {
</div>
</div>
<div
id=
"bt_box"
class=
"col-md-12"
style=
"text-align: right;"
>
<div
id=
"bt_box"
class=
"col-md-12"
style=
"text-align: right;"
>
<button
style=
"
width: 100px;"
class=
"btn btn-success
"
type=
"submit"
name=
"bayar"
id=
"bt_bayar"
>
Bayar
</button>
<button
style=
"
margin: 0px;"
class=
"btn btn-success col-md-5 col-xs-5 col-sm-5 pull-left
"
type=
"submit"
name=
"bayar"
id=
"bt_bayar"
>
Bayar
</button>
<button
class=
"btn btn-warning
"
type=
"submit"
name=
"batal_bayar"
id=
"bt_batal_bayar"
>
Batal
</button>
<button
style=
"margin: 0px;"
class=
"btn btn-warning col-md-5 col-xs-5 col-sm-5 pull-right
"
type=
"submit"
name=
"batal_bayar"
id=
"bt_batal_bayar"
>
Batal
</button>
</div>
</div>
</div>
<div>
</div>
</form>
</form>
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment