1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-11-30 11:24:21 +01:00
fab-manager/app/frontend/templates/admin/members/import.html

178 lines
5.7 KiB
HTML
Raw Normal View History

<div>
<section class="heading b-b">
<div class="row no-gutter">
<div class="col-md-1 hidden-xs">
<section class="heading-btn">
<a ng-click="cancel()"><i class="fa fa-long-arrow-left"></i></a>
</section>
</div>
<div class="col-md-8 b-l b-r">
<section class="heading-title">
<h1 translate>{{ 'app.admin.members_import.import_members' }}</h1>
</section>
</div>
<div class="col-md-3">
<section class="heading-actions wrapper">
<a class="btn btn-lg btn-block btn-default m-t-xs" target="_blank" href="example.csv" translate>
{{ 'app.admin.members_import.download_example' }}
</a>
</section>
</div>
</div>
</section>
2019-09-25 16:37:42 +02:00
<div class="row p-sm">
<div class="col-md-12">
<p class="alert alert-info" translate>
{{ 'app.admin.members_import.info' }}
2019-09-25 16:37:42 +02:00
</p>
</div>
</div>
2019-09-25 16:37:42 +02:00
<div class="row m-h-sm">
2019-09-25 16:37:42 +02:00
<div class="col-md-6 p-h-s">
<h3 translate>{{ 'app.admin.members_import.groups' }}</h3>
2019-09-25 16:37:42 +02:00
<table class="table">
<thead>
<tr>
<th translate>{{ 'app.admin.members_import.group_name' }}</th>
<th translate>{{ 'app.admin.members_import.group_identifier' }}</th>
2019-09-25 16:37:42 +02:00
</tr>
</thead>
<tbody>
<tr ng-repeat="group in groups">
<td>
{{ group.name }}
</td>
<td>
{{ group.slug }}
</td>
</tr>
</tbody>
</table>
</div>
<div class="col-md-6 p-h-s">
<h3 translate>{{ 'app.admin.members_import.trainings' }}</h3>
<table class="table">
<thead>
<tr>
<th translate>{{ 'app.admin.members_import.training_name' }}</th>
<th translate>{{ 'app.admin.members_import.training_identifier' }}</th>
</tr>
</thead>
<tbody>
2019-09-25 16:37:42 +02:00
<tr ng-repeat="training in trainings | filterDisabled">
<td>
2019-09-25 16:37:42 +02:00
{{ training.name }}
</td>
<td>
2019-09-25 16:37:42 +02:00
{{ training.id }}
</td>
</tr>
</tbody>
</table>
</div>
2019-09-25 16:37:42 +02:00
</div>
<div class="row m-h-sm">
2019-09-24 15:21:18 +02:00
<div class="col-md-6 p-h-s" ng-hide="tags.length == 0">
<h3 translate>{{ 'app.admin.members_import.tags' }}</h3>
<table class="table">
<thead>
<tr>
<th translate>{{ 'app.admin.members_import.tag_name' }}</th>
<th translate>{{ 'app.admin.members_import.tag_identifier' }}</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="tag in tags">
<td>
{{ tag.name }}
</td>
<td>
{{ tag.id }}
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="row no-gutter">
<div class="col-sm-12 col-md-12 b-r nopadding">
2019-09-25 16:37:42 +02:00
<form role="form" name="importForm" class="form-horizontal" novalidate action="{{ actionUrl }}" ng-upload="onImportResult(content)" upload-options-enable-rails-csrf="true">
<section class="panel panel-default bg-light m-lg">
<div class="panel-body m-r">
2019-09-25 16:37:42 +02:00
<div class="m-t">
2019-09-24 15:21:18 +02:00
<p class="alert alert-warning m-h" translate>
{{ 'app.admin.members_import.required_fields' }}
2019-09-24 15:21:18 +02:00
</p>
<p class="alert alert-warning m-h" translate>
{{ 'app.admin.members_import.about_example' }}
2019-09-24 15:21:18 +02:00
</p>
</div>
<div class="fileinput input-group" data-provides="fileinput" ng-class="fileinputClass()">
<div class="form-control" data-trigger="fileinput">
<i class="glyphicon glyphicon-file fileinput-exists"></i> <span class="fileinput-filename">{{file.attachment}}</span>
</div>
<span class="input-group-addon btn btn-default btn-file"><span class="fileinput-new" translate>{{ 'app.admin.members_import.select_file' }}</span>
<span class="fileinput-exists" translate>{{ 'app.shared.buttons.change' }}</span>
2019-09-24 15:21:18 +02:00
<input type="file"
name="import_members"
2019-09-25 16:37:42 +02:00
accept="text/csv"
required></span>
2019-09-24 15:21:18 +02:00
<a class="input-group-addon btn btn-danger fileinput-exists" data-dismiss="fileinput" ng-click="deleteFile(file)"><i class="fa fa-trash-o"></i></a>
</div>
2019-09-25 16:37:42 +02:00
<div class="m-h">
<span translate>{{ 'app.admin.members_import.update_field' }}</span>
2019-09-25 16:37:42 +02:00
<div class="radio m-l-md">
<label class="control-label">
<input type="radio" id="update_field" name="update_field" value="id" checked>
<span translate>{{ 'app.admin.members_import.update_on_id' }}</span>
2019-09-25 16:37:42 +02:00
</label>
</div>
<div class="radio m-l-md">
<label class="control-label">
<input type="radio" id="update_field" name="update_field" value="username">
<span translate>{{ 'app.admin.members_import.update_on_username' }}</span>
2019-09-25 16:37:42 +02:00
</label>
</div>
<div class="radio m-l-md">
<label class="control-label">
<input type="radio" id="update_field" name="update_field" value="email">
<span translate>{{ 'app.admin.members_import.update_on_email' }}</span>
2019-09-25 16:37:42 +02:00
</label>
</div>
</div>
</div> <!-- ./panel-body -->
<div class="panel-footer no-padder">
<input type="submit" value="{{ 'app.admin.members_import.import' | translate }}" class="r-b btn-valid btn btn-warning btn-block p-lg btn-lg text-u-c" ng-disabled="importForm.$invalid"/>
</div>
</section>
</form>
</div>
</div>
</div>