Merge pull request #752 from julceslauhub/master
Fix issues with dorms accesibility (Stanford)
This commit is contained in:
@@ -681,17 +681,20 @@ var G_Grid = function(oForm, sGridName){
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Set focus the first element in the grid
|
||||
for (var i = 0; i < this.aFields.length; i++) {
|
||||
var fieldName = 'form[' + sGridName + '][' + currentRow + '][' + this.aFields[i].sFieldName + ']';
|
||||
if (this.aFields[i].sType != 'file' && document.getElementById(fieldName).focus) {
|
||||
document.getElementById(fieldName).focus();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//Fires OnAddRow Event
|
||||
if (this.onaddrow) {
|
||||
this.onaddrow(currentRow);
|
||||
}
|
||||
var newInputs = oNewRow.getElementsByTagName('input');
|
||||
for (var i = 0; i < newInputs.length; i++) {
|
||||
if (typeof(newInputs[i]) != 'undefined' && newInputs[i].type != 'hidden') {
|
||||
newInputs[i].focus();
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
this.deleteGridRow = function (sRow, bWithoutConfirm)
|
||||
|
||||
@@ -4789,19 +4789,16 @@ class xmlformTemplate extends Smarty
|
||||
$value = (isset ( $form->values [$k] )) ? $form->values [$k] : NULL;
|
||||
$result [$k] = G::replaceDataField ( $form->fields [$k]->label, $form->values );
|
||||
if ($form->type == 'xmlform') {
|
||||
if ($v->type == 'checkgroup' || $v->type == 'radiogroup') {
|
||||
$firstValueOptions = '';
|
||||
foreach ($v->options as $indexOption => $valueOptions) {
|
||||
$firstValueOptions = $indexOption;
|
||||
break;
|
||||
}
|
||||
if ($firstValueOptions != '') {
|
||||
$result[$k] = '<label for="form[' . $k . '][' . $firstValueOptions . ']">' . $result[$k] . '</label>';
|
||||
} else {
|
||||
$result[$k] = '<label for="form[' . $k . ']">' . $result[$k] . '</label>';
|
||||
}
|
||||
} else {
|
||||
if ($v->type != 'checkgroup' && $v->type != 'radiogroup') {
|
||||
$result[$k] = '<label for="form[' . $k . ']">' . $result[$k] . '</label>';
|
||||
} else {
|
||||
if (is_array($v->options)) {
|
||||
foreach ($v->options as $optionValue => $optionLabel) {
|
||||
if (isset($form->fields[$k]->options[$optionValue])) {
|
||||
$form->fields[$k]->options[$optionValue] = '<label for="form[' . $k . '][' . $optionValue . ']">' . $form->fields[$k]->options[$optionValue] . '</label>';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (! is_array ( $value )) {
|
||||
|
||||
Reference in New Issue
Block a user