eventman/angular_app/person-edit.html

70 lines
3.9 KiB
HTML
Raw Normal View History

2015-04-05 22:16:11 +02:00
<!-- show details of a Person -->
<div class="container">
2015-05-05 21:31:37 +02:00
<div class="panel panel-primary table-striped top5">
<div class="panel-heading">
<h1>
<button ng-if="person._id" ng-click="$state.go('person.info', {id: person._id})" class="btn btn-success">
<span class="fa fa-info-circle vcenter"></span>
{{'Info' | translate}}
</button>
&nbsp;<span ng-if="!(person.name || person.surname)">{{'New person' | translate}}</span>{{person.name}} {{person.surname}}
</h1>
2015-04-05 20:12:54 +02:00
</div>
2015-05-05 21:31:37 +02:00
<div class="panel-body">
2015-04-05 17:36:29 +02:00
2015-05-05 21:31:37 +02:00
<form name="personForm" ng-model="persondetails" ng-submit="save()">
<div ng-class="{clearfix: true, alert: true, 'alert-success': !personForm.$dirty, 'alert-danger': personForm.$dirty}">
<button type="button" class="btn btn-default pull-right" ng-click="save($event)" ng-disabled="!personForm.$dirty">
<span class="fa fa-floppy-o vcenter"></span>
{{'save' | translate}}
</button>
</div>
2015-03-15 23:05:59 +01:00
2015-05-05 21:31:37 +02:00
<div class="input-group input-group-lg">
<span class="input-group-addon min120">{{'Name' | translate}}</span>
<input type="text" class="form-control" placeholder="{{'Name' | translate}}" ng-model="person.name" ng-required="1">
</div>
2015-03-15 23:05:59 +01:00
2015-05-05 21:31:37 +02:00
<div class="input-group input-group-lg top5">
<span class="input-group-addon min120">{{'Surname' | translate}}</span>
<input type="text" class="form-control" placeholder="{{'Surname' | translate}}" ng-model="person.surname">
</div>
2015-03-15 23:05:59 +01:00
2015-05-05 21:31:37 +02:00
<div class="input-group input-group-lg top5">
<span class="input-group-addon min120">{{'Email' | translate}}</span>
<input type="email" name="email" class="form-control" placeholder="{{'name.surname@example.com' | translate}}" ng-model="person.email">
</div>
2015-05-05 21:31:37 +02:00
<div class="input-group input-group-lg top5">
<span class="input-group-addon min120">{{'Company' | translate}}</span>
<input name="company" class="form-control" placeholder="{{'Acme Corporation' | translate}}" ng-model="person.company">
</div>
2015-04-18 18:26:50 +02:00
2015-05-05 21:31:37 +02:00
<div class="input-group input-group-lg top5">
<span class="input-group-addon min120">{{'Job' | translate}}</span>
<input name="job_title" class="form-control" placeholder="{{'Evil Ruler' | translate}}" ng-model="person.job_title">
</div>
2015-05-05 21:31:37 +02:00
<div class="form-group top5">
<label for="addToEvent">{{'Add to event:' | translate}}</label>
<select class="form-control" id="addToEvent" ng-model="addToEvent">
<option value=""></option>
<option ng-repeat="event in events | eventWithPersonData:false" value="{{event._id}}">{{event.title}}</option>
</select>
<option>
<tr ng-repeat="event in events | splittedFilter:query | orderBy:eventsOrderProp">
</div>
2015-04-18 17:52:36 +02:00
2015-05-05 21:31:37 +02:00
<div ng-repeat="custom in customFields" class="form-group top5">
<label for="custom_{{custom['key']}}">{{custom.label | translate}}</span>
<input ng-if="custom.type == 'boolean'" id="custom_{{custm['key']}}" type="checkbox" class="form-control" placeholder="{{custom.label | translate}}" ng-model="person[custom.key]">
<input ng-if="custom.type != 'boolean'" id="custom_{{custm['key']}}" type="text" class="form-control" placeholder="{{custom.label | translate}}" ng-model="person[custom.key]">
</div>
<input type="submit" class="outside-screen" />
</form>
</div>
</div>
2015-03-21 16:48:00 +01:00
</div>