{if !$masterdatamanagement_email_accounts_have_ssl}
    <div class="warning warningborder ui-corner-all" style="color:red">
        {$i.useroptions_email_no_ssl}
    </div>
{/if}
<form action="" method="post" id="masterdatamanagement_email_accounts_global_form" class="bigform ui-corner-all" style="margin-top:10px;">
    
    <div class="warningsmall ui-corner-all" style="margin: 5px 0 10px 0">
        {$i.useroptions_email_ask_help1} <br />
        {$i.useroptions_email_ask_help2}: 
        <a href="https://webservices.untermstrich.com/h4/{$language_short}:user:start#e-mail" onclick="window.open(this.href); return false;" class="dialog_make_text_btn ui-corner-all">
            <span class="dialog_make_btn16 help"></span>
            {$i.basic_help}
        </a>
    </div>
    
    <fieldset class="borderbottom sepnext ui-corner-all" style="background-color: rgba(0, 255, 0, 0.03);">
        <legend style="background-color: rgba(0, 255, 0, 0.06);" class="ui-corner-all">{$i.useroptions_email_smtp_outbox}</legend>
        {include file='r/input.tpl' name="masterdatamanagement_email_accounts_smtp_host" title="useroptions_email_host" default=$masterdatamanagement_email_accounts_smtp_host maxlength=255 class="t-long"}

        {include file='r/select.tpl' name="masterdatamanagement_email_accounts_smtp_mode" title='useroptions_email_mode'
            list=$masterdatamanagement_email_accounts_smtp_modes id="key" text="item" noempty=true class="required"
            default=$masterdatamanagement_email_accounts_smtp_mode collapse='formcoll' filter_extra="onchange=\"user_options_email.switch_mode(this, true);\""}
        {include file='r/input.tpl' name="masterdatamanagement_email_accounts_smtp_port" title="useroptions_email_port" default=$masterdatamanagement_email_accounts_smtp_port class="required numberi18n digits t-small" collapse='formcoll'}
    </fieldset>
    <fieldset class="borderbottom sepnext ui-corner-top" style="background-color: rgba(255, 0, 0, 0.03);">
        <legend style="background-color: rgba(255, 0, 0, 0.06);" class="ui-corner-all">{$i.useroptions_email_imap_inbox}</legend>
        {include file='r/input.tpl' name="masterdatamanagement_email_accounts_imap_host" title="useroptions_email_host" default=$masterdatamanagement_email_accounts_imap_host maxlength=255 class="t-long"}

        {include file='r/select.tpl' name="masterdatamanagement_email_accounts_imap_mode" title='useroptions_email_mode'
            list=$masterdatamanagement_email_accounts_imap_modes id="key" text="item" noempty=true class="required"
            default=$masterdatamanagement_email_accounts_imap_mode collapse='formcoll' filter_extra="onchange=\"user_options_email.switch_mode(this, true);\""}
        {include file='r/input.tpl' name="masterdatamanagement_email_accounts_imap_port" title="useroptions_email_port" default=$masterdatamanagement_email_accounts_imap_port class="required numberi18n digits t-small" collapse='formcoll'}
    </fieldset>
        
    <fieldset class="borderbottom sepnext ui-corner-all" style="background-color: rgba(255, 155, 89, 0.08);">
        <legend style="background-color: rgba(255, 155, 89, 0.15);" class="ui-corner-all">{$i.useroptions_email_autoimport_projectmail}</legend>
        {include file='r/ajaxselect.tpl' name='masterdatamanagement_email_fallback_address' title="useroptions_email_fallback_address" labelclass="label3"
            class="required addressselect fulltext_search t-mid" default_id=$masterdatamanagement_email_fallback_address_id default=$masterdatamanagement_email_fallback_address_name}
        {include file='r/input.tpl' name="masterdatamanagement_email_autoimport_projectmail_interval" title="useroptions_email_autoimport_projectmail_interval" default=$masterdatamanagement_email_autoimport_projectmail_interval labelclass="label3" class="required numberi18n digits t-small"}
        <br />
    </fieldset>

    <fieldset class="borderbottom ui-corner-top">
        {include file='r/input.tpl' name="masterdatamanagement_email_refresh_cache_interval" title="useroptions_email_refresh_cache_interval" default=$masterdatamanagement_email_refresh_cache_interval labelclass="label3" class="required numberi18n digits t-small"}
        {include file='r/input.tpl' name="masterdatamanagement_email_fullcache_limit" title="useroptions_email_fullcache_limit" default=$masterdatamanagement_email_fullcache_limit maxlength=3 labelclass="label2" class="required numberi18n digits t-small"}
        {include file='r/input.tpl' name="masterdatamanagement_email_no_ssl_verification" title="useroptions_email_no_ssl_verification" default=$masterdatamanagement_email_no_ssl_verification labelclass="label3" class="t-mid" add_icons_file='multiple_comma_separated'}
    <br />
    {include file='r/checkbox.tpl' name="masterdatamanagement_email_send_minimised" title="useroptions_email_send_minimised" default=$masterdatamanagement_email_send_minimised labelclass="label3" class="required"}
    <br />
    {if $O365_support}
        {include file='r/input.tpl' name="masterdatamanagement_email_o365_upload_path" title="useroptions_email_o365_share_attachments_upload_path" class="t-long"
            default=$masterdatamanagement_email_o365_upload_path
            add_icons_file=($O365_support) ? 'basic_icon' : false add_icons_onclick="usComm.open_365_filepicker('masterdatamanagement_email_o365_upload_path');" add_icons_class="dialog_make_btn16 o365" add_icons_title="Office 365"}    
        <br />
    {/if}
    <a onclick="user_options_email.save_global_master_data();" class="dialog_make_text_btn ui-corner-all">
        <span class="dialog_make_btn16 ok ui-corner-all"></span>
        {$i.basic_save}
    </a>
    </fieldset>
    
</form>