<div class="wrap timely ticketing">
	<h2>{{ title | raw }}</h2>
	<div id="poststuff">
		<div class="ai1ec-tickets-manage">
			<ul class="ai1ec-nav ai1ec-nav-tabs">
				<li class="ai1ec-active">
					<a href="#ai1ec_settings" data-toggle="ai1ec-tab">{{ settings_text }}</a>
				</li>
				<li>
					<a href="#ai1ec_sales" data-toggle="ai1ec-tab">{{ sales_text }}</a>
				</li>
			</ul>
			<div class="ai1ec-tab-content ai1ec-form-horizontal">
				<div class="ai1ec-tab-pane ai1ec-active" id="ai1ec_settings">
					<form action="" method="POST">
						<input type="hidden" name="ai1ec_save_settings" value="1">
						<ul class="ai1ec-payment-method ai1ec-panel">
							<h4>{{ currency_text }}</h4>
							<li class="ai1ec-payment-type">
								<select name="ai1ec_currency" id="ai1ec_currency"
								        class="ai1ec-required">
									{% for ite in paypal_currencies %}
										<option value="{{ ite.code }}"
										{% if currency and ite.code == currency %}
											selected="selected"
										{% endif %}
										{% if ite.note %}
											title="{{ ite.note | e( 'html_attr' )}}"
										{% endif %}>
											{{ ite.code }}: {{ ite.description | e( 'html' )}}
										</option>
									{% endfor %}
								</select>
							</li>
							<h4>{{ select_payment_text }}</h4>
							<li class="ai1ec-payment-type">
								<label for="ai1ec_payment_paypal" class="ai1ec-hidden">
									<input type="radio" name="ai1ec_payment_method"
										checked='checked'
										id="ai1ec_payment_paypal" value="paypal">
									{{ paypal_text }}
								</label>
								<div class="ai1ec-payment-details ai1ec-active
								">
									<div class="ai1ec-ticket-field-error">
										{{ required_text }}
									</div>
									<input name="ai1ec_paypal_email" type="email"
										{% if paypal_email %} value='{{ paypal_email }}' {% endif %}
										   placeholder="Valid PayPal Email" class="ai1ec-required"/>
									<div class="ai1ec-ticket-field-error">
										{{ required_text }}
									</div>
									<input name="ai1ec_first_name" type="text"
										{% if first_name %} value='{{ first_name }}' {% endif %}
										   placeholder="PayPal First Name" class="ai1ec-required"/>
									<div class="ai1ec-ticket-field-error">
										{{ required_text }}
									</div>
									<input name="ai1ec_last_name" type="text"
										{% if last_name %} value='{{ last_name }}' {% endif %}
										   placeholder="PayPal Last Name" class="ai1ec-required"/>
									<div>	  
										<h6>* Make sure you are using exactly the same First and Last names as found in your <a href="https://www.paypal.com/myaccount/settings/" target="_blank">PayPal account settings</a>.</h6>										   
									</div>
								</div>
							</li>
							<li class="ai1ec-payment-type">								
							</li>
						</ul>
						<div>
							<a href="#" name="ai1ec_tickets_submit"
							   class="ai1ec-btn ai1ec-btn-primary ai1ec-btn-lg">
								{{ save_changes_text }}
							</a>
						</div>
					</form>
				</div>

				<div class="ai1ec-tab-pane" id="ai1ec_sales">
					<table class="ai1ec-ticket-sales">
						<thead>
							<tr>
								<th class="ai1ec-hidden-sm">{{ date_text }}</th>
								<th>{{ event_text }}</th>
								<th class="ai1ec-hidden-sm">{{ purchaser_text }}</th>
								<th>{{ email_text }}</th>
								<th>{{ tickets_text }}</th>
								<th>{{ total_text }}</th>
								<th>{{ status_text }}</th>
							</tr>
						</thead>
						<tbody>
							{% for purchase in purchases %}
							<tr>
								<td>
									<div class="ai1ec-visible-sm">
										{{ purchase.event_title }}
									</div>
									{{ purchase.created_at }}
								</td>
								<td class="ai1ec-hidden-sm">
									{{ purchase.event_title }}
								</td>
								<td class="ai1ec-hidden-sm">
									{{ purchase.purchaser_name }}
								</td>
								<td>
									<div class="ai1ec-visible-sm">
										{{ purchase.purchaser_name }}
									</div>
									{{ purchase.email }}
								</td>
								<td>
									<div class="ai1ec-visible-sm">
										{{ purchase.ticket_count }}
									</div>
									{{ purchase.ticket_count }}
								</td>
								<td>{% if purchase.symbol is defined %}{{ purchase.symbol }}{% endif %}{{ purchase.total }} {{purchase.currency}}</td>
								<td>{{ purchase.status }}</td>
							</tr>
							 {% endfor %}
						</tbody>
					</table>
				</div>
			</div>
		</div>
	</div>{# /#poststuff #}
</div>{# /.wrap #}

