Bug #3291923, Insert Ajax form does not generate default values - partial fix for text fields

This commit is contained in:
Marc Delisle
2011-04-30 14:56:02 -04:00
parent fcaedaf75b
commit eec80b2a1f
2 changed files with 4 additions and 1 deletions

View File

@@ -387,7 +387,7 @@ $(document).ready(function() {
if ($this_element.is('.textfield')) {
// do not remove the 'value' attribute for ENUM columns
if ($this_element.closest('tr').find('span.column_type').html() != 'enum') {
$this_element.attr('value', '');
$this_element.attr('value', $this_element.closest('tr').find('span.default_value').html());
}
$this_element
.unbind('change')

View File

@@ -694,6 +694,9 @@ foreach ($rows as $row_id => $vrow) {
// HTML attribute
echo ' <td>' . "\n";
// Will be used by js/tbl_change.js to set the default value
// for the "Continue insertion" feature
echo '<span class="default_value hide">' . $special_chars . '</span>';
if ($foreignData['foreign_link'] == true) {
echo $backup_field . "\n";
?>