BUG 10027 Request for Dynaform Editing, a way to edit various dynaforms simply SOLVED
- Added a dropdown with the dynaforms list to change the dynaform editing inside the dynaforms editor
This commit is contained in:
@@ -169,7 +169,7 @@ class dynaformEditor extends WebResource
|
||||
$oHeadPublisher->addScriptCode("var TRANSLATIONS = " . G::json_encode($labesTrans) . ";");
|
||||
$oHeadPublisher->setTitle(G::LoadTranslation('ID_DYNAFORM_EDITOR') . ' - ' . $Properties['DYN_TITLE']);
|
||||
$G_PUBLISH->AddContent('blank');
|
||||
$this->panelConf['title'] = $this->title;
|
||||
$this->panelConf['title'] = '';
|
||||
$G_PUBLISH->AddContent('panel-init', 'mainPanel', $this->panelConf);
|
||||
if ($Properties['DYN_TYPE'] == 'xmlform') {
|
||||
$G_PUBLISH->AddContent('xmlform', 'toolbar', 'dynaforms/fields_Toolbar', 'display:none', $Parameters, '', '');
|
||||
|
||||
@@ -155,6 +155,29 @@ class XmlForm_Field_toolButton extends XmlForm_Field
|
||||
case 'text/image':
|
||||
$html = $this->htmlentities( $this->label, ENT_QUOTES, 'utf-8' ) . '<br/><img src="' . htmlentities( $url, ENT_QUOTES, 'utf-8' ) . '"' . (($this->style) ? ' style="' . $this->style . '"' : '') . '/>';
|
||||
break;
|
||||
case 'dropdown':
|
||||
$html = '';
|
||||
if (isset($this->owner->values['PRO_UID'])) {
|
||||
G::LoadClass('processMap');
|
||||
$criteria = processMap::getDynaformsCriteria($this->owner->values['PRO_UID']);
|
||||
$dataset = DynaformPeer::doSelectRS($criteria);
|
||||
if ($dataset->getRecordCount() > 0) {
|
||||
$html .= '<span style="font-size: 8pt;margin-left: 20px;">' . G::LoadTranslation('ID_EDITING_DYNAFORM');
|
||||
$html .= ': <select onchange="window.location = \'dynaforms_Editor?PRO_UID=' . $this->owner->values['PRO_UID'];
|
||||
$html .= '&DYN_UID=\' + this.value;" class="module_app_input___gray">';
|
||||
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$dataset->next();
|
||||
while ($row = $dataset->getRow()) {
|
||||
$html .= '<option value="' . $row['DYN_UID'] . '"';
|
||||
$html .= ($this->owner->values['DYN_UID'] == $row['DYN_UID'] ? ' selected="selected"' : '') . '>';
|
||||
$html .= htmlentities($row['DYN_TITLE'], ENT_QUOTES, 'utf-8') . '</option>';
|
||||
$dataset->next();
|
||||
}
|
||||
$html .= '</select></span>';
|
||||
}
|
||||
}
|
||||
return $html;
|
||||
break;
|
||||
case 'class':
|
||||
$html = '<a href="#" onclick="' . $this->onclick . '" onmouseover="backImage(this, \'url(/images/dynamicForm/hover.gif) no-repeat\')" onmouseout="backImage(this, \'\')" style="width:25px;height:25px;margin-bottom:3px">
|
||||
<div class="' . $this->class . '" title="' . strip_tags( $this->label ) . '" style="width:25px;height:25px;margin-bottom:3px"></div>
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<dynaForm name="fields_Toolbar" version="1.0" type="toolbar" align="left" width="100%">
|
||||
<PRO_UID type="private" />
|
||||
<DYN_UID type="private" />
|
||||
<separator1 type="toolButton" file="images/dynamicForm/separatorTable.gif" home="public_html" buttonStyle=""/>
|
||||
<saveDyna type="toolButton" class="ss_sprite button_toolbar ss_disk" onclick="dynaformEditor.save()" home="public_html" buttonType="class">
|
||||
<en>Save</en>
|
||||
@@ -92,4 +94,6 @@
|
||||
<grid type="toolButton" class="ss_sprite button_toolbar ss_table" onclick="fieldsAdd('grid')" buttonType="class">
|
||||
<en>Grid</en>
|
||||
</grid>
|
||||
<separator10 type="toolButton" file="images/dynamicForm/separatorTable.gif" home="public_html" buttonStyle=""/>
|
||||
<dynaforms type="toolButton" class="" onclick="" buttonType="dropdown" />
|
||||
</dynaForm>
|
||||
@@ -1,5 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<dynaForm name="fields_Toolbar" version="1.0" type="toolbar" align="left" width="894px">
|
||||
<PRO_UID type="private" />
|
||||
<DYN_UID type="private" />
|
||||
<separator1 type="toolButton" file="images/dynamicForm/separatorTable.gif" home="public_html" buttonStyle=""/>
|
||||
<saveDyna type="toolButton" class="ss_sprite button_toolbar ss_disk" onclick="dynaformEditor.save()" buttonType="class">
|
||||
<en>Save</en>
|
||||
@@ -49,4 +51,6 @@
|
||||
<file type="toolButton" class="ss_sprite button_toolbar ss_upload" onclick="fieldsAdd('file')" buttonType="class">
|
||||
<en>File</en>
|
||||
</file>
|
||||
<separator10 type="toolButton" file="images/dynamicForm/separatorTable.gif" home="public_html" buttonStyle=""/>
|
||||
<dynaforms type="toolButton" class="" onclick="" buttonType="dropdown" />
|
||||
</dynaForm>
|
||||
Reference in New Issue
Block a user