Fixing label + fatal error when including file.

skala
Julio Montoya 13 years ago
parent 801a06a384
commit b6dab79773
  1. 2
      main/exercice/exercise.class.php
  2. 2
      main/exercice/exercise_admin.php
  3. 25
      main/inc/lib/formvalidator/Element/tbl_change.js.php

@ -1431,7 +1431,7 @@ class Exercise
'<a href="javascript://" onclick=" return advanced_parameters()">
<span id="img_plus_and_minus">
<div style="vertical-align:top;" >
'.Display::return_icon('div_show.gif').' '.addslashes(api_htmlentities(get_lang('AdvancedParameters'))).'</div>
'.Display::return_icon('div_show.gif').' '.addslashes(get_lang('AdvancedParameters')).'</div>
</span>
</a>'
);

@ -72,7 +72,7 @@ $htmlHeadXtra[] = '<script>
complete_text: "'.get_lang('StartToType').'",
firstselected: false,
onselect: check,
oncreate: add_item,
//oncreate: add_item,
filter_selected: true,
newel: true
});

@ -1,6 +1,7 @@
<?php
/* For licensing terms, see /license.txt */
require '../../../global.inc.php';
$app['default_layout'] = $app['template_style'].'/layout/blank.tpl';
?>
var day;
var month;
@ -27,13 +28,13 @@ function openCalendar(form, field) {
if (regex.test(forminputs[i].getAttribute('name'))) {
datevalues[dateindex++] = forminputs[i].value;
}
}
}
window.open("<?php echo api_get_path(WEB_LIBRARY_PATH); ?>formvalidator/Element/calendar_popup.php", "calendar", "width=260,height=230,status=no");
day = datevalues[0];
month = datevalues[1];
year = datevalues[2];
month--;
formName = form;
fieldName =field;
@ -164,7 +165,7 @@ function initCalendar() {
* @param string date text
*/
function returnDate(d,m,y) {
formblock= window.opener.document.getElementById(window.opener.formName);
forminputs = formblock.getElementsByTagName('select');
var datevalues = new Array();
@ -172,25 +173,25 @@ function returnDate(d,m,y) {
for (i = 0; i < forminputs.length; i++) {
// regex here to check name attribute
var regex = new RegExp(window.opener.fieldName, "i");
if (regex.test(forminputs[i].getAttribute('name'))) {
if (regex.test(forminputs[i].getAttribute('name'))) {
datevalues[dateindex] = forminputs[i];
dateindex++;
window.close();
}
}
datevalues[0].selectedIndex = (d-1) ;
datevalues[0].selectedIndex = (d-1) ;
datevalues[1].selectedIndex = m;
date = new Date();
//Selecting the first option of the year
year = datevalues[2].options[0].value;
year = datevalues[2].options[0].value;
datevalues[2].selectedIndex = y - year;
for(i = 0; i<= 3; i++) {
attributes = datevalues[i].attributes;
for (attr=0; attr<attributes.length; attr++)
if(attributes[attr].nodeName == 'onchange') {
if(attributes[attr].nodeName == 'onchange') {
datevalues[i].onchange();
}
}

Loading…
Cancel
Save