$Form = new Form(NULL, 'settings_checkchanges');
$Form->begin_form('fform', '', array('onsubmit' => 'var es=this.elements; for( var i=0; i < es.length; i++ ) { es[i].disabled=false; };'));
$Form->add_crumb('collectionsettings');
$Form->hidden('ctrl', 'collections');
$Form->hidden('tab', get_param('tab'));
$Form->hidden('action', 'update_settings_site');
// --------------------------------------------
if ($current_User->check_perm('users', 'edit')) {
    $Form->begin_fieldset(T_('Locking down b2evolution for maintenance, upgrade or server switching...') . get_manual_link('system-lock'));
    $Form->checkbox_input('system_lock', $Settings->get('system_lock'), T_('Lock system'), array('note' => T_('check this to prevent login (except for admins) and sending comments/messages. This prevents the DB from receiving updates (other than logging)') . '<br />' . T_('Note: for a more complete lock down, rename the file /conf/_maintenance.html to /conf/maintenance.html (complete lock) or /conf/imaintenance.html (gives access to /install)')));
    $Form->end_fieldset();
}
// --------------------------------------------
$Form->begin_fieldset(T_('Global Site Settings') . get_manual_link('global-site-settings'));
$Form->text_input('site_code', $Settings->get('site_code'), 10, T_('Site code'), '$instance_name = ' . $instance_name, array('maxlength' => 20));
$Form->color_input('site_color', $Settings->get('site_color'), T_('Site color'), T_('E-g: #ff0000 for red'));
$Form->text_input('notification_short_name', $Settings->get('notification_short_name'), 50, T_('Short site name'), T_('Shared with email settings'), array('maxlength' => 127, 'required' => true));
$Form->text_input('notification_long_name', $Settings->get('notification_long_name'), 50, T_('Long site name'), T_('Shared with email settings'), array('maxlength' => 255));
$Form->text_input('notification_logo', $Settings->get('notification_logo'), 50, T_('Small site logo (URL)'), T_('Shared with email settings'), array('maxlength' => 5000));
$Form->text_input('notification_logo_large', $Settings->get('notification_logo_large'), 50, T_('Large site logo (URL)'), '', array('maxlength' => 5000));
$Form->text_input('site_footer_text', $Settings->get('site_footer_text'), 50, T_('Site footer text'), '', array('maxlength' => 5000));
$Form->checkbox_input('site_skins_enabled', $Settings->get('site_skins_enabled'), T_('Enable site skins'), array('note' => T_('Enables a sitewide header and footer')));
$Form->text_input('site_terms', $Settings->get('site_terms'), 7, T_('Terms & Conditions'), T_('Enter ID of the page containing the terms & conditions.'), array('maxlength' => 11));
$Form->end_fieldset();
// --------------------------------------------
$Form->begin_fieldset(T_('Default collections') . get_manual_link('default-collections'));
$BlogCache =& get_BlogCache();
$create_new_blog_link = ' <a href="' . $admin_url . '?ctrl=collections&action=new">' . T_('Create new collection') . ' &raquo;</a>';
$Form->select_input_object('default_blog_ID', $Settings->get('default_blog_ID'), $BlogCache, get_icon('coll_default') . ' ' . T_('Default collection to display'), array('note' => T_('This collection will be displayed on index.php.') . $create_new_blog_link, 'allow_none' => true, 'loop_object_method' => 'get_maxlen_name'));
$Form->select_input_object('info_blog_ID', $Settings->get('info_blog_ID'), $BlogCache, get_icon('coll_info') . ' ' . T_('Collection for info pages'), array('note' => T_('The pages in this collection will be added to the site menu.') . $create_new_blog_link, 'allow_none' => true, 'loop_object_method' => 'get_maxlen_name'));
$Form->select_input_object('login_blog_ID', $Settings->get('login_blog_ID'), $BlogCache, get_icon('coll_login') . ' ' . T_('Collection for login/registration'), array('note' => T_('This collection will be used for all login/registration functions.') . $create_new_blog_link, 'allow_none' => true, 'loop_object_method' => 'get_maxlen_name'));
 *
 * @copyright (c)2003-2015 by Francois Planque - {@link http://fplanque.com/}
 *
 * @package admin
 */
if (!defined('EVO_MAIN_INIT')) {
    die('Please, do not access this page directly.');
}
/**
 * @var GoalCategory
 */
global $edited_GoalCategory;
// Determine if we are creating or updating...
global $action;
$creating = in_array($action, array('cat_new', 'cat_copy', 'cat_create', 'cat_create_new', 'cat_create_copy'));
$Form = new Form(NULL, 'goalcat_checkchanges', 'post', 'compact');
if (!$creating) {
    $Form->global_icon(T_('Delete this goal category!'), 'delete', regenerate_url('action', 'action=cat_delete&amp;' . url_crumb('goalcat')));
}
$Form->global_icon(T_('Cancel editing!'), 'close', regenerate_url('action,gcat_ID'));
$Form->begin_form('fform', $creating ? T_('New goal category') : T_('Goal category'));
$Form->add_crumb('goalcat');
$Form->hiddens_by_key(get_memorized('action' . ($creating ? ',gcat_ID' : '')));
// (this allows to come back to the right list order & page)
$Form->text_input('gcat_name', $edited_GoalCategory->name, 40, T_('Name'), '', array('maxlength' => 50, 'required' => true));
$Form->color_input('gcat_color', $edited_GoalCategory->color, T_('Color'), T_('E-g: #ff0000 for red'), array('required' => true));
if ($creating) {
    $Form->end_form(array(array('submit', 'actionArray[cat_create]', T_('Record'), 'SaveButton'), array('submit', 'actionArray[cat_create_new]', T_('Record, then Create New'), 'SaveButton'), array('submit', 'actionArray[cat_create_copy]', T_('Record, then Create Similar'), 'SaveButton')));
} else {
    $Form->end_form(array(array('submit', 'actionArray[cat_update]', T_('Save Changes!'), 'SaveButton')));
}