Merged in bugfix/PMC-1100 (pull request #7049)
PMC-1100 Approved-by: Paula Quispe <paula.quispe@processmaker.com>
This commit is contained in:
@@ -27,37 +27,37 @@
|
|||||||
*/
|
*/
|
||||||
if (!((isset($_SESSION['USER_LOGGED']))&&(!(isset($_GET['sid']))))||!isset($_SESSION['Current_Dynafom'])) {
|
if (!((isset($_SESSION['USER_LOGGED']))&&(!(isset($_GET['sid']))))||!isset($_SESSION['Current_Dynafom'])) {
|
||||||
$oHeadPublisher = headPublisher::getSingleton();
|
$oHeadPublisher = headPublisher::getSingleton();
|
||||||
$oHeadPublisher->addScriptCode("
|
$oHeadPublisher->addScriptCode("
|
||||||
window.parent.location.href = '../processes/mainInit';
|
window.parent.location.href = '../processes/mainInit';
|
||||||
");
|
");
|
||||||
G::RenderPage('publish');
|
G::RenderPage('publish');
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<link type="text/css" href="/js/jquery/css/redmond/jquery-ui-1.7.2.custom.css" rel="stylesheet" />
|
<link type="text/css" href="/js/jquery/css/redmond/jquery-ui-1.7.2.custom.css" rel="stylesheet" />
|
||||||
<link type="text/css" href="/skin/<?php echo SYS_SKIN;?>/style.css" rel="stylesheet" />
|
<link type="text/css" href="/skin/<?php echo SYS_SKIN;?>/style.css" rel="stylesheet" />
|
||||||
<style> body{ background-color: #fff; }</style>
|
<style> body{ background-color: #fff; }</style>
|
||||||
<script type="text/javascript" src="/js/jquery/jquery-1.3.2.min.js"></script>
|
<script type="text/javascript" src="/js/jquery/jquery-1.3.2.min.js"></script>
|
||||||
<script type="text/javascript" src="/js/jquery/jquery-ui-1.7.2.custom.min.js"></script>
|
<script type="text/javascript" src="/js/jquery/jquery-ui-1.7.2.custom.min.js"></script>
|
||||||
<script type="text/javascript" src="/jscore/dynaforms/dynaforms_fieldsHandler.js"></script>
|
<script type="text/javascript" src="/jscore/dynaforms/dynaforms_fieldsHandler.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<?php
|
<?php
|
||||||
$content = file_get_contents(PATH_DYNAFORM.$_SESSION['Current_Dynafom']['Parameters']['FILE'].".xml");
|
$content = file_get_contents(PATH_DYNAFORM.$_SESSION['Current_Dynafom']['Parameters']['FILE'].".xml");
|
||||||
$oXxml = G::xmlParser($content);
|
$oXxml = G::xmlParser($content);
|
||||||
|
|
||||||
if (!isset($oXxml->result['dynaForm']['__CONTENT__'])) {
|
if (!isset($oXxml->result['dynaForm']['__CONTENT__'])) {
|
||||||
?>
|
?>
|
||||||
<br/>
|
<br/>
|
||||||
<div class="ui-widget-header ui-corner-all" style="height:17px" align="center">
|
<div class="ui-widget-header ui-corner-all" style="height:17px" align="center">
|
||||||
<?php echo G::loadTranslation('ID_NO_FIELD_FOUND')?>
|
<?php echo G::loadTranslation('ID_NO_FIELD_FOUND')?>
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
parent.document.getElementById('light').style.display='none';
|
parent.document.getElementById('light').style.display='none';
|
||||||
parent.document.getElementById('fade').style.display='none';
|
parent.document.getElementById('fade').style.display='none';
|
||||||
</script>
|
</script>
|
||||||
<?php
|
<?php
|
||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
@@ -73,58 +73,58 @@
|
|||||||
$hidden_fields = G::decrypt($boot_strap['__ATTRIBUTES__']['meta'], 'dynafieldsHandler');
|
$hidden_fields = G::decrypt($boot_strap['__ATTRIBUTES__']['meta'], 'dynafieldsHandler');
|
||||||
//echo $hidden_fields;
|
//echo $hidden_fields;
|
||||||
$hidden_fields_list = explode(',', $hidden_fields);
|
$hidden_fields_list = explode(',', $hidden_fields);
|
||||||
unset($elements[$node_name]); ?>
|
unset($elements[$node_name]); ?>
|
||||||
<script>
|
<script>
|
||||||
parent.jsMeta = "<?php echo $boot_strap['__ATTRIBUTES__']['meta'] ?>";
|
parent.jsMeta = "<?php echo $boot_strap['__ATTRIBUTES__']['meta'] ?>";
|
||||||
</script>
|
</script>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<body>
|
<body>
|
||||||
<table border="0" width="100%" cellpadding="0" cellspacing="0" class="fieldshandler_item">
|
<table border="0" width="100%" cellpadding="0" cellspacing="0" class="fieldshandler_item">
|
||||||
<tr>
|
<tr>
|
||||||
<td width="15%" valign="top" align="left">
|
<td width="15%" valign="top" align="left">
|
||||||
<a href='#' onclick="return false;" onmouseout="parent.hideTooltip()" onmouseover="parent.showTooltip(event,document.getElementById('help').innerHTML);return false;">
|
<a href='#' onclick="return false;" onmouseout="parent.hideTooltip()" onmouseover="parent.showTooltip(event,document.getElementById('help').innerHTML);return false;">
|
||||||
<image src="/images/help4.gif" width="16" height="16" border="0"/>
|
<image src="/images/help4.gif" width="16" height="16" border="0"/>
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<td valign="top" width="990px"><center>
|
<td valign="top" width="990px"><center>
|
||||||
|
|
||||||
<div style="width:100%">
|
<div style="width:100%">
|
||||||
<div class="ui-widget-header ui-corner-all" style="height:17px">
|
<div class="ui-widget-header ui-corner-all" style="height:17px">
|
||||||
<table border="0" width="100%" cellpadding="0" cellspacing="0">
|
<table border="0" width="100%" cellpadding="0" cellspacing="0">
|
||||||
<td width="7%"><div style="font-size:9px; color:#fff;" align="left"> <b><?php echo G::loadTranslation('ID_VISIBLE')?></b></div></td>
|
<td width="7%"><div style="font-size:9px; color:#fff;" align="left"> <b><?php echo G::loadTranslation('ID_VISIBLE')?></b></div></td>
|
||||||
<td width="15%"><div style="font-size:12px;color:#fff; font-weight:bold" align="left"> <?php echo G::loadTranslation('ID_TYPE')?></div></td>
|
<td width="15%"><div style="font-size:12px;color:#fff; font-weight:bold" align="left"> <?php echo G::loadTranslation('ID_TYPE')?></div></td>
|
||||||
<td width="28%"><div style="font-size:12px;color:#fff; font-weight:bold" align="left"> <?php echo G::loadTranslation('ID_NAME')?></div></td>
|
<td width="28%"><div style="font-size:12px;color:#fff; font-weight:bold" align="left"> <?php echo G::loadTranslation('ID_NAME')?></div></td>
|
||||||
<td width="6"><div style="font-size:12px;color:#fff; font-weight:bold" align="left"> <?php echo G::loadTranslation('ID_LABEL')?></div></td>
|
<td width="6"><div style="font-size:12px;color:#fff; font-weight:bold" align="left"> <?php echo G::loadTranslation('ID_LABEL')?></div></td>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="dynafields">
|
<div id="dynafields">
|
||||||
<ul id="sortable" style="margin:0; padding:0;">
|
<ul id="sortable" style="margin:0; padding:0;">
|
||||||
<?php foreach ($elements as $node_name=>$node) {
|
<?php foreach ($elements as $node_name=>$node) {
|
||||||
if (isset($hidden_fields_list)) {
|
if (isset($hidden_fields_list)) {
|
||||||
$checked = !(in_array($node_name, $hidden_fields_list))? 'checked="checked"': '';
|
$checked = !(in_array($node_name, $hidden_fields_list))? 'checked="checked"': '';
|
||||||
} else {
|
} else {
|
||||||
$checked = 'checked="checked"';
|
$checked = 'checked="checked"';
|
||||||
} ?>
|
} ?>
|
||||||
<li style="list-style:none;" id="<?php echo $node_name?>" class="ui-state-default" onmouseover="setClass(this, 'ui-state-hover')" onmouseout="setClass(this, 'ui-state-default')">
|
<li style="list-style:none;" id="<?php echo $node_name?>" class="ui-state-default" onmouseover="setClass(this, 'ui-state-hover')" onmouseout="setClass(this, 'ui-state-default')">
|
||||||
<table class="dynalist" border="0" width="100%" cellpadding="0" cellspacing="0" id="fieldshandler_items_table">
|
<table class="dynalist" border="0" width="100%" cellpadding="0" cellspacing="0" id="fieldshandler_items_table">
|
||||||
<tr>
|
<tr>
|
||||||
<td width="7%">
|
<td width="7%">
|
||||||
<?php if ($node['__ATTRIBUTES__']['type'] != 'javascript' && $dynaformType != 'grid') {
|
<?php if ($node['__ATTRIBUTES__']['type'] != 'javascript' && $dynaformType != 'grid') {
|
||||||
?>
|
?>
|
||||||
<input id="chk@<?php echo $node_name?>" type="checkbox" onclick="parent.jsMeta = fieldsHandlerSaveHidden();" <?php echo $checked?> />
|
<input id="chk@<?php echo $node_name?>" type="checkbox" onclick="parent.jsMeta = fieldsHandlerSaveHidden();" <?php echo $checked?> />
|
||||||
<?php
|
<?php
|
||||||
} else {
|
} else {
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
} ?>
|
} ?>
|
||||||
</td>
|
</td>
|
||||||
<td width="15%" >
|
<td width="15%" >
|
||||||
<?php $type = $node['__ATTRIBUTES__']['type'];
|
<?php $type = $node['__ATTRIBUTES__']['type'];
|
||||||
switch ($type) {
|
switch ($type) {
|
||||||
case 'yesno': $type = 'yes_no'; break;
|
case 'yesno': $type = 'yes_no'; break;
|
||||||
@@ -132,23 +132,23 @@
|
|||||||
case 'checkgroup': $type = 'check_group'; break;
|
case 'checkgroup': $type = 'check_group'; break;
|
||||||
case 'radiogroup': $type = 'radio_group'; break;
|
case 'radiogroup': $type = 'radio_group'; break;
|
||||||
case 'file': $type = 'upload_files'; break;
|
case 'file': $type = 'upload_files'; break;
|
||||||
} ?>
|
} ?>
|
||||||
<?php if (is_file(PATH_HTML.'images'.PATH_SEP.'dynamicForm'.PATH_SEP."$type.gif")) {
|
<?php if (is_file(PATH_HTML.'images'.PATH_SEP.'dynamicForm'.PATH_SEP."$type.gif")) {
|
||||||
?>
|
?>
|
||||||
<img src="/images/dynamicForm/<?php echo $type?>.gif"/>
|
<img src="/images/dynamicForm/<?php echo $type?>.gif"/>
|
||||||
<?php
|
<?php
|
||||||
} else {
|
} else {
|
||||||
?>
|
?>
|
||||||
<img src="/images/unknown_icon.gif" border="0" width="20" height="16"/>
|
<img src="/images/unknown_icon.gif" border="0" width="20" height="16"/>
|
||||||
<?php
|
<?php
|
||||||
} ?>
|
} ?>
|
||||||
<span style="font-size:10px;"> <?php echo "({$node['__ATTRIBUTES__']['type']})"; ?></span>
|
<span style="font-size:10px;"> <?php echo "({$node['__ATTRIBUTES__']['type']})"; ?></span>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td width="28%" style="font-size:12px;">
|
<td width="28%" style="font-size:12px;">
|
||||||
<?php echo "$node_name"; ?>
|
<?php echo "$node_name"; ?>
|
||||||
</td>
|
</td>
|
||||||
<td><p style="font-size:12px; color:#1C3166; font-weight:bold">
|
<td><p style="font-size:12px; color:#1C3166; font-weight:bold">
|
||||||
<?php if (isset($node["__CONTENT__"][SYS_LANG]["__VALUE__"]) && $node["__CONTENT__"][SYS_LANG]["__VALUE__"] != "") {
|
<?php if (isset($node["__CONTENT__"][SYS_LANG]["__VALUE__"]) && $node["__CONTENT__"][SYS_LANG]["__VALUE__"] != "") {
|
||||||
if (strlen($node['__CONTENT__'][SYS_LANG]['__VALUE__']) > 30) {
|
if (strlen($node['__CONTENT__'][SYS_LANG]['__VALUE__']) > 30) {
|
||||||
$label = substr(trim(strip_tags(G::stripCDATA($node['__CONTENT__'][SYS_LANG]['__VALUE__']))), 0, 30) . '...';
|
$label = substr(trim(strip_tags(G::stripCDATA($node['__CONTENT__'][SYS_LANG]['__VALUE__']))), 0, 30) . '...';
|
||||||
@@ -158,98 +158,97 @@
|
|||||||
print($label);
|
print($label);
|
||||||
} else {
|
} else {
|
||||||
print(" ");
|
print(" ");
|
||||||
} ?></p>
|
} ?></p>
|
||||||
</td>
|
</td>
|
||||||
<td width="40px" class="options" align="right">
|
<td width="40px" class="options" align="right">
|
||||||
<?php if (in_array($node['__ATTRIBUTES__']['type'], $_POST['fieldsList'])) {
|
<?php if (in_array($node['__ATTRIBUTES__']['type'], $_POST['fieldsList'])) {
|
||||||
?>
|
?>
|
||||||
<!-- <div class="tool"><img src="/images/options.png" width="12" height="12" border="0"/> </div>-->
|
<!-- <div class="tool"><img src="/images/options.png" width="12" height="12" border="0"/> </div>-->
|
||||||
<div class="jq-checkpointSubhead" style="display:block">
|
<div class="jq-checkpointSubhead" style="display:block">
|
||||||
<a title="<?php echo G::loadTranslation('ID_EDIT_FIELD')?>" href="#" onclick="__ActionEdit('<?php echo $node_name?>'); return false;"><img src="/images/e_Edit.png" width="15" height="15" border="0" onmouseout="backImage(this,'')" onmouseover="backImage(this,'url(/images/dynamicForm/hover.gif) no-repeat')"/></a>
|
<a title="<?php echo G::loadTranslation('ID_EDIT_FIELD')?>" href="#" onclick="__ActionEdit('<?php echo $node_name?>'); return false;"><img src="/images/e_Edit.png" width="15" height="15" border="0" onmouseout="backImage(this,'')" onmouseover="backImage(this,'url(/images/dynamicForm/hover.gif) no-repeat')"/></a>
|
||||||
<a title="<?php echo G::loadTranslation('ID_REMOVE_FIELD')?>" href="#" onclick="__ActionDelete('<?php echo $node_name?>', '<?php echo $node['__ATTRIBUTES__']['type']; ?>');return false;"><img src="/images/e_Delete.png" width="15" height="15" border="0" onmouseout="backImage(this,'')" onmouseover="backImage(this,'url(/images/dynamicForm/hover.gif) no-repeat')"/></a>
|
<a title="<?php echo G::loadTranslation('ID_REMOVE_FIELD')?>" href="#" onclick="__ActionDelete('<?php echo $node_name?>', '<?php echo $node['__ATTRIBUTES__']['type']; ?>');return false;"><img src="/images/e_Delete.png" width="15" height="15" border="0" onmouseout="backImage(this,'')" onmouseover="backImage(this,'url(/images/dynamicForm/hover.gif) no-repeat')"/></a>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
} else {
|
} else {
|
||||||
?>
|
?>
|
||||||
<div class="tool"><img src="/images/options.png" width="12" height="12" border="0"/> </div>
|
<div class="tool"><img src="/images/options.png" width="12" height="12" border="0"/> </div>
|
||||||
<div class="jq-checkpointSubhead" style="display:none">
|
<div class="jq-checkpointSubhead" style="display:none">
|
||||||
<a title="<?php echo G::loadTranslation('ID_REMOVE_FIELD')?>" href="#" onclick="__ActionDelete('<?php echo $node_name?>', '<?php echo $node['__ATTRIBUTES__']['type']; ?>');return false;"><img src="/images/e_Delete.png" width="15" height="15" border="0" onmouseout="backImage(this,'')" onmouseover="backImage(this,'url(/images/dynamicForm/hover.gif) no-repeat')"/></a>
|
<a title="<?php echo G::loadTranslation('ID_REMOVE_FIELD')?>" href="#" onclick="__ActionDelete('<?php echo $node_name?>', '<?php echo $node['__ATTRIBUTES__']['type']; ?>');return false;"><img src="/images/e_Delete.png" width="15" height="15" border="0" onmouseout="backImage(this,'')" onmouseover="backImage(this,'url(/images/dynamicForm/hover.gif) no-repeat')"/></a>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
} ?>
|
} ?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</li>
|
</li>
|
||||||
<?php
|
<?php
|
||||||
}?>
|
}?>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</center>
|
</center>
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
</td>
|
</td>
|
||||||
<td valign="top" align="right" width="300" style="text-align:right">
|
<td valign="top" align="right" width="300" style="text-align:right">
|
||||||
<div id="help" style="display:none">
|
<div id="help" style="display:none">
|
||||||
<h3 class="ui-widget-header ui-corner-all">Processmaker - DynaFields Handler</h3>
|
<h3 class="ui-widget-header ui-corner-all">Processmaker - DynaFields Handler</h3>
|
||||||
<b><?php echo G::LoadTranslation('ID_FIELD_HANDLER_HELP1');?></b><br/><br/>
|
<b><?php echo G::LoadTranslation('ID_FIELD_HANDLER_HELP1');?></b><br/><br/>
|
||||||
<li> <?php echo G::LoadTranslation('ID_FIELD_HANDLER_HELP2');?><br/>
|
<li> <?php echo G::LoadTranslation('ID_FIELD_HANDLER_HELP2');?><br/>
|
||||||
<li> <?php echo G::LoadTranslation('ID_FIELD_HANDLER_HELP3');?>
|
<li> <?php echo G::LoadTranslation('ID_FIELD_HANDLER_HELP3');?>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</body>
|
</body>
|
||||||
<script language="javascript">
|
<script language="javascript">
|
||||||
var lastUidFHSelected;
|
var lastUidFHSelected;
|
||||||
var lastFTypeFHSelected;
|
var lastFTypeFHSelected;
|
||||||
function __ActionEdit(uid){
|
function __ActionEdit(uid){
|
||||||
lastUidFHSelected = uid;
|
lastUidFHSelected = uid;
|
||||||
if (!parent.sessionPersits()) {
|
if (!parent.sessionPersits()) {
|
||||||
parent.showPrompt('__ActionEdit');
|
parent.showPrompt('__ActionEdit');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var client_window = parent.getClientWindowSize();
|
var client_window = parent.getClientWindowSize();
|
||||||
h = client_window.height;
|
h = client_window.height;
|
||||||
h1 = (h / 100) * 92;
|
h1 = (h / 100) * 92;
|
||||||
window.parent.popupWindow('', "fields_Edit?A=<?php echo $_SESSION['Current_Dynafom']['Parameters']['URL']?>&XMLNODE_NAME="+ uid , 600, h1);
|
window.parent.popupWindow('', "fields_Edit?A=<?php echo $_SESSION['Current_Dynafom']['Parameters']['URL']?>&XMLNODE_NAME="+ uid , 600, h1);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function __ActionDelete(uid, ftype){
|
function __ActionDelete(uid, ftype){
|
||||||
lastUidFHSelected = uid;
|
lastUidFHSelected = uid;
|
||||||
lastFTypeFHSelected = ftype;
|
lastFTypeFHSelected = ftype;
|
||||||
if (!parent.sessionPersits()) {
|
if (!parent.sessionPersits()) {
|
||||||
parent.showPrompt('__ActionDelete');
|
parent.showPrompt('__ActionDelete');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
new window.parent.leimnud.module.app.confirm().make({
|
new window.parent.leimnud.module.app.confirm().make({
|
||||||
label: '<?php echo G::LoadTranslation('ID_FIELD_HANDLER_ACTION_DELETE');?>' + ' ' + ftype + "?",
|
label: '<?php echo G::LoadTranslation('ID_FIELD_HANDLER_ACTION_DELETE');?>' + ' ' + ftype + "?",
|
||||||
action:function(){
|
action:function(){
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "POST",
|
type: "POST",
|
||||||
url: "fields_Delete",
|
url: "fields_Delete",
|
||||||
data: 'A=<?php echo $_SESSION['Current_Dynafom']['Parameters']['URL']?>&XMLNODE_NAME='+uid,
|
data: 'A=<?php echo $_SESSION['Current_Dynafom']['Parameters']['URL']?>&XMLNODE_NAME='+uid,
|
||||||
success: function(httpResponse){
|
success: function(httpResponse){
|
||||||
window.parent.dynaformEditor.refreshFieldsList();
|
window.parent.dynaformEditor.refreshFieldsList();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
window.onload = function() {
|
window.onload = function() {
|
||||||
parent_divs = parent.document.getElementsByTagName('div');
|
parent_divs = parent.document.getElementsByTagName('div');
|
||||||
for(i=0; i<parent_divs.length; i++){
|
for(i=0; i<parent_divs.length; i++){
|
||||||
if(parent_divs[i].className == 'panel_containerWindow___processmaker'){
|
if(parent_divs[i].className == 'panel_containerWindow___processmaker'){
|
||||||
content_div = parent_divs[i];
|
content_div = parent_divs[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
h = content_div.style.height.split('px');
|
h = content_div.style.height.split('px');
|
||||||
window.parent.document.getElementById('dynaframe').height = (h[0]-120);
|
window.parent.document.getElementById('dynaframe').height = (h[0]-120);
|
||||||
|
|
||||||
parent.document.getElementById('light').style.display='none';
|
parent.document.getElementById('light').style.display='none';
|
||||||
parent.document.getElementById('fade').style.display='none';
|
parent.document.getElementById('fade').style.display='none';
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user