Merge branch 'MDL-48898' of git://github.com/timhunt/moodle
This commit is contained in:
@@ -3414,10 +3414,36 @@ class admin_setting_configduration extends admin_setting {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Seconds duration setting with an advanced checkbox, that controls a additional
|
||||
* $name.'_adv' setting.
|
||||
*
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
* @copyright 2014 The Open University
|
||||
*/
|
||||
class admin_setting_configduration_with_advanced extends admin_setting_configduration {
|
||||
/**
|
||||
* Constructor
|
||||
* @param string $name unique ascii name, either 'mysetting' for settings that in config,
|
||||
* or 'myplugin/mysetting' for ones in config_plugins.
|
||||
* @param string $visiblename localised name
|
||||
* @param string $description localised long description
|
||||
* @param array $defaultsetting array of int value, and bool whether it is
|
||||
* is advanced by default.
|
||||
* @param int $defaultunit - day, week, etc. (in seconds)
|
||||
*/
|
||||
public function __construct($name, $visiblename, $description, $defaultsetting, $defaultunit = 86400) {
|
||||
parent::__construct($name, $visiblename, $description, $defaultsetting['value'], $defaultunit);
|
||||
$this->set_advanced_flag_options(admin_setting_flag::ENABLED, !empty($defaultsetting['adv']));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Used to validate a textarea used for ip addresses
|
||||
*
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
* @copyright 2011 Petr Skoda (http://skodak.org)
|
||||
*/
|
||||
class admin_setting_configiplist extends admin_setting_configtextarea {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user