{% extends "corporate_memberships/base.html" %}
{% load corporate_memberships_tags %}
{% load base_tags %}
{% load base_filters %}
{% load i18n %}

{% block title %}Import Corporate Memberships from CSV file{% endblock %}

{% block extra_head %}
{{ block.super }}
    <link rel="stylesheet" href="{{ STATIC_URL }}css/corporate_memberships.css">
    <link rel="stylesheet" href="{{ STATIC_URL }}css/corporate_memberships-import-upload_file.css">
{% endblock %}

{% block body %}
 {% corpmemb_nav request.user %}
<div id="corp-import-wrap">
    
    <h1>Corporate Membership Import</h1>
    <p>{% blocktrans %}The entire process includes <b>4</b> steps:{% endblocktrans %}</p>
    <div class="indented-block">
    <i>{% blocktrans %}Upload file &middot; Map fields &middot; Preview &middot; Process and confirm{% endblocktrans %}</i>
    </div>
    
    <p><b>{% trans "Spread Sheet Guidelines:" %}</b></p>
    <ul>
    	{% blocktrans %}
        <li><b>Name</b> and <b>corporate_membership_type</b> are required fields and should be included.</li>
    	<li>The corporate_membership_type should be filled out with <b>corporate membership type name</b>.</li>
    	<li>The <b>authorized_domains</b> is comma delimited.</li>
    	<li>The <b>dues_rep</b> should be filled out with username, and separated with a comma if there are mutiple reps.</li>
    	<li>You can add more fields or remove fields as needed.</li>
        {% endblocktrans %}
    </ul>
   <br />
   <div>
    <div style="float:left;">
    <img src="{{ STATIC_URL }}images/icons/xls-icon.gif" alt="Download CSV Template" title="Download CSV Template"/>
    </div>
    
    <div id="download-csv"><a href="{% url corp_memb_import_download_template%}">{% trans "Download Template" %}</a></div>
     
     <div style="clear: left;"></div>
    </div>
   
    <div id="corp-import" class="corp-import-upload">
    	<p class="import-timestamp">{{ datetime.now }}</p>
	    <h3 class="corp-import-step">{% trans "Step 1/4 - Upload File" %}</h3>
	    <div class="clear-right"></div>
		{% if err_msg %}
		<div style="color:red;">{{ err_msg }}</div>
		{% endif %}
	    <form method="post" action="" enctype="multipart/form-data">{% csrf_token %}
	    {{ form.as_p }}
	    <input type='submit' value='Submit'>
	    </form>
    
    </div>
</div>
{% endblock %}
