Revize 1365
Přidáno uživatelem Ondřej Fibich před více než 12 roky(ů)
freenetis/branches/testing/application/controllers/installation.php | ||
---|---|---|
->rules('required|length[1,200]');
|
||
|
||
$form->input('street_number')
|
||
->rules('required|length[1,50]|valid_numeric');
|
||
->rules('length[1,50]');
|
||
|
||
$form->input('town')
|
||
->rules('required|length[1,200]');
|
freenetis/branches/testing/application/controllers/address_points.php | ||
---|---|---|
->options($arr_streets);
|
||
|
||
$form->input('street_number')
|
||
->rules('length[1,50]|valid_numeric');
|
||
->rules('length[1,50]');
|
||
|
||
$form->input('gpsx')
|
||
->label(__('GPS').' X: '.help::hint('gps_coordinates'))
|
freenetis/branches/testing/application/controllers/registration.php | ||
---|---|---|
|
||
$form->input('street_number')
|
||
->label(__('street number') . ':')
|
||
->rules('length[1,50]|valid_numeric');
|
||
->rules('length[1,50]');
|
||
|
||
$form->input('gpsx')
|
||
->label(__('GPS').' X: '.help::hint('gps_coordinates'))
|
freenetis/branches/testing/application/controllers/members.php | ||
---|---|---|
->add_button('streets', '{street}');
|
||
|
||
$form->input('street_number')
|
||
->rules('length[1,50]|valid_numeric');
|
||
->rules('length[1,50]');
|
||
|
||
$form->dropdown('country_id')
|
||
->label(__('Country').':')
|
||
... | ... | |
|
||
$form->input('domicile_street_number')
|
||
->label(__('Street number').':')
|
||
->rules('length[1,50]|valid_numeric')
|
||
->rules('length[1,50]')
|
||
->callback(array($this, 'valid_docimile_street_number'));
|
||
|
||
$form->dropdown('domicile_country_id')
|
||
... | ... | |
->add_button('streets', '{street}');
|
||
|
||
$form->input('street_number')
|
||
->rules('length[1,50]|valid_numeric')
|
||
->rules('length[1,50]')
|
||
->value($member->address_point->street_number);
|
||
|
||
$form->dropdown('country_id')
|
||
... | ... | |
|
||
$form->input('domicile_street_number')
|
||
->label(__('street number').':')
|
||
->rules('length[1,50]|valid_numeric')
|
||
->rules('length[1,50]')
|
||
->value($member->members_domicile->address_point->street_number)
|
||
->callback(array($this, 'valid_docimile_street_number'));
|
||
|
freenetis/branches/testing/application/controllers/devices.php | ||
---|---|---|
->add_button('streets');
|
||
|
||
$form->input('street_number')
|
||
->rules('length[1,50]|valid_numeric')
|
||
->rules('length[1,50]')
|
||
->value($selected_street_number);
|
||
|
||
$form->dropdown('country_id')
|
||
... | ... | |
->add_button('streets');
|
||
|
||
$form->input('street_number')
|
||
->rules('length[1,50]|valid_numeric')
|
||
->rules('length[1,50]')
|
||
->value($device->address_point->street_number);
|
||
|
||
$form->dropdown('country_id')
|
freenetis/branches/testing/application/upgrade_sql/upgrade_sql.php | ||
---|---|---|
}
|
||
|
||
/**
|
||
* Add column to member table for registration time and column to phone call
|
||
* table for descripton of call.
|
||
* Changes street_number column in order to store differents kinds of PSC
|
||
* such as POC. See #80.
|
||
*
|
||
* @author Ondřej Fibich
|
||
*/
|
||
$upgrade_sql[get_SVN_rev()] = array
|
||
(
|
||
"CREATE TABLE IF NOT EXISTS `monitor_hosts` (
|
||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||
`device_id` int(11) NOT NULL,
|
||
`state` tinyint(1) NOT NULL,
|
||
`state_changed` tinyint(1) NOT NULL,
|
||
`state_changed_date` datetime NOT NULL,
|
||
`last_attempt_date` datetime NOT NULL,
|
||
`last_notification_date` datetime DEFAULT NULL,
|
||
`latency_current` float DEFAULT NULL,
|
||
`latency_min` float DEFAULT NULL,
|
||
`latency_max` float DEFAULT NULL,
|
||
`latency_avg` float DEFAULT NULL,
|
||
`polls_total` bigint(11) NOT NULL,
|
||
`polls_failed` bigint(11) NOT NULL,
|
||
`availability` float NOT NULL,
|
||
`priority` tinyint(1) NOT NULL,
|
||
PRIMARY KEY (`id`),
|
||
KEY `device_id` (`device_id`)
|
||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=1;",
|
||
|
||
"ALTER TABLE `monitor_hosts`
|
||
ADD CONSTRAINT `monitor_hosts_ibfk_1` FOREIGN KEY (`device_id`)
|
||
REFERENCES `devices` (`id`) ON DELETE CASCADE;",
|
||
|
||
"ALTER TABLE `job_reports` DROP FOREIGN KEY `job_reports_ibfk_3`,
|
||
ADD FOREIGN KEY `job_reports_ibfk_3` ( `transfer_id` )
|
||
REFERENCES `transfers` (`id`) ON DELETE SET NULL ON UPDATE RESTRICT;"
|
||
"ALTER TABLE `address_points` CHANGE `street_number` `street_number` VARCHAR( 50 ) NULL DEFAULT NULL"
|
||
);
|
freenetis/branches/testing/application/upgrade_sql/upgrade_sql_1363.php | ||
---|---|---|
<?php defined('SYSPATH') or die('No direct script access.');
|
||
/*
|
||
* This file is part of open source system FreeNetIS
|
||
* and it is released under GPLv3 licence.
|
||
*
|
||
* More info about licence can be found:
|
||
* http://www.gnu.org/licenses/gpl-3.0.html
|
||
*
|
||
* More info about project can be found:
|
||
* http://www.freenetis.org/
|
||
*
|
||
*/
|
||
|
||
/**
|
||
* Adds a table required for monitoring and it changes foreing key in job reports
|
||
* in order to fix the issue #119
|
||
*
|
||
* @author Michal Kliment
|
||
*/
|
||
$upgrade_sql[1363] = array
|
||
(
|
||
"CREATE TABLE IF NOT EXISTS `monitor_hosts` (
|
||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||
`device_id` int(11) NOT NULL,
|
||
`state` tinyint(1) NOT NULL,
|
||
`state_changed` tinyint(1) NOT NULL,
|
||
`state_changed_date` datetime NOT NULL,
|
||
`last_attempt_date` datetime NOT NULL,
|
||
`last_notification_date` datetime DEFAULT NULL,
|
||
`latency_current` float DEFAULT NULL,
|
||
`latency_min` float DEFAULT NULL,
|
||
`latency_max` float DEFAULT NULL,
|
||
`latency_avg` float DEFAULT NULL,
|
||
`polls_total` bigint(11) NOT NULL,
|
||
`polls_failed` bigint(11) NOT NULL,
|
||
`availability` float NOT NULL,
|
||
`priority` tinyint(1) NOT NULL,
|
||
PRIMARY KEY (`id`),
|
||
KEY `device_id` (`device_id`)
|
||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=1;",
|
||
|
||
"ALTER TABLE `monitor_hosts`
|
||
ADD CONSTRAINT `monitor_hosts_ibfk_1` FOREIGN KEY (`device_id`)
|
||
REFERENCES `devices` (`id`) ON DELETE CASCADE;",
|
||
|
||
"ALTER TABLE `job_reports` DROP FOREIGN KEY `job_reports_ibfk_3`,
|
||
ADD FOREIGN KEY `job_reports_ibfk_3` ( `transfer_id` )
|
||
REFERENCES `transfers` (`id`) ON DELETE SET NULL ON UPDATE RESTRICT;"
|
||
);
|
||
freenetis/branches/testing/application/views/registration/index.php | ||
---|---|---|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||
<title><?php echo $title ?> | <?php echo $this->settings->get('title') ?></title>
|
||
<?php echo html::stylesheet('media/css/installation.css') ?>
|
||
<?php echo html::stylesheet('media/css/jquery-ui.css') ?>
|
||
<?php echo html::stylesheet('media/css/jquery.validate.password.css') ?>
|
||
<?php echo html::script('media/js/jquery.min', FALSE) ?>
|
||
<?php echo html::script('media/js/jquery-ui.min', FALSE) ?>
|
||
... | ... | |
|
||
$(document).ready(function ()
|
||
{
|
||
$("form").validate();
|
||
$('form').validate();
|
||
});
|
||
|
||
--></script>
|
Také k dispozici: Unified diff
Umozneni ukládani Orientacniho cisla v PSC (#80).
Oprava zobrazeni napovedovych dialogu pri samo-registraci clena.