MASTER I add functinality label an addRoww to focus
I add functinality label an addRoww to focus
This commit is contained in:
@@ -685,6 +685,14 @@ var G_Grid = function(oForm, sGridName){
|
|||||||
if (this.onaddrow) {
|
if (this.onaddrow) {
|
||||||
this.onaddrow(currentRow);
|
this.onaddrow(currentRow);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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)
|
||||||
|
|||||||
@@ -4781,7 +4781,9 @@ class xmlformTemplate extends Smarty
|
|||||||
function getFields(&$form, $therow = -1)
|
function getFields(&$form, $therow = -1)
|
||||||
{
|
{
|
||||||
$result = array ();
|
$result = array ();
|
||||||
|
|
||||||
foreach ( $form->fields as $k => $v ) {
|
foreach ( $form->fields as $k => $v ) {
|
||||||
|
|
||||||
if ($form->mode != '') { #@ last modification: erik
|
if ($form->mode != '') { #@ last modification: erik
|
||||||
$v->mode = $form->mode; #@
|
$v->mode = $form->mode; #@
|
||||||
} #@
|
} #@
|
||||||
@@ -4789,8 +4791,21 @@ 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') {
|
||||||
|
$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>';
|
$result[$k] = '<label for="form[' . $k . ']">' . $result[$k] . '</label>';
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
$result[$k] = '<label for="form[' . $k . ']">' . $result[$k] . '</label>';
|
||||||
|
}
|
||||||
|
}
|
||||||
if (! is_array ( $value )) {
|
if (! is_array ( $value )) {
|
||||||
if ($form->type == 'grid') {
|
if ($form->type == 'grid') {
|
||||||
$aAux = array();
|
$aAux = array();
|
||||||
|
|||||||
Reference in New Issue
Block a user