Commit 8f92401c authored by Falko Timme's avatar Falko Timme
Browse files

- Bugfix: show the correct country flag in client and reseller lists.

parent 046d621d
......@@ -248,6 +248,12 @@ class listform_actions {
$order_by_sql = "GROUP BY mailuser_id ".$order_by_sql;
}
}
if($this->SQLExtSelect != '') {
if(substr($this->SQLExtSelect,0,1) != ',') $this->SQLExtSelect = ','.$this->SQLExtSelect;
$extselect .= $this->SQLExtSelect;
}
return 'SELECT '.$app->listform->listDef['table'].'.*'.$extselect.' FROM '.$app->listform->listDef['table']."$join WHERE $sql_where $order_by_sql $limit_sql";
}
......
......@@ -19,6 +19,7 @@ $app->uses('listform_actions');
$app->listform_actions->SQLOrderBy = 'ORDER BY company_name, contact_name, client_id';
$app->listform_actions->SQLExtWhere = "limit_client = 0";
$app->listform_actions->SQLExtSelect = ', client.country as countryiso';
$app->listform_actions->onLoad();
......
......@@ -49,6 +49,7 @@ $app->uses('listform_actions');
$app->listform_actions->SQLOrderBy = 'ORDER BY company_name, contact_name, client_id';
$app->listform_actions->SQLExtWhere = "(limit_client > 0 or limit_client = -1)";
$app->listform_actions->SQLExtSelect = ', client.country as countryiso';
$app->listform_actions->onLoad();
......
......@@ -46,7 +46,7 @@
<td class="tbl_col_contact_name"><a href="#" onclick="loadContent('client/client_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="contact_name"}</a></td>
<td class="tbl_col_username"><a href="#" onclick="loadContent('client/client_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="username"}</a></td>
<td class="tbl_col_city"><a href="#" onclick="loadContent('client/client_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="city"}</a></td>
<td class="tbl_col_country"><div class="country-{tmpl_var name="country"}"><span>{tmpl_var name="country"}</span></div></td>
<td class="tbl_col_country"><a href="#" onclick="loadContent('client/client_edit.php?id={tmpl_var name='id'}');"><div class="country-{tmpl_var name="countryiso"}" style="float:left"></div>{tmpl_var name="country"}</a></td>
<td class="tbl_col_buttons">
<tmpl_if name="is_admin">
<a class="button icons16 icoLoginAs" href="javascript: loadContent('admin/login_as.php?cid={tmpl_var name='id'}');"><span>{tmpl_var name='login_as_txt'}</span></a>
......
......@@ -43,7 +43,7 @@
<td class="tbl_col_company_name"><a href="#" onclick="loadContent('client/reseller_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="company_name"}</a></td>
<td class="tbl_col_contact_name"><a href="#" onclick="loadContent('client/reseller_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="contact_name"}</a></td>
<td class="tbl_col_city"><a href="#" onclick="loadContent('client/reseller_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="city"}</a></td>
<td class="tbl_col_country"><div class="country-{tmpl_var name="country"}"><span>{tmpl_var name="country"}</span></div></td>
<td class="tbl_col_country"><a href="#" onclick="loadContent('client/reseller_edit.php?id={tmpl_var name='id'}');"><div class="country-{tmpl_var name="countryiso"}" style="float:left"></div>{tmpl_var name="country"}</a></td>
<td class="tbl_col_buttons">
<a class="button icons16 icoLoginAs" href="javascript: loadContent('admin/login_as.php?cid={tmpl_var name='id'}');"><span>{tmpl_var name='login_as_txt'}</span></a>
<a class="button icons16 icoDelete" href="javascript: del_record('client/reseller_del.php?id={tmpl_var name='id'}&phpsessid={tmpl_var name='phpsessid'}','{tmpl_var name='delete_confirmation'}');"><span>{tmpl_var name='delete_txt'}</span></a>
......
This diff is collapsed.
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