Commit 3f5bf8d7 authored by Reinhold Kainhofer's avatar Reinhold Kainhofer
Browse files

Code cleanup; Fix selectbox width

parent 6ca666f1
......@@ -67,25 +67,9 @@ class VirtuemartControllerEuRecap extends VmController {
vRequest::setVar('task', $layout);
// vRequest::setVar('format', 'raw');
// $japp = &JApplication::getInstance("site"); // fetches the current application
// $japp->setTemplate("", null); // sets an empty template, disables the default one
// $document = &JFactory::getDocument(); // gets the document, that the user wants
// $document->setType("raw"); // sets its type to raw
// JRequest::setVar("format", "raw"); // this one is not obligatory, but my component uses this in the view later
// $document = JDocument::getInstance('raw'); //this new instance is a raw document object
// $viewType = $document->getType();
// // $viewname below is set in jinput or as you named it
// $view = $this->getView($viewName, $viewType);
// // $this->input->set('view', $viewName);
// $this->input->set('view', $viewName);
$document = JFactory::getDocument();
// $document->setType('raw');
$viewType = $document->getType();
$view = $this->getView($viewName, $viewType);
JFactory::getApplication()->enqueueMessage("Export function in controller", 'warning');
$view->setLayout($layout);
$this->display();
......
......@@ -235,7 +235,7 @@ class VirtuemartModelEuRecap extends VmModel {
foreach ($vals as $month=>$label) {
$options[] = JHtml::_ ('select.option', $label, $month);
}
$listHTML = JHtml::_ ('select.genericlist', $options, 'month', 'size="7" class="inputbox" onchange="this.form.submit();" ', 'text', 'value', $selected);
$listHTML = JHtml::_ ('select.genericlist', $options, 'month', 'class="inputbox" style="width: inherit" onchange="this.form.submit();" ', 'text', 'value', $selected);
return $listHTML;
}
......@@ -245,7 +245,7 @@ class VirtuemartModelEuRecap extends VmModel {
foreach (range(2010, 2020) as $year) {
$options[] = JHtml::_ ('select.option', $year, $year);
}
$listHTML = JHtml::_ ('select.genericlist', $options, 'year', 'size="7" class="inputbox" onchange="this.form.submit();" ', 'text', 'value', $selected);
$listHTML = JHtml::_ ('select.genericlist', $options, 'year', 'class="inputbox" style="width: inherit" onchange="this.form.submit();" ', 'text', 'value', $selected);
return $listHTML;
}
......@@ -263,7 +263,7 @@ class VirtuemartModelEuRecap extends VmModel {
$value = substr($tmpl, 7, -4); // Cut off export_ and .php
$options[] = JHtml::_('select.option', vmText::_('VMEXT_EU_RECAP_EXPORT_' . strtoupper($value)), $value);
}
$listHTML = JHtml::_ ('select.genericlist', $options, 'export_format', 'size="7" class="inputbox" ', 'text', 'value', $selected);
$listHTML = JHtml::_ ('select.genericlist', $options, 'export_format', 'size="7" class="inputbox"', 'text', 'value', $selected);
return $listHTML;
}
......
......@@ -26,7 +26,7 @@ $myCurrencyDisplay = CurrencyDisplay::getInstance();
?>
<pre><?php print_r(vRequest::getRequest()); ?></pre>
<form action="index.php" method="post" name="adminForm" id="adminForm">
<?php echo $this->addStandardHiddenToForm(); ?>
......@@ -37,6 +37,7 @@ $myCurrencyDisplay = CurrencyDisplay::getInstance();
<table width="100%">
<tr width="100%">
<td align="left">
<div style="float: left">
<?php
echo vmText::_('VMEXT_EU_RECAP_LIST_PERIOD');
if ($this->frequency<12) {
......@@ -48,17 +49,14 @@ $myCurrencyDisplay = CurrencyDisplay::getInstance();
$vendorId = vRequest::getInt('virtuemart_vendor_id',1);
echo ShopFunctions::renderVendorList($vendorId,false);
} ?><br>
<label><input type="checkbox" <?php if ($this->include_taxed_orders) { ?>checked <?php } ?> name="include_taxed_orders" value="true" style=" vertical-align: middle; position: relative; bottom: 1px;">&nbsp;&nbsp;&nbsp;<?php echo vmText::_('VMEXT_EU_RECAP_INCLUDE_TAXED'); ?></label>
</td>
<td align="left" width="5%">
<button class="btn btn-small" name="Go" onclick="this.form.task.value=''; this.form.submit();"><?php echo vmText::_('COM_VIRTUEMART_GO'); ?></button>
<label><input type="checkbox" <?php if ($this->include_taxed_orders) { ?>checked <?php } ?> name="include_taxed_orders" value="true" style="vertical-align: top; position: relative; bottom: 1px;">&nbsp;<?php echo vmText::_('VMEXT_EU_RECAP_INCLUDE_TAXED'); ?></label>
</div>
<span><button class="btn btn-small" name="Go" onclick="this.form.task.value=''; this.form.submit();"><?php echo vmText::_('COM_VIRTUEMART_GO'); ?></button></span>
</td>
<td width="30%"></td>
<td align="right" width>
<?php echo $this->export_format_list; ?>
<button class="btn btn-small" name="format" value="raw" onclick="this.form.task.value='export'; this.form.submit();"><?php echo vmText::_('VMEXT_EU_RECAP_EXPORT'); ?>
</button>
<td align="right" style="vertical-align: top">
<div style="float: right"><?php echo $this->export_format_list; ?>
<button class="btn btn-small" name="format" value="raw" onclick="this.form.task.value='export'; this.form.submit();" style="vertical-align: top;"><?php echo vmText::_('VMEXT_EU_RECAP_EXPORT'); ?>
</button></div>
</td>
</tr>
</table>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment