?> </td> <!-- Joomla! Component Builder - end code --> <?php if (isset($row->ordering)) { ?> <td class="order nowrap"> <?php $page = new JPagination($n, 1, $n); $up = JString::strtolower($this->lists['order_Dir']) == 'asc' ? 'orderup' : 'orderdown'; $down = JString::strtolower($this->lists['order_Dir']) == 'asc' ? 'orderdown' : 'orderup'; $enable = $this->auth('core.edit') && $this->lists['order'] == 'ordering'; ?> <span><?php echo $page->orderUpIcon($i, $i > 0, 'movehistorylist.' . $up, JText::_('JLIB_HTML_MOVE_UP'), $enable); ?> </span> <span><?php echo $page->orderDownIcon($i, $n, $i < $n, 'movehistorylist.' . $down, JText::_('JLIB_HTML_MOVE_DOWN'), $enable); ?> </span> <input type="text" name="order[]" size="5" value="<?php echo $row->ordering; ?> " class="text-area-order input-mini" <?php echo $enable ? '' : 'disabled="true"'; ?> /> </td> <?php
?> </td> <!-- Joomla! Component Builder - end code --> <?php if (isset($row->ordering)) { ?> <td class="order nowrap"> <?php $page = new JPagination($n, 1, $n); $up = JString::strtolower($this->lists['order_Dir']) == 'asc' ? 'orderup' : 'orderdown'; $down = JString::strtolower($this->lists['order_Dir']) == 'asc' ? 'orderdown' : 'orderup'; $enable = $this->auth('core.edit') && $this->lists['order'] == 'ordering'; ?> <span><?php echo $page->orderUpIcon($i, $i > 0, 'buddyblacklistlist.' . $up, JText::_('JLIB_HTML_MOVE_UP'), $enable); ?> </span> <span><?php echo $page->orderDownIcon($i, $n, $i < $n, 'buddyblacklistlist.' . $down, JText::_('JLIB_HTML_MOVE_DOWN'), $enable); ?> </span> <input type="text" name="order[]" size="5" value="<?php echo $row->ordering; ?> " class="text-area-order input-mini" <?php echo $enable ? '' : 'disabled="true"'; ?> /> </td> <?php
/** * Test the html string for the orderUpIcon function. * * @param integer $i The row index. * @param string $expected The expected html string * @param boolean $condition True to show the icon. * @param string $task The task to fire. * @param string $alt The image alternative text string. * @param boolean $enabled An optional setting for access control on the action. * @param string $checkbox An optional prefix for checkboxes. * * @return void * * @covers JPagination::orderUpIcon * @dataProvider dataTestOrderUpIcon * @since 3.2 */ public function testOrderUpIcon($i, $expected, $condition = true, $task = 'orderup', $alt = 'JLIB_HTML_MOVE_UP', $enabled = true, $checkbox = 'cb') { $pagination = new JPagination(100, 50, 20, '', $this->app); $string = $pagination->orderUpIcon($i, $condition, $task, $alt, $enabled, $checkbox); $this->assertEquals($string, $expected, 'This is not the expected order up html'); }
</td> <td align="center"> <?php echo JHTML::_('grid.access', $row, $i); ?> </td> <td nowrap> <?php $page = new JPagination($n, 1, $n); ?> <input type="text" name="order[]" size="5" value="<?php echo $row->ordering; ?> " class="text_area" style="text-align: center" /> <span><?php echo $page->orderUpIcon($i, $i > 0, 'orderup', JText::_('MOVE_UP'), true); ?> </span> <span><?php echo $page->orderDownIcon($i, $n, $i < $n, 'orderdown', JText::_('MOVE_DOWN'), true); ?> </span> </td> <td align="center"> <?php echo $published; ?> </td> <td align="center"> <?php echo $row->product_id;
echo $index; ?> ]" value="1" <?php echo $is_default; ?> /> </td> <td align="center"> <input type="text" name="value_id[]" value="<?php echo $row->id; ?> " size="2" readonly="readonly"/> </td> <td align="right"> <?php echo $pageNav->orderUpIcon($index, $index !== 0, "ordvalup", JText::_('Move Up')); ?> </td> <td align="left"> <?php echo $pageNav->orderDownIcon($index, $count, $index != $count, "ordvaldn", JText::_('Move Down')); ?> </td> <td align="center"> <input type="text" name="value_order[]" size="5" value="<?php echo $row->ordering; ?> " class="text_area" style="text-align: center" /> </td> <td align="center"> <a href="javascript: void(0);" onclick="if(confirm('<?php
?> </td> <!-- Joomla! Component Builder - end code --> <?php if (isset($row->ordering)) { ?> <td class="order nowrap"> <?php $page = new JPagination($n, 1, $n); $up = JString::strtolower($this->lists['order_Dir']) == 'asc' ? 'orderup' : 'orderdown'; $down = JString::strtolower($this->lists['order_Dir']) == 'asc' ? 'orderdown' : 'orderup'; $enable = $this->auth('core.edit') && $this->lists['order'] == 'ordering'; ?> <span><?php echo $page->orderUpIcon($i, $i > 0, 'gamechatlist.' . $up, JText::_('JLIB_HTML_MOVE_UP'), $enable); ?> </span> <span><?php echo $page->orderDownIcon($i, $n, $i < $n, 'gamechatlist.' . $down, JText::_('JLIB_HTML_MOVE_DOWN'), $enable); ?> </span> <input type="text" name="order[]" size="5" value="<?php echo $row->ordering; ?> " class="text-area-order input-mini" <?php echo $enable ? '' : 'disabled="true"'; ?> /> </td> <?php
?> </td> <!-- Joomla! Component Builder - end code --> <?php if (isset($row->ordering)) { ?> <td class="order nowrap"> <?php $page = new JPagination($n, 1, $n); $up = JString::strtolower($this->lists['order_Dir']) == 'asc' ? 'orderup' : 'orderdown'; $down = JString::strtolower($this->lists['order_Dir']) == 'asc' ? 'orderdown' : 'orderup'; $enable = $this->auth('core.edit') && $this->lists['order'] == 'ordering'; ?> <span><?php echo $page->orderUpIcon($i, $i > 0, 'autoplayerlist.' . $up, JText::_('JLIB_HTML_MOVE_UP'), $enable); ?> </span> <span><?php echo $page->orderDownIcon($i, $n, $i < $n, 'autoplayerlist.' . $down, JText::_('JLIB_HTML_MOVE_DOWN'), $enable); ?> </span> <input type="text" name="order[]" size="5" value="<?php echo $row->ordering; ?> " class="text-area-order input-mini" <?php echo $enable ? '' : 'disabled="true"'; ?> /> </td> <?php
?> </td> <td><?php echo $accesOptions[$row->access]; ?> </td> <td><?php echo $published; ?> </td> <td> <span><?php echo $pageNav->orderUpIcon($i, true, 'orderup', 'Move Up'); ?> </span> </td> <td> <span><?php echo $pageNav->orderDownIcon($i, $n, true, 'orderdown', 'Move Down'); ?> </span> </td> <td align="center" >
function display($tpl = null) { $order_text = ucfirst(JText::_('JFIELD_ORDERING_LABEL')); $id_text = ucfirst(JText::_('JGLOBAL_FIELD_ID_LABEL')); $yes_text = ucfirst(JText::_('JYES')); $no_text = ucfirst(JText::_('JNO')); FCP_Admin::make_title('COM_FLEXICONTACT_CONFIG_FIELDS_NAME', $this->config_data, $this->config_count); JToolBarHelper::custom('add_default_fields', 'default.png', 'default_f2.png', 'COM_FLEXICONTACT_RESTORE_DEFAULT_FIELDS', false); $num_fields = count($this->config_data->config_data->all_fields); if ($num_fields < LAFC_MAX_FIELDS) { JToolBarHelper::addNew(); } JToolBarHelper::editList(); JToolBarHelper::deleteList(); JToolBarHelper::cancel(); $field_types = FCP_Admin::make_field_type_list(); require_once LAFC_HELPER_PATH . '/date_pickers.php'; $validation_types = FCP_date_picker::validation_type_list(); $pagination = new JPagination($num_fields, 0, 1000); // we don't actually use pagination but we need this for the ordering tools // Joomla 3.0 took away the Javascript checkAll() function. Joomla.checkAll() first appeared in 1.7 $check_all = 'onclick="Joomla.checkAll(this);"'; // draw the form ?> <form action="index.php" method="post" name="adminForm" id="adminForm" > <input type="hidden" name="option" value="<?php echo LAFC_COMPONENT; ?> " /> <input type="hidden" name="controller" value="field" /> <input type="hidden" name="task" value="" /> <input type="hidden" name="view" value="config_field_list" /> <input type="hidden" name="boxchecked" value="0" /> <?php echo '<table>'; echo '<table class="adminlist table table-striped">'; echo '<thead>'; echo ' <th width="1">' . $id_text . '</th>'; echo ' <th width="1"><input type="checkbox" name="toggle" value="" ' . $check_all . ' /></th>'; echo ' <th width="1"></th>'; echo ' <th width="1"></th>'; echo ' <th width="1" nowrap="nowrap">' . $order_text . ' ' . JHTML::_('grid.order', $this->config_data->config_data->all_fields) . '</th>'; echo ' <th nowrap="nowrap" width="20%">' . JText::_('COM_FLEXICONTACT_V_PROMPT') . '</th>'; echo ' <th nowrap="nowrap" width="10%" colspan="2">' . JText::_('COM_FLEXICONTACT_FIELD_TYPE') . '</th>'; echo ' <th nowrap="nowrap" width="5%" >' . JText::_('COM_FLEXICONTACT_V_MANDATORY') . '</th>'; echo ' <th nowrap="nowrap" width="5%" >' . JText::_('COM_FLEXICONTACT_V_WIDTH') . '</th>'; echo ' <th nowrap="nowrap" width="5%" >' . JText::_('COM_FLEXICONTACT_V_HEIGHT') . '</th>'; echo ' <th nowrap="nowrap">' . JText::_('COM_FLEXICONTACT_DETAILS') . '</th>'; echo ' </tr>'; echo '</thead>'; for ($i = 0; $i < $num_fields; $i++) { $field =& $this->config_data->config_data->all_fields[$i]; $field_type_name = $field_types[$field->field_type]; $checked = JHTML::_('grid.id', $i, $i); if ($field->mandatory == 1) { $mandatory = $yes_text; } else { $mandatory = $no_text; } if ($field->visible == 1) { $visible = $yes_text; } else { $visible = $no_text; } $width = ''; $height = ''; $details = ''; switch ($field->field_type) { case LAFC_FIELD_FROM_ADDRESS: $width = $field->width; break; case LAFC_FIELD_FROM_NAME: case LAFC_FIELD_TEXT: case LAFC_FIELD_PASSWORD: case LAFC_FIELD_TEXT_NUMERIC: case LAFC_FIELD_FIELDSET_START: $width = $field->width; if ($field->default_value != '') { $details = JText::_('COM_FLEXICONTACT_DEFAULT') . ': ' . $field->default_value; } break; case LAFC_FIELD_SUBJECT: $width = $field->width; if ($field->default_value != '') { $details = JText::_('COM_FLEXICONTACT_DEFAULT') . ': ' . $field->default_value . ', ' . JText::_('COM_FLEXICONTACT_VISIBLE') . ': ' . $visible; } else { $details = JText::_('COM_FLEXICONTACT_VISIBLE') . ': ' . $visible; } break; case LAFC_FIELD_TEXTAREA: $width = $field->width; $height = $field->height; break; case LAFC_FIELD_LIST: $list_array = FCP_Common::split_list($field->list_list, $field->delimiter); $field_id = sprintf('field%03d', $i); $list_html = FCP_Common::make_list($field_id, 0, $list_array['LEFT']); $details = $list_html; break; case LAFC_FIELD_FIXED_TEXT: $details = $field->default_value; break; case LAFC_FIELD_ADVANCED: $width = $field->width; $details = $field->regex; if (!empty($field->sql)) { if (!empty($details)) { $details .= '<br />'; } $details .= $field->sql; } if ($field->error_msg != '') { $details .= ' [' . $field->error_msg . ']'; } break; case LAFC_FIELD_RECIPIENT: $list_array = FCP_Common::split_list($field->list_list, ';', $field->delimiter); $field_id = sprintf('field%03d', $i); $list_html = FCP_Common::make_list($field_id, 0, $list_array['LEFT']); $details = $list_html; break; case LAFC_FIELD_RADIO_V: case LAFC_FIELD_RADIO_H: $list_array = FCP_Common::split_list($field->list_list, ';', $field->delimiter); $details = implode(", ", $list_array['RIGHT']); break; case LAFC_FIELD_CHECKBOX_M: $list_array = FCP_Common::split_list($field->list_list, $field->delimiter); $details = implode(", ", $list_array['LEFT']); break; case LAFC_FIELD_DATE: $details = $validation_types[$field->validation_type]; } $image = FCP_Admin::get_icon_image($field->field_type); $link = JRoute::_(LAFC_COMPONENT_LINK . '&controller=field&task=edit&cid[]=' . $i); $field_id = sprintf('%02d', $i + 1); echo "\n<tr>"; echo ' <td>' . JHTML::link($link, $field_id) . '</td>'; echo ' <td align="center">' . $checked . '</td>'; echo ' <td>' . $pagination->orderUpIcon($i, true) . '</td>'; echo ' <td>' . $pagination->orderDownIcon($i, true) . '</td>'; echo ' <td><input type="text" name="order[]" size="5" value="' . ($i + 1) . '" class="text_area" style="text-align: center" /></td>'; echo ' <td nowrap="nowrap">' . JHTML::link($link, $field->prompt) . '</td>'; echo ' <td align="center">' . $image . '</td>'; echo ' <td nowrap="nowrap">' . $field_type_name . '</td>'; echo ' <td align="center">' . $mandatory . '</td>'; echo ' <td align="center">' . $width . '</td>'; echo ' <td align="center">' . $height . '</td>'; echo ' <td align="left">' . $details . '</td>'; echo "\n</tr>"; } echo '</table></form>'; }