Add new v3 master with v2 forms, with colander/deform

goal here is to replace FormAlchemy dependency, slowly but surely..
so far only the Settings and Stores views use v3 master
This commit is contained in:
Lance Edgar 2017-07-18 12:29:05 -05:00
parent 2b5aaa0753
commit 4dcd89fba7
18 changed files with 718 additions and 59 deletions

View file

@ -7,6 +7,8 @@
## ##############################################################################
<%inherit file="/mobile/base.mako" />
<%def name="title()">${instance_title}</%def>
<%def name="title()">${index_title} &raquo; ${instance_title}</%def>
<%def name="page_title()">${h.link_to(index_title, index_url)} &raquo; ${instance_title}</%def>
${form.render()|n}

View file

@ -1,8 +0,0 @@
## -*- coding: utf-8; -*-
<%inherit file="/mobile/base.mako" />
<%def name="title()">Receiving</%def>
${h.link_to("New Receiving Batch", url('purchases.batch.mobile_create'), class_='ui-btn')}
${h.link_to("View Receiving Batches", url('mobile.purchases.batch'), class_='ui-btn')}

View file

@ -1,7 +1,9 @@
## -*- coding: utf-8; -*-
<%inherit file="/mobile/base.mako" />
<%def name="title()">${h.link_to("Receiving", url('mobile.receiving'))} &raquo; New Batch</%def>
<%def name="title()">Receiving &raquo; New Batch</%def>
<%def name="page_title()">${h.link_to("Receiving", url('mobile.receiving'))} &raquo; New Batch</%def>
${h.form(request.current_route_url(), class_='ui-filterable', name='new-purchasing-batch')}
${h.csrf_token(request)}

View file

@ -1,7 +1,9 @@
## -*- coding: utf-8; -*-
<%inherit file="/mobile/master/view.mako" />
<%def name="title()">${h.link_to("Receiving", url('mobile.receiving'))} &raquo; ${instance.id_str}</%def>
<%def name="title()">Receiving &raquo; ${instance.id_str}</%def>
<%def name="page_title()">${h.link_to("Receiving", url('mobile.receiving'))} &raquo; ${instance.id_str}</%def>
${form.render()|n}
<br />

View file

@ -2,8 +2,9 @@
<%inherit file="/mobile/master/view_row.mako" />
<%namespace file="/mobile/keypad.mako" import="keypad" />
## TODO: this is broken for actual page (header) title
<%def name="title()">${h.link_to("Receiving", url('mobile.receiving'))} &raquo; ${h.link_to(instance.batch.id_str, url('mobile.receiving.view', uuid=instance.batch_uuid))} &raquo; ${row.upc.pretty()}</%def>
<%def name="title()">Receiving &raquo; ${instance.batch.id_str} &raquo; ${row.upc.pretty()}</%def>
<%def name="page_title()">${h.link_to("Receiving", url('mobile.receiving'))} &raquo; ${h.link_to(instance.batch.id_str, url('mobile.receiving.view', uuid=instance.batch_uuid))} &raquo; ${row.upc.pretty()}</%def>
<%
unit_uom = 'LB' if row.product and row.product.weighed else 'EA'