This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
khosb/themes/default/blocks/account/sub_account_add.tpl
2011-05-03 09:49:01 +10:00

209 lines
8.7 KiB
Smarty

{assign var=meth value=':'|explode:$VAR._page}
<!-- {$meth.0}:{$meth.1} -->
<!-- Make sure user is logged out -->
{if !$smarty.const.SESS_LOGGED}
{$block->display('account:user_login')}
{else}
<!-- Display the form validation -->
{if $form_validation}
{$block->display('core:alert_fields')}
{/if}
<!-- Display the form to collect the input values -->
<form id="{$meth.0}_{$meth.1}" method="post" action="" enctype="multipart/form-data">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table_background">
<tr>
<td>
<table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr valign="top">
<td width="65%" class="table_heading">
<div style="text-align: center;">{translate module=account}title_add_sub_account{/translate}</div>
</td>
</tr>
<tr valign="top">
<td width="65%">
<table width="100%" border="0" cellspacing="3" cellpadding="1" class="row1">
<tr valign="top">
<td width="43%">{translate module=account}field_username{/translate}</td>
<td width="57%">
<input type="text" name="account_username" value="{$VAR.account_username}" {if $account_username == true}class="form_field_error"{else}{/if}/>
</td>
</tr>
<tr valign="top">
<td width="43%">{translate module=account}field_password{/translate}</td>
<td width="57%">
<input type="password" name="account_password" {if $account_password == true}class="form_field_error"{/if} value="{$confirm_account_password}"/>
</td>
</tr>
<tr valign="top">
<td width="43%">{translate module=account}field_confirm_password{/translate}</td>
<td width="57%">
<input type="password" name="confirm_password" {if $account_password == true}class="form_field_error"{/if} value="{$confirm_account_password}"/>
</td>
</tr>
<tr valign="top">
<td width="43%">{translate module=account}field_email{/translate}</td>
<td width="57%">
<input type="text" name="account_email" value="{$VAR.account_email}" {if $account_email == true}class="form_field_error"{/if}/>
</td>
</tr>
<tr valign="top">
<td width="43%">{translate module=account}field_company{/translate}</td>
<td width="57%">
<input type="text" name="account_company" value="{$VAR.account_company}" {if $account_company == true}class="form_field_error"{/if}/>
</td>
</tr>
<tr valign="top">
<td width="43%">{translate module=account}field_first_name{/translate}</td>
<td width="57%">
<input type="text" name="account_first_name" value="{$VAR.account_first_name}" {if $account_first_name == true}class="form_field_error"{/if}/>
</td>
</tr>
<tr valign="top">
<td width="43%">{translate module=account}field_middle_name{/translate}</td>
<td width="57%">
<input type="text" name="account_middle_name" value="{$VAR.account_middle_name}" {if $account_middle_name == true}class="form_field_error"{/if}/>
</td>
</tr>
<tr valign="top">
<td width="43%">{translate module=account}field_last_name{/translate}</td>
<td width="57%">
<input type="text" name="account_last_name" value="{$VAR.account_last_name}" {if $account_last_name == true}class="form_field_error"{/if}/>
</td>
</tr>
<tr valign="top">
<td width="43%">{translate module=account}field_title{/translate}</td>
<td width="57%">{$list->menu_nametitles('account_title','account_title',$VAR.account_title,'form_menu','')}</td>
</tr>
<tr valign="top">
<td width="43%">{translate module=account}field_address1{/translate}</td>
<td width="57%">
<input type="text" name="account_address1" value="{$VAR.account_address1}" {if $account_address1 == true}class="form_field_error"{/if}/>
</td>
</tr>
<tr valign="top">
<td width="43%">{translate module=account}field_address2{/translate}</td>
<td width="57%">
<input type="text" name="account_address2" value="{$VAR.account_address2}" {if $account_address2 == true}class="form_field_error"{/if}/>
</td>
</tr>
<tr valign="top">
<td width="43%">{translate module=account}field_city{/translate}</td>
<td width="57%">
<input type="text" name="account_city" value="{$VAR.account_city}" {if $account_city == true}class="form_field_error"{/if}/>
</td>
</tr>
<tr valign="top">
<td width="43%">{translate module=account}field_state{/translate}</td>
<td width="57%">
<input type="text" name="account_state" value="{$VAR.account_state}" {if $account_state == true}class="form_field_error"{/if}/>
</td>
</tr>
<tr valign="top">
<td width="43%">{translate module=account}field_zip{/translate}</td>
<td width="57%">
<input type="text" name="account_zip" value="{$VAR.account_zip}" {if $account_zip == true}class="form_field_error"{/if}/>
</td>
</tr>
<tr valign="top">
<td width="43%">{translate module=account}field_country_id{/translate}</td>
<td width="57%">
{if $VAR.account_country_id != ''}
{$list->menu('no','account_country_id','country','name',$VAR.account_country_id,'form_field" onChange="taxIdsDisplay(this.value)',true)}
{else}
{$list->menu('no','account_country_id','country','name',$smarty.const.DEFAULT_COUNTRY,'form_field" onChange="taxIdsDisplay(this.value)',true)}
{/if}
{$method->exe_noauth('tax','get_tax_ids')}
{if $tax_ids}
<script type="text/javascript" language="javascript">
{if $VAR.account_country_id != ""}
var countryId='{$VAR.account_country_id}';
{else}
var countryId='{$smarty.const.DEFAULT_COUNTRY}';
{/if}
{literal}
function taxIdsDisplay(id) {
try{ document.getElementById('tax_country_id_'+id).style.display='block'; } catch(e) {}
try{ document.getElementById('tax_country_id_'+countryId).style.display='none'; } catch(e) {}
countryId=id;
}
{/literal}
</script>
{/if}
</td>
</tr>
{foreach from=$tax_ids item=tax}
<tr valign="top" id="tax_country_id_{$tax.country_id}" {if $VAR.account_country_id !=''}{if $VAR.account_country_id!=$tax.country_id}{osb f=style_hide}{/if}{else}{if $smarty.const.DEFAULT_COUNTRY!=$tax.country_id}{osb f=style_hide}{/if}{/if}>
<td width="29%">{$tax.tax_id_name}</td>
<td width="71%">
<input type="text" name="account_tax_id[{$tax.country_id}]" value="{$VAR.account_tax_id}" {if $account_tax_id == true}class="form_field_error"{/if}/>
<!-- {if $tax.tax_id_exempt}
(or) exempt
<input type="checkbox" name="account_tax_id_exempt[{$tax.country_id}]" value="1"/>
{/if} -->
</td>
</tr>
{/foreach}
{$method->exe('account','static_var')}
{foreach from=$static_var item=record}
<tr valign="top">
<td width="29%">{$record.name}</td>
<td width="71%">{$record.html}</td>
</tr>
{/foreach}
{if $smarty.const.NEWSLETTER_REGISTRATION == '1'}
<tr valign="top">
<td width="43%">{translate module=account}subscribe_newsletters{/translate}</td>
<td width="57%">{$method->exe('newsletter','check_list_registration')}</td>
</tr>
{/if}
<tr valign="top">
<td width="43%">{translate module=account}field_email_type{/translate}</td>
<td width="57%">{$list->bool('account_email_type',$VAR.account_email_type)}</td>
</tr>
{$method->exe_noauth('account','get_auth_groups')}
{if $groups}
<tr valign="top">
<td width="43%">{translate} authorized_groups {/translate}</td>
<td width="57%">
{foreach from=$groups item=group}
<input name="groups[{$group.id}]" type="checkbox" value="{$group.id}" {if $group.checked}checked{/if} />{$group.name}<br/>
{/foreach}
</td>
</tr>
{/if}
<tr valign="top">
<td>&nbsp;</td>
<td>
<input type="submit" name="Submit" value="{translate}submit{/translate}" class="form_button"/>
<input type="hidden" name="_page" value="{$VAR._page}"/>
{if $VAR._page == ''}
<input type="hidden" name="_page_current" value="account:account"/>
{else}
<input type="hidden" name="_page_current" value="{$VAR._page}"/>
{/if}
<input type="hidden" name="do[]" value="{$meth.0}:{$meth.0}"/>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
{/if}