function show_conf($row, $id, $form_id, $option) { global $mainframe; require_once JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_chronocontact' . DS . 'helpers' . DS . 'plugin.php'; $helper = new ChronoContactHelperPlugin(); // identify and initialise the parameters used in this plugin $params_array = array('editor' => '1', 'buttons' => '0'); $params = $helper->loadParams($row, $params_array); if ($params->get('editor') == 'No') { $params->set('editor', '0'); } elseif ($params->get('editor') == 'Yes') { $params->set('editor', '1'); } if ($params->get('buttons') == 'No') { $params->set('buttons', '0'); } elseif ($params->get('buttons') == 'Yes') { $params->set('buttons', '1'); } //echo '<div>$params: '.print_r($params, true).'</div>'; $params = new JParameter($row->params); ?> <form action="index2.php" method="post" name="adminForm" id="adminForm" class="adminForm"> <?php echo $pane->startPane("confirmationpage"); echo $pane->startPanel('Configure Plugin', "configure"); ?> <table border="0" cellpadding="3" cellspacing="0" class='cf_table' > <?php $input = $helper->createHeaderTD('Configuration', '', true, $attribs['header']); echo $helper->wrapTR($input); $tooltip = "Disable the WYSIWYG Editor for creating the confirmation page?"; $input = $helper->createYesNoTD("Disable WYSYWYG editor?", "params[editor]", '', $params->get('editor'), '', $tooltip); echo $helper->wrapTR($input, array('class' => 'cf_config')); $tooltip = "Show 'Submit' and 'Back' buttons in the confirmation page ?"; $input = $helper->createYesNoTD("Show buttons?", "params[buttons]", '', $params->get('buttons'), '', $tooltip); echo $helper->wrapTR($input, array('class' => 'cf_config')); $tooltip = "Enter the submit button value e.g:Submit, default is Submit if left empty!"; $input = $helper->createInputTD("Submit button value", "params[submit_button_value]", $params->get('submit_button_value', 'Submit'), '', $attribs['input'], $tooltip); echo $helper->wrapTR($input, array('class' => 'cf_config')); $tooltip = "Enter the back button value e.g:Back, default is Back if left empty!"; $input = $helper->createInputTD("Back button value", "params[back_button_value]", $params->get('back_button_value', 'Back'), '', $attribs['input'], $tooltip); echo $helper->wrapTR($input, array('class' => 'cf_config')); $input = $helper->createHeaderTD('Confirmation page code', '', true, $attribs['header']); echo $helper->wrapTR($input); if (!$params->get('editor', false)) { $editor =& JFactory::getEditor(); $input = $editor->display('extra1', $row->extra1, '100%', '350', '75', '20', false); $input = $helper->wrapTD($input, array('colspan' => '4')); } else { $input = $helper->createTextarea('extra1', $row->extra1, array('cols' => '85', 'rows' => '20'), false, true, array('colspan' => '4')); } echo $helper->wrapTR($input, array('class' => 'cf_config')); ?> </td> </tr> </table> <?php echo $pane->endPanel(); echo $pane->startPanel('Help', 'help'); ?> <table border="0" cellpadding="3" cellspacing="0" class='cf_table' > <?php $input = $helper->createHeaderTD('How to configure the Confirmation Page plugin', '', true, array('colspan' => '4', 'class' => 'cf_header')); echo $helper->wrapTR($input); ?> <tr> <td colspan='4' style='border:1px solid silver; padding:6px;'> <div>The Confirmation page plugin shows a page of form results after the form is submitted but before emails are sent or data saved. This gives the user a final chance to review their input.</div> <ul><li>There is an WYSYWG editor configured by default, you can disable this on the Configuration tab if you prefer to use a plain text editor.</li> <li>The 'buttons' option will include 'Submit' and 'Back' buttons on the Confirmation page. If you prefer to add your own buttons then set this option to 'No'.</li> <li>In the Confirmation Page Code box you may enter HTML to display the submitted results. Use {field_name} to show the value of any field from the form.</li> <li>You can also include PHP in this box if you need to process the data for display. PHP must be enclosed in <?php . . . ?> tags.</li> <li>If you wish to use PHP or complex HTML, you may prefer to disable the WYSYWYG editor as it may change some code entries.</li> </ul> </td> </tr> </table> <?php echo $pane->endPanel(); echo $pane->endPane(); $hidden_array = array('id' => $id, 'form_id' => $form_id, 'name' => $this->plugin_name, 'event' => $this->event, 'option' => $option, 'task' => 'save_conf'); $hidden_array['params[onsubmit]'] = 'before_email'; echo $helper->createHiddenArray($hidden_array); ?> </form> <?php }