function display($arrParam = array()) { if (empty($arrParam)) { $arrParam = $this->options; } if (!isset($this->cssErrorName)) { $this->cssErrorName = $this->template->name; } print '<tr><td width="40%" '; print displayErrorCss($this->cssErrorName); print 'style = "text-align: right;">'; //if we got a tooltip, we show it if ($this->tooltip) { print "<a href=\"#\" class=\"tooltip\">" . $this->desc . "<span>" . $this->tooltip . "</span></a>"; } else { print $this->desc; } print '</td><td>'; print "<a href=\"" . $arrParam["value"] . "\">" . $arrParam["name"]; print "</a>"; if (isset($arrParam["extra"])) { print " " . $arrParam["extra"]; } print "</td></tr>"; }
function display($arrParam = array()) { list($start, $end) = $this->parseParams($arrParam); print '<p '; displayErrorCss($this->name . '_start'); print '>' . _T('Start : '); $pool_elem = new HiddenTpl($this->name); $pool_elem->display(array('value' => $arrParam['value'], 'hide' => True)); $start_elem = new IPInputTpl($this->name . '_start'); $start_elem->display(array('value' => $start, 'onchange' => 'updateRange(this);')); print ' ' . _T('End : '); $end_elem = new IPInputTpl($this->name . '_end'); $end_elem->display(array('value' => $end, 'onchange' => 'updateRange(this);')); print '<button type="button" class="btn btn-small" onclick="delRange(this); return false;">' . _('Delete') . '</button>'; print '</p>'; }
/** * display input Element * $arrParam accept ["value"] to corresponding value */ function display($arrParam = array()) { if (empty($arrParam)) { $arrParam = $this->options; } if (!isset($this->cssErrorName)) { $this->cssErrorName = $this->template->name; } if ($this->rowNum % 2) { print ' <tr class="alternate"><td width="50%" '; } else { print '<tr><td '; } print displayErrorCss($this->cssErrorName); print 'style = "text-align: left;">'; if ($this->tab) { print '<dd>'; } //if we got a tooltip, we show it if ($this->tooltip) { print "<a href=\"#\" class=\"tooltip\">" . $this->desc . "<span>" . $this->tooltip . "</span></a>"; } else { if (!isset($this->template)) { print '<h2>' . $this->desc . '</h2>'; } else { print $this->desc; } } print '</td><td style = "text-align: left;">'; if (isset($this->template)) { if (!empty($this->arrparam)) { parent::display($this->arrparam); } else { parent::display($arrParam); } } if (isset($arrParam["extra"])) { print " " . $arrParam["extra"]; } print "</td></tr>\n "; }
function displayRo($arrParam) { printf('<tr><td width="%s" ', $this->firstColWidth); print displayErrorCss($this->cssErrorName); print 'style = "text-align: right;">'; //if we got a tooltip, we show it if ($this->tooltip) { print "<a href=\"#\" class=\"tooltip\">" . $this->desc . "<span>" . $this->tooltip . "</span></a>"; } else { print $this->desc; } print '</td><td>'; parent::displayRo($arrParam); print '</td></tr>'; }
function display($arrParam = array()) { if (empty($arrParam)) $arrParam = $this->options; if ($this->key==0) { $desc = $this->desc; } else { $desc = ''; } if ($this->ajaxPage == ""){ $this->ajaxPage = "includes/FormGenerator/MultipleInput.tpl.php"; } // set hidden form with old_value for each DeletableTrFormElement field // set a random old_value if some field has been created if($this->new) { $old_value = uniqid(); } else if(isset($arrParam["value"])) { $old_value = $arrParam["value"]; } else { $old_value = ""; } if(is_object($this->template)) { $field_name = $this->template->name; } else if(is_array($this->template)) { $field_name = $this->template["name"]; } else { $field_name = ""; } if ($field_name) { print '<input type="hidden" name="old_'.$field_name.'" value="'.$old_value.'" />'; } print '<tr><td width="40%" '; print displayErrorCss($this->cssErrorName); print 'style = "text-align: right;">'; //if we got a tooltip, we show it if ($this->tooltip) { print "<a href=\"#\" class=\"tooltip\">".$desc."<span>".$this->tooltip."</span></a>"; } else { print $desc; } print '</td><td>'; // reald field display FormElement::display($arrParam); print '<input name="bdel" type="submit" class="btnSecondary" value="'._("Delete").'" onclick=" new Ajax.Updater(\''.$this->name.'\',\''.$this->ajaxPage.'\', { parameters: Form.serialize($(\'' . $this->formId . '\'))+\'&minputname='.$this->name.'&del='.$this->key.'&desc='.urlencode($this->desc) . '&regexp='.rawurlencode($this->template->regexp) . '\' }); return false;"/>'; print '</td></tr>'; }