server/admin/static/views/event.html

24 lines
1.4 KiB
HTML

<h2>
&Eacute;vénement
<a href="events/new" class="float-right btn btn-sm btn-primary ml-2"><span class="glyphicon glyphicon-plus" aria-hidden="true"></span> Ajouter un événement</a>
</h2>
<form ng-submit="saveEvent()">
<div class="form-group row" ng-repeat="field in fields">
<label for="{{ field }}" class="col-sm-1 col-form-label">{{ field | capitalize }}</label>
<div class="col-sm-11">
<input type="text" class="form-control" id="{{ field }}" ng-model="event[field]" ng-show="field != 'kind' && field != 'time'">
<input type="datetime" class="form-control" id="{{ field }}" ng-model="event[field]" ng-show="field == 'time' && event.id">
<select class="custom-select" id="{{ field }}" ng-model="event[field]" ng-options="k as v for (k, v) in kinds" ng-show="field == 'kind'">
</select>
</div>
</div>
<div class="text-right" ng-show="event.id">
<button type="submit" class="btn btn-primary"><span class="glyphicon glyphicon-save" aria-hidden="true"></span> Save</button>
<button type="button" class="btn btn-danger" ng-click="deleteEvent()"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span> Delete</button>
</div>
<div class="text-right" ng-show="!event.id">
<button type="submit" class="btn btn-primary"><span class="glyphicon glyphicon-plus" aria-hidden="true"></span> Ajouter l'événement</button>
</div>
</form>