Files
local_webhooks/classes/service_form.php
T

55 lines
1.8 KiB
PHP
Raw Normal View History

2017-10-23 08:31:09 +04:00
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
2017-11-17 20:14:52 +04:00
* Defines forms.
2017-10-23 08:31:09 +04:00
*
* @package local_webhooks
* @copyright 2017 "Valentin Popov" <info@valentineus.link>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
2018-06-19 22:22:45 +04:00
defined('MOODLE_INTERNAL') || die();
2017-10-23 08:31:09 +04:00
require_once($CFG->libdir . '/formslib.php');
2017-10-25 09:25:54 +04:00
2019-02-17 03:34:52 +04:00
/**
* Description of the form of restoration.
*
* @copyright 2017 "Valentin Popov" <info@valentineus.link>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class service_backup_form extends moodleform {
/**
* Defines the standard structure of the form.
*
* @throws \coding_exception
*/
protected function definition() {
$mform =& $this->_form;
/* Form heading */
$mform->addElement('header', 'editserviceheader', new lang_string('restore', 'moodle'));
/* Download the file */
$mform->addElement('filepicker', 'backupfile', new lang_string('file', 'moodle'));
$mform->addRule('backupfile', null, 'required');
/* Control Panel */
$this->add_action_buttons(true, new lang_string('restore', 'moodle'));
}
}