salix/modules/item/front/create/index.html

66 lines
2.4 KiB
HTML
Raw Normal View History

<mg-ajax path="Items/new" options="vnPost"></mg-ajax>
2017-12-20 11:40:29 +00:00
<vn-watcher
vn-id="watcher"
data="$ctrl.item"
form="form"
save="post">
</vn-watcher>
2019-01-30 22:47:06 +00:00
<div class="content-block">
<form name="form" ng-submit="$ctrl.onSubmit()" compact>
<vn-card class="vn-pa-lg">
2018-03-01 22:38:14 +00:00
<vn-horizontal>
2019-01-16 07:46:40 +00:00
<vn-textfield
vn-one
label="Temporal name"
2019-10-09 22:47:29 +00:00
ng-model="$ctrl.item.provisionalName"
2019-01-16 07:46:40 +00:00
vn-focus>
</vn-textfield>
2018-03-01 22:38:14 +00:00
</vn-horizontal>
<vn-horizontal>
<vn-autocomplete vn-one
url="ItemTypes"
2018-03-01 22:38:14 +00:00
label="Type"
2018-10-18 07:24:20 +00:00
fields="['code', 'name']"
2018-03-01 22:38:14 +00:00
value-field="id"
2019-10-09 22:47:29 +00:00
ng-model="$ctrl.item.typeFk"
2019-01-28 09:04:08 +00:00
search-function="{or: [{code: {like: $search +'%'}}, {name: {like: '%'+ $search +'%'}}]}">
2018-05-31 12:40:42 +00:00
<tpl-item style="display: flex;">
<div style="width: 3em; padding-right: 1em;">{{::code}}</div>
<div>{{::name}}</div>
</tpl-item>
2018-03-01 22:38:14 +00:00
</vn-autocomplete>
<vn-autocomplete vn-one
url="Intrastats"
2018-03-22 17:02:48 +00:00
label="Intrastat"
show-field="description"
value-field="id"
2019-10-09 22:47:29 +00:00
ng-model="$ctrl.item.intrastatFk"
2019-01-28 09:04:08 +00:00
search-function="{or: [{id: {like: $search +'%'}}, {description: {like: '%'+ $search +'%'}}]}">
2018-05-31 12:40:42 +00:00
<tpl-item style="display: flex;">
<div style="width: 6em; text-align: right; padding-right: 1em;">{{::id}}</div>
<div>{{::description}}</div>
</tpl-item>
2018-03-22 17:02:48 +00:00
</vn-autocomplete>
2018-03-01 22:38:14 +00:00
</vn-horizontal>
<vn-horizontal>
<vn-autocomplete vn-one
url="Origins"
2018-03-01 22:38:14 +00:00
label="Origin"
show-field="name"
value-field="id"
2019-10-09 22:47:29 +00:00
ng-model="$ctrl.item.originFk">
2018-03-01 22:38:14 +00:00
</vn-autocomplete>
</vn-horizontal>
2017-12-20 11:40:29 +00:00
</vn-card>
<vn-button-bar>
2019-10-18 19:36:30 +00:00
<vn-submit
label="Create">
</vn-submit>
<vn-button
label="Cancel"
ui-sref="item.index">
</vn-button>
2017-12-20 11:40:29 +00:00
</vn-button-bar>
2019-01-30 22:47:06 +00:00
</form>
</div>