Merge branch 'ticket-12462-returnMR' into develop

This commit is contained in:
Marion Muszynski 2017-03-03 10:59:12 +01:00
commit b988870c40

View File

@ -123,6 +123,17 @@ class AdminReturn extends AdminTab
{
global $currentIndex, $cookie;
if($return_number = Tools::getValue('return_number')) {
if($return = Db::getInstance()->getRow('
SELECT *
FROM `'._DB_PREFIX_.'order_return_link`
WHERE `return_number` = "'.pSQL($return_number).'"
')) {
header('Location: /adm/index.php?tab=AdminReturn&id_order_return='.(int) $return['id_order_return'].'&updateorder_return&token='.Tools::getValue('token'));
exit;
}
}
// Include current tab
if (isset($_GET['update'.$this->table]))
{
@ -137,6 +148,33 @@ class AdminReturn extends AdminTab
else
{
$this->getList((int)($cookie->id_lang), !Tools::getValue($this->table.'Orderby') ? 'date_add' : NULL, !Tools::getValue($this->table.'Orderway') ? 'DESC' : NULL);
echo '
<fieldset style="display: inline-block; margin-bottom: 20px;">
<legend><img src="/img/admin/search.gif" alt="" style="float: right; margin-left: 20px;" /> '.$this->l('Find order return by return number').'</legend>
<p style="padding-top: 20px;">
<input type="text" id="return_number_input" value="" autocomplete="off" />
<a class="button" onclick="getReturnByNumber();" style="cursor: pointer;">'.$this->l('Submit').'</a>
</p>
<br style="display: table; clear: both;" />
</fieldset>
<script type="text/javascript">
function getReturnByNumber() {
var val = $("#return_number_input").val().trim();
if(val != "" && val.length == 15) {
document.location.href = "/adm/index.php?tab=AdminReturn&token='.Tools::getValue('token').'&return_number=" + val;
}
}
$(function() {
$("#return_number_input").bind("keydown", function(e) {
if(e.which == 13) {
getReturnByNumber();
return false;
}
});
});
</script>
';
$this->displayList();
$this->displayOptionsList();
$this->includeSubTab('display');