2019-09-24 12:21:19 +02:00
|
|
|
<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">
|
2019-12-17 12:40:36 +01:00
|
|
|
<h1 translate>{{ 'app.admin.members_import.import_members' }}</h1>
|
2019-09-24 12:21:19 +02:00
|
|
|
</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>
|
2019-12-17 12:40:36 +01:00
|
|
|
{{ 'app.admin.members_import.download_example' }}
|
2019-09-24 12:21:19 +02:00
|
|
|
</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>
|
2019-12-17 12:40:36 +01:00
|
|
|
{{ 'app.admin.members_import.info' }}
|
2019-09-25 16:37:42 +02:00
|
|
|
</p>
|
|
|
|
</div>
|
2019-09-24 12:21:19 +02:00
|
|
|
</div>
|
|
|
|
|
2019-09-25 16:37:42 +02:00
|
|
|
<div class="row m-h-sm">
|
2019-09-24 12:21:19 +02:00
|
|
|
|
2019-09-25 16:37:42 +02:00
|
|
|
<div class="col-md-6 p-h-s">
|
2019-12-17 12:40:36 +01:00
|
|
|
<h3 translate>{{ 'app.admin.members_import.groups' }}</h3>
|
2019-09-25 16:37:42 +02:00
|
|
|
<table class="table">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
2019-12-17 12:40:36 +01:00
|
|
|
<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>
|
2019-09-24 12:21:19 +02:00
|
|
|
|
|
|
|
<div class="col-md-6 p-h-s">
|
2019-12-17 12:40:36 +01:00
|
|
|
<h3 translate>{{ 'app.admin.members_import.trainings' }}</h3>
|
2019-09-24 12:21:19 +02:00
|
|
|
<table class="table">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
2019-12-17 12:40:36 +01:00
|
|
|
<th translate>{{ 'app.admin.members_import.training_name' }}</th>
|
|
|
|
<th translate>{{ 'app.admin.members_import.training_identifier' }}</th>
|
2019-09-24 12:21:19 +02:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
2019-09-25 16:37:42 +02:00
|
|
|
<tr ng-repeat="training in trainings | filterDisabled">
|
2019-09-24 12:21:19 +02:00
|
|
|
<td>
|
2019-09-25 16:37:42 +02:00
|
|
|
{{ training.name }}
|
2019-09-24 12:21:19 +02:00
|
|
|
</td>
|
|
|
|
<td>
|
2019-09-25 16:37:42 +02:00
|
|
|
{{ training.id }}
|
2019-09-24 12:21:19 +02:00
|
|
|
</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">
|
2019-12-17 12:40:36 +01:00
|
|
|
<h3 translate>{{ 'app.admin.members_import.tags' }}</h3>
|
2019-09-24 12:21:19 +02:00
|
|
|
<table class="table">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
2019-12-17 12:40:36 +01:00
|
|
|
<th translate>{{ 'app.admin.members_import.tag_name' }}</th>
|
|
|
|
<th translate>{{ 'app.admin.members_import.tag_identifier' }}</th>
|
2019-09-24 12:21:19 +02:00
|
|
|
</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">
|
2019-09-24 12:21:19 +02:00
|
|
|
<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>
|
2019-12-17 12:40:36 +01:00
|
|
|
{{ 'app.admin.members_import.required_fields' }}
|
2019-09-24 15:21:18 +02:00
|
|
|
</p>
|
|
|
|
<p class="alert alert-warning m-h" translate>
|
2019-12-17 12:40:36 +01:00
|
|
|
{{ '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>
|
2019-09-24 12:21:19 +02:00
|
|
|
</div>
|
2019-12-17 12:40:36 +01:00
|
|
|
<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"
|
2019-09-24 17:42:50 +02:00
|
|
|
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>
|
2019-09-24 12:21:19 +02:00
|
|
|
</div>
|
|
|
|
|
2019-09-25 16:37:42 +02:00
|
|
|
<div class="m-h">
|
2019-12-17 12:40:36 +01:00
|
|
|
<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>
|
2019-12-17 12:40:36 +01:00
|
|
|
<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">
|
2019-12-17 12:40:36 +01:00
|
|
|
<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">
|
2019-12-17 12:40:36 +01:00
|
|
|
<span translate>{{ 'app.admin.members_import.update_on_email' }}</span>
|
2019-09-25 16:37:42 +02:00
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2019-09-24 12:21:19 +02:00
|
|
|
</div> <!-- ./panel-body -->
|
|
|
|
|
|
|
|
|
|
|
|
<div class="panel-footer no-padder">
|
2019-12-17 12:40:36 +01:00
|
|
|
<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"/>
|
2019-09-24 12:21:19 +02:00
|
|
|
</div>
|
|
|
|
|
|
|
|
</section>
|
|
|
|
</form>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|