mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-27 00:58:55 +01:00
No longer using document write to add icon (to not display it if user
has javascript switched off, as we require it now and it makes problems with the new etemplate rendering)
This commit is contained in:
parent
7520c468c7
commit
8d93ce6fbb
@ -134,16 +134,15 @@ class jscalendar
|
||||
}
|
||||
return
|
||||
'<input type="text" id="'.$name.'" name="'.$name.'" size="10" value="'.htmlspecialchars($date).'"'.$options.'/>
|
||||
<script type="text/javascript">'.(!$useicon ? '
|
||||
document.getElementById("'.$name.'").readOnly=true;
|
||||
' : '
|
||||
document.writeln(\'<img id="'.$name.'-trigger" src="'.common::find_image('phpgwapi','datepopup').'" title="'.lang('Select date').'" style="cursor:pointer; cursor:hand;"/>\');').'
|
||||
Calendar.setup(
|
||||
{
|
||||
inputField : "'.$name.'",'.(!$useicon ? '' : '
|
||||
button : "'.$name.'-trigger"').'
|
||||
}
|
||||
);
|
||||
'.($useicon ? '<img id="'.$name.'-trigger" src="'.common::find_image('phpgwapi','datepopup').'" title="'.lang('Select date').'" style="cursor:pointer; cursor:hand;">' : '').
|
||||
'<script type="text/javascript">
|
||||
'.(!$useicon ? 'document.getElementById("'.$name.'").readOnly=true;' : '').
|
||||
'Calendar.setup(
|
||||
{
|
||||
inputField : "'.$name.'",'.(!$useicon ? '' : '
|
||||
button : "'.$name.'-trigger"').'
|
||||
}
|
||||
);
|
||||
</script>
|
||||
';
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user