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
|
//Fires OnAddRow Event
|
||||||
if (this.onaddrow) {
|
if (this.onaddrow) {
|
||||||
this.onaddrow(currentRow);
|
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)
|
this.deleteGridRow = function (sRow, bWithoutConfirm)
|
||||||
@@ -740,12 +743,12 @@ var G_Grid = function(oForm, sGridName){
|
|||||||
for (i = 1; i < oObj.oGrid.rows[iRowAux - 1].cells.length; i++) {
|
for (i = 1; i < oObj.oGrid.rows[iRowAux - 1].cells.length; i++) {
|
||||||
var oCell1 = oObj.oGrid.rows[iRowAux - 1].cells[i];
|
var oCell1 = oObj.oGrid.rows[iRowAux - 1].cells[i];
|
||||||
var oCell2 = oObj.oGrid.rows[iRowAux].cells[i];
|
var oCell2 = oObj.oGrid.rows[iRowAux].cells[i];
|
||||||
|
|
||||||
switch (oCell1.innerHTML.replace(/^\s+|\s+$/g, '').substr(0, 6).toLowerCase()){
|
switch (oCell1.innerHTML.replace(/^\s+|\s+$/g, '').substr(0, 6).toLowerCase()){
|
||||||
case '<input':
|
case '<input':
|
||||||
aObjects1 = oCell1.getElementsByTagName('input');
|
aObjects1 = oCell1.getElementsByTagName('input');
|
||||||
aObjects2 = oCell2.getElementsByTagName('input');
|
aObjects2 = oCell2.getElementsByTagName('input');
|
||||||
|
|
||||||
if (aObjects1 && aObjects2) {
|
if (aObjects1 && aObjects2) {
|
||||||
switch (aObjects2[0].type) {
|
switch (aObjects2[0].type) {
|
||||||
case "file":
|
case "file":
|
||||||
@@ -828,7 +831,7 @@ var G_Grid = function(oForm, sGridName){
|
|||||||
if (( oCell2.innerHTML.indexOf('changeValues') == 111 || oCell2.innerHTML.indexOf('changeValues') == 115 ) ) {
|
if (( oCell2.innerHTML.indexOf('changeValues') == 111 || oCell2.innerHTML.indexOf('changeValues') == 115 ) ) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (oCell2.innerHTML.toLowerCase().indexOf('deletegridrow') == -1) {
|
if (oCell2.innerHTML.toLowerCase().indexOf('deletegridrow') == -1) {
|
||||||
oCell1.innerHTML = oCell2.innerHTML;
|
oCell1.innerHTML = oCell2.innerHTML;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4789,19 +4789,16 @@ class xmlformTemplate extends Smarty
|
|||||||
$value = (isset ( $form->values [$k] )) ? $form->values [$k] : NULL;
|
$value = (isset ( $form->values [$k] )) ? $form->values [$k] : NULL;
|
||||||
$result [$k] = G::replaceDataField ( $form->fields [$k]->label, $form->values );
|
$result [$k] = G::replaceDataField ( $form->fields [$k]->label, $form->values );
|
||||||
if ($form->type == 'xmlform') {
|
if ($form->type == 'xmlform') {
|
||||||
if ($v->type == 'checkgroup' || $v->type == 'radiogroup') {
|
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 {
|
|
||||||
$result[$k] = '<label for="form[' . $k . ']">' . $result[$k] . '</label>';
|
$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 )) {
|
if (! is_array ( $value )) {
|
||||||
|
|||||||
Reference in New Issue
Block a user