<script type="text/javascript">
	$(document).ready(function(){
		{{if isset( $smarty.get.activeTabId )}}$('ul.tab-headers li a[href="#{{$smarty.get.activeTabId}}"]').trigger('click');{{/if}}
	});
</script>

<form action="?p={{$_GET.p}}" method="post" name="form">
	<fieldset class="tabbed">
		<div class="clear"></div>
		<ul class="tab-headers">
			<li><a href="#carriers">{{$lang.Carriers}}</a></li>
			<li><a href="#dpd_api">DPD API</a></li>
			<li><a href="#dhl_api">DHL API</a></li>
			<li><a href="#enadawca_api">E-Nadawca API</a></li>
			<li><a href="#paczkomaty_api">Paczkomaty API</a></li>
		</ul>
		<h1>{{$lang.Carriers}}</h1>
		<div class="tab" id="carriers">
			<a href="?p=carriers-form" class="new_element">{{$lang.New_carrier}}</a>
			{{if count( $aCarriers ) > 0}}
			<form action="?p={{$_GET.p}}" method="post">
				<fieldset>
					<table class="list">
						<thead>
							<tr>
								<th class="id">{{$lang.Id}}</th><th class="name">{{$lang.Name}}</th><th class="price">{{$lang.Price}} [{{$config.currency_symbol}}]</th><th class="actions">{{$lang.Actions}}</th>
							</tr>
						</thead>
						<tbody>
							{{foreach from=$aCarriers item=aCarrier}}
								<tr>
									<td class="id">{{$aCarrier.iCarrier}}</td><td class="name"><a href="?p={{$aActions.f}}-form&amp;iCarrier={{$aCarrier.iCarrier}}">{{$aCarrier.sName}}</a></td><td class="price">{{$aCarrier.sPrice}}</td>
									<td class="actions">
										<a href="?p={{$aActions.f}}-form&amp;iCarrier={{$aCarrier.iCarrier}}"><img src="{{$config.dir_templates}}admin/images/ico/edit.png" alt="{{$lang.Edit}}" title="{{$lang.Edit}}" /></a>
										<a href="?p={{$aActions.f}}-delete&amp;iCarrier={{$aCarrier.iCarrier}}" class="delete" onclick="return del( );"><img src="{{$config.dir_templates}}admin/images/ico/delete.png" alt="{{$lang.Delete}}" title="{{$lang.Delete}}"/></a>
									</td>
								</tr>
							{{/foreach}}
						</tbody>
					</table>
				</fieldset>
			</form>
			{{else}}
			<div class="msg" id="error">
				<img src="{{$config.dir_templates}}admin/images/ico/msg_error.png" class="imgv" alt="" /> {{$lang.Data_not_found}}
			</div>
			{{/if}}
		</div>
		<div class="tab" id="dpd_api">
			<fieldset>
				<table class="details">
					<tr>
						<th colspan="3"><h2>DPD API</h2></th>
					</tr><tr>
						<th class="name">{{$lang.DPD_Host}}</th>
						<td class="value"><input type="text" name="DPD_Host" value="{{$config.DPD_Host}}" class="input" /></td>
						<td class="help"><img class="tTip info" src="templates/images/info.png"  title="{{$lang.help_DPD_Host}}" /></td>
					</tr><tr>
						<th class="name">{{$lang.DPD_Login}}</th>
						<td class="value"><input type="text" name="DPD_Login" value="{{$config.DPD_Login}}" class="input" /></td>
						<td class="help"></td>
					</tr><tr>
						<th class="name">{{$lang.DPD_Password}}</th>
						<td class="value"><input type="text" name="DPD_Password" value="{{$config.DPD_Password}}" class="input" /></td>
						<td class="help"></td>
					</tr><tr>
						<th class="name">{{$lang.DPD_Masterfid}}</th>
						<td class="value"><input type="text" name="DPD_Masterfid" value="{{$config.DPD_Masterfid}}" class="input" /></td>
						<td class="help"><img class="tTip info" src="templates/images/info.png"  title="{{$lang.help_DPD_Masterfid}}" /></td>
					</tr>
				</table>
			</fieldset>
		</div> <!-- end div id=dpd_api -->
		<div class="tab" id="dhl_api">
			<fieldset>
				<table class="details">
					<tr>
						<th colspan="3"><h2>DHL API</h2></th>
					</tr><tr>
						<th class="name">{{$lang.DHL_Login}}</th>
						<td class="value"><input type="text" name="DHL_Login" value="{{$config.DHL_Login}}" class="input" /></td>
						<td class="help"></td>
					</tr><tr>
						<th class="name">{{$lang.DHL_Password}}</th>
						<td class="value"><input type="text" name="DHL_Password" value="{{$config.DHL_Password}}" class="input" /></td>
						<td class="help"></td>
					</tr><tr>
						<th class="name">{{$lang.DHL_SAP}}</th>
						<td class="value"><input type="text" name="DHL_SAP" value="{{$config.DHL_SAP}}" class="input" /></td>
						<td class="help"><img class="tTip info" src="templates/images/info.png"  title="{{$lang.help_DHL_SAP}}" /></td>
					</tr><tr>
						<th class="name">{{$lang.DHL_sandbox}}</th>
						<td class="value"><select name="DHL_sandbox"><option value="0">{{$lang.no}}</option><option value="1" {{if $config.DHL_sandbox}}selected="selected"{{/if}}>{{$lang.yes}}</option></select></td>
						<td class="help"><img class="tTip info" src="templates/images/info.png"  title="{{$lang.help_DHL_sandbox}}" /></td>
					</tr>
				</table>
			</fieldset>
		</div> <!-- end div id=dpd_api -->
		<div class="tab" id="enadawca_api">
			<fieldset>
				<table class="details">
					<tr>
						<th colspan="3"><h2>E-Nadawca API</h2></th>
					</tr><tr>
						<th class="name">{{$lang.ENadawca_Login}}</th>
						<td class="value"><input type="text" name="enadawca_user" value="{{$config.enadawca_user}}" class="input" /></td>
						<td class="help"></td>
					</tr><tr>
						<th class="name">{{$lang.ENadawca_Password}}</th>
						<td class="value"><input type="text" name="enadawca_password" value="{{$config.enadawca_password}}" class="input" /></td>
						<td class="help"></td>
					</tr><tr>
						<th class="name">{{$lang.ENadawca_Test}}</th>
						<td class="value"><select name="enadawca_test"><option value="0">{{$lang.no}}</option><option value="1" {{if $config.enadawca_test}}selected="selected"{{/if}}>{{$lang.yes}}</option></select></td>
						<td class="help"></td>
					</tr><tr>
						<th class="name">{{$lang.ENadawca_UrzadNadania}}</th>
						<td class="value"><select name="enadawca_urzad"><option value="0">{{$lang.none}}</option>{{foreach from=$aUrzedyNadania item=sUrzadNadania}}<option value="{{$sUrzadNadania@key}}" {{if $sUrzadNadania@key == $config.enadawca_urzad}}selected="selected"{{/if}}>{{$sUrzadNadania}}</option>{{/foreach}}</select></td>
						<td class="help"><img class="tTip info" src="templates/images/info.png"  title="{{$lang.help_carriers_ENadawca_UrzadNadania}}" /></td>
					</tr><tr>
						<th class="name">{{$lang.ENadawca_NRB}}</th>
						<td class="value"><input type="text" name="enadawca_pobranie_nrb" value="{{$config.enadawca_pobranie_nrb}}" class="input" /></td>
						<td class="help"></td>
					</tr>
				</table>
			</fieldset>
		</div> <!-- end div id=enadawca_api -->
		<div class="tab" id="paczkomaty_api">
			<fieldset>
				<table class="details">
					<tr>
						<th colspan="3"><h2>Paczkomaty API</h2></th>
					</tr><tr>
						<th class="name">{{$lang.Paczkomaty_Email}}</th>
						<td class="value"><input type="text" name="paczkomaty_email" value="{{$config.paczkomaty_email}}" class="input" /></td>
						<td class="help"></td>
					</tr><tr>
						<th class="name">{{$lang.Paczkomaty_Password}}</th>
						<td class="value"><input type="text" name="paczkomaty_haslo" value="{{$config.paczkomaty_haslo}}" class="input" /></td>
						<td class="help"></td>
					</tr><tr>
						<th class="name">{{$lang.Paczkomaty_SelfSend}}</th>
						<td class="value"><select name="paczkomaty_self_send"><option value="0">{{$lang.no}}</option><option value="1" {{if $config.paczkomaty_self_send}}selected="selected"{{/if}}>{{$lang.yes}}</option></select></td>
						<td class="help"><img class="tTip info" src="templates/images/info.png"  title="{{$lang.help_Paczkomaty_SelfSend}}" /></td>
					</tr><tr>
						<th class="name">{{$lang.Paczkomaty_sandbox}}</th>
						<td class="value"><select name="paczkomaty_sandbox"><option value="0">{{$lang.no}}</option><option value="1" {{if $config.paczkomaty_sandbox}}selected="selected"{{/if}}>{{$lang.yes}}</option></select></td>
						<td class="help"><img class="tTip info" src="templates/images/info.png"  title="{{$lang.help_paczkomaty_sandbox}}" /></td>
					</tr>
				</table>
			</fieldset>
		</div> <!-- end div id=paczkomaty_api -->
		<div class="save float"><div class="save floatcontainer">
			<input type="submit" class="submit" value="{{$lang.Save}} &raquo;" name="sOption" />
		</div></div>
							
	</fieldset> <!-- end fieldset tabbed -->
</form>
<div class="clear"></div>