2018-02-20 07:53:06 +00:00
|
|
|
<vn-watcher
|
|
|
|
vn-id="watcher"
|
2018-02-20 13:30:02 +00:00
|
|
|
data="$ctrl.botanical"
|
2020-03-09 08:00:03 +00:00
|
|
|
form="form">
|
2018-02-20 07:53:06 +00:00
|
|
|
</vn-watcher>
|
2021-03-04 19:11:10 +00:00
|
|
|
<form name="form" ng-submit="$ctrl.onSubmit()" ng-cloak class="vn-w-md">
|
2019-10-04 22:16:57 +00:00
|
|
|
<vn-card class="vn-pa-lg">
|
2018-03-01 22:38:14 +00:00
|
|
|
<vn-horizontal>
|
|
|
|
<vn-autocomplete
|
2020-03-09 08:00:03 +00:00
|
|
|
label="Genus"
|
2019-10-09 22:47:29 +00:00
|
|
|
ng-model="$ctrl.botanical.genusFk"
|
2020-03-09 08:00:03 +00:00
|
|
|
url="Genera"
|
2021-03-04 06:56:31 +00:00
|
|
|
show-field="name"
|
|
|
|
value-field="id">
|
|
|
|
<append>
|
|
|
|
<vn-icon-button
|
|
|
|
icon="add_circle"
|
|
|
|
vn-tooltip="New genus"
|
|
|
|
ng-click="$ctrl.showGenus($event)"
|
|
|
|
vn-acl="logisticBoss">
|
|
|
|
</vn-icon-button>
|
|
|
|
</append>
|
2018-03-01 22:38:14 +00:00
|
|
|
</vn-autocomplete>
|
2020-03-09 08:00:03 +00:00
|
|
|
<vn-autocomplete
|
2019-12-26 07:43:34 +00:00
|
|
|
label="Species"
|
2019-10-09 22:47:29 +00:00
|
|
|
ng-model="$ctrl.botanical.specieFk"
|
2020-03-09 08:00:03 +00:00
|
|
|
url="Species"
|
2021-03-04 06:56:31 +00:00
|
|
|
show-field="name"
|
|
|
|
value-field="id">
|
2019-12-26 07:21:08 +00:00
|
|
|
<tpl-item>
|
2021-03-04 06:56:31 +00:00
|
|
|
<div>{{name}}</div>
|
2019-12-26 07:21:08 +00:00
|
|
|
<div class="text-caption text-secondary">
|
2021-03-04 06:56:31 +00:00
|
|
|
{{genus.name}}
|
2019-12-26 07:21:08 +00:00
|
|
|
</div>
|
|
|
|
</tpl-item>
|
2021-03-04 06:56:31 +00:00
|
|
|
<append>
|
|
|
|
<vn-icon-button
|
|
|
|
icon="add_circle"
|
|
|
|
vn-tooltip="New species"
|
|
|
|
ng-click="$ctrl.showSpecies($event)"
|
|
|
|
vn-acl="logisticBoss">
|
|
|
|
</vn-icon-button>
|
|
|
|
</append>
|
2018-03-01 22:38:14 +00:00
|
|
|
</vn-autocomplete>
|
|
|
|
</vn-horizontal>
|
2018-02-20 07:53:06 +00:00
|
|
|
</vn-card>
|
|
|
|
<vn-button-bar>
|
2020-12-13 12:54:17 +00:00
|
|
|
<vn-submit
|
2020-12-15 15:07:34 +00:00
|
|
|
disabled="!watcher.dataChanged()"
|
2020-12-13 12:54:17 +00:00
|
|
|
label="Save">
|
|
|
|
</vn-submit>
|
2020-12-15 15:07:34 +00:00
|
|
|
<!-- # #2680 Undo changes button bugs -->
|
|
|
|
<!-- <vn-button
|
|
|
|
class="cancel"
|
2020-03-09 08:00:03 +00:00
|
|
|
label="Undo changes"
|
2020-12-15 15:07:34 +00:00
|
|
|
disabled="!watcher.dataChanged()"
|
2020-03-09 08:00:03 +00:00
|
|
|
ng-click="watcher.loadOriginalData()">
|
2020-12-15 15:07:34 +00:00
|
|
|
</vn-button> -->
|
2018-02-20 07:53:06 +00:00
|
|
|
</vn-button-bar>
|
2021-03-04 06:56:31 +00:00
|
|
|
</form>
|
|
|
|
<!-- Create new genus dialog -->
|
|
|
|
<vn-dialog class="edit"
|
|
|
|
vn-id="genus"
|
|
|
|
on-accept="$ctrl.onGenusAccept()"
|
|
|
|
message="New genus">
|
|
|
|
<tpl-body>
|
|
|
|
<vn-horizontal>
|
|
|
|
<vn-textfield vn-one vn-focus
|
2021-03-04 19:11:10 +00:00
|
|
|
label="Latin genus name"
|
2021-03-04 06:56:31 +00:00
|
|
|
ng-model="$ctrl.data.name"
|
|
|
|
required="true">
|
|
|
|
</vn-textfield>
|
|
|
|
</vn-horizontal>
|
|
|
|
</tpl-body>
|
|
|
|
<tpl-buttons>
|
|
|
|
<input type="button" response="cancel" translate-attr="{value: 'Cancel'}"/>
|
|
|
|
<button response="accept" translate>Create</button>
|
|
|
|
</tpl-buttons>
|
|
|
|
</vn-dialog>
|
|
|
|
<!-- Create new species dialog -->
|
|
|
|
<vn-dialog class="edit"
|
|
|
|
vn-id="species"
|
|
|
|
on-accept="$ctrl.onSpeciesAccept()"
|
|
|
|
message="New species">
|
|
|
|
<tpl-body>
|
|
|
|
<vn-horizontal>
|
|
|
|
<vn-textfield vn-one vn-focus
|
2021-03-04 19:11:10 +00:00
|
|
|
label="Latin species name"
|
2021-03-04 06:56:31 +00:00
|
|
|
ng-model="$ctrl.data.name"
|
|
|
|
required="true">
|
|
|
|
</vn-textfield>
|
|
|
|
</vn-horizontal>
|
|
|
|
</tpl-body>
|
|
|
|
<tpl-buttons>
|
|
|
|
<input type="button" response="cancel" translate-attr="{value: 'Cancel'}"/>
|
|
|
|
<button response="accept" translate>Create</button>
|
|
|
|
</tpl-buttons>
|
|
|
|
</vn-dialog>
|