Update html.formresource.class.php
This commit is contained in:
parent
f83f746123
commit
49c62a28a0
@ -1,5 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) - 2013-2015 Jean-François FERRY <jfefe@aternatik.fr>
|
/* Copyright (C) - 2013-2015 Jean-François FERRY <jfefe@aternatik.fr>
|
||||||
|
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -85,7 +86,7 @@ class FormResource
|
|||||||
|
|
||||||
$resourcestat = new Dolresource($this->db);
|
$resourcestat = new Dolresource($this->db);
|
||||||
|
|
||||||
$resources_used = $resourcestat->fetch_all('ASC', 't.rowid', $limit, $offset, $filter);
|
$resources_used = $resourcestat->fetch_all('ASC', 't.rowid', $limit, 0, $filter);
|
||||||
|
|
||||||
if ($outputmode != 2)
|
if ($outputmode != 2)
|
||||||
{
|
{
|
||||||
@ -194,17 +195,17 @@ class FormResource
|
|||||||
if ($empty && empty($arraytypes['code'])) continue;
|
if ($empty && empty($arraytypes['code'])) continue;
|
||||||
|
|
||||||
if ($format == 0) print '<option value="'.$id.'"';
|
if ($format == 0) print '<option value="'.$id.'"';
|
||||||
if ($format == 1) print '<option value="'.$arraytypes['code'].'"';
|
elseif ($format == 1) print '<option value="'.$arraytypes['code'].'"';
|
||||||
if ($format == 2) print '<option value="'.$arraytypes['code'].'"';
|
elseif ($format == 2) print '<option value="'.$arraytypes['code'].'"';
|
||||||
if ($format == 3) print '<option value="'.$id.'"';
|
elseif ($format == 3) print '<option value="'.$id.'"';
|
||||||
// Si selected est text, on compare avec code, sinon avec id
|
// Si selected est text, on compare avec code, sinon avec id
|
||||||
if (preg_match('/[a-z]/i', $selected) && $selected == $arraytypes['code']) print ' selected';
|
if (preg_match('/[a-z]/i', $selected) && $selected == $arraytypes['code']) print ' selected';
|
||||||
elseif ($selected == $id) print ' selected';
|
elseif ($selected == $id) print ' selected';
|
||||||
print '>';
|
print '>';
|
||||||
if ($format == 0) $value=($maxlength?dol_trunc($arraytypes['label'], $maxlength):$arraytypes['label']);
|
if ($format == 0) $value=($maxlength?dol_trunc($arraytypes['label'], $maxlength):$arraytypes['label']);
|
||||||
if ($format == 1) $value=$arraytypes['code'];
|
elseif ($format == 1) $value=$arraytypes['code'];
|
||||||
if ($format == 2) $value=($maxlength?dol_trunc($arraytypes['label'], $maxlength):$arraytypes['label']);
|
elseif ($format == 2) $value=($maxlength?dol_trunc($arraytypes['label'], $maxlength):$arraytypes['label']);
|
||||||
if ($format == 3) $value=$arraytypes['code'];
|
elseif ($format == 3) $value=$arraytypes['code'];
|
||||||
print $value?$value:' ';
|
print $value?$value:' ';
|
||||||
print '</option>';
|
print '</option>';
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user