Current Path :
/
home
/
develito
/
www
/
components
/
com_raforms
/
views
/
fform
/
tmpl
/
Or
Select Your Path :
Upload File :
New :
File
Dir
/home/develito/www/components/com_raforms/views/fform/tmpl/default.php
<?php /* ------------------------------------------------------------------------ # com_raforms - rootArea Forms # ------------------------------------------------------------------------ # author Markus Döhla # copyright Copyright (C) 2012 rootarea.de. All Rights Reserved. # @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL # @license - Please read policy about plugins development in administrator/components/com_raforms/license-plugins.txt carefully # @license - Additional EULA on www.rootarea.de DOES NOT apply to ANY lite packages # Websites: http://www.rootarea.de # Technical Support: Forum - http://www.rootarea.de/en/forum ------------------------------------------------------------------------- */ //-- No direct access defined('_JEXEC') or die('=;)'); $document = JFactory::getDocument(); $document->addStyleSheet(JUri::root() . '/components/com_raforms/views/fform/tmpl/fform.css'); $formid = $this->form->id; $padding = (empty($this->form->config['padding'])) ? '0px' : $this->form->config['padding']; $allowedit = ($this->allowedit) ? 'true' : 'false'; $formname = 'raforms-form-' . $formid; ?> <noscript> <div id="noscriptDiv"> <?php echo JText::_('RAFORMS_NOSCRIPT'); ?> </div> </noscript> <?php $javascript = <<<EOT window.addEvent('domready', function() { $$('.raformsGotoPage').addEvent('click', function(ev) { if ($allowedit) { document.id('raformsTask').set('value', 'fform.gotoPage'); document.id('gotoPage').set('value', ev.target.get('rel')); if (raformsValidate.validate()) { document.id('$formname').submit(); } } else { document.id('raformsTask').set('value', 'fform.edit'); document.id('gotoPage').set('value', ev.target.get('rel')); document.id('$formname').submit(); } }); }); EOT; if (count($this->form->data) > 0) { if ($this->showDeleteButton) { $link = JRoute::_('index.php?option=com_raforms&task=fform.delete&formid='.$this->form->id.'&id='.$this->id, false); $question = JText::_('RAFORMS_REALLY_DELETE_ENTRY'); $javascript = <<<EOT function oreally() { question = '$question'; check = confirm ( question ); if (check == false) { location.replace('#'); } else { location.replace('$link'); } } EOT; } if (($this->showDeleteButton && !$this->comments) || ($this->showDeleteButton && $this->commentPosition == 0)) { ?> <a href="javascript:oreally()" class="afdelbutton"> <?php echo JText::_('RAFORMS_DELETE_ENTRY'); ?> </a> <?php } $document->addScriptDeclaration($javascript); ?> <form name="raforms-form-<?php echo $this->form->id; ?>" id="raforms-form-<?php echo $this->form->id; ?>" class="raformForm" action="<?php echo JRoute::_('index.php?option=com_raforms'); ?>" method="POST"> <div id="form-<?php echo $this->form->id; ?>" style="position: relative; width: <?php echo $this->form->config['width']; ?>px; height: <?php echo $this->form->config['height']; ?>px;" <?php echo (array_key_exists('formclass', $this->form->config) && !empty($this->form->config['formclass'])) ? 'class="' . $this->form->config['formclass'] . '"' : ''; ?>> <?php foreach ($this->form->elementOrdering as $k => $fieldname) { // positions $labelClass = (@array_key_exists('labelposition', $this->form->data[$fieldname])) ? 'label-' . $this->form->data[$fieldname]['labelposition'] : ''; $elementClass = (@array_key_exists('labelposition', $this->form->data[$fieldname])) ? 'element-' . $this->form->data[$fieldname]['labelposition'] : ''; $label_width = (@array_key_exists('label_width', $this->form->data[$fieldname])) ? $this->form->data[$fieldname]['label_width'] : ''; $label_height = (@array_key_exists('label_height', $this->form->data[$fieldname])) ? $this->form->data[$fieldname]['label_height'] : ''; $label = "<div class='" . $labelClass . "' style='width: " . $label_width . "px; height: " . $label_height . "px;'>" . @$this->form->element[$fieldname]['label'] . "</div>"; if (@$this->form->data[$fieldname]['elementtype'] == 'separator') { $element = "<div style='float: left; width: 100%;'>" . @$this->form->element[$fieldname]['element'] . "</div>"; } else { $element = "<div class='" . $elementClass . "'>" . @$this->form->element[$fieldname]['element'] . "</div>"; } ?> <div id="<?php echo @$fieldname; ?>" class="formField" style="left: <?php echo $this->form->data[$fieldname]['posX']; ?>px; top: <?php echo $this->form->data[$fieldname]['posY']; ?>px;" > <?php if ( $labelClass == "label-bottom" ) { echo $element; echo $label; } else { echo $label; echo $element; } ?> </div> <?php } if ($this->edit) { ?> <input type="hidden" name="data[id]" value="<?php echo $this->id; ?>" /> <input type="hidden" name="id" value="<?php echo $this->id; ?>" /> <?php } if (count($this->form->hidden) > 0) { foreach ($this->form->hidden as $fieldname => $hiddenField) { echo $hiddenField . "\n"; } } ?> <input id="gotoPage" type="hidden" name="gotoPage" value="" /> <input type="hidden" name="formid" value="<?php echo $this->form->id; ?>" /> <input type="hidden" name="raformsPage" value="<?php echo $this->page; ?>" /> <input id="raformsTask" type="hidden" name="task" value="fform.save" /> <?php } ?> <?php if ($this->pages > 1) { ?> <div id="raformsPagination"> <div class="raformsPaginationButton"> <?php if ($this->page - 1 > 0) { ?> <input class="raformsGotoPage" type="button" rel="<?php echo ($this->page - 1); ?>" value="<?php //echo ($this->page - 1); ?> << "/> <?php } ?> <?php if ($this->page + 1 <= $this->pages) { ?> <input class="raformsGotoPage" type="button" rel="<?php echo ($this->page + 1); ?>" value="<?php //echo ($this->page + 1); ?> >> "/> </div> <?php } else { ?> </div> <?php } ?> </div> <?php } ?> </div> </form> <?php if ($this->comments) { include_once(JPATH_SITE . DIRECTORY_SEPARATOR . 'components' . DIRECTORY_SEPARATOR . 'com_raforms' . DIRECTORY_SEPARATOR . 'views' . DIRECTORY_SEPARATOR . 'fform' . DIRECTORY_SEPARATOR . 'tmpl' . DIRECTORY_SEPARATOR . 'comments_js.php'); $commentsDivPosition = ($this->commentPosition == 0) ? 'style="float: left; clear: both; margin: 20px 0 0 0;"' : 'style="float: right;"'; include_once(JPATH_SITE . DIRECTORY_SEPARATOR . 'components' . DIRECTORY_SEPARATOR . 'com_raforms' . DIRECTORY_SEPARATOR . 'views' . DIRECTORY_SEPARATOR . 'fform' . DIRECTORY_SEPARATOR . 'tmpl' . DIRECTORY_SEPARATOR . 'comments_div.php'); } if ($this->params->get('showrequired')) { ?> <div style="float: right;"> <span style='font-size: x-large; font-weight: bold; color: #FF0000;'>*</span><span style='font-weight: bold; color: #FF0000;'> <?php echo JText::_('RAFORMS_REQUIRED'); ?></span> </div> <?php } ?>