PM-595 Creacion de Dynaforms a traves de PMtables
Creacion de Dynaforms a traves de PMtables
This commit is contained in:
@@ -289,6 +289,14 @@ class PmTable
|
|||||||
$columnNode->setAttribute( 'size', $column->field_size );
|
$columnNode->setAttribute( 'size', $column->field_size );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($column->field_type == 'DECIMAL') {
|
||||||
|
if ($column->field_size > 2) {
|
||||||
|
$columnNode->setAttribute( 'scale', 2 );
|
||||||
|
} else {
|
||||||
|
$columnNode->setAttribute( 'scale', 1 );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$columnNode->setAttribute( 'required', ($column->field_null ? 'false' : 'true') );
|
$columnNode->setAttribute( 'required', ($column->field_null ? 'false' : 'true') );
|
||||||
|
|
||||||
// only define the primaryKey attribute if it is defined
|
// only define the primaryKey attribute if it is defined
|
||||||
|
|||||||
@@ -206,7 +206,7 @@ try {
|
|||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$idPmtable = $oForm->fields[$id]->pmconnection->pmtable != '' ? $oForm->fields[$id]->pmconnection->pmtable : $oForm->fields[$id]->owner->tree->children[0]->attributes['pmtable'];
|
$idPmtable = isset($oForm->fields[$id]->pmconnection->pmtable) && $oForm->fields[$id]->pmconnection->pmtable != '' ? $oForm->fields[$id]->pmconnection->pmtable : $oForm->fields[$id]->owner->tree->children[0]->attributes['pmtable'];
|
||||||
|
|
||||||
if (!($oAdditionalTables->updateDataInTable($idPmtable, $newValues ))) {
|
if (!($oAdditionalTables->updateDataInTable($idPmtable, $newValues ))) {
|
||||||
//<--This is to know if it is a new registry on the PM Table
|
//<--This is to know if it is a new registry on the PM Table
|
||||||
|
|||||||
@@ -1008,7 +1008,7 @@ function editorFieldsEnableDisable(fieldTypeValue, fieldNull, fieldPrimaryKey, f
|
|||||||
var swI = 1;
|
var swI = 1;
|
||||||
|
|
||||||
//Date
|
//Date
|
||||||
if (fieldTypeValue == "DATE" || fieldTypeValue == "DATETIME" || fieldTypeValue == "TIME") {
|
if (fieldTypeValue == "DATE" || fieldTypeValue == "DATETIME" || fieldTypeValue == "TIMESTAMP" || fieldTypeValue == "TIME") {
|
||||||
swSize = 0; //Disable
|
swSize = 0; //Disable
|
||||||
swPK = 0;
|
swPK = 0;
|
||||||
swAI = 0;
|
swAI = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user