salix/client/item/src/create/item-create.html

56 lines
2.1 KiB
HTML
Raw Normal View History

2017-12-20 11:40:29 +00:00
<mg-ajax path="/item/api/Items" options="vnPost"></mg-ajax>
<vn-watcher
vn-id="watcher"
data="$ctrl.item"
form="form"
save="post">
</vn-watcher>
<form name="form" ng-submit="$ctrl.onSubmit()" margin-medium>
<div style="max-width: 70em; margin: 0 auto;">
2018-03-01 22:38:14 +00:00
<vn-card pad-large>
<vn-title>New item</vn-title>
<vn-horizontal>
<vn-textfield vn-one label="Name" field="$ctrl.item.name" vn-focus></vn-textfield>
</vn-horizontal>
<vn-horizontal>
<vn-autocomplete vn-one
url="/item/api/ItemTypes"
label="Type"
select-fields=["code","name"]
2018-03-01 22:38:14 +00:00
value-field="id"
field="$ctrl.item.typeFk"
where="{or: [{code: {regexp: 'search'}}, {name: {regexp: 'search'}}]}">
<tpl-item>{{code}} : {{name}}</tpl-item>
2018-03-01 22:38:14 +00:00
</vn-autocomplete>
<vn-autocomplete vn-one
url="/item/api/Intrastats"
label="Intrastat"
show-field="description"
value-field="id"
field="$ctrl.item.intrastatFk"
where="{or: [{id: {regexp: 'search'}}, {description: {regexp: 'search'}}]}">
<tpl-item>{{id}} : {{description}}</tpl-item>
</vn-autocomplete>
2018-03-01 22:38:14 +00:00
</vn-horizontal>
<vn-horizontal>
<vn-autocomplete vn-one
url="/item/api/Origins"
label="Origin"
show-field="name"
value-field="id"
field="$ctrl.item.originFk">
</vn-autocomplete>
<vn-autocomplete vn-one
url="/item/api/Expences"
label="Expence"
field="$ctrl.item.expenceFk"
initial-data="$ctrl.item.expence">
</vn-autocomplete>
</vn-horizontal>
2017-12-20 11:40:29 +00:00
</vn-card>
<vn-button-bar>
<vn-submit label="Create"></vn-submit>
</vn-button-bar>
</div>
</form>