fix for enable the onchange event in the new calendar widget
This commit is contained in:
@@ -2914,6 +2914,7 @@ class XmlForm_Field_Date extends XmlForm_Field_SimpleText
|
||||
public $dependentFields = '';
|
||||
public $editable;
|
||||
var $hint;
|
||||
var $onchange;
|
||||
/**
|
||||
* Verify the format of a date
|
||||
* @param <Date> $date
|
||||
@@ -3120,6 +3121,12 @@ class XmlForm_Field_Date extends XmlForm_Field_SimpleText
|
||||
}
|
||||
}
|
||||
|
||||
//onchange
|
||||
if( isset($this->onchange) && $this->onchange != '' )
|
||||
$onchange = 'onchange="'.$this->onchange.'"';
|
||||
else
|
||||
$onchange = '';
|
||||
|
||||
#the validations field was moved to javascript routines ;)
|
||||
if ($this->mode == 'edit') {
|
||||
if( $startDate=='1969-12-31' ) {
|
||||
@@ -3140,13 +3147,13 @@ class XmlForm_Field_Date extends XmlForm_Field_SimpleText
|
||||
$sizeend = $maskleng + 2;
|
||||
}
|
||||
if ( $this->editable != "0") {
|
||||
$html = '<input id="'.$pID.'" name="'.$pID.'" class="module_app_input___gray" size="'.$sizeend.'" value="'.$value.'"/>
|
||||
<a onclick="removeValue(\''.$pID.'\'); return false;"/> <img src="/images/icons_silk/calendar_x_button.png" style="position:relative;left:-17px;top:5px;"/></a>
|
||||
<a id="'.$pID.'[btn]" onmouseover="datePicker4(this, \''.$pID.'\', \''.$mask.'\', \''.$startDate.'\', \''.$endDate.'\','.$Time.')"><img src="/images/pmdateicon.png" border="0" width="12" height="12" style="position:relative;left:-17px;top:0px;"/></a>';
|
||||
$html = '<input id="'.$pID.'" name="'.$pID.'" '.$onchange.' class="module_app_input___gray" size="'.$sizeend.'" value="'.$value.'"/>
|
||||
<a onclick="removeValue(\''.$pID.'\'); return false;"/> <img src="/images/icons_silk/calendar_x_button.png" style="position:relative;left:-17px;top:5px;"/></a>
|
||||
<a id="'.$pID.'[btn]" onmouseover="datePicker4(this, \''.$pID.'\', \''.$mask.'\', \''.$startDate.'\', \''.$endDate.'\','.$Time.')"><img src="/images/pmdateicon.png" border="0" width="12" height="12" style="position:relative;left:-17px;top:0px;"/></a>';
|
||||
} else {
|
||||
$html = '<input id="'.$pID.'" name="'.$pID.'" class="module_app_input___gray" size="'.$sizeend.'" value="'.$value.'" readonly/>
|
||||
<a onclick="removeValue(\''.$pID.'\'); return false;"/> <img src="/images/icons_silk/calendar_x_button.png" style="position:relative;left:-17px;top:5px;"/></a>
|
||||
<a id="'.$pID.'[btn]" onmouseover="datePicker4(this, \''.$pID.'\', \''.$mask.'\', \''.$startDate.'\', \''.$endDate.'\', '.$Time.')"><img src="/images/pmdateicon.png" border="0" width="12" height="12" style="position:relative;left:-17px;top:0px;"/></a>';
|
||||
$html = '<input id="'.$pID.'" name="'.$pID.'" '.$onchange.' class="module_app_input___gray" size="'.$sizeend.'" value="'.$value.'" readonly/>
|
||||
<a onclick="removeValue(\''.$pID.'\'); return false;"/> <img src="/images/icons_silk/calendar_x_button.png" style="position:relative;left:-17px;top:5px;"/></a>
|
||||
<a id="'.$pID.'[btn]" onmouseover="datePicker4(this, \''.$pID.'\', \''.$mask.'\', \''.$startDate.'\', \''.$endDate.'\', '.$Time.')"><img src="/images/pmdateicon.png" border="0" width="12" height="12" style="position:relative;left:-17px;top:0px;"/></a>';
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user