MDL-20204 replaced html_button
This commit is contained in:
@@ -2484,7 +2484,7 @@ function button_to_popup_window ($url, $name=null, $linkname=null,
|
||||
throw new coding_exception('A link must have a descriptive text value! See $OUTPUT->action_link() for usage.');
|
||||
}
|
||||
|
||||
// Create a html_button object
|
||||
// Create a single_button object
|
||||
$form = new single_button($url, $text, 'post');
|
||||
$form->button->title = $title;
|
||||
$form->button->id = $id;
|
||||
|
||||
@@ -1657,46 +1657,6 @@ class html_table_cell extends html_component {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Component representing a XHTML button (input of type 'button').
|
||||
* The renderer will either output it as a button with an onclick event,
|
||||
* or as a form with hidden inputs.
|
||||
*
|
||||
* @copyright 2009 Nicolas Connault
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
* @since Moodle 2.0
|
||||
*/
|
||||
class html_button extends labelled_html_component {
|
||||
/**
|
||||
* @var string $text
|
||||
*/
|
||||
public $text;
|
||||
|
||||
/**
|
||||
* @var boolean $disabled Whether or not this button is disabled
|
||||
*/
|
||||
public $disabled = false;
|
||||
|
||||
/**
|
||||
* @see lib/html_component#prepare()
|
||||
* @return void
|
||||
*/
|
||||
public function prepare(renderer_base $output, moodle_page $page, $target) {
|
||||
$this->add_class('singlebutton');
|
||||
|
||||
if (empty($this->text)) {
|
||||
$this->text = get_string('submit');
|
||||
}
|
||||
|
||||
if ($this->disabled) {
|
||||
$this->disabled = 'disabled';
|
||||
}
|
||||
|
||||
parent::prepare($output, $page, $target);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Component representing a list.
|
||||
*
|
||||
|
||||
@@ -1257,7 +1257,7 @@ class core_renderer extends renderer_base {
|
||||
* @param pix_icon $icon
|
||||
* @return string HTML fragment
|
||||
*/
|
||||
public function render_pix_icon(pix_icon $icon) {
|
||||
protected function render_pix_icon(pix_icon $icon) {
|
||||
$attributes = $icon->attributes;
|
||||
$attributes['src'] = $this->pix_url($icon->pix, $icon->component);
|
||||
return html_writer::empty_tag('img', $attributes);
|
||||
|
||||
Reference in New Issue
Block a user