<mt:setvar name="page_title" value="<__trans phrase="General Settings">">
<$mt:setvar name="position_actions_bottom" value="1"$>
<mt:setvar name="system-general-settings" value="1">

<mt:setvarblock name="system_msg">
<mt:if name="error">
  <mtapp:statusmsg
     id="generic-error"
     class="error"
     can_close="0">
    <mt:var name="error" escape="html">
  </mtapp:statusmsg>
</mt:if>
<mt:if name="test_mail_sent">
  <mtapp:statusmsg
     id="saved"
     class="success">
    <__trans phrase="A test email was sent.">
  </mtapp:statusmsg>
</mt:if>
<mt:if name="saved">
  <mtapp:statusmsg
     id="saved"
     class="success">
    <__trans phrase="Your settings have been saved.">
  </mtapp:statusmsg>
</mt:if>
<mt:if name="config_warning">
  <mtapp:statusmsg
     id="info"
     class="info"
     can_close="0">
    <mt:var name="config_warning">
  </mtapp:statusmsg>
</mt:if>
</mt:setvarblock>

<mt:setvarblock name="html_head" append="1">
<script type="text/javascript">
/* <![CDATA[ */
function clearLockoutNotifyTo() {
    var el_name = getByID('lockout-notify-names');
    var el_id   = getByID('lockout-notify-ids');
    if (el_name && el_id) {
        el_id.value       = '';
        el_name.innerHTML = '<__trans phrase="(None selected)">';
    }
}
/* ]]> */
</script>
</mt:setvarblock>

<mt:include name="include/header.tmpl">

<script type="text/javascript">
/* <![CDATA[ */
function validate (f) {
    return true;
}
/* ]]> */
</script>

<form action="<mt:var name="script_url">" method="post" onsubmit="return validate(this);">
  <input type="hidden" name="__mode" value="save_cfg_system_general" />
  <input type="hidden" name="return_args" value="<mt:var name="return_args" escape="html">" />
  <input type="hidden" name="magic_token" value="<mt:var name="magic_token">" />

  <mtapp:settinggroup id="system-support-settings">
    <mtapp:setting
       id="system-email-address"
       label="<__trans phrase="System Email">"
       hint="<__trans phrase="This email address is used in the 'From:' header of each email sent by Movable Type.  Email may be sent for password recovery, commenter registration, comment and trackback notification, and a few other minor events.">"
       show_hint="1">
      <input type="text" name="system_email_address" id="system-email-address" class="text med"<mt:if name="system_email_address"> value="<mt:var name="system_email_address" escape="html">"</mt:if> /> <a href="#" id="send-test-email"><__trans phrase="Send Test Email"></a>
    </mt:app:setting>

    <mtapp:setting
       id="system_debug_mode"
       label="<__trans phrase="Debug Mode">"
       hint="<__trans phrase='Values other than zero provide additional diagnostic information for troubleshooting problems with your Movable Type installation.  More information is available in the <a href="http://www.movabletype.org/documentation/developer/plugins/debug-mode.html">Debug Mode documentation</a>.'>"
       show_hint="1">
      <input type="text" name="system_debug_mode" id="system-debug-mode" class="text num" maxlength="3" value="<mt:var name="system_debug_mode" escape="html">" />
    </mt:app:setting>

    <mtapp:setting
       id="system-performance-logging"
       class="has-option"
       label="<__trans phrase="Performance Logging">"
       hint="<__trans phrase="Turn on performance logging, which will report any system event that takes the number of seconds specified by Logging Threshold.">"
       show_hint="1">
      <input type="checkbox" name="system_performance_logging" id="system-performance-logging" <mt:if name="system_performance_logging" eq="1">checked="checked"</mt:if> />
      <label for="system-performance-logging"><__trans phrase="Turn on performance logging"></label>
    </mt:app:setting>

    <div id="system-performance-logging-option" class="serring-option">
      <mtapp:setting
         id="system-performance-logging-path"
         label="<__trans phrase="Log Path">"
         hint="<__trans phrase="The filesystem directory where performance logs are written.  The web server must have write permission in this directory.">"
         show_hint="1">
        <input type="text" name="system_performance_logging_path" id="system-performance-logging-path" class="text"<mt:if name="system_performance_logging_path"> value="<mt:var name="system_performance_logging_path" escape="html">"</mt:if> />
      </mt:app:setting>

      <mtapp:setting
         id="system-performance-logging-threshold"
         label="<__trans phrase="Logging Threshold">"
         hint="<__trans phrase="The time limit for unlogged events in seconds. Any event that takes this amount of time or longer will be reported.">"
         show_hint="1">
        <input type="text" name="system_performance_logging_threshold" id="system-performance-logging-threshold" class="text num" maxlength="3" value="<mt:var name="system_performance_logging_threshold" escape="html">" />
      </mt:app:setting>
    </div>

    <mtapp:setting
       id="track-revisions"
       label="<__trans phrase="Revision History">"
       hint="<__trans phrase="Enable this setting to have Movable Type track revisions made by users to entries, pages and templates.">">
      <input type="checkbox" name="track_revisions" id="track-revisions" <mt:if name="track_revisions"> checked="checked"</mt:if> /> <label for="track_revisions"><__trans phrase="Track revision history"></label>
    </mtapp:setting>
</mtapp:settinggroup>

<h2><__trans phrase="System-wide Feedback Controls"></h2>
<mtapp:settinggroup id="system-feedback-controls">
  <mtapp:setting
     id="comment-disable"
     label="<__trans phrase="Prohibit Comments">"
     hint="<__trans phrase="This will override all individual blog settings.">">
    <input type="checkbox" name="comment_disable" id="comment-disable"<mt:if name="comment_disable"> checked="checked"</mt:if> /> <label for="comment_disable"><__trans phrase="Disable comments for all blogs."></label>
  </mtapp:setting>

  <mtapp:setting
     id="ping-disable"
     label="<__trans phrase="Prohibit TrackBacks">"
     hint="<__trans phrase="This will override all individual blog settings.">">
    <input type="checkbox" name="ping_disable" id="ping-disable" <mt:if name="ping_disable"> checked="checked"</mt:if> class="cb" /> <label for="ping_disable"><__trans phrase="Disable receipt of TrackBacks for all blogs."></label>
  </mtapp:setting>
</mtapp:settinggroup>

<h2><__trans phrase="Outbound Notifications"></h2>
<mtapp:settinggroup id="outbound-notifications">
  <mtapp:setting
     id="disable-notify-ping"
     label="<__trans phrase="Prohibit Notification Pings">"
     hint="<__trans phrase="Disable sending notification pings when a new entry is created in any blog on the system.">">
    <input type="checkbox" name="disable_notify_ping" id="disable-notify-ping" value="1"<mt:if name="disabled_notify_ping"> checked="checked"</mt:if> class="cb" /> <label for="disable_notify_ping"><__trans phrase="Disable notification pings for all blogs."></label>
  </mtapp:setting>

  <mtapp:setting
     id="trackback-send"
     label="<__trans phrase="Send Outbound TrackBacks to">"
     hint="<__trans phrase="Do not send outbound TrackBacks or use TrackBack auto-discovery if your installation is intended to be private.">"
     show_hint="1">
    <ul id="outbound-trackback-setting-list" class="setting-list">
      <li><input type="radio" name="trackback_send" id="trackback_send_any" value="any"<mt:if name="trackback_send_any"> checked="checked"</mt:if> /> <label for="trackback_send_any"><__trans phrase="Any site"></label></li>
      <li><input type="radio" name="trackback_send" id="trackback_send_off" value="off"<mt:if name="trackback_send_off"> checked="checked"</mt:if> /> <label for="trackback_send_off"><__trans phrase="Disabled"></label> <span class="hint"><__trans phrase="(No Outbound TrackBacks)"></span></li>
      <li><input type="radio" name="trackback_send" id="trackback_send_local" value="local"<mt:if name="trackback_send_local"> checked="checked"</mt:if> /> <label for="trackback_send_local"><__trans phrase="Only to blogs within this system"></label></li>
      <li>
        <input type="radio" name="trackback_send" id="trackback-send-selected" value="selected"<mt:if name="trackback_send_selected"> checked="checked"</mt:if> /> <label for="trackback_send_selected"><__trans phrase="Only to websites on the following domains:"></label><br />
        <textarea name="trackback_send_domains" class="text low"><mt:var name="trackback_send_domains" escape="html"></textarea>
      </li>
    </ul>
  </mtapp:setting>
</mtapp:settinggroup>

<h2><__trans phrase="Lockout Settings"></h2>
<mtapp:settinggroup id="lockout">
  <mtapp:setting
     id="lockout-notify-ids"
     label="<__trans phrase="Recipients for lockout notification">"
     hint="<__trans phrase="The system administrators whom you wish to notify if a user or an IP address is locked out.  If no administrators are selected, notifications will be sent to the 'System Email' address.">"
     show_hint="1">
    <input type="hidden" id="lockout-notify-ids" name="lockout_notify_ids" value="<mt:var name="lockout_notify_ids" escape="html">" />
    <span id="lockout-notify-names">
    <mt:if name="lockout_notify_ids">
      <strong><mt:var name="lockout_notify_names" escape="html"></strong>
      <a href="javascript:void(0)" onclick="return clearLockoutNotifyTo()"><__trans phrase="Clear"></a> |
    <mt:else>
      <__trans phrase="(None selected)">
    </mt:if>
    </span>
    <a href="<mt:var name="script_url">?__mode=dialog_select_sysadmin&amp;multi=1&amp;idfield=lockout-notify-ids&amp;namefield=lockout-notify-names" class="mt-open-dialog"><__trans phrase="Select"></a>
  </mtapp:setting>

  <mtapp:setting
     id="user-lockout"
     label="<__trans phrase="User lockout policy">"
     show_hint="0">  
    <__trans phrase="A Movable Type user will be locked out if he or she submits an incorrect password [_1] or more times within [_2] seconds." params="<input type="text" name="user_lockout_limit" id="user-lockout-limit" class="text num" maxlength="3" value="<mt:var name="user_lockout_limit" escape="html">" />%%<input type="text" name="user_lockout_interval" id="user-lockout-interval" class="text num" maxlength="5" value="<mt:var name="user_lockout_interval" escape="html">" />">
  </mt:app:setting>

  <mtapp:setting
     id="ip-lockout"
     label="<__trans phrase="IP address lockout policy">"
     show_hint="0">  
    <p><__trans phrase="An IP address will be locked out if [_1] or more incorrect login attempts are made within [_2] seconds from the same IP address." params="<input type="text" name="ip_lockout_limit" id="ip-lockout-limit" class="text num" maxlength="3" value="<mt:var name="ip_lockout_limit" escape="html">" />%%<input type="text" name="ip_lockout_interval" id="ip-lockout-interval" class="text num" maxlength="5" value="<mt:var name="ip_lockout_interval" escape="html">" />"></p>
    <label for="lockout-ip-address-whitelist"><__trans phrase="However, the following IP addresses are 'whitelisted' and will never be locked out:"><br />
    <textarea name="lockout_ip_address_whitelist" id="lockout-ip-address-whitelist" class="text low"><mt:var name="lockout_ip_address_whitelist" escape="html"></textarea></label>
    <div class="hint"><__trans phrase="The list of IP addresses. If a remote IP address is included in this list, the failed login will not recorded. You can specify multiple IP addresses separated by commas or line breaks."></div>
  </mt:app:setting>

</mtapp:settinggroup>

<mt:setvarblock name="action_buttons">
  <button
     type="submit"
     accesskey="s"
     title="<__trans phrase="Save changes to these settings (s)">"
     class="save action primary button">
    <__trans phrase="Save Changes">
  </button>
</mt:setvarblock>
<mt:include name="include/actions_bar.tmpl" bar_position="bottom" hide_pager="1" settings_bar="1">
</form>

<div id="test-email-dialog">
  <form id="send-test-email" action="<mt:var name="script_url">" method="post" onsubmit="return validate(this);">
    <input type="hidden" name="__mode" value="cfg_system_general" />
    <input type="hidden" name="magic_token" value="<mt:var name="magic_token">" />
    <input type="hidden" name="return_args" value="<mt:var name="return_args" escape="html">" />    
    <mtapp:setting
       id="to_email_address"
       label="<__trans phrase="Send Email To">"
       label_class="top-class"
       hint="<__trans phrase="The email address that should receive a test email from Movable Type.">"
       show_hint="1">
      <input type="text" name="to_email_address" id="to-email-address" class="text full" />
    </mt:app:setting>
    <div class="dialog actions-bar">
      <button
         type="submit"
         class="action primary button">
        <__trans phrase="Send">
      </button>
    </div>
  </form>
</div>

<mt:setvarblock name="jq_js_include" append="1">
    jQuery('#test-email-dialog').dialog({
        bgiframe: true,
        title: '<__trans phrase="Send Test Email">',
        autoOpen: false,
        width: 450
    });
    jQuery('#send-test-email').click(function() {
        jQuery('#test-email-dialog').dialog('open');
        return false;
    });
    jQuery('input#system_performance_logging').click(function() {
        jQuery('div#system_performance_logging_prefs').toggleClass('hidden');
    });
</mt:setvarblock>

<mt:include name="include/footer.tmpl">
