<div class="wrapper purple-content" style="text-align:center">
    	<div class="container">
        	<div class="content-heading white whmcsportal">
    			<h2>{$pagetitle}</h2>
                <small>{$LANG.clientregisterheadertext}</small>
                <span></span>
            </div>
            <div class="loginbox">
            {if $noregistration}
<br />
<div class="errorbox">{$LANG.registerdisablednotice}</div>
<br /><br /><br />
{else}
<script type="text/javascript" src="includes/jscript/statesdropdown.js"></script>
<script type="text/javascript" src="includes/jscript/pwstrength.js"></script>
{if $errormessage}
<div class="errorbox">{$errormessage}</div>
<br />
{/if}

<script>
window.langPasswordStrength = "{$LANG.pwstrength}";
window.langPasswordWeak = "{$LANG.pwstrengthweak}";
window.langPasswordModerate = "{$LANG.pwstrengthmoderate}";
window.langPasswordStrong = "{$LANG.pwstrengthstrong}";
</script>

<form method="post" action="{$smarty.server.PHP_SELF}">
  <input type="hidden" name="register" value="true" />
		<div class="row">
            <div class="col-sm-4"><label>{$LANG.clientareafirstname}</label></div>
            <div class="col-sm-8"><input type="text" name="firstname" size="30" value="{$clientfirstname}" /></div>
            </div>
			<div class="row">
            <div class="col-sm-4"><label>{$LANG.clientarealastname}</label></div>
            <div class="col-sm-8"><input type="text" name="lastname" size="30" value="{$clientlastname}" /></div>
       		</div>
			<div class="row">
            <div class="col-sm-4"><label>{$LANG.clientareacompanyname}</label></div>
            <div class="col-sm-8"><input type="text" name="companyname" size="30" value="{$clientcompanyname}" /></div>
 			</div>
			<div class="row">
            <div class="col-sm-4"><label>{$LANG.clientareaemail}</label></div>
            <div class="col-sm-8"><input type="text" name="email" size="50" value="{$clientemail}" /></div>
 			</div>
			<div class="row">
            <div class="col-sm-4"><label>{$LANG.clientareaaddress1}</label></div>
            <div class="col-sm-8"><input type="text" name="address1" size="40" value="{$clientaddress1}" /></div>
 			</div>
			<div class="row">
            <div class="col-sm-4"><label>{$LANG.clientareaaddress2}</label></div>
            <div class="col-sm-8"><input type="text" name="address2" size="30" value="{$clientaddress2}" /></div>
   			</div>
			<div class="row">
            <div class="col-sm-4"><label>{$LANG.clientareacity}</label></div>
            <div class="col-sm-8"><input type="text" name="city" size="30" value="{$clientcity}" /></div>
       		</div>
			<div class="row">
            <div class="col-sm-4"><label>{$LANG.clientareastate}</label></div>
            <div class="col-sm-8"><input type="text" name="state" size="25" value="{$clientstate}" /></div>
			</div>
			<div class="row">
            <div class="col-sm-4"><label>{$LANG.clientareapostcode}</label></div>
            <div class="col-sm-8"><input type="text" name="postcode" size="10" value="{$clientpostcode}" /></div>
			</div>
			<div class="row">
            <div class="col-sm-4"><label>{$LANG.clientareacountry}<label></div>
            <div class="col-sm-8">{$clientcountriesdropdown}</div>
			</div>
			<div class="row">
            <div class="col-sm-4"><label>{$LANG.clientareaphonenumber}</label></div>
            <div class="col-sm-8"><input type="text" name="phonenumber" size="20" value="{$clientphonenumber}" /></div>
            </div>

  {if $customfields || $securityquestions || $currencies}
  <br />
          {if $securityquestions}
          <div class="row">
            <div class="col-sm-4"><label>{$LANG.clientareasecurityquestion}  </label></div>
            <div class="col-sm-8"><select name="securityqid">

{foreach key=num item=question from=$securityquestions}

                <option value="{$question.id}">{$question.question}</option>

{/foreach}

              </select></div>
        </div>
        <div class="row">
            <div class="col-sm-4"><label>{$LANG.clientareasecurityanswer}</label></div>
            <div class="col-sm-8"><input type="password" name="securityqans" size="30" /> *</div>
         </div>
          {/if}
          {foreach key=num item=customfield from=$customfields}
          <div class="row">
            <div class="col-sm-4"><label>{$customfield.name}</label>
            <div class="col-sm-8">{$customfield.input} {$customfield.description}</div>
          </div>
          {/foreach}
{if $currencies}
          <div class="row">
            <div class="col-sm-4">{$LANG.choosecurrency}</div>
           <div class="col-sm-8"><select name="currency">
            {foreach from=$currencies item=curr}
            <option value="{$curr.id}"{if !$smarty.post.currency && $curr.default || $smarty.post.currency eq $curr.id } selected{/if}>{$curr.code}</option>
            {/foreach}
            </select></div>
         </div>
{/if}
  {/if}

  <h2>{$LANG.orderlogininfo}</h2>
  <p>{$LANG.orderlogininfopart1} {$companyname} {$LANG.orderlogininfopart2}</p>
  <div class="row">
            <div class="col-sm-4"><label>{$LANG.clientareapassword}</label></div>
            <div class="col-sm-8"><input type="password" name="password" id="newpw" size="25" /></div>
            
   </div>
   <div class="row">
            <div class="col-sm-4"><label>{$LANG.clientareaconfirmpassword}</label></div>
            <div class="col-sm-8"><input type="password" name="password2" size="25" /></div>
    </div>
    <div class="row">
<script language="JavaScript" type="text/javascript">showStrengthBar();</script>
</div>
  {if $capatacha}
  <h2>{$LANG.captchatitle}</h2>
  <p>{$LANG.captchaverify}</p>
  {if $capatacha eq "recaptcha"}
  <div align="center">{$recapatchahtml}</div>
  {else}
   <div class="row">
            <div class="col-sm-4"><img src="includes/verifyimage.php" align="middle" /> </div>
            <div class="col-sm-8"><input type="text" name="code" size="10" maxlength="5" style="max-width:160px"/></div>
 	</div>
  {/if}
  {/if}

  {if $accepttos}
  <p>
    <input type="checkbox" name="accepttos" id="accepttos" />
    <label for="accepttos">{$LANG.ordertosagreement} <a href="{$tosurl}" target="_blank">{$LANG.ordertos}</a></label>
    .  </p>
  {/if}
  <p> </p>
  <p align="center">
    <input type="submit" value="{$LANG.ordercontinuebutton}" class="btn-red btn-lg"/>
  </p>
</form>
{/if}<br />
</div>
</div>
</div>