You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
118 lines
3.8 KiB
118 lines
3.8 KiB
::use 'design.mtt'::
|
|
|
|
<div class="col-md-12">
|
|
<div class="article">
|
|
<h2>::_("Import")::</h2>
|
|
|
|
|
|
::if step==1::
|
|
<form action="/member/import/" method="POST" enctype="multipart/form-data">
|
|
<p>
|
|
<input name="file" type="file"/>
|
|
</p>
|
|
<input type="submit" value="OK" class="btn btn-primary" />
|
|
</form>
|
|
::elseif step==2::
|
|
<h4>::_("Users to import")::</h4>
|
|
<div style="margin-bottom:24px;">
|
|
::if (data!=null && data.length>0) || (data2!=null && data2.length>0)::
|
|
<table class="table table-bordered" style="font-size:11px;background-color:#FFF;">
|
|
<tr>
|
|
<th>::_("First name")::</th>
|
|
<th>::_("Last name")::</th>
|
|
<th>::_("Email")::</th>
|
|
<th>::_("Phone")::</th>
|
|
<th>::_("Partner first name")::</th>
|
|
<th>::_("Partner last name")::</th>
|
|
<th>::_("Partner email")::</th>
|
|
<th>::_("phone")::</th>
|
|
<th>::_("Address 1")::</th>
|
|
<th>::_("Address 2")::</th>
|
|
<th>::_("zip code")::</th>
|
|
<th>::_("City")::</th>
|
|
</tr>
|
|
::foreach d data::
|
|
<tr>
|
|
::foreach r d::
|
|
<td>
|
|
::if r!=null:: ::r:: ::end::
|
|
</td>
|
|
::end::
|
|
</tr>
|
|
::end::
|
|
</table>
|
|
|
|
<h4>::_("Existing accounts")::</h4>
|
|
<table class="table table-bordered" style="font-size:11px;color:#666666;background-color:#FFF;">
|
|
<tr>
|
|
<th>::_("First name")::</th>
|
|
<th>::_("Last name")::</th>
|
|
<th>::_("Email")::</th>
|
|
<th>::_("Phone")::</th>
|
|
<th>::_("Partner first name")::</th>
|
|
<th>::_("Partner last name")::</th>
|
|
<th>::_("Partner email")::</th>
|
|
<th>::_("phone")::</th>
|
|
<th>::_("Address 1")::</th>
|
|
<th>::_("Address 2")::</th>
|
|
<th>::_("zip code")::</th>
|
|
<th>::_("City")::</th>
|
|
</tr>
|
|
::foreach d data2::
|
|
<tr>
|
|
::foreach r d::
|
|
<td>
|
|
::if r!=null:: ::r:: ::end::
|
|
</td>
|
|
::end::
|
|
</tr>
|
|
::end::
|
|
</table>
|
|
|
|
<div class="alert alert-error">
|
|
<b>::_("Warning")::</b>
|
|
<p>::_("Before validating this import, please check that this table est correctly filled.<br/>If some datas are shifted or are not linked to the right column, please check your CSV file.")::
|
|
</p>
|
|
<a href="/member/import">::_("Try again")::</a>
|
|
</div>
|
|
<a href="/member/import?confirm=1" class="btn btn-danger">::_("Finalize import")::</a>
|
|
::else::
|
|
<div class="alert alert-error">
|
|
<b>::_("Oups !")::</b>
|
|
<p>::_("It looks like there is no data to import. Please check your CSV file or check that the users you want to import are not already registred.")::</p>
|
|
<a href="/member/import">::_("Try again")::</a>
|
|
</div>
|
|
|
|
::end::
|
|
</div>
|
|
|
|
|
|
::elseif step==3::
|
|
::if numImported>0::
|
|
|
|
<div class="alert alert-success">
|
|
<b>::raw __("Congratulations ! You just imported <b>::numImported::</b> users in your group.",{numImported:numImported})::</b>
|
|
</div>
|
|
<p>
|
|
::raw _("You may now consider <a href='/member/?select=newusers'>inviting them</a> to log into Cagette.net")::
|
|
</p>
|
|
::else::
|
|
<p>::_("You did'nt import anything in your database because your file was empty, or contained already registred users")::</p>
|
|
::end::
|
|
<a href="/member/">::_("Go back to the main page")::</a>
|
|
|
|
|
|
::end::
|
|
|
|
</div>
|
|
|
|
<div class="block">
|
|
<h3>::_("Help")::</h3>
|
|
::raw _("Here you can import a large amount of members in your database from a simple Excel or Libre Office file.<br/><ul><li>The first step is to <a href=\"/adherents.xls\">download this demo file.</a></li><li>Fill out the table, of modify your existing file to striclty match the columns order.</li><li>Once your file is completed, click on \"save as\" in your spreadsheet software, and select \"CSV\" format</li><li>Select the following options : separator : <b>coma</b> or <b>dot-coma</b>, encoding : <b>Unicode UTF-8</b></li><li>Save the file</li><li>finally, click on \"select a file\" on this page and upload it.</li></ul>")::
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
::end::
|