MDL-20204 replaced html_button

This commit is contained in:
Petr Skoda
2010-02-16 17:33:13 +00:00
parent 0029a91734
commit ce0110bf95
3 changed files with 2 additions and 42 deletions
+1 -1
View File
@@ -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;
-40
View File
@@ -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.
*
+1 -1
View File
@@ -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);