Revize 1532
Přidáno uživatelem Ondřej Fibich před asi 12 roky(ů)
freenetis/branches/testing/application/i18n/cs_CZ/texts.php | ||
---|---|---|
'directory' => 'adresář',
|
||
'directory "static" is not writable, change access rights' => 'Adresář "static" není zapisovatelný, změňte přístupová práva.',
|
||
'directory "upload" is not writable, change access rights' => 'Adresář "upload" není zapisovatelný, změňte přístupová práva.',
|
||
'directory "media/images" is not writable, change access rights to be able upload your own logo' => 'Adresář "media/images" není zapisovatelný, změňte přístupové práva pro možnost nahrát vlastní logo.',
|
||
'directory "upload" is not writable, change access rights to be able upload your own logo' => 'Adresář "upload" není zapisovatelný, změňte přístupové práva pro možnost nahrát vlastní logo.',
|
||
'disable this subnet' => 'Zakázat tuto podsíť',
|
||
'disabled' => 'Vypnuto',
|
||
'disagree' => 'Nesouhlas',
|
freenetis/branches/testing/application/i18n/cs_CZ/help.php | ||
---|---|---|
'recalculate_entrance_fees' => 'Pro primární strhávání vstupních příspěvků používejte funkci pro globální strhávání v účetním deníku. Tuto funkci používejte jen v případě, že došlo k nějakému omylu, například, že měl zaplatit vstupní a pak se ukázalo, že nemusel.',
|
||
'redirection_preview' => 'Náhled zobrazí stránku přesně tak, jak se zobrazí dané IP adrese. V případě více aktivovaných přesměrování najednou pro jednu IP adresu se zobrazí jen to, které se členovi zobrazí jako první.',
|
||
'register_install' => 'Zašlě data o instalaci (jméno organizace a Váš email) vývojářům FreeNetISu pro zasílání novinek a informacích o vývoji',
|
||
'registration_logo' => 'Jedná se o logo sdružení, které se zobrazí v levém horním rohu vyexportované přihlášky. Poměr stran by běl být 16:6.',
|
||
'registration_logo' => 'Jedná se o logo sdružení, které se zobrazí v levém horním rohu vyexportované přihlášky. Poměr stran by měl být 16:6.',
|
||
'self_cancel' => 'Je-li daná zpráva samozrušitelná, znamená to, že při jejím zobrazení členovi se v patičce stránky objeví odkaz, který mu umožní přesměrování vypnout. Vhodné pro zprávy informativního charakteru. Rozlišuje se samozrušitelnost pro jednu IP adresu anebo pro všechny IP adresy člena.',
|
||
'self_cancel_text' => 'Text pro odkaz určený k zrušení přesměrování členem. Tento text se zobrazuje v patičce stránky přesměrovanému členovi.',
|
||
'self_cancel_url' => 'Je to adresa na centrální bráně, na které běží lighthttpd web server. Pravidla firewallu na centrální bráně takto poznají uživatelův úmysl ukončit přesměrování. Stránka tedy může obsahovat stručnou informaci pro uživatele o ukončení přesměrování a případný rozcestník.',
|
freenetis/branches/testing/application/helpers/arr.php | ||
---|---|---|
{
|
||
return max(array_keys($array));
|
||
}
|
||
|
||
/**
|
||
* Return translated bool array (yes, no)
|
||
*
|
||
* @author Ondřej Fibich
|
||
* @return array
|
||
*/
|
||
public static function bool()
|
||
{
|
||
return array
|
||
(
|
||
'1' => __('Yes'),
|
||
'0' => __('No')
|
||
);
|
||
}
|
||
|
||
/**
|
||
* Return reverted translated bool array (no, yes)
|
||
*
|
||
* @author Ondřej Fibich
|
||
* @return array
|
||
*/
|
||
public static function rbool()
|
||
{
|
||
return array
|
||
(
|
||
'0' => __('No'),
|
||
'1' => __('Yes')
|
||
);
|
||
}
|
||
|
||
} // End arr
|
freenetis/branches/testing/application/controllers/settings.php | ||
---|---|---|
'monitoring' => __('Monitoring'),
|
||
'registration_export' => __('Export of registration')
|
||
);
|
||
// because of ajax loading of tabs, see main view for explementation
|
||
new TextEditor();
|
||
}
|
||
|
||
/**
|
||
... | ... | |
{
|
||
$this->info();
|
||
}
|
||
|
||
|
||
/**
|
||
* info() displays various system information
|
||
*
|
||
... | ... | |
|
||
if (defined('FREENETIS_VERSION'))
|
||
{
|
||
$data[__('freenetis_version')] = FREENETIS_VERSION;
|
||
$data['FreenetIS ' . __('version')] = FREENETIS_VERSION;
|
||
}
|
||
|
||
$data[__('DB schema revision')] = Settings::get('db_schema_version');
|
||
... | ... | |
$html = preg_replace('/<html.*?>.*?<body.*?>/is', '', $html);
|
||
$html = preg_replace('/<\/body><\/html>/is', '', $html);
|
||
$html = preg_replace('/table border="0"/is', 'table class="extended"', $html);
|
||
$html = preg_replace('/width="600"/is', 'width="720" style="table-layout:fixed; overflow: hidden"', $html);
|
||
}
|
||
|
||
$table = new View('table_2_columns');
|
||
$table->table_data = $data;
|
||
|
||
... | ... | |
// access control
|
||
if (!$this->acl_check_edit('Settings_Controller', 'system'))
|
||
Controller::error(ACCESS);
|
||
|
||
$arr_bool = array
|
||
(
|
||
'1' => __('Yes'),
|
||
'0' => __('No')
|
||
);
|
||
|
||
// creating of new forge
|
||
$this->form = new Forge('settings/system');
|
||
... | ... | |
|
||
// page title
|
||
$this->form->input('title')
|
||
->label(__('Page title') . ':')
|
||
->label('Page title')
|
||
->rules('length[3,40]|required')
|
||
->value(Settings::get('title'));
|
||
|
||
$countries = ORM::factory('country')->select_list('id', 'country_name');
|
||
|
||
$this->form->dropdown('default_country')
|
||
->label(__('Country') . ':')
|
||
->label('Country')
|
||
->rules('required')
|
||
->options($countries)
|
||
->selected(Settings::get('default_country'));
|
||
->selected(Settings::get('default_country'))
|
||
->style('width:200px');
|
||
|
||
// currency
|
||
$this->form->input('currency')
|
||
->label(__('Currency') . ':')
|
||
->rules('length[3,40]|required')
|
||
->value(Settings::get('currency'));
|
||
|
||
// self-registration
|
||
$this->form->radio('self_registration')
|
||
->label(__('Self-registration') . ':')
|
||
->options($arr_bool)
|
||
->label('Self-registration')
|
||
->options(arr::bool())
|
||
->default(Settings::get('self_registration'));
|
||
|
||
// forgotten password
|
||
$this->form->radio('forgotten_password')
|
||
->label(__('Forgotten password') . ':')
|
||
->options($arr_bool)
|
||
->label('Forgotten password')
|
||
->options(arr::bool())
|
||
->default(Settings::get('forgotten_password'));
|
||
|
||
$this->form->group('')
|
||
->label(__('E-mail settings'));
|
||
$this->form->group('E-mail settings');
|
||
|
||
$this->form->input('email_default_email')
|
||
->label(__('Default e-mail') . ':')
|
||
->label('Default e-mail')
|
||
->rules('length[3,100]|valid_email')
|
||
->value(Settings::get('email_default_email'));
|
||
|
||
$this->form->group('')
|
||
->label(__('URL settings'));
|
||
$this->form->group('URL settings');
|
||
|
||
$this->form->dropdown('protocol')
|
||
->label(__('Protocol') . ':')
|
||
->rules('length[3,100]')
|
||
->options(array
|
||
(
|
||
... | ... | |
))->selected(url::protocol());
|
||
|
||
$this->form->input('domain')
|
||
->label(__('Domain') . ':')
|
||
->rules('required|length[3,100]')
|
||
->value(url::domain());
|
||
|
||
$this->form->input('suffix')
|
||
->label(__('Suffix') . ':')
|
||
->rules('required|valid_suffix')
|
||
->value(url::suffix());
|
||
|
||
... | ... | |
if (($htaccessFile = @file('.htaccess-sample')) != FALSE)
|
||
{
|
||
$this->form->radio('clean_urls')
|
||
->label(__('Clean URLs') . ':')
|
||
->options($arr_bool)
|
||
->label('Clean URLs')
|
||
->options(arr::bool())
|
||
->default(!Settings::get('index_page'))
|
||
->help(__('URL addresses without index.php.'));
|
||
|
||
... | ... | |
if (!is_writable('.') && !file_exists('.htaccess'))
|
||
{
|
||
$textarea = '';
|
||
|
||
foreach ($htaccessFile as $line)
|
||
{
|
||
$textarea .= htmlentities($line);
|
||
}
|
||
|
||
$help = __('It\'s not possible to write your htacess file for clean URLS.');
|
||
$help .= ' ' . __('You must create it manually and paste the following text into it.');
|
||
|
||
$this->form->textarea('htaccess')
|
||
->label(__('Content of file htaccess') . ':')
|
||
->label('Content of file htaccess')
|
||
->value($textarea)
|
||
->help(
|
||
__(
|
||
'It\'s not possible to write ' .
|
||
'your htacess file for clean URLS.'
|
||
) . ' ' . __(
|
||
'You must create it manually ' .
|
||
'and paste the following text into it.'
|
||
)
|
||
);
|
||
->help($help);
|
||
}
|
||
}
|
||
|
||
$this->form->group('')
|
||
->label(__('Network settings'));
|
||
$this->form->group('Network settings');
|
||
|
||
$this->form->input('address_ranges')
|
||
->label(__('Address ranges') . ':')
|
||
->rules('valid_address_ranges')
|
||
->value(Settings::get('address_ranges'));
|
||
|
||
$this->form->group('')
|
||
->label(__('Module settings'));
|
||
$this->form->group('Module settings');
|
||
|
||
$timeout = Settings::get('module_status_timeout');
|
||
|
||
... | ... | |
->rules('required|valid_numeric')
|
||
->class('increase_decrease_buttons')
|
||
->value($timeout)
|
||
->help(__('Time threshold in minutes, before module is shown as inactive'));
|
||
->help('Time threshold in minutes, before module is shown as inactive');
|
||
|
||
|
||
$this->form->submit('Save');
|
||
... | ... | |
{
|
||
fwrite($handle, $line);
|
||
}
|
||
|
||
fclose($handle);
|
||
chmod('.htaccess', 0666);
|
||
$message = __('Htaccess file has been ' .
|
||
|
||
$message = __(
|
||
'Htaccess file has been ' .
|
||
'successfully created.'
|
||
);
|
||
}
|
||
... | ... | |
$view->content->content = $this->form->html();
|
||
$view->content->headline = __('System');
|
||
|
||
if (!empty($message))
|
||
$view->content->message = $message;
|
||
|
||
$view->render(TRUE);
|
||
}
|
||
|
||
/**
|
||
* Settings for QoS
|
||
*/
|
||
public function qos()
|
||
{
|
||
// access control
|
||
... | ... | |
|
||
$this->form->checkbox('qos_enabled')
|
||
->value('1')
|
||
->label(__('Enable QoS'));
|
||
->label('Enable QoS');
|
||
|
||
if (Settings::get('qos_enabled') == 1)
|
||
$this->form->qos_enabled->checked('checked');
|
||
... | ... | |
if (Settings::get('ulogd_enabled'))
|
||
{
|
||
$this->form->input('qos_active_speed')
|
||
->label(__('Speed for active members')
|
||
. ': '.help::hint('qos_active_speed'))
|
||
->label(__('Speed for active members') . ': '.help::hint('qos_active_speed'))
|
||
->rules('valid_speed_size')
|
||
->value(Settings::get('qos_active_speed'));
|
||
}
|
||
... | ... | |
$view->content->headline = __('QoS');
|
||
$view->content->description = module_state::get_state('qos', TRUE);
|
||
|
||
if (!empty($message))
|
||
$view->content->message = $message;
|
||
|
||
$view->render(TRUE);
|
||
}
|
||
|
||
... | ... | |
$this->form->group('E-mail variables');
|
||
|
||
$this->form->dropdown('email_driver')
|
||
->label(__('Driver') . ':')
|
||
->label('Driver')
|
||
->options(array
|
||
(
|
||
'native' => __('Native'),
|
||
... | ... | |
))->selected(Settings::get('email_driver'));
|
||
|
||
$this->form->input('email_hostname')
|
||
->label(__('Hostname') . ':')
|
||
->label('Hostname')
|
||
->value(Settings::get('email_hostname'))
|
||
->help(__('For SMTP settings only.'));
|
||
->help('For SMTP settings only.');
|
||
|
||
$this->form->input('email_port')
|
||
->label(__('Port') . ':')
|
||
->label('Port')
|
||
->rules('valid_numeric')
|
||
->value(Settings::get('email_port'))
|
||
->help(__('For SMTP settings only.'));
|
||
->help('For SMTP settings only.');
|
||
|
||
$this->form->input('email_username')
|
||
->label(__('User name') . ':')
|
||
->label('User name')
|
||
->value(Settings::get('email_username'))
|
||
->help(__('For SMTP settings only.'));
|
||
->help('For SMTP settings only.');
|
||
|
||
$this->form->input('email_password')
|
||
->label(__('Password') . ':')
|
||
->label('Password')
|
||
->value(Settings::get('email_password'))
|
||
->help(__('For SMTP settings only.'));
|
||
->help('For SMTP settings only.');
|
||
|
||
$this->form->submit('Save');
|
||
|
||
... | ... | |
|
||
$arr_approval_templates = array
|
||
(
|
||
NULL => '----- ' . __('select approval template') . ' -----'
|
||
NULL => '----- ' . __('Select approval template') . ' -----'
|
||
) + $approval_templates;
|
||
|
||
// creating of new forge
|
||
... | ... | |
$this->form->group('Work');
|
||
|
||
$this->form->dropdown('default_work_approval_template')
|
||
->label(__('Default approval template') . ':')
|
||
->label('Default approval template')
|
||
->options($arr_approval_templates)
|
||
->selected(Settings::get('default_work_approval_template'))
|
||
->rules('required');
|
||
|
||
$this->form->group('')
|
||
->label(__('Work report'));
|
||
$this->form->group('Work report');
|
||
|
||
$this->form->dropdown('default_work_report_approval_template')
|
||
->label(__('Default approval template') . ':')
|
||
->label('Default approval template')
|
||
->options($arr_approval_templates)
|
||
->selected(Settings::get('default_work_report_approval_template'))
|
||
->rules('required');
|
||
|
||
$this->form->group('')
|
||
->label(__('Request'));
|
||
$this->form->group('Request');
|
||
|
||
$this->form->dropdown('default_request_approval_template')
|
||
->label(__('Default approval template') . ':')
|
||
->label('Default approval template')
|
||
->options($arr_approval_templates)
|
||
->selected(Settings::get('default_request_approval_template'))
|
||
->rules('required');
|
||
... | ... | |
// creating of new forge
|
||
$this->form = new Forge('settings/voip');
|
||
|
||
$this->form->group('')
|
||
->label(__('VoIP settings'));
|
||
$this->form->group('VoIP settings');
|
||
|
||
// page title
|
||
$this->form->input('voip_number_interval')
|
||
->label(__('Number interval') . ':')
|
||
->label('Number interval')
|
||
->rules('length[19,19]|required')
|
||
->value(addslashes(Settings::get('voip_number_interval')))
|
||
->callback(array($this, 'valid_voip_number_interval'));
|
||
|
||
$this->form->input('voip_number_exclude')
|
||
->label(__('Exclude numbers') . ':')
|
||
->label('Exclude numbers')
|
||
->rules('length[9,100]')
|
||
->value(addslashes(Settings::get('voip_number_exclude')))
|
||
->callback(array($this, 'valid_voip_number_exclude'));
|
||
|
||
$this->form->input('voip_sip_server')
|
||
->label(__('SIP server') . ':')
|
||
->label('SIP server')
|
||
->rules('length[1,30]|required')
|
||
->value(addslashes(Settings::get('voip_sip_server')));
|
||
|
||
$this->form->group('')
|
||
->label(__('Asterisk manager settings'));
|
||
$this->form->group('Asterisk manager settings');
|
||
|
||
$this->form->input('voip_asterisk_hostname')
|
||
->label(__('Hostname') . ':')
|
||
->label('Hostname')
|
||
->rules('length[1,50]')
|
||
->value(Settings::get('voip_asterisk_hostname'));
|
||
|
||
$this->form->input('voip_asterisk_user')
|
||
->label(__('User') . ':')
|
||
->label('User')
|
||
->rules('length[1,50]')
|
||
->value(Settings::get('voip_asterisk_user'));
|
||
|
||
$this->form->input('voip_asterisk_pass')
|
||
->label(__('Password') . ':')
|
||
->label('Password')
|
||
->rules('length[1,50]')
|
||
->value(Settings::get('voip_asterisk_pass'));
|
||
|
||
|
||
$this->form->group('')
|
||
->label(__('Billing settings'));
|
||
$this->form->group('Billing settings');
|
||
|
||
$this->form->dropdown('voip_billing_driver')
|
||
->label(__('Driver') . ':')
|
||
->label('Driver')
|
||
->rules('required')
|
||
->options(array
|
||
(
|
||
... | ... | |
))->selected(Settings::get('voip_billing_driver'));
|
||
|
||
$this->form->input('voip_billing_partner')
|
||
->label(__('Partner') . ':')
|
||
->label('Partner')
|
||
->rules('length[1,50]')
|
||
->value(Settings::get('voip_billing_partner'));
|
||
|
||
$this->form->input('voip_billing_password')
|
||
->label(__('Password') . ':')
|
||
->label('Password')
|
||
->rules('length[1,50]')
|
||
->value(Settings::get('voip_billing_password'));
|
||
|
||
|
||
$this->form->group('')
|
||
->label(__('Actual price of calls'));
|
||
$this->form->group('Actual price of calls');
|
||
|
||
$this->form->input('voip_tariff_fixed')
|
||
->label(__('Fixed line number') . ':')
|
||
->label('Fixed line number')
|
||
->rules('valid_numeric')
|
||
->value(Settings::get('voip_tariff_fixed'));
|
||
|
||
$this->form->input('voip_tariff_cellphone')
|
||
->label(__('Cellphone number') . ':')
|
||
->label('Cellphone number')
|
||
->rules('valid_numeric')
|
||
->value(Settings::get('voip_tariff_cellphone'));
|
||
|
||
$this->form->input('voip_tariff_voip')
|
||
->label(__('VoIP number') . ':')
|
||
->label('VoIP number')
|
||
->rules('valid_numeric')
|
||
->value(Settings::get('voip_tariff_voip'));
|
||
|
||
... | ... | |
url::redirect('settings/voip');
|
||
}
|
||
|
||
// create view for this template
|
||
$view = new View('main');
|
||
$view->title = __('Settings') . ' - ' . __('VoIP');
|
||
$view->content = new View('settings/main');
|
||
$view->content->current = 'voip';
|
||
$view->content->content = $this->form->html();
|
||
$view->content->headline = __('VoIP');
|
||
|
||
if (!empty($message))
|
||
$view->content->message = $message;
|
||
// drover informations
|
||
$ai = null;
|
||
|
||
$hostname = Settings::get('voip_asterisk_hostname');
|
||
$user = Settings::get('voip_asterisk_user');
|
||
$pass = Settings::get('voip_asterisk_pass');
|
||
|
||
$additional_info = null;
|
||
|
||
if (Billing::instance()->has_driver())
|
||
{
|
||
if (Billing::instance()->test_conn())
|
||
{
|
||
$additional_info = __('Testing driver')
|
||
. ': lBilling - NFX......<span style="color:green">OK</span>';
|
||
$ai = __('Testing driver');
|
||
$ai .= ': lBilling - NFX......<span style="color:green">OK</span>';
|
||
}
|
||
else
|
||
{
|
||
$additional_info = __('Testing driver')
|
||
. ': lBilling - NFX......<span style="color:red">'
|
||
. __('Failed') . '</span>';
|
||
$ai = __('Testing driver');
|
||
$ai .= ': lBilling - NFX......<span style="color:red">';
|
||
$ai .= __('Failed') . '</span>';
|
||
}
|
||
}
|
||
|
||
$view->content->additional_info = $additional_info;
|
||
// create view for this template
|
||
$view = new View('main');
|
||
$view->title = __('Settings') . ' - ' . __('VoIP');
|
||
$view->content = new View('settings/main');
|
||
$view->content->current = 'voip';
|
||
$view->content->content = $this->form->html();
|
||
$view->content->headline = __('VoIP');
|
||
$view->content->additional_info = $ai;
|
||
$view->render(TRUE);
|
||
}
|
||
|
||
... | ... | |
|
||
// page title
|
||
$this->form->input('sms_sender_number')
|
||
->label(__('Number of the sender') . ':')
|
||
->label('Number of the sender')
|
||
->rules('length[12,12]|required|valid_phone')
|
||
->value(Settings::get('sms_sender_number'));
|
||
|
||
$this->form->dropdown('sms_driver')
|
||
->label(__('Default driver') . ':')
|
||
->label('Default driver')
|
||
->options($drivers)
|
||
->selected(Settings::get('sms_driver'));
|
||
|
||
... | ... | |
$this->form->group(Sms::get_driver_name($key));
|
||
|
||
$this->form->dropdown('sms_driver_state' . $key)
|
||
->label(__('Driver state') . ':')
|
||
->label('Driver state')
|
||
->options(array
|
||
(
|
||
Sms::DRIVER_INACTIVE => __('Inactive'),
|
||
Sms::DRIVER_ACTIVE => __('Active')
|
||
Sms::DRIVER_INACTIVE => __('Inactive'),
|
||
Sms::DRIVER_ACTIVE => __('Active')
|
||
))->selected(Settings::get('sms_driver_state' . $key));
|
||
|
||
// hostname not defined by config driver array?
|
||
if (!array_key_exists('hostname', $driver))
|
||
{
|
||
$this->form->input('sms_hostname' . $key)
|
||
->label(__('Hostname') . ':')
|
||
->label('Hostname')
|
||
->rules('length[1,50]')
|
||
->value(Settings::get('sms_hostname' . $key));
|
||
}
|
||
|
||
$this->form->input('sms_user' . $key)
|
||
->label(__('User') . ':')
|
||
->label('User')
|
||
->rules('length[1,50]')
|
||
->value(Settings::get('sms_user' . $key));
|
||
|
||
$this->form->input('sms_password' . $key)
|
||
->label(__('Password') . ':')
|
||
->label('Password')
|
||
->rules('length[1,50]')
|
||
->value(Settings::get('sms_password' . $key));
|
||
|
||
... | ... | |
|
||
if (Settings::get('sms_driver_state' . $key) == Sms::DRIVER_ACTIVE)
|
||
{
|
||
// variables
|
||
$hostname = Settings::get('sms_hostname' . $key);
|
||
|
||
$aditional_info .= __('Testing driver') . ' : '
|
||
. Sms::get_driver_name($key)
|
||
. '......<span style="color:';
|
||
... | ... | |
|
||
$this->form->input('payment_notice_boundary')
|
||
->label(__('Payment notice boundary')." (".
|
||
$this->settings->get('currency')."): ".
|
||
Settings::get('currency')."): ".
|
||
help::hint('payment_notice_boundary'))
|
||
->value($this->settings->get('payment_notice_boundary'));
|
||
->value(Settings::get('payment_notice_boundary'));
|
||
|
||
$this->form->input('debtor_boundary')
|
||
->label(__('Debtor boundary')." (".
|
||
$this->settings->get('currency')."): ".
|
||
Settings::get('currency')."): ".
|
||
help::hint('debtor_boundary'))
|
||
->value($this->settings->get('debtor_boundary'));
|
||
->value(Settings::get('debtor_boundary'));
|
||
|
||
$this->form->input('initial_immunity')
|
||
->label(__('Initial immunity').': '.
|
||
help::hint('initial_immunity'))
|
||
->rules('required|valid_numeric')
|
||
->value($this->settings->get('initial_immunity'));
|
||
->value(Settings::get('initial_immunity'));
|
||
|
||
$this->form->input('initial_debtor_immunity')
|
||
->label(__('Initial debtor immunity').': '.
|
||
help::hint('initial_debtor_immunity'))
|
||
->rules('required|valid_numeric')
|
||
->value($this->settings->get('initial_debtor_immunity'));
|
||
->value(Settings::get('initial_debtor_immunity'));
|
||
|
||
$this->form->group('Redirection');
|
||
|
||
$this->form->input('gateway')
|
||
->label(__('Gateway IP address').":")
|
||
->value($this->settings->get('gateway'));
|
||
->value(Settings::get('gateway'));
|
||
|
||
$this->form->input('redirection_port_self_cancel')
|
||
->label(__('Port for self-canceling').": ".help::hint('redirection_port_self_cancel'))
|
||
->rules('valid_numeric')
|
||
->value($this->settings->get('redirection_port_self_cancel'));
|
||
->value(Settings::get('redirection_port_self_cancel'));
|
||
|
||
$this->form->input('redirection_logo_url')
|
||
->label(__('Redirection logo URL').":")
|
||
->value($this->settings->get('redirection_logo_url'));
|
||
->value(Settings::get('redirection_logo_url'));
|
||
|
||
$this->form->input('self_cancel_text')
|
||
->label(__('Text for self cancel anchor').": ".
|
||
help::hint('self_cancel_text'))
|
||
->value($this->settings->get('self_cancel_text'));
|
||
->value(Settings::get('self_cancel_text'));
|
||
|
||
$this->form->group('E-mail');
|
||
|
||
$this->form->input('email_subject_prefix')
|
||
->label(__('E-mail subject prefix').':')
|
||
->value($this->settings->get('email_subject_prefix'));
|
||
->value(Settings::get('email_subject_prefix'));
|
||
|
||
$this->form->submit('submit')->value(__('Save'));
|
||
|
||
... | ... | |
|
||
$this->form->group('Centralized logging');
|
||
|
||
$this->form->group('')
|
||
->label('ulogd ' . help::hint('ulogd'))
|
||
$this->form->group('ulogd ' . help::hint('ulogd'))
|
||
->message();
|
||
|
||
$this->form->checkbox('ulogd_enabled')
|
||
->value('1')
|
||
->label(__('Enable ulogd'));
|
||
->label('Enable ulogd');
|
||
|
||
$this->form->input('ulogd_update_interval')
|
||
->label(__('Interval of update') . ': ' .
|
||
... | ... | |
0 => '----- ' . __('Select type') . ' -----',
|
||
'upload' => __('upload'),
|
||
'download' => __('download'),
|
||
'total' => __('both') . ' ('
|
||
. __('upload') . ' + '
|
||
. __('download') . ')'
|
||
))->selected(Settings::get('ulogd_active_type'));
|
||
'total' => __('both') . ' (' . __('upload') . ' + ' . __('download') . ')'
|
||
))->selected(Settings::get('ulogd_active_type'))
|
||
->style('width:200px');
|
||
|
||
$this->form->input('ulogd_active_min')
|
||
->label(__('Minimum of traffic') . ': ' .
|
||
... | ... | |
->rules('valid_byte_size')
|
||
->value(Settings::get('ulogd_active_min'));
|
||
|
||
$this->form->group('')
|
||
->label(__('Syslog NG MySQL API').' '.help::hint('syslog_ng_mysql_api'));
|
||
$this->form->group(__('Syslog NG MySQL API').' '.help::hint('syslog_ng_mysql_api'));
|
||
|
||
$this->form->checkbox('syslog_ng_mysql_api_enabled')
|
||
->value('1')
|
||
->label(__('Enable'));
|
||
->label('Enable');
|
||
|
||
if (Settings::get('syslog_ng_mysql_api_enabled') == 1)
|
||
$this->form->syslog_ng_mysql_api_enabled->checked('checked');
|
||
... | ... | |
->value(Settings::get('syslog_ng_mysql_api_url'))
|
||
->style('width: 500px;');
|
||
|
||
$this->form->group('')
|
||
->label(__('Action logs') . ' ' .
|
||
help::hint('action_logs_active'));
|
||
$this->form->group(__('Action logs') . ' ' . help::hint('action_logs_active'));
|
||
|
||
$this->form->checkbox('action_logs_active')
|
||
->value('1')
|
||
->label(__('Enable action logs'));
|
||
->label('Enable action logs');
|
||
|
||
$this->form->submit('Save');
|
||
|
||
... | ... | |
if (version_compare($user_model->get_mysql_version(), '5.1.0', '<'))
|
||
{
|
||
$this->form->action_logs_active->label(
|
||
__('Enable action logs') .
|
||
' - <span class="error">' .
|
||
__('require MySQL %s and higher', array('5.1')
|
||
) . '</span>'
|
||
__('Enable action logs') . ' - <span class="error">' .
|
||
__('require MySQL %s and higher', array('5.1')) . '</span>'
|
||
);
|
||
$this->form->action_logs_active->disabled('disabled');
|
||
}
|
||
... | ... | |
!$user_model->check_permission('CREATE ROUTINE'))
|
||
{
|
||
$this->form->ulogd_enabled->label(
|
||
__('Enable ulogd')
|
||
. ' - <span class="error">' .
|
||
__('Enable ulogd') . ' - <span class="error">' .
|
||
__('it requires already created functions for '.
|
||
'ulogd or MySQL permission CREATE ROUTINE for create them'
|
||
) . '</span>');
|
||
... | ... | |
|
||
foreach ($form_data as $name => $value)
|
||
{
|
||
if ($name == 'action_logs_active' OR $name == 'ulogd_enabled' OR $name == 'syslog_ng_mysql_api_enabled')
|
||
if ($name == 'action_logs_active' OR
|
||
$name == 'ulogd_enabled' OR
|
||
$name == 'syslog_ng_mysql_api_enabled')
|
||
{
|
||
continue;
|
||
}
|
||
|
||
$issaved = $issaved && Settings::set($name, $value);
|
||
}
|
||
... | ... | |
$view = new View('main');
|
||
$view->title = __('Settings') . ' - ' . __('logging');
|
||
$view->content = new View('settings/main');
|
||
|
||
$view->content->current = 'logging';
|
||
$view->content->content = $this->form->html();
|
||
$view->content->headline = __('Logging');
|
||
$view->content->description = module_state::get_state('logging', TRUE);
|
||
if (!empty($message))
|
||
$view->content->message = $message;
|
||
$view->render(TRUE);
|
||
}
|
||
|
||
... | ... | |
|
||
$this->form->checkbox('monitoring_enabled')
|
||
->value('1')
|
||
->label(__('Enable monitoring'));
|
||
->label('Enable monitoring');
|
||
|
||
if (Settings::get('monitoring_enabled') == 1)
|
||
$this->form->monitoring_enabled->checked('checked');
|
||
... | ... | |
$view->content->current = 'monitoring';
|
||
$view->content->content = $this->form->html();
|
||
$view->content->headline = __('Monitoring');
|
||
$view->content->description = module_state::get_state('monitoring', TRUE);
|
||
|
||
if (!empty($message))
|
||
$view->content->message = $message;
|
||
|
||
$view->content->description = module_state::get_state('monitoring', TRUE);
|
||
$view->render(TRUE);
|
||
}
|
||
|
||
... | ... | |
if (is_writable('upload'))
|
||
{
|
||
$this->form->upload('registration_logo')
|
||
->label(__('Logo') . ':')
|
||
->label('Logo')
|
||
->rules('allow[jpg]')
|
||
->new_name('logo.jpg')
|
||
->help(help::hint('registration_logo'));
|
||
}
|
||
|
||
$this->form->html_textarea('registration_info')
|
||
->label(__('Info') . ':')
|
||
->label('Info')
|
||
->rows(5)
|
||
->cols(100)
|
||
->value(Settings::get('registration_info'));
|
||
|
||
$this->form->html_textarea('registration_license')
|
||
->label(__('License') . ':')
|
||
->label('License')
|
||
->rows(5)
|
||
->cols(100)
|
||
->value(Settings::get('registration_license'));
|
||
... | ... | |
$view->content->current = 'registration_export';
|
||
$view->content->content = $this->form->html();
|
||
$view->content->headline = __('Export of registration');
|
||
if (!empty($message))
|
||
$view->content->message = $message;
|
||
|
||
// directory is not writable
|
||
if (!is_writable('upload'))
|
||
{
|
||
$view->content->warning = __('Directory "upload" is not writable, ' .
|
||
'change access rights to be able upload your own logo.');
|
||
$view->content->warning = __(
|
||
'Directory "upload" is not writable, change access ' .
|
||
'rights to be able upload your own logo.'
|
||
);
|
||
}
|
||
|
||
$view->render(TRUE);
|
||
... | ... | |
// check if first and second number are 9 characters long (123456789, NOT 1234567890)
|
||
if (strlen($number) != 9)
|
||
{
|
||
$input->add_error('required', __(
|
||
'VoIP number must be 9 characters long'
|
||
));
|
||
$input->add_error('required', __('VoIP number must be 9 characters long'));
|
||
break;
|
||
}
|
||
// check if first and second number are numbers :-) (123456789, NOT abcdefghi)
|
freenetis/branches/testing/application/libraries/forge/Form_Input.php | ||
---|---|---|
{
|
||
$this->data['label'] = utf8::ucwords(inflector::humanize($this->name));
|
||
}
|
||
else
|
||
else if (!preg_match('/<.*>/', $val))
|
||
{
|
||
$val = __($val);
|
||
|
||
... | ... | |
|
||
$this->data['label'] = $val;
|
||
}
|
||
else
|
||
{
|
||
$this->data['label'] = $val;
|
||
}
|
||
|
||
return $this;
|
||
}
|
Také k dispozici: Unified diff
Novinky:
- pridani frekventovane pouzivaneho pole u dropdownů a radio buttonů - bool (arr::bool a arr:rbool)
Upravy:
- upravy v settings controlleru (predevsim vylepseni vzhledu rozhrani)
Opravy:
- opravy nacitani labelu HTML