
<script language="javascript" type="text/javascript">
<!-- //
{include file="$incpath/other/validate_js.tpl"}
{literal}

$(document).ready(function() {
	var validator = $("#convert").validate(
	{ 
		rules: 
		{ 
			{/literal}
			{if $is_pro==1}
			Vorname: {ldelim}required: true,minLength:3{rdelim},
			Nachname: {ldelim}required: true,minLength:3{rdelim},
			{/if}
			{literal}
			Benutzername: {required: true, remote: "index.php?do=user&sub=checkuserdata&ext={/literal}{$smarty.request.Benutzername|koobispecialchars}{literal}"},
			{/literal}
			{if $smarty.request.new==1 && $is_pro==1}
			Strasse_Nr: {ldelim}required: true{rdelim},
			Postleitzahl: {ldelim}required: true{rdelim},
			Ort: {ldelim}required: true{rdelim},
			{/if}
			{literal}
			Email: {required: true,email:true, remote: "index.php?do=user&sub=checkuserdata&ext={/literal}{$smarty.request.Email}{literal}"},
			Kennwort: {required: true}
		},
		messages: 
		{
			Email:{remote: jQuery.format("{/literal}{#Validate_usedMail#}{literal}")},
			Benutzername:{remote: jQuery.format("{/literal}{#Validate_usedUName#}{literal}")}
		},
			
		submitHandler: function() 
		{ 
			document.forms['convert'].submit();
		},
		
		success: function(label) 
		{
			label.html("&nbsp;").addClass("checked");
		}
	});
});

// -->
</script>   
{/literal}

<form autocomplete="off" method="post" action="" name="convert" id="convert">
<div class="popbox">
<div class="header">{#User_Add#}</div>
{if $done==1}
<div class="subheaders">
{#User_profileNewOk#}
<p align="center">
<input class="button big" type="button" name="button" onclick="window.close();" value="{#Close#}">
</p>
</div>
{else}

{if $error}
<div class="error_box">
<strong>{#Global_Error#}</strong>
<ul>
{foreach from=$error item=e}
<li>{$e}</li>
{/foreach}
</ul>
</div>
{/if}
<table width="100%" border="0" cellspacing="0" cellpadding="2">
  <tr>
    <td width="180" class="row_left">{#User_first#}</td>
    <td class="row_right"><input class="input" type="text" name="Vorname" value="{$smarty.request.Vorname|koobispecialchars}"></td>
  </tr>
  <tr>
    <td class="row_left">{#User_last#}</td>
    <td class="row_right"><input class="input" type="text" name="Nachname" value="{$smarty.request.Nachname|koobispecialchars}"></td>
  </tr>
  <tr>
    <td class="row_left">{#User_username#}</td>
    <td class="row_right"><input class="input" type="text" name="Benutzername" value="{$smarty.request.Benutzername|koobispecialchars}"></td>
  </tr>
  <tr>
    <td class="row_left">{#User_street#}</td>
    <td class="row_right"><input class="input" type="text" name="Strasse_Nr" value="{$smarty.request.Strasse_Nr|koobispecialchars}"></td>
  </tr>
  <tr>
    <td class="row_left">{#User_zip#}</td>
    <td class="row_right"><input class="input" type="text" name="Postleitzahl" value="{$smarty.request.Postleitzahl|koobispecialchars}"></td>
  </tr>
  <tr>
    <td class="row_left">{#User_town#}</td>
    <td class="row_right"><input class="input" type="text" name="Ort" value="{$smarty.request.Ort|koobispecialchars}"></td>
  </tr>
 <tr>
    <td class="row_left">{#User_country#}</td>
    <td class="row_right">
    <select class="input" style="width:130px" name="Land">
    {foreach from=$countries item=c}
    <option value="{$c->Code|lower}" {if $c->Code|lower==$settings.Land|lower}selected="selected"{/if}>{$c->Name|koobispecialchars}</option>
    {/foreach}
    </select>    </td>
  </tr>
  <tr>
    <td class="row_left">{#User_phone#}</td>
    <td class="row_right"><input class="input" type="text" name="Telefon" value="{$smarty.request.Telefon|koobispecialchars}"></td>
  </tr>
  <tr>
    <td class="row_left">{#User_fax#}</td>
    <td class="row_right"><input class="input" type="text" name="Telefax" value="{$smarty.request.Telefax|koobispecialchars}"></td>
  </tr>
  <tr>
    <td class="row_left">{#User_company#}</td>
    <td class="row_right"><input class="input" type="text" name="Firma" value="{$smarty.request.Firma|koobispecialchars}"></td>
  </tr>
  <tr>
    <td class="row_left">{#User_ustid#}</td>
    <td class="row_right"><input class="input" type="text" name="UStId" value="{$smarty.request.UStId|koobispecialchars}"></td>
  </tr>
    <tr>
    <td class="row_left">{#User_email#}</td>
    <td class="row_right"><input class="input" type="text" name="Email" value="{$smarty.request.Email}"></td>
  </tr>
  
  
    <tr>
      <td class="row_left">Geburtstag</td>
      <td class="row_right"><input class="input" type="text" name="Geburtstag" id="Geburtstag" value="{$smarty.request.Geburtstag}" readonly="readonly"></td>
    </tr>
    <tr>
    <td class="row_left">{#User_ugroup#}</td>
    <td class="row_right">
    
    <select class="input" style="width:130px" name="Gruppe">
    {foreach from=$groups item=g}
    {if $g->Id!=2}<option value="{$g->Id}" {if $g->Id=='3'}selected="selected"{/if}>{$g->Name_Intern|koobispecialchars}</option>{/if}
    {/foreach}
    </select>
   </td>
  </tr>
  
  <tr>
    <td class="row_left">{#User_ugroupmisc#}</td>
    <td class="row_right">
    <select name="GruppeMisc[]" size="5" multiple="multiple" class="input" style="width:130px">
    {foreach from=$groups item=g}
    {if $g->Id!=2 && $g->Id!=1}
     <option value="{$g->Id}">{$g->Name_Intern|koobispecialchars}</option>{/if}
    {/foreach}
    </select>    </td>
  </tr>
  
  <tr>
      <td class="row_left">
      <img {popup sticky=$config_vars.POPSTICKY   text=$config_vars.FSK18_Userinf} class="absmiddle" src="{$imgpath}/help.png" alt="" /> 
      {#FSK18_User#}</td>
      <td class="row_right">
      <label><input name="Fsk18" type="radio" value="1" />{#Yes#}</label>
      <label><input name="Fsk18" type="radio" value="0" checked="checked" />{#No#}</label>      </td>
    </tr>
    
  <tr>
    <td class="row_left">{#User_sstatus#}</td>
    <td class="row_right">
    <label><input type="radio" name="Aktiv" value="1" checked="checked" />{#User_status_unlocked#}</label>
    <label><input type="radio" name="Aktiv" value="0"  />{#User_status_locked#}</label></td>
  </tr>
 
  <tr>
    <td class="row_left">
    <img {popup sticky=$config_vars.POPSTICKY   text=$config_vars.User_markteamI} class="absmiddle" src="{$imgpath}/help.png" alt="" />
    
    {#User_team#}</td>
    <td class="row_right">
    <label><input type="radio" name="Team" value="1" />{#Yes#}</label>
    <label><input type="radio" name="Team" value="0" checked="checked" />{#No#}</label>    </td>
  </tr>
  
 
    <tr>
    <td class="row_left">{#User_Pass#}</td>
    <td class="row_right"><input class="input" type="text" name="Kennwort" value="{$smarty.request.Kennwort|koobispecialchars|default:$password}"></td>
  </tr>
    
    <tr>
      <td class="row_left">{#User_semail#}</td>
      <td class="row_right">
      <label><input name="send_mail" type="radio" id="send_mail" value="1" checked="checked" />{#Yes#}</label>
      <label><input name="send_mail" type="radio" value="0" />{#No#}</label>      </td>
    </tr>
    <tr>
      <td class="row_left">{#User_emailtext#}</td>
      <td class="row_right"><textarea name="mail_text" id="mail_text" class="input" style="width:400px; height:150px">{$config_vars.User_profileNewText|replace:"__N__":"\n"}</textarea></td>
    </tr>
</table>
<input class="button big" type="submit" name="button" value="{#Save#}">
<input class="button big" type="button" name="button" onclick="window.close();" value="{#Close#}">
<input name="save" type="hidden" id="save" value="1" />
</div>
{/if}
</form>



<script language="javascript" src="{$jspath}/calendar.js" type="text/javascript"></script>
<style type="text/css" media="screen,projection">
@import url({$csspath}/calendar.css);
</style>
<script type="text/javascript">
	jQuery(function($){ldelim}
	$.datepicker.setDefaults({ldelim}
	{include file="$incpath/other/calendar.conf.tpl"}
	,yearRange: '-80:+80'
	{rdelim}); 
	$("#Geburtstag").attachDatepicker();
	{rdelim});
</script>

