2019-01-17 18:14:09 +00:00
|
|
|
<h2>
|
|
|
|
É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>
|
2016-12-26 02:44:04 +00:00
|
|
|
|
2017-12-17 15:07:04 +00:00
|
|
|
<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>
|
2016-12-26 02:44:04 +00:00
|
|
|
<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">
|
2017-12-17 15:07:04 +00:00
|
|
|
<select class="custom-select" id="{{ field }}" ng-model="event[field]" ng-options="k as v for (k, v) in kinds" ng-show="field == 'kind'">
|
2016-12-26 02:44:04 +00:00
|
|
|
</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>
|
2018-11-18 20:34:08 +00:00
|
|
|
<button type="button" class="btn btn-danger" ng-click="deleteEvent()"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span> Delete</button>
|
2016-12-26 02:44:04 +00:00
|
|
|
</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>
|