<h3>{$mod->Lang('addedit_user')}</h3>

{$formstart}{$formhidden|default:''}
<div class="pageoverflow">
  <p class="pageinput">
    <input type="submit" name="{$actionid}submit" value="{$mod->Lang('submit')}"/>
    <input type="submit" name="{$actionid}cancel" value="{$mod->Lang('cancel')}"/>
  </p>
</div>

{cge_start_tabs}
{cge_tabheader name='details' label=$mod->Lang('label_userdetails')}
{cge_tabheader name='settings' label=$mod->Lang('label_usersettings')}

{cge_tabcontent_start name='details'}
  <div class="pageoverflow">
    <p class="pagetext">*{$mod->Lang('emailaddress')}:</p>
    <p class="pageinput">
      <input type="text" name="{$actionid}email" value="{$userinfo.email}" size="80" maxlength="225"/>
    </p>
  </div>
  <div class="pageoverflow">
    <p class="pagetext">{$mod->Lang('username')}:</p>
    <p class="pageinput">
      <input type="text" name="{$actionid}username" value="{$userinfo.username}" size="80" maxlength="225"/>
    </p>
  </div>

  {if isset($fielddefs)}
    {foreach $fielddefs as $field}
      <div class="pageoverflow">
        <p class="pagetext">{if $field.required}*{/if}{$field.prompt}:</p>
        <p class="pageinput">
          {$val=''}
          {if isset($userinfo.fields[$field.id])}{$val=$userinfo.fields[$field.id]}{/if}
          {if $field.type == 'textbox'}
            <input type="text" name="{$actionid}fld_{$field.id}" value="{$val}"/>
          {elseif $field.type == 'textarea'}
            <textarea name="{$actionid}fld_{$field.id}">{$val}</textarea>
          {elseif $field.type == 'checkbox'}
            <input type="checkbox" name="{$actionid}fld_{$field.id}" value="1" {if $val}checked="checked"{/if}/>
          {elseif $field.type == 'dropdown'}
            <select name="{$actionid}fld_{$field.id}">{html_options options=$field.options selected=$val}</select>
          {/if}
        </p>
      </div>
    {/foreach}
  {/if}

{cge_tabcontent_start name='settings'}
  <div class="pageoverflow">
    <p class="pagetext">{$mod->Lang('accept_html')}:</p>
    <p class="pageinput">
      {cge_yesno_options prefix=$actionid name=htmlemail selected=$userinfo.htmlemail}
    </p>
  </div>
  <div class="pageoverflow">
    <p class="pagetext">{$mod->Lang('disabled')}:</p>
    <p class="pageinput">
      {cge_yesno_options prefix=$actionid name=disabled selected=$userinfo.disabled}
    </p>
  </div>
  <div class="pageoverflow">
    <p class="pagetext">{$mod->Lang('confirmed')}:</p>
    <p class="pageinput">
      {cge_yesno_options prefix=$actionid name=confirmed selected=$userinfo.confirmed}
    </p>
  </div>
  <div class="pageoverflow">
    <p class="pagetext">{$mod->Lang('bounce_count')}:</p>
    <p class="pageinput">
      <input type="text" name="{$actionid}bounce_count" value="{$userinfo.bounce_count}" size="5" maxlength="5"/>
    </p>
  </div>
  <div class="pageoverflow">
    <p class="pagetext">{$mod->Lang('error_count')}:</p>
    <p class="pageinput">
      <input type="text" name="{$actionid}error_count" value="{$userinfo.error_count}" size="5" maxlength="5"/>
    </p>
  </div>
  <div class="pageoverflow">
    <p class="pagetext">{$mod->Lang('lists')}:</p>
    <p class="pageinput">
      <select name="{$actionid}lists[]" multiple="multiple" size="5"/>
        {html_options options=$lists selected=$memberlists}
      </select>
    </p>
  </div>
{cge_end_tabs}
{$formend}