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/user_add.tpl

170 lines
7.4 KiB
Smarty
Raw Normal View History

2009-08-03 04:10:16 +00:00
{assign var=meth value=':'|explode:$VAR._page}
<!-- {$meth.0}:{$meth.1} -->
<!-- Make sure user is logged out -->
{if $smarty.const.SESS_LOGGED}
{literal}<script type="text/javascript" language="javascript">document.location='?_page=account:account';</script>{/literal}
{else}
<!-- Display the form validation -->
{if $form_validation}
{$block->display('core:alert_fields')}
{/if}
<!-- Display the form to collect the input values -->
<form id="user_add" 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 class="table_heading">{osb f=tt module=account method=user_add}</td>
</tr>
<tr valign="top">
<td>
<table width="100%" border="0" cellspacing="3" cellpadding="1" class="row1">
<tr valign="top">
<td>{osb f=tf module=account field=username}</td>
<td><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>{osb f=tf module=account field=password}</td>
<td><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>{t}Confirm Password{/t}</td>
<td><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>{osb f=tf module=account field=email}</td>
<td><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>{osb f=tf module=account field=company}</td>
<td><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>{osb f=tf module=account field=first_name}</td>
<td><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>{osb f=tf module=account field=middle_name}</td>
<td><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>{osb f=tf module=account field=last_name}</td>
<td><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>{osb f=tf module=account field=title}</td>
<td>{$list->menu_staticlist('nametitle','account_title','account_title','','form_menu','all')}</td>
</tr>
<tr valign="top">
<td>{osb f=tf module=account field=address1}</td>
<td><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>{osb f=tf module=account field=address2}</td>
<td><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>{osb f=tf module=account field=city}</td>
<td><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>{osb f=tf module=account field=state}</td>
<td><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>{osb f=tf module=account field=zip}</td>
<td><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>{osb f=tf module=account field=country_id}</td>
<td>
{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>
</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[$tax.country_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} -->
{/foreach}
{/if}
</td>
</tr>
{$method->exe('account','static_var')}
{foreach from=$static_var item=record}
<tr valign="top">
<td>{$record.name}</td>
<td>{$record.html}</td>
</tr>
{/foreach}
{if $smarty.const.NEWSLETTER_REGISTRATION == "1"}
<tr valign="top">
<td>{t module=account}subscribe_newsletters{/t}</td>
<td>{$method->exe('newsletter','check_list_registration')}</td>
</tr>
{/if}
<tr valign="top">
<td>{osb f=tf module=account field=email_type}</td>
<td>{$list->bool('account_email_type',$VAR.account_email_type)}</td>
</tr>
<tr valign="top">
<td>&nbsp;</td>
<td>
<input type="submit" name="Submit" value="{t}Submit{/t}" class="form_button"/>
<input type="hidden" name="_page" value="account:account"/>
{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}:user_add"/>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
{/if}