Created
June 21, 2013 22:55
-
-
Save mikeyp/5834928 to your computer and use it in GitHub Desktop.
Lets play a game. Do you think it's possible to un-check "Emergency" on the settings form, and save that change?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Form builder for settings form. | |
*/ | |
function honeybadger_settings_form($form, &$form_state) { | |
$form['honeybadger_api_key'] = array( | |
'#type' => 'textfield', | |
'#title' => t('Honeybadger.io API key'), | |
'#default_value' => variable_get('honeybadger_api_key'. ''), | |
'#description' => t('Enter the <strong>Private API Key</strong> from the Setttings section of the Honeybadger.io project that corresponds with this site.') | |
); | |
$form['honeybadger_api_levels'] = array( | |
'#type' => 'checkboxes', | |
'#title' => t('Error levels to be sent to Honeybadger.io'), | |
'#description' => t('Only errors that correspond with the checked error levels will be sent to Honeybadger.io.'), | |
'#options' => array( | |
WATCHDOG_EMERGENCY => t('Emergency'), | |
WATCHDOG_ALERT => t('Alert'), | |
WATCHDOG_CRITICAL => t('Critical'), | |
WATCHDOG_ERROR => t('Error'), | |
WATCHDOG_WARNING => t('Warning'), | |
WATCHDOG_NOTICE => t('Notice'), | |
WATCHDOG_INFO => t('Info'), | |
WATCHDOG_DEBUG => t('Debug'), | |
), | |
'#default_value' => variable_get('honeybadger_api_levels', array()), | |
); | |
return system_settings_form($form); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment