{strip}

{tr}Register as a new user{/tr}

{if $showmsg eq 'y'}

{$msg}

{/if}
{if $showmsg ne 'y'}

{tr}If you are already registered, please{/tr} {tr}login{/tr}

{form enctype="multipart/form-data" legend="Please fill in the following details"} {foreach from=$reg.CUSTOM item='custom' key='custom_name'} {/foreach} {foreach from=$reg.auth item='auth' key='auth_name'} {/foreach} {formfeedback error=$errors.create} {if $notrecognized eq 'y'}
{formfeedback error=$errors.validate} {formlabel label="Username" for="email"} {forminput} {/forminput}
{elseif $showmsg ne 'y'} {if $gBitSystem->isFeatureActive('users_register_passcode')}
{formfeedback error=$errors.passcode} {formlabel label="Passcode to register" for="passcode"} {forminput} {required} {formhelp note="This is not your user password. It is a code required for registration. Contact your site administrator for details."} {/forminput}
{/if} {if $gBitSystem->isFeatureActive( 'reg_real_name' )}
{formlabel label="Your Name" for="real_name"} {forminput} {formhelp note="This will be displayed in links to your information."} {/forminput}
{/if}
{formfeedback error=$errors.login} {formlabel label="Username" for="login"} {forminput} {required} {formhelp note="This will be used in links to your profile. Your username can only contain numbers, characters, and underscores."}
{/forminput}
{if $gBitSystem->isFeatureActive( 'users_validate_user' )} {formfeedback warning="{tr}A confirmation email will be sent to you with instructions on how to login{/tr}"} {/if}
{formfeedback error=$errors.email} {formlabel label="Email" for="email"} {forminput} {required} {/forminput}
{if !$gBitSystem->isFeatureActive( 'users_validate_user' )}
{formfeedback error=$errors.password} {formlabel label="Password" for="pass"} {forminput} {required} {/forminput}
{formfeedback error=$errors.password2} {formlabel label="Repeat password" for="password2"} {forminput} {required} {/forminput}
{if $gBitSystem->isFeatureActive( 'user_password_generator' )}
{formlabel label="{tr}Generate a password{/tr}" for="email"} {forminput} {formhelp note="You can use this link to create a random password. Make sure you make a note of it somewhere to log in to this site in the future."} {/forminput}
{/if} {/if} {if $gBitUser->hasPermission( 'p_users_view_user_homepage' ) } {*For public sites, get user approval to display information*}
{formlabel label="User information" for="users_information"} {forminput} {formhelp note="Please select whether you would like to be a public or private user (you can change this later)"} {/forminput}
{/if} {if $gBitSystem->isFeatureActive( 'reg_real_name' ) || $gBitSystem->isFeatureActive( 'reg_homepage' ) || $gBitSystem->isFeatureActive( 'reg_country' ) || $gBitSystem->isFeatureActive( 'reg_language' ) || $gBitSystem->isFeatureActive( 'reg_portrait' )} {if $gBitSystem->isFeatureActive( 'reg_homepage' )}
{formlabel label="HomePage" for="users_homepage"} {forminput} {formhelp note="If you have a personal or professional homepage, enter it here."} {/forminput}
{/if} {if $gBitSystem->isFeatureActive( 'reg_country' )}
{formlabel label="Country" for="country"} {forminput} {include file="bitpackage:users/flag_select_inc.tpl" fsName="prefs[users_country]" fsValue=$smarty.request.prefs.users_country fsId="flag-select-role-reg"} {formhelp note=""} {/forminput}
{/if} {if $gBitSystem->isFeatureActive( 'reg_language' )}
{formlabel label="Language" for="language"} {forminput} {formhelp note="Pick your preferred site language."} {/forminput}
{/if} {if $gBitSystem->isFeatureActive( 'reg_portrait' )}
{formlabel label="Self Portrait" for="user_portrait_file"} {forminput} {formhelp note="Upload a personal photo to be displayed on your personal page."} {/forminput}
{/if} {/if} {section name=f loop=$customFields}
{formlabel label="$customFields[f]} {forminput} {/forminput}
{/section} {foreach from=$auth_reg_fields item='output' key='op_id'} {assign var=op_name value="auth[$op_id]"}
{formlabel label=$output.label for=$op_id} {forminput} {if $output.type == 'checkbox'} {html_checkboxes name="$op_name" values="y" selected=$output.value labels=false id=$op_id} {elseif $output.type == 'option'} {else} {/if} {formhelp note=$output.note page=$output.page link=$output.link} {/forminput}
{/foreach} {if $gBitSystem->isFeatureActive('users_random_number_reg')}
{formfeedback error=$errors.captcha} {captcha force=true variant=row} {/if} {if count($roleList) > 1}
{formlabel label="Role" for="role"} {forminput} {foreach item=gr from=$roleList name=role} {if $gr.is_default eq "y"} {tr}None{/tr} {elseif $gr.role_desc} {$gr.role_desc} {else} {$gr.role_name} {/if} {if !$smarty.foreach.role.last}
{/if} {/foreach} {formhelp note="Choose the role you belong to."} {/forminput} {/if} {foreach item=package from=$packages} {include file=$package.template } {/foreach}
{required legend=1} {/if} {/form}
{/if}
{/strip}