Commit d01d060b by yasir

update tampilan

1 parent a070cbce
......@@ -58,8 +58,8 @@ ems = [
class VaSchema(colander.Schema):
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_time = colander.SchemaNode(colander.String(), title = "Jam 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, widget=widget.HiddenWidget())
class CcSchema(colander.Schema):
cc_instmnt_type = colander.SchemaNode(colander.String(), title = "Installment type", missing=colander.drop)
......@@ -90,10 +90,10 @@ class EmSchema(colander.Schema):
class FormSchema(colander.Schema):
pay_method = colander.SchemaNode(colander.String(), title = "Metode Pembayaran", missing=colander.drop)
biller_name = colander.SchemaNode(colander.String(), title = "Biller", missing=colander.drop)
amount_tot = colander.SchemaNode(colander.String(), title = "Amount", missing=colander.drop)
customer_name = colander.SchemaNode(colander.String(), title = "Customer", 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, widget=widget.HiddenWidget())
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, widget=widget.HiddenWidget())
def encode_to_json(form_request_data, parsed_produks):
decoded_dict = {}
......@@ -294,6 +294,7 @@ class view_pay(BaseView):
loans = loans,
cps = cps,
ems = ems,
formData = data_form,
produks = produks,
......
......@@ -54,6 +54,9 @@ td, th {
<input type="hidden" name="_charset_">
<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 -->
<div tal:define="field form" class="alert alert-danger" tal:condition="field.error">
......@@ -63,37 +66,9 @@ td, th {
<p class="errorMsg">${field.errormsg}</p>
</div>
<!-- END Tampilan untuk general error -->
<div style=" padding: 5px; " class="col-md-12">
<div tal:define="fieldItem form['biller_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 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 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 class="col-md-4 col-sm-4 col-xs-4" style="padding: 0px;">
<img width="100px" src="${prod['img_url']}">
......@@ -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; font-size: 0.8em;">@${prod['goods_amt']} x ${prod['qty']}</label>
</div>
<div class="col-md-4 col-sm-4 col-xs-4" style="padding: 0px;">
<label style="font-weight: bold;">${prod['subtotal']}</label>
<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>
</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-->
<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 {
</div>
</div>
<hr class="col-md-12">
<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;">
<label for="${fieldItem.oid}" class="control-label col-md-4" id="req-${fieldItem.oid}">
......@@ -140,20 +112,14 @@ td, th {
</div>
<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">
<input type="text" class="form-control" id="${fieldItem.name}-cnt" name="${fieldItem.name}-cnt" value="" style="width: 150px">
<p id="error-${fieldItem.oid}" class="help-block" tal:condition="fieldItem.error" tal:repeat="error fieldItem.error.messages()">${error}</p>
${structure:fieldItem.serialize()}
</div>
</div>
<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">
<input type="text" class="form-control" id="${fieldItem.name}-cnt" name="${fieldItem.name}-cnt" value="" style="width: 150px">
<p id="error-${fieldItem.oid}" class="help-block" tal:condition="fieldItem.error" tal:repeat="error fieldItem.error.messages()">${error}</p>
${structure:fieldItem.serialize()}
</div>
</div>
......@@ -315,18 +281,12 @@ td, th {
</div>
<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>
</form>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!