NEW Edit of extrafields position page on the edit form

This commit is contained in:
Laurent Destailleur 2018-03-17 11:21:50 +01:00
parent cfeb0dccfe
commit 57e2240354
2 changed files with 4 additions and 4 deletions

View File

@ -131,8 +131,8 @@ $langs->load("modulebuilder");
});
</script>
<form action="<?php echo $_SERVER["PHP_SELF"]; ?>?attrname=<?php echo $attrname; ?>" method="post">
<!-- Form to edit an extra field -->
<form action="<?php echo $_SERVER["PHP_SELF"]; ?>?attrname=<?php echo $attrname; ?>" id="formeditextrafield" method="post">
<input type="hidden" name="token" value="<?php echo $_SESSION['newtoken']; ?>">
<input type="hidden" name="attrname" value="<?php echo $attrname; ?>">
<input type="hidden" name="action" value="update">

View File

@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2010-2017 Laurent Destailleur <eldy@users.sourceforge.net>
/* Copyright (C) 2010-2018 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2012-2017 Regis Houssin <regis.houssin@capnetworks.com>
*
* This program is free software; you can redistribute it and/or modify
@ -91,7 +91,7 @@ if (is_array($extrafields->attributes[$elementtype]['type']) && count($extrafiel
if (! empty($conf->multicompany->enabled)) {
print '<td align="center">'.($extrafields->attributes[$elementtype]['entityid'][$key]==0?$langs->trans("All"):$extrafields->attributes[$elementtype]['entitylabel'][$key]).'</td>';
}
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=edit&attrname='.$key.'">'.img_edit().'</a>';
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=edit&attrname='.$key.'#formeditextrafield">'.img_edit().'</a>';
print "&nbsp; <a href=\"".$_SERVER["PHP_SELF"]."?action=delete&attrname=$key\">".img_delete()."</a></td>\n";
print "</tr>";
}