Chamilo is a learning management system focused on ease of use and accessibility
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
chamilo-lms/plugin/vchamilo/lib/QuickForm/cancel.php

60 lines
1.5 KiB

<?php
require_once('HTML/QuickForm/submit.php');
/**
* HTML class for a submit type element
*
* @author Valery Fremaux
* @access public
*/
class HTML_QuickForm_cancel extends HTML_QuickForm_button
{
// {{{ constructor
/**
* Class constructor
*
* @since 1.0
* @access public
* @return void
*/
function HTML_QuickForm_cancel($elementName=null, $value=null, $escapeurl=null, $attributes = null)
{
if ($elementName==null){
$elementName = 'cancel';
}
if ($value == null){
$value = get_lang('cancel');
}
parent::HTML_QuickForm_button($elementName, $value, $attributes);
if ($escapeurl!=null){
$this->updateAttributes(array('onclick'=>'window.location.href = "'.$escapeurl.'"; return true;'));
}
} //end constructor
function onQuickFormEvent($event, $arg, &$caller){
$value = $arg[0];
$escapeurl = $arg[1];
if ($value != null){
$this->updateAttributes(array('value'=> $value));
}
if ($escapeurl != null){
$this->updateAttributes(array('onclick'=>'window.location.href = "'.$escapeurl.'"; return true;'));
}
return true;
}
function getFrozenHtml(){
return HTML_QuickForm_submit::getFrozenHtml();
}
function freeze(){
return HTML_QuickForm_submit::freeze();
}
// }}}
} //end class MoodleQuickForm_cancel