<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>{$language.lblAdmin}: {$language.lblManageUsers} : {if $userID|default:''} {$language.lblEditUser}{else}{$language.lblAddUser}{/if}</title>
{include file='CommonStyles.tpl'}
{include file='CommonJavaScript.tpl'}
{include file='CommonCustomStyles.tpl'}
<link rel="stylesheet" type="text/css" href="{$view_styles}/inner-formlisting.css" />
<link rel="stylesheet" type="text/css" href="{$view_styles}/chosen.css" />
{literal}
<style type="text/css">
.fileuploader_field {
	width:90px;
}
</style>
{/literal}
{*<script src="{$view_javascript}/chosen.pluggin.js" type="text/javascript"></script> *}
<script type="text/javascript" src="{$common_js}/chosen.pluggin.js"></script> 
<script type="text/javascript" src="{$view_javascript}/signUp.page.js"></script>
</head>
<body  >
<div class="outer_container"> {include file='CommonTop.tpl'}
  <div class="content_container">
    <div class="content_wrapper add-new-formlisting">
		{assign var="userID" value=$userID|default:''}
                
      <h2>{if $userID}{$userFirstName} {$userLastName}{else}{$language.lblAddUser}{/if}</h2>
      <div class="clear"></div>
      {form->start name="formUserSignup" action="" method="post" enctype="multipart/form-data"}
      {form->hidden name="cityhidValue"}
      {form->hidden name="userID"}
      {form->hidden name="removeIcon"  id="removeIcon" value="$view_images/remove.gif"}
      {form->hidden name="statehidValue"}
      {*form->errors form="formUserSignup"*} 
      <!--End: Right Block-->
      <div class="form_listing" id="c01"> 
        
        <!--section wrap :: Starts-->
        <div class="section_wrap clearfix">
          <h3><span>{$language.lblAccountinfo}</span></h3>
          <!--start: left pane -->
          <div class="left-pane clearfix">
            <div class="form_listing03">
			{form->hidden name="userID"}
              <ul>
                <li class="clearfix">
                  <div class="leftside01 mandatory">{$language.lblEmailID} </div>
                  <div class="rightside01"> {form->textbox readonly="{if $userID>0}readonly{/if}" autocomplete="off" tabindex="1" class="textbox {if $userID>0}disabled{/if}" validate="required~*email~*userEmail->database->users,userEmail,userID!='$userID' AND userStatus!='Deleted' " error=$language.errEmailID|cat:"~*"|cat:$language.errValidEmail|cat:"~*"|cat:$language.errEmailExists maxlength="100" name="userEmail"} </div>
                </li>
                <li class="clearfix">
                  <div class="leftside01 add-user">{$language.lblPassword} </div>
				  {if $userID>0}
					<div class="rightside01"> {form->password  validate="isSecurePassword" error=$language.errValidPassword  name="userPassword1" tabindex="1" maxlength="20" class="textbox"  postTrigger="$('#userNewPassword').blur();"} <span class="small-txt">{$language.msgUserPassword}</span> </div>
                  {else}
					<div class="rightside01"> {form->password  validate="required~*isSecurePassword" error=$language.errPassword|cat:"~*"|cat:$language.errValidPassword  name="userPassword1" tabindex="1" maxlength="20" class="textbox"  postTrigger="$('#userNewPassword').blur();"} <span class="small-txt">{$language.msgUserPassword}</span> </div>
				  {/if}
				</li>
                <li class="clearfix">
                  <div class="leftside01 add-user">{$language.lblConfirmPassword} </div>
                  <div class="rightside01"> {form->password  validate="userPassword1->compare->value" error=$language.errPasswordMismatch  name="userNewPassword" tabindex="1" maxlength="20" class="textbox"} </div>
                  {form->hidden name="hidPaswd"} </li>
              </ul>
            </div>
          </div>
          <!--End: left pane --> 
          <!--start: right pane -->
          <div  class="right-pane clearfix">
            <div class="form_listing03">
              <ul>
                <li class="clearfix">
                  <div class="leftside01">{$language.lblProfileImage} </div>
                  <div class="rightside01 label-btm-fix" tabindex="1"> {if $userGender|default:''=="Male"}              
                    {assign var="profilePic" value="no_image_male.gif"}              
                    {elseif $userGender|default:''=="Female"}              
                    {assign var="profilePic" value="no_image_female.gif"}              
                    {else}              
                    {assign var="profilePic" value="no-image-user.gif"}              
                    {/if}              
                    {form->upload_image 
						   name			 = "userProfilePicture"  
						   icon			 = "{$profilePic}" 
						   width		 = "90" 
						   validate		 = "isImage" 
						   error		 = $language.errProfileImage
						   path			 = "uploads/profile/avatar/"
						   file			 = $userProfilePicture|default:''
						   tabindex		 = "1" 
						   size_caption	 = $language.lblMaximumFileSize 
						   types_caption = $language.lblFileTypes
						   message_delete= $language.msgConfirmDelete
						   delete_title	 = $language.lblDelete}
				   </div>
                </li>
              </ul>
            </div>
          </div>
        </div>
        <div class="section_wrap clearfix">
          <h3><span>{$language.lblBillinginfo}</span></h3>
          <div class="left-pane clearfix">
            <div class="form_listing03">
              <ul>
                <li class="clearfix">
                  <div class="leftside01 mandatory">{$language.lblFirstName}</div>
                  <div class="rightside01"> {form->textbox  name="userFirstName" maxlength="100"  tabindex="1"  class="textbox" validate="required" error=$language.errFirstName} </div>
                  <div class="clear"></div>
                </li>
                <li class="clearfix">
                  <div class="leftside01 mandatory">{$language.lblLastName}</div>
                  <div class="rightside01"> {form->textbox   class="textbox" maxlength="100"   tabindex="1" name="userLastName" validate="required" error=$language.errLastName}
                    <div class="clear"></div>
                  </div>
                  <div class="clear"></div>
                </li>
                <li class="clearfix">
                  <div class="leftside01">{$language.lblAddress1}</div>
                  <div class="rightside01"> {form->textbox  tabindex="1" class="textbox" maxlength="200" name="userAdress1"} 
                  {form->hidden value="" name="userAdress2"} </div>
                </li>
               {* <li class="clearfix">
                  <div class="leftside01">{$language.lblAddress2}</div>
                  <div class="rightside01"> {form->textbox  tabindex="1"  class="textbox" maxlength="200" name="userAdress2"} </div>
                </li>*}
			
                <li class="clearfix">
                  <div class="leftside01 mandatory">{$language.lblPhone}</div>

                  <div class="rightside01">
                      {form->hidden name="userCountrycode" value=""}
                      {*<div class="fixing_left width-136px">{form->select class=""  name="userCountrycode"   options=$resCountryCode value=$userCountrycode }</div>*}
                      <div class="fixing_left width-136px">{form->textbox  name="userPhone" tabindex="1"  class="textbox" maxlength="10" validate="required~*userPhone->database->users,userPhone,userID!='$userID' AND userStatus!='Deleted' " error=$language.errPhone|cat:"~*"|cat:$language.errPhoneExists value=$resuserPhone} </div>
                  </div>

                </li>
              </ul>
            </div>
          </div>
          <!--start: right pane -->
          <div  class="right-pane clearfix">
            <div class="form_listing03">
              <ul>
                {*<li class="clearfix">
                  <div class="leftside01">{$language.lblCity}</div>
                  <div class="rightside01"> {form->textbox   class="textbox" maxlength="100" name="userCity"  tabindex="1"} </div>
                </li>*}
                <li class="clearfix">
                  <div class="leftside01"> {$language.lblCountry}</div>
                  <div class="rightside01"> {form->select tabindex="1" options=$resCountry onchange="listStates(this.value,'');" name="countryID" onchange="listStates(this.value,'');" caption="->Select" custom='true' customfield='class'} </div>
                </li>
                 <li class="clearfix">
                  <div class="leftside01">{$language.lblStateProvince}</div>
                  <div class="rightside01"> <span id="stateInput">{form->hidden id="stateSelectedType"  name="stateSelectedType" value=""} {form->select tabindex="1" name="stateID" caption="->"|cat:$language.lblSelect validate="hidRedType->isequal->store->stateSelectedType->isequal->state~*required" error=$language.errState class="textbox02" onchange="getStateHiddenValue(this.value);"} </span> <span id="stateProvinceInput"> {form->textbox tabindex="1" name="locProvince" value=$businessStateProvince|default:'' maxlength="100" class="textbox" validate="stateSelectedType->isequal->province~*required"  error=$language.errEnterProvince} </span><span id="loadProcessImage"></span>  </div>
                </li>
                <li class="clearfix">
                  <div class="leftside01">{$language.lblCity}</div>
                  <div class="rightside01"> 
                      {*<span id="cityInput"> {assign var="class" value="choosen"}{form->select  tabindex="1"  name="userCity" options="->Select" onchange="getCityHiddenValue(this.value);" class="{$class}"} </span> <span id="cityProvinceInput"> {form->textbox  name="userProvince" tabindex="1"  maxlength="100" class="textbox"} </span><span id="loadProcessImage"></span>
                      {form->hidden id="citySelectedType"  name="citySelectedType" value="province"} *}
                       {form->textbox  tabindex="1" name="userProvince" maxlength="100" validate="hidRedType->isequal->store~*required" error=$language.errCity  class="textbox"}
                  </div>
                </li>
                <li class="clearfix">
                  <div class="leftside01">{$language.lblZipPostalCode}</div>
                  <div class="rightside01"> {form->textbox  tabindex="1" class="textbox" maxlength="20" name="userZip"} </div>
                </li>
                <li class="clearfix">
                  <div class="leftside01"> {$language.lblProfileLanguage}</div>
                  <div class="rightside01"> {form->select tabindex="1" options=$view_common_languages  name="userDefaultLanguage"} </div>
                </li>				
              </ul>
            </div>
          </div>
        </div>
        <div class="section_wrap clearfix">
           <div class="left-pane">
            <div class="form_listing03">
              <ul>
                {if $followedBusiness|default:''}
                <li  class="clearfix">
                  <div class="leftside01">{$language.lblFollowedBusiness}</div>
                  <div class="rightside01" > {foreach from=$followedBusiness item="business" key="key1"}    
                    {$business.langbusinessName} {if ($key1+1)< $followedBusiness|@count}<br />
                    {/if}
                    {/foreach} </div>
                </li>
                {/if}
				<li class="selection clearfix">
                  <div class="leftside01 status">{$language.lblSelectUserGroup}</div>
                  <div class="rightside01">
                    {form->select name="userGroupID" options=$listUsergroups|default:''  tabindex="1"}
                  </div>
                </li> 
				
				<li class="selection clearfix">
                  <div class="leftside01 status">{$language.lblRestRole}</div>
                  <div class="rightside01">
                    {form->select name="roleID" caption="->{$language.lblSelect}" options=$listRoles|default:''  tabindex="1" disabled="disabled"}
                  </div>
                </li> 
				
                <li  class="clearfix">
                  <div class="leftside01">{if $userNewsletterSubscribeStatus|default:''=="Yes"}{assign var="checked" value="checked"}{/if}
                    {form->checkbox  tabindex="1" name="userNewsletterSubscribeStatus" caption=" " class="checkbox01" value="Yes" checked="$checked"|default:''}</div>
                  <div class="rightside01" > {$language.lblNewsletterSignup} </div>
                </li>
              </ul>
            </div>
          </div>
        </div>
        <div class="status-centering"> <span class="line"></span>
          <div class="style001 clearfix">
            <div class="fixing_left mandatory"><strong>{$language.lblCurrentAccountStatus}</strong> &nbsp;</div>
            <div class="fixing_right">
              <div id="perioddiv" rel="userStatus">
              {form->radio tabindex="1" name="userStatus" class="customradio" options="Active~*Inactive" value="Active"}
	      {if $userStatus|default:''=='Locked'}
	      <strong>{$language.lblLocked} </strong>{/if}
           </div>
            </div>
          </div>
        </div>
        <div class="submit-block clearfix textto_center"> 
		{if $userID>0}
          {assign var="buttonText" value="{$language.lblUpdate}"} 
          {else} 
          {assign var="buttonText" value="{$language.lblSave}"} 
          {/if}
          {form->submit name="submitUser" tabindex="1" id="submit" class="curve-3" form="formUserSignup" value=$buttonText}
          {$language.lblOr} 
          {form->button id="cancel" tabindex="1" name="cancelUserAdd" class="cancelBusinessAdd"  value={$language.lblCancel} href="/user/index/"} </div>
      </div>
      {form->hidden name="count" value=1 id="count"}
      {form->close}
      <div class="clear"></div>
    </div>
  </div>
  <!--End:Content Container--> 
  {include file='CommonBottom.tpl'} </div>
{form->validate_script form="formUserSignup"}
{html->messages_script id="common_message"}
{form->rootpath_script}
{include file='CommonJavaScriptBottom.tpl'}
<script type="text/javascript" src="{$view_javascript}/custom-radiobutton.js"></script>  
<script type="text/javascript" src="{$common_js}/uploadImage.plugin.js"></script> 
<script type="text/javascript" src="{$common_js}/validate.plugin.js"></script> 
<script type="text/javascript">
    var lblSelectAll   =   '{$language.lblSelectAllWithBraces}';
    var lblSelectNone  =   '{$language.lblSelectNoneWithBraces}';
	 var msgdelcityconfirm  =   '{$language.msgdelcityconfirm}';
	 var errSelectAcity  =   '{$language.errSelectAcity}';
</script> 
<script type="text/javascript">
$(function(){
	 $('#perioddiv input').customInput('');
	});	
</script>
</body>
</html>
