[{include file="headitem.tpl" title="GENERAL_ADMIN_TITLE"|oxmultilangassign}]

[{assign var="readonly" value=""}]
[{if $readonly}]
    [{assign var="readonly" value="readonly disabled"}]
[{/if}]

<form name="transfer" id="transfer" action="[{$oViewConf->getSelfLink()}]" method="post">
    [{$oViewConf->getHiddenSid()}]
    <input type="hidden" name="oxid" value="[{$oxid}]">
    <input type="hidden" name="cl" value="ShipcloudAddressForm">
    <input type="hidden" name="actshop" value="[{$oViewConf->getActiveShopId()}]">
</form>

<form name="myedit" id="myedit" action="[{$oViewConf->getSelfLink()}]" method="post">
    [{$oViewConf->getHiddenSid()}]
    <input type="hidden" name="cl" value="ShipcloudAddressForm">
    <input type="hidden" name="fnc" value="">
    <input type="hidden" name="actshop" value="[{$oViewConf->getActiveShopId()}]">
    <input type="hidden" name="oxid" value="[{$oxid}]">
    <input type="hidden" name="editval[ysshipcloudaddress__oxid]" value="[{$oxid}]">

    <table cellspacing="0" cellpadding="0" border="0" width="98%">
        <tr>
            <td valign="top" class="edittext">

                <table cellspacing="0" cellpadding="0" border="0">
                    [{if $sSaveError}]
                        <tr>
                            <td></td>
                            <td class="errorbox">[{oxmultilang ident=$sSaveError}]</td>
                        </tr>
                    [{/if}]
                    <tr>
                        <td class="edittext">
                            [{oxmultilang ident="YS_ADDRESS_NAME"}]
                        </td>
                        <td class="edittext">
                            <input type="text" class="editinput" size="10" maxlength="[{$edit->ysshipcloudaddress__addressname->fldmax_length}]" name="editval[ysshipcloudaddress__addressname]" value="[{$edit->ysshipcloudaddress__addressname->value}]" [{$readonly}]>
                        </td>
                    </tr>
                    <tr>
                        <td class="edittext">
                            [{oxmultilang ident="GENERAL_BILLSAL"}]
                        </td>
                        <td class="edittext">
                            <select name="editval[ysshipcloudaddress__oxsal]" class="editinput" [{$readonly}]>
                                <option value="MR" [{if $edit->ysshipcloudaddress__oxsal->value|lower  == "mr"}]SELECTED[{/if}]>[{oxmultilang ident="MR"}]</option>
                                <option value="MRS" [{if $edit->ysshipcloudaddress__oxsal->value|lower  == "mrs"}]SELECTED[{/if}]>[{oxmultilang ident="MRS"}]</option>
                            </select>
                            [{oxinputhelp ident="HELP_GENERAL_BILLSAL"}]
                        </td>
                    </tr>
                    <tr>
                        <td class="edittext">
                            [{oxmultilang ident="USER_MAIN_NAME"}]
                        </td>
                        <td class="edittext">
                            <input type="text" class="editinput" size="10" maxlength="[{$edit->ysshipcloudaddress__oxfname->fldmax_length}]" name="editval[ysshipcloudaddress__oxfname]" value="[{$edit->ysshipcloudaddress__oxfname->value}]" [{$readonly}]>
                            <input type="text" class="editinput" size="20" maxlength="[{$edit->ysshipcloudaddress__oxlname->fldmax_length}]" name="editval[ysshipcloudaddress__oxlname]" value="[{$edit->ysshipcloudaddress__oxlname->value}]" [{$readonly}]>
                            [{oxinputhelp ident="HELP_USER_MAIN_NAME"}]
                        </td>
                    </tr>
                    <tr>
                        <td class="edittext">
                            [{oxmultilang ident="GENERAL_COMPANY"}]
                        </td>
                        <td class="edittext">
                            <input type="text" class="editinput" size="37" maxlength="[{$edit->ysshipcloudaddress__oxcompany->fldmax_length}]" name="editval[ysshipcloudaddress__oxcompany]" value="[{$edit->ysshipcloudaddress__oxcompany->value}]" [{$readonly}]>
                            [{oxinputhelp ident="HELP_GENERAL_COMPANY"}]
                        </td>
                    </tr>
                    <tr>
                        <td class="edittext">
                            [{oxmultilang ident="USER_MAIN_STRNR"}]
                        </td>
                        <td class="edittext">
                            <input type="text" class="editinput" size="28" maxlength="[{$edit->ysshipcloudaddress__oxstreet->fldmax_length}]" name="editval[ysshipcloudaddress__oxstreet]" value="[{$edit->ysshipcloudaddress__oxstreet->value}]" [{$readonly}]> <input type="text" class="editinput" size="5"
                                                                                                                                                                                                                                                                        maxlength="[{$edit->ysshipcloudaddress__oxstreetnr->fldmax_length}]"
                                                                                                                                                                                                                                                                        name="editval[ysshipcloudaddress__oxstreetnr]"
                                                                                                                                                                                                                                                                        value="[{$edit->ysshipcloudaddress__oxstreetnr->value}]" [{$readonly}]>
                            [{oxinputhelp ident="HELP_USER_MAIN_STRNR"}]
                        </td>
                    </tr>
                    <tr>
                        <td class="edittext">
                            [{oxmultilang ident="GENERAL_ZIPCITY"}]
                        </td>
                        <td class="edittext">
                            <input type="text" class="editinput" size="5" maxlength="[{$edit->ysshipcloudaddress__oxzip->fldmax_length}]" name="editval[ysshipcloudaddress__oxzip]" value="[{$edit->ysshipcloudaddress__oxzip->value}]" [{$readonly}]>
                            <input type="text" class="editinput" size="25" maxlength="[{$edit->ysshipcloudaddress__oxcity->fldmax_length}]" name="editval[ysshipcloudaddress__oxcity]" value="[{$edit->ysshipcloudaddress__oxcity->value}]" [{$readonly}]>
                            [{oxinputhelp ident="HELP_GENERAL_ZIPCITY"}]
                        </td>
                    </tr>
                    <tr>
                        <td class="edittext">
                            [{oxmultilang ident="GENERAL_EXTRAINFO"}]
                        </td>
                        <td class="edittext">
                            <input type="text" class="editinput" size="37" maxlength="[{$edit->ysshipcloudaddress__oxaddinfo->fldmax_length}]" name="editval[ysshipcloudaddress__oxaddinfo]" value="[{$edit->ysshipcloudaddress__oxaddinfo->value}]" [{$readonly}]>
                            [{oxinputhelp ident="HELP_GENERAL_EXTRAINFO"}]
                        </td>
                    </tr>
                    <tr>
                        <td class="edittext">
                            [{oxmultilang ident="GENERAL_STATE"}]
                        </td>
                        <td class="edittext">
                            <input type="text" class="editinput" size="15" maxlength="[{$edit->ysshipcloudaddress__oxstateid->fldmax_length}]" name="editval[ysshipcloudaddress__oxstateid]" value="[{$edit->ysshipcloudaddress__oxstateid->value}]" [{$readonly}]>
                            [{oxinputhelp ident="HELP_GENERAL_STATE"}]
                        </td>
                    </tr>
                    <tr>
                        <td class="edittext">
                            [{oxmultilang ident="GENERAL_COUNTRY"}]
                        </td>
                        <td class="edittext">
                            <select class="editinput" name="editval[ysshipcloudaddress__oxcountryid]" [{$readonly}]>
                                [{foreach from=$countrylist item=oCountry}]
                                    <option value="[{$oCountry->oxcountry__oxid->value}]" [{if $oCountry->oxcountry__oxid->value == $edit->ysshipcloudaddress__oxcountryid->value}]selected[{/if}]>[{$oCountry->oxcountry__oxtitle->value}]</option>
                                [{/foreach}]
                            </select>
                            [{oxinputhelp ident="HELP_GENERAL_COUNTRY"}]
                        </td>
                    </tr>
                    <tr>
                        <td class="edittext">
                            [{oxmultilang ident="GENERAL_TELEPHONE"}]
                        </td>
                        <td class="edittext">
                            <input type="text" class="editinput" size="20" maxlength="[{$edit->ysshipcloudaddress__oxfon->fldmax_length}]" name="editval[ysshipcloudaddress__oxfon]" value="[{$edit->ysshipcloudaddress__oxfon->value}]" [{$readonly}]>
                            [{oxinputhelp ident="HELP_GENERAL_TELEPHONE"}]
                        </td>
                    </tr>
                    <tr>
                        <td class="edittext">
                            [{oxmultilang ident="GENERAL_FAX"}]
                        </td>
                        <td class="edittext">
                            <input type="text" class="editinput" size="20" maxlength="[{$edit->ysshipcloudaddress__oxfax->fldmax_length}]" name="editval[ysshipcloudaddress__oxfax]" value="[{$edit->ysshipcloudaddress__oxfax->value}]" [{$readonly}]>
                            [{oxinputhelp ident="HELP_GENERAL_FAX"}]
                        </td>
                    </tr>
                    <tr>
                        <td class="edittext">
                            [{oxmultilang ident="YS_PICKUP_ADDRESS"}]
                        </td>
                        <td class="edittext">
                            <input type="hidden" name="editval[ysshipcloudaddress__ys_pickup_address]" value='0'>&nbsp;&nbsp;&nbsp;
                            <input type="checkbox" class="editinput" name="editval[ysshipcloudaddress__ys_pickup_address]" value='1' [{if $edit->ysshipcloudaddress__ys_pickup_address->value}]checked[{/if}] [{$readonly}]>
                            [{oxinputhelp ident="YS_HELP_PICKUP_ADDRESS"}]
                        </td>
                    </tr>
                    <tr>
                        <td class="edittext">
                            [{oxmultilang ident="YS_RETURN_ADDRESS"}]
                        </td>
                        <td class="edittext">
                            <input type="hidden" name="editval[ysshipcloudaddress__ys_return_address]" value='0'>&nbsp;&nbsp;&nbsp;
                            <input type="checkbox" class="editinput" name="editval[ysshipcloudaddress__ys_return_address]" value='1' [{if $edit->ysshipcloudaddress__ys_return_address->value}]checked[{/if}] [{$readonly}]>
                            [{oxinputhelp ident="YS_HELP_RETURN_ADDRESS"}]
                        </td>
                    </tr>
                    <tr>
                        <td class="edittext">
                        </td>
                        <td class="edittext"><br>
                            <input type="submit" class="edittext" name="save" value="[{oxmultilang ident="GENERAL_SAVE"}]" onClick="Javascript:document.myedit.fnc.value='save'" [{$readonly}]>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>

</form>

</div>

<div class="actions">
    [{strip}]
        <ul>
            <li><a [{if !$firstitem}]class="firstitem"[{assign var="firstitem" value="1"}][{/if}] id="btn.new" href="#" onClick="Javascript:top.oxid.admin.editThis( -1 );return false" target="edit">[{oxmultilang ident="YS_NEW_SHIPCLOUD_ADDRESS"}]</a></li>
        </ul>
    [{/strip}]
</div>
[{*include file="bottomnaviitem.tpl"*}]
[{include file="bottomitem.tpl"}]
