Fix: use loadurl just for textarea and numeric

This commit is contained in:
Regis Houssin
2011-10-27 18:17:27 +02:00
parent df19c5e606
commit 1137b69a03
4 changed files with 6 additions and 12 deletions

View File

@@ -361,7 +361,7 @@ else if ($id)
// Km/Price
print '<tr><td>'.$langs->trans("FeesKilometersOrAmout").'</td>';
print '<td>'.$form->editInPlace($object->km, 'km', $object->element, 'text').'</td></tr>';
print '<td>'.$form->editInPlace($object->km, 'km', $object->element, 'numeric').'</td></tr>';
// Where
print '<tr><td>'.$langs->trans("CompanyVisited").'</td>';
@@ -405,7 +405,7 @@ else if ($id)
// Public note
print '<tr><td valign="top">'.$langs->trans("NotePublic").'</td>';
print '<td valign="top" colspan="3">';
print $form->editInPlace(($object->note_public ? dol_nl2br($object->note_public) : "&nbsp;"), 'note_public', $user->rights->deplacement->creer);
print $form->editInPlace(dol_nl2br($object->note_public), 'note_public', $user->rights->deplacement->creer);
print "</td></tr>";
// Private note
@@ -413,7 +413,7 @@ else if ($id)
{
print '<tr><td valign="top">'.$langs->trans("NotePrivate").'</td>';
print '<td valign="top" colspan="3">';
print $form->editInPlace(($object->note_private ? dol_nl2br($object->note_private) : "&nbsp;"), 'note', $user->rights->deplacement->creer);
print $form->editInPlace(dol_nl2br($object->note_private), 'note', $user->rights->deplacement->creer);
print "</td></tr>";
}

View File

@@ -156,6 +156,7 @@ class Form
global $user;
$out='';
$value = ($value ? $value : "&nbsp;");
if ($condition)
{

View File

@@ -42,13 +42,6 @@ $(document).ready(function() {
cancel : cancelInPlace,
submit : submitInPlace,
indicator : indicatorInPlace,
loadurl : urlLoadInPlace,
loaddata : {
type: 'text',
element: element,
table_element: table_element,
fk_element: fk_element
},
submitdata : {
type: 'text',
element: element,

View File

@@ -870,7 +870,7 @@ else if ($id > 0 || ! empty($ref))
// Public note
print '<tr><td valign="top">'.$langs->trans("NotePublic").'</td>';
print '<td valign="top" colspan="3">';
print $form->editInPlace(($object->note_public ? dol_nl2br($object->note_public) : "&nbsp;"), 'note_public', $user->rights->ficheinter->creer);
print $form->editInPlace(dol_nl2br($object->note_public), 'note_public', $user->rights->ficheinter->creer);
print "</td></tr>";
// Private note
@@ -878,7 +878,7 @@ else if ($id > 0 || ! empty($ref))
{
print '<tr><td valign="top">'.$langs->trans("NotePrivate").'</td>';
print '<td valign="top" colspan="3">';
print $form->editInPlace(($object->note_private ? dol_nl2br($object->note_private) : "&nbsp;"), 'note_private', $user->rights->ficheinter->creer);
print $form->editInPlace(dol_nl2br($object->note_private), 'note_private', $user->rights->ficheinter->creer);
print "</td></tr>";
}