1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-12-12 23:09:03 +01:00
fab-manager/app/frontend/templates/shared/_admin_form.html

144 lines
7.8 KiB
HTML
Raw Normal View History

2016-03-23 18:39:41 +01:00
<div class="row m-t">
<div class="col-sm-offset-3 col-sm-6">
<div ng-if="genderRequired" class="form-group" ng-class="{'has-error': adminForm['admin[statistic_profile_attributes][gender]'].$dirty && adminForm['admin[statistic_profile_attributes][gender]'].$invalid}">
<label class="checkbox-inline btn btn-default">
<input type="radio"
name="admin[statistic_profile_attributes][gender]"
ng-model="admin.statistic_profile_attributes.gender"
ng-value="true"
ng-required="genderRequired"/>
<i class="fa fa-male m-l-sm"></i> {{ 'app.admin.admins_new.man' | translate }}
</label>
<label class="checkbox-inline btn btn-default">
<input type="radio"
name="admin[statistic_profile_attributes][gender]"
ng-model="admin.statistic_profile_attributes.gender"
ng-value="false"/>
<i class="fa fa-female m-l-sm"></i> {{ 'app.admin.admins_new.woman' | translate }}
</label>
<span ng-show="genderRequired" class="exponent m-l-xs help-cursor"><i class="fa fa-asterisk" aria-hidden="true"></i></span>
2016-03-23 18:39:41 +01:00
</div>
<div class="form-group" ng-class="{'has-error': adminForm['admin[username]'].$dirty && adminForm['admin[username]'].$invalid}">
<div class="input-group">
<span class="input-group-addon"><i class="fa fa-user"></i> <span class="exponent"><i class="fa fa-asterisk" aria-hidden="true"></i></span></span>
2016-03-23 18:39:41 +01:00
<input ng-model="admin.username"
type="text" name="admin[username]"
class="form-control"
id="user_username"
placeholder="{{ 'app.admin.admins_new.pseudonym' | translate }}"
2016-03-23 18:39:41 +01:00
required>
</div>
<span class="help-block" ng-show="adminForm['admin[username]'].$dirty && adminForm['admin[username]'].$error.required" translate>{{ 'app.admin.admins_new.pseudonym_is_required' }}</span>
2016-03-23 18:39:41 +01:00
</div>
<div class="form-group" ng-class="{'has-error': adminForm['admin[profile_attributes][last_name]'].$dirty && adminForm['admin[profile_attributes][last_name]'].$invalid}">
<div class="input-group">
<span class="input-group-addon"><i class="fa fa-user"></i> <span class="exponent"><i class="fa fa-asterisk" aria-hidden="true"></i></span></span>
2016-03-23 18:39:41 +01:00
<input ng-model="admin.profile_attributes.last_name"
type="text"
name="admin[profile_attributes][last_name]"
class="form-control"
id="user_last_name"
placeholder="{{ 'app.admin.admins_new.surname' | translate }}"
2016-03-23 18:39:41 +01:00
required>
</div>
<span class="help-block" ng-show="adminForm['admin[profile_attributes][last_name]'].$dirty && adminForm['admin[profile_attributes][last_name]'].$error.required" translate>{{ 'app.admin.admins_new.surname_is_required' }}</span>
2016-03-23 18:39:41 +01:00
</div>
<div class="form-group" ng-class="{'has-error': adminForm['admin[profile_attributes][first_name]'].$dirty && adminForm['admin[profile_attributes][first_name]'].$invalid}">
<div class="input-group">
<span class="input-group-addon"><i class="fa fa-user"></i> <span class="exponent"><i class="fa fa-asterisk" aria-hidden="true"></i></span></span>
2016-03-23 18:39:41 +01:00
<input ng-model="admin.profile_attributes.first_name"
type="text"
name="admin[profile_attributes][first_name]"
class="form-control"
id="user_first_name"
placeholder="{{ 'app.admin.admins_new.first_name' | translate }}"
2016-03-23 18:39:41 +01:00
required>
</div>
<span class="help-block" ng-show="adminForm['admin[profile_attributes][first_name]'].$dirty && adminForm['admin[profile_attributes][first_name]'].$error.required" translate>{{ 'app.admin.admins_new.first_name_is_required' }}</span>
2016-03-23 18:39:41 +01:00
</div>
<div class="form-group" ng-class="{'has-error': adminForm['admin[email]'].$dirty && adminForm['admin[email]'].$invalid}">
<div class="input-group">
<span class="input-group-addon"><i class="fa fa-envelope"></i> <span class="exponent"><i class="fa fa-asterisk" aria-hidden="true"></i></span></span>
2016-03-23 18:39:41 +01:00
<input ng-model="admin.email"
type="email"
name="admin[email]"
class="form-control"
id="user_email"
placeholder="{{ 'app.admin.admins_new.email_address' | translate }}"
2016-03-23 18:39:41 +01:00
required>
</div>
<span class="help-block" ng-show="adminForm['admin[email]'].$dirty && adminForm['admin[email]'].$error.required" translate>{{ 'app.admin.admins_new.email_is_required' }}</span>
2016-03-23 18:39:41 +01:00
</div>
<div class="form-group" ng-class="{'has-error': adminForm['admin[statistic_profile_attributes][birthday]'].$dirty && adminForm['admin[statistic_profile_attributes][birthday]'].$invalid}">
2016-03-23 18:39:41 +01:00
<div class="input-group">
<span class="input-group-addon"><i class="fa fa-calendar-o"></i>
<span ng-show="birthdayRequired" class="exponent m-l-xs help-cursor"><i class="fa fa-asterisk" aria-hidden="true"></i></span>
</span>
2016-03-23 18:39:41 +01:00
<input type="text"
id="user_birthday"
class="form-control"
ng-model="admin.statistic_profile_attributes.birthday"
2016-03-23 18:39:41 +01:00
uib-datepicker-popup="{{datePicker.format}}"
datepicker-options="datePicker.options"
is-open="datePicker.opened"
placeholder="{{ 'app.admin.admins_new.birth_date' | translate }}"
2016-03-23 18:39:41 +01:00
ng-click="openDatePicker($event)"
ng-required="birthdayRequired"
2016-03-23 18:39:41 +01:00
/>
<input type="hidden"
name="admin[statistic_profile_attributes][birthday]"
value="{{admin.statistic_profile_attributes.birthday | toIsoDate}}" />
2016-03-23 18:39:41 +01:00
</div>
</div>
<div class="form-group">
<div class="input-group">
2022-12-16 15:35:02 +01:00
<span class="input-group-addon">
<i class="fa fa-map-marker"></i>
<span class="exponent" ng-show="addressRequired"><i class="fa fa-asterisk" aria-hidden="true"></i></span>
</span>
2016-03-23 18:39:41 +01:00
<input type="hidden"
name="admin[invoicing_profile_attributes][address_attributes][id]"
ng-value="admin.invoicing_profile_attributes.address.id" />
<input ng-model="admin.invoicing_profile_attributes.address_attributes.address"
2016-03-23 18:39:41 +01:00
type="text"
name="admin[invoicing_profile_attributes][address_attributes][address]"
2016-03-23 18:39:41 +01:00
class="form-control"
id="user_address"
placeholder="{{ 'app.admin.admins_new.address' | translate }}">
2016-03-23 18:39:41 +01:00
</div>
</div>
<div class="form-group" ng-class="{'has-error': adminForm['admin[profile_attributes][phone]'].$dirty && adminForm['admin[profile_attributes][phone]'].$invalid}">
<div class="input-group">
2020-07-21 18:04:20 +02:00
<span class="input-group-addon"><i class="fa fa-phone"></i> <span class="exponent" ng-show="phoneRequired"><i class="fa fa-asterisk" aria-hidden="true"></i></span></span>
2016-03-23 18:39:41 +01:00
<input ng-model="admin.profile_attributes.phone"
type="text"
name="admin[profile_attributes][phone]"
class="form-control" id="user_phone"
2020-07-21 18:04:20 +02:00
placeholder="{{ 'app.admin.admins_new.phone_number' | translate }}"
ng-required="phoneRequired">
2016-03-23 18:39:41 +01:00
</div>
</div>
<div class="form-group" ng-class="{'has-error': adminForm['admin[group_id]'].$dirty && adminForm['admin[group_id]'].$invalid}">
<div class="input-group">
<span class="input-group-addon"><i class="fa fa-group"></i> <span class="exponent"><i class="fa fa-asterisk" aria-hidden="true"></i></span></span>
<select ng-model="admin.group_id"
name="admin[group_id]"
class="form-control"
id="group_id"
required
ng-options="g.id as g.name for g in groups">
</select>
</div>
</div>
2016-03-23 18:39:41 +01:00
</div>
</div>