1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-11-30 11:24:21 +01:00
fab-manager/app/assets/templates/admin/members/_form.html.erb
2016-03-23 18:39:41 +01:00

62 lines
2.9 KiB
Plaintext

<div class="form-group" ng-class="{'has-error': userForm['user[group_id]'].$dirty && userForm['user[group_id]'].$invalid}">
<label for="user_group_id" class="col-sm-3 control-label" translate>{{ 'group' }}</label>
<div class="col-sm-9">
<select ng-model="user.group_id" ng-disabled="user.subscribed_plan" class="form-control" name="user[group_id]" id="user_group_id" ng-options="g.id as g.name for g in groups" required>
</select>
<input type="hidden" name="user[group_id]" ng-value="user.group_id" />
<span class="help-block" ng-show="userForm['user[group_id]'].$dirty && userForm['user[group_id]'].$error.required" translate>{{ 'group_is_required' }}</span>
</div>
</div>
<div class="form-group">
<label for="user[invoicing_disabled]" class="control-label col-sm-3" translate>
{{ 'disable_invoices_generation' }}
</label>
<div class="col-sm-2">
<input bs-switch
ng-model="user.invoicing_disabled"
name="user[invoicing_disabled]"
type="checkbox"
class="form-control"
switch-on-text="{{ 'yes' | translate }}"
switch-off-text="{{ 'no' | translate }}"
switch-animate="true"/>
<input type="hidden" name="user[invoicing_disabled]" value="{{user.invoicing_disabled}}">
</div>
<div class="col-sm-7">
<span class="help-block"><i class="fa fa-warning"></i> {{ 'no_more_invoices_will_be_generated_for_' | translate }} <strong translate>{{ '_the_payments_carried_out_at_the_reception_' }}</strong> {{ '_regarding_this_user' | translate }}</span>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" translate>{{ 'trainings' }}</label>
<div class="col-sm-10">
<input type="hidden" name="user[training_ids][]" value="" />
<ui-select multiple ng-model="user.training_ids" class="form-control">
<ui-select-match>
<span ng-bind="$item.name"></span>
<input type="hidden" name="user[training_ids][]" value="{{$item.id}}" />
</ui-select-match>
<ui-select-choices repeat="t.id as t in (trainings | filter: $select.search)">
<span ng-bind-html="t.name | highlight: $select.search"></span>
</ui-select-choices>
</ui-select>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" translate>{{ 'tags' }}</label>
<div class="col-sm-10">
<input type="hidden" name="user[tag_ids][]" value="" />
<ui-select multiple ng-model="user.tag_ids" name="user[tag_ids][]" class="form-control">
<ui-select-match>
<span ng-bind="$item.name"></span>
<input type="hidden" name="user[tag_ids][]" value="{{$item.id}}" />
</ui-select-match>
<ui-select-choices repeat="t.id as t in (tags | filter: $select.search)">
<span ng-bind-html="t.name | highlight: $select.search"></span>
</ui-select-choices>
</ui-select>
</div>
</div>