59 рядки
3,3 КіБ
HTML
59 рядки
3,3 КіБ
HTML
<!-- show details of a Person -->
|
|
<div class="container">
|
|
<h1><span ng-if="!(person.name || person.surname)">{{'New person' | translate}}</span>{{person.name}} {{person.surname}}
|
|
<button ng-if="person._id" ng-click="$state.go('person.info', {id: person._id})" class="btn btn-success">
|
|
<span class="glyphicon glyphicon-info-sign"></span>
|
|
{{'Info' | translate}}
|
|
</button>
|
|
</h1>
|
|
|
|
<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">{{'save' | translate}}</button>
|
|
</div>
|
|
|
|
<div class="input-group input-group-lg">
|
|
<span class="input-group-addon">{{'Name' | translate}}</span>
|
|
<input type="text" class="form-control" placeholder="{{'Name' | translate}}" ng-model="person.name" ng-required="1">
|
|
</div>
|
|
|
|
<div class="input-group input-group-lg top5">
|
|
<span class="input-group-addon">{{'Surname' | translate}}</span>
|
|
<input type="text" class="form-control" placeholder="{{'Surname' | translate}}" ng-model="person.surname">
|
|
</div>
|
|
|
|
<div class="input-group top5">
|
|
<span class="input-group-addon">{{'Email' | translate}}</span>
|
|
<input type="email" name="email" class="form-control" placeholder="{{'name.surname@example.com' | translate}}" ng-model="person.email">
|
|
</div>
|
|
|
|
<div class="input-group top5">
|
|
<span class="input-group-addon">{{'Company' | translate}}</span>
|
|
<input name="company" class="form-control" placeholder="{{'Acme Corporation' | translate}}" ng-model="person.company">
|
|
</div>
|
|
|
|
<div class="input-group top5">
|
|
<span class="input-group-addon">{{'Job' | translate}}</span>
|
|
<input name="job_title" class="form-control" placeholder="{{'Evil Ruler' | translate}}" ng-model="person.job_title">
|
|
</div>
|
|
|
|
<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>
|
|
|
|
<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" style="position: absolute; left: -9999px; width: 1px; height: 1px;"/>
|
|
</form>
|
|
</div>
|
|
|