Skip to content

Commit

Permalink
Fix: use loadurl just for textarea and numeric
Browse files Browse the repository at this point in the history
  • Loading branch information
hregis committed Oct 27, 2011
1 parent df19c5e commit 1137b69
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 12 deletions.
6 changes: 3 additions & 3 deletions htdocs/compta/deplacement/fiche.php
Expand Up @@ -361,7 +361,7 @@

// 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>';
Expand Down Expand Up @@ -405,15 +405,15 @@
// 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
if (! $user->societe_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>";
}

Expand Down
1 change: 1 addition & 0 deletions htdocs/core/class/html.form.class.php
Expand Up @@ -156,6 +156,7 @@ function editInPlace($value, $htmlname, $condition, $type='area')
global $user;

$out='';
$value = ($value ? $value : "&nbsp;");

if ($condition)
{
Expand Down
7 changes: 0 additions & 7 deletions htdocs/core/js/editinplace.js
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions htdocs/fichinter/fiche.php
Expand Up @@ -870,15 +870,15 @@
// 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
if (! $user->societe_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_private', $user->rights->ficheinter->creer);
print $form->editInPlace(dol_nl2br($object->note_private), 'note_private', $user->rights->ficheinter->creer);
print "</td></tr>";
}

Expand Down

0 comments on commit 1137b69

Please sign in to comment.