Fix warning
This commit is contained in:
parent
9fd5727985
commit
47451432a7
@ -350,17 +350,15 @@ if (empty($conf->global->MAIN_ENABLE_DEFAULT_VALUES)) {
|
||||
$disabled = ' disabled="disabled"';
|
||||
}
|
||||
print '<input type="submit" class="button"'.$disabled.' value="'.$langs->trans("Add").'" name="add">';
|
||||
print "</td>\n";
|
||||
print '</tr>';
|
||||
print '</td>'."\n";
|
||||
print '</tr>'."\n";
|
||||
|
||||
$result=$object->fetchAll($sortorder, $sortfield, 0, 0, array('t.type'=>$mode,'t.entity'=>array($user->entity,$conf->entity)));
|
||||
$result = $object->fetchAll($sortorder, $sortfield, 0, 0, array('t.type'=>$mode,'t.entity'=>array($user->entity,$conf->entity)));
|
||||
|
||||
if (!is_array($result) && $result<0) {
|
||||
if (!is_array($result) && $result < 0) {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
} elseif (count($result)>0) {
|
||||
foreach ($result as $key=>$defaultvalue) {
|
||||
print "\n";
|
||||
|
||||
} elseif (is_array($result) && count($result) > 0) {
|
||||
foreach ($result as $key => $defaultvalue) {
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
// Page
|
||||
@ -378,11 +376,6 @@ if (!is_array($result) && $result<0) {
|
||||
// Value
|
||||
if ($mode != 'focus' && $mode != 'mandatory') {
|
||||
print '<td>';
|
||||
/*print '<input type="hidden" name="const['.$i.'][rowid]" value="'.$obj->rowid.'">';
|
||||
print '<input type="hidden" name="const['.$i.'][lang]" value="'.$obj->lang.'">';
|
||||
print '<input type="hidden" name="const['.$i.'][name]" value="'.$obj->transkey.'">';
|
||||
print '<input type="text" id="value_'.$i.'" class="flat inputforupdate" size="30" name="const['.$i.'][value]" value="'.dol_escape_htmltag($obj->transvalue).'">';
|
||||
*/
|
||||
if ($action != 'edit' || GETPOST('rowid') != $defaultvalue->id) print dol_escape_htmltag($defaultvalue->value);
|
||||
else print '<input type="text" name="value" value="'.dol_escape_htmltag($defaultvalue->value).'">';
|
||||
print '</td>';
|
||||
@ -405,8 +398,6 @@ if (!is_array($result) && $result<0) {
|
||||
print '</td>';
|
||||
|
||||
print "</tr>\n";
|
||||
print "\n";
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user