55 lines
1.8 KiB
HTML
55 lines
1.8 KiB
HTML
<vn-watcher
|
|
vn-id="watcher"
|
|
url="ItemBotanicals"
|
|
data="$ctrl.botanical"
|
|
id-field="itemFk"
|
|
id-value="$ctrl.$params.id"
|
|
include="[{relation: 'genus'}, {relation: 'specie'}]"
|
|
auto-fill="true"
|
|
form="form">
|
|
</vn-watcher>
|
|
<form name="form" ng-submit="watcher.submit()" ng-cloak class="vn-w-md">
|
|
<vn-card class="vn-pa-lg">
|
|
<vn-horizontal>
|
|
<vn-textfield
|
|
label="Botanical"
|
|
ng-model="$ctrl.botanical.botanical"
|
|
vn-focus>
|
|
</vn-textfield>
|
|
</vn-horizontal>
|
|
<vn-horizontal>
|
|
<vn-autocomplete
|
|
label="Genus"
|
|
ng-model="$ctrl.botanical.genusFk"
|
|
initial-data="$ctrl.botanical.genus"
|
|
url="Genera"
|
|
show-field="latin_genus_name"
|
|
value-field="genus_id">
|
|
</vn-autocomplete>
|
|
<vn-autocomplete
|
|
label="Species"
|
|
ng-model="$ctrl.botanical.specieFk"
|
|
initial-data="$ctrl.botanical.specie"
|
|
url="Species"
|
|
show-field="latin_species_name"
|
|
value-field="specie_id"
|
|
fields="['genus_id']"
|
|
include="'genus'">
|
|
<tpl-item>
|
|
<div>{{latin_species_name}}</div>
|
|
<div class="text-caption text-secondary">
|
|
{{genus.latin_genus_name}}
|
|
</div>
|
|
</tpl-item>
|
|
</vn-autocomplete>
|
|
</vn-horizontal>
|
|
</vn-card>
|
|
<vn-button-bar>
|
|
<vn-submit label="Save"></vn-submit>
|
|
<vn-button
|
|
ng-if="watcher.dataChanged()"
|
|
label="Undo changes"
|
|
ng-click="watcher.loadOriginalData()">
|
|
</vn-button>
|
|
</vn-button-bar>
|
|
</form> |