this bug 6305 was fixed, now the fields of type int are checked into webEntry
This commit is contained in:
@@ -529,6 +529,58 @@ class Step extends BaseStep {
|
||||
|
||||
return StepPeer::doSelect($c);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the uids of the grids into a xml form
|
||||
*
|
||||
* @param string $sproUid the uid of the process
|
||||
* @param string $sdbsUid the uid of the db connection
|
||||
* @author krlos <carlos@colosa.com>
|
||||
*/
|
||||
function lookingforUidGrids($sproUid,$sObjUID) {
|
||||
|
||||
require_once ( "classes/model/DynaformPeer.php" );
|
||||
G::LoadSystem('dynaformhandler');
|
||||
$uidsGrids=array();
|
||||
$oC = new Criteria('workflow');
|
||||
$oC->add(DynaformPeer::DYN_UID, $sObjUID);
|
||||
$oC->add(DynaformPeer::PRO_UID, $sproUid);
|
||||
$oDataset = DynaformPeer::doSelectRS($oC);
|
||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$oDataset->next();
|
||||
$aRow = $oDataset->getRow();
|
||||
|
||||
if($aRow['DYN_TYPE']=='xmlform') {
|
||||
|
||||
$oC1 = new Criteria('workflow');
|
||||
$oC1->add(DynaformPeer::PRO_UID, $sproUid);
|
||||
$oC1->add(DynaformPeer::DYN_TYPE, "xmlform");
|
||||
$oDataset = DynaformPeer::doSelectRS($oC1);
|
||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
while($oDataset->next()){
|
||||
$aRow1 = $oDataset->getRow();
|
||||
|
||||
$dynHandler = new dynaFormHandler(PATH_DYNAFORM.$sproUid."/".$sObjUID.".xml");
|
||||
$dynFields = $dynHandler->getFields();
|
||||
$sxmlgrid = '';
|
||||
$sType = '';
|
||||
$check=0;
|
||||
foreach($dynFields as $field){
|
||||
$sType = $this->getAttribute($field, 'type');
|
||||
|
||||
if($sType == 'grid'){
|
||||
$sxmlgrid = $this->getAttribute($field, 'xmlgrid');
|
||||
//print_r($sxmlgrid);print"<hr>";
|
||||
$aGridInfo= explode("/",$sxmlgrid);
|
||||
$uidsGrids[]=$aGridInfo[1];
|
||||
}
|
||||
}
|
||||
}
|
||||
return ($uidsGrids);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} // Step
|
||||
|
||||
|
||||
@@ -138,7 +138,11 @@ try {
|
||||
$pluginTpl = PATH_CORE . 'templates' . PATH_SEP . 'processes' . PATH_SEP . 'webentry.tpl';
|
||||
$template = new TemplatePower ( $pluginTpl );
|
||||
$template->prepare ();
|
||||
|
||||
require_once 'classes/model/Step.php';
|
||||
$oStep = new Step();
|
||||
$sUidGrids = $oStep->lookingforUidGrids($sPRO_UID,$sDYNAFORM);
|
||||
|
||||
|
||||
$template->assign ( 'siteUrl', $http . $_SERVER['HTTP_HOST'] );
|
||||
$template->assign ( 'sysSys', SYS_SYS );
|
||||
$template->assign ( 'sysLang', SYS_LANG );
|
||||
@@ -150,6 +154,14 @@ try {
|
||||
$template->assign ( 'formId', $G_FORM->id );
|
||||
$template->assign ( 'scriptCode', $scriptCode );
|
||||
|
||||
if(sizeof($sUidGrids)>0){
|
||||
foreach($sUidGrids as $k => $v){
|
||||
$template->newBlock( 'grid_uids' );
|
||||
$template->assign ( 'siteUrl', $http . $_SERVER['HTTP_HOST'] );
|
||||
$template->assign ( 'gridFileName', $sPRO_UID . '/' . $v );
|
||||
}
|
||||
}
|
||||
|
||||
print_r ( '<textarea cols="70" rows="20">' . htmlentities ( str_replace ( '</body>', '</form></body>', str_replace ( '</form>', '', $template->getOutputContent () ) ) ) . '</textarea>' );
|
||||
}
|
||||
|
||||
@@ -158,4 +170,6 @@ try {
|
||||
$aMessage['MESSAGE'] = $e->getMessage ();
|
||||
$G_PUBLISH->AddContent ( 'xmlform', 'xmlform', 'login/showMessage', '', $aMessage );
|
||||
G::RenderPage ( 'publish', 'raw' );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -7,6 +7,9 @@
|
||||
<script type="text/javascript" src="{siteUrl}/jsform/gulliver/dynaforms_Options.js"></script>
|
||||
|
||||
<script type="text/javascript" src="{siteUrl}/jsform/{dynFileName}.js"></script>
|
||||
<!-- START BLOCK : grid_uids -->
|
||||
<script type="text/javascript" src="{siteUrl}/jsform/{gridFileName}.js"></script>
|
||||
<!-- END BLOCK : grid_uids -->
|
||||
<script type="text/javascript">
|
||||
var leimnud = new maborak();
|
||||
leimnud.make();
|
||||
@@ -40,4 +43,4 @@
|
||||
<input type="hidden" name="DYNAFORM" value="{dynaformUid}">
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user