<?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/>. /** * Server-side script for generating response to AJAX search request * Original: block_course_list * * @package block_hshcourselist * @author Mark Johnson <mark.johnson@tauntons.ac.uk>, Edited by Tobias Baden, Hochschule Hannover * @copyright 2010 Tauntons College, UK * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class block_hshcourselist_edit_form extends block_edit_form { protected function specific_definition($mform) { // Blocktitel. $mform->addElement('header', 'titlesettings', get_string('blocksettings_title', 'block_hshcourselist')); $mform->addElement('selectyesno', 'config_enablecustomheader', get_string('enablecustomheader', 'block_hshcourselist')); $mform->setDefault('config_enablecustomheader', 0); $mform->addElement('text', 'config_title', get_string('blocktitle', 'block_hshcourselist')); $mform->setDefault('config_title', get_string('default_blocktitle', 'block_hshcourselist')); $mform->setType('config_title', PARAM_TEXT); // Placeholder Text. $mform->addElement('header', 'placeholdersettings', get_string('placeholder_settings', 'block_hshcourselist')); $mform->addElement('text', 'config_placeholder', get_string('placeholder', 'block_hshcourselist')); $mform->setDefault('config_placeholder', ""); $mform->setType('config_placeholder', PARAM_TEXT); // Displaysettings. $mform->addElement('header', 'displaysettings', get_string('blocksettings_display', 'block_hshcourselist')); $selectoptions = array(0 => get_string('displayZero', 'block_hshcourselist'), 1 => get_string('displayOne', 'block_hshcourselist'), 2 => get_string('displayTwo', 'block_hshcourselist')); $mform->addElement('select', 'config_displaymode', get_string('displaymode', 'block_hshcourselist'), $selectoptions); $mform->setDefault('config_displaymode', 0); $mform->addElement('header', 'footersettings', get_string('blocksettings_footer', 'block_hshcourselist')); // Blockfooter. $mform->addElement('selectyesno', 'config_enablefooter', get_string('enablefooter', 'block_hshcourselist')); $mform->setDefault('config_enablefooter', 0); $mform->addElement('text', 'config_footer', get_string('blockfooter', 'block_hshcourselist')); $mform->setType('config_footer', PARAM_RAW); } }