Skip to content

Commit

Permalink
Item1085: fix for not saving from empty table or added / removed rows
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.foswiki.org/trunk@2523 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
ArthurClemens authored and ArthurClemens committed Feb 17, 2009
1 parent e68e708 commit eda58cb
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 deletions.
2 changes: 1 addition & 1 deletion EditTablePlugin/data/System/EditTablePlugin.txt
Expand Up @@ -212,7 +212,7 @@ a plugin setting write ==%<nop>&lt;plugin&gt;_&lt;setting&gt;%==, for example, =

| Copyright: | &copy; 2008-2009, Arthur Clemens and Foswiki Contributors; Copyright &copy; 2002-2007 Peter Thoeny, peter@thoeny.org and TWiki Contributors |
| License: | GPL ([[http://www.gnu.org/copyleft/gpl.html][GNU General Public License]]) |
| Plugin Version: | 4.13 (08 Feb 2009) |
| Plugin Version: | 4.14 (17 Feb 2009) |
| Change History: | <!-- specify latest version first -->&nbsp; |
| 08 Feb 2009: | 4.13: Fixed incidental removal of =EDITCELL= tags when a different table in the topic is edited. Improved display of linebreaks and TML inside cells. |
| 07 Feb 2009: | 4.12: Protect =verbatim class="xxx"= during edit. |
Expand Down
2 changes: 1 addition & 1 deletion EditTablePlugin/lib/Foswiki/Plugins/EditTablePlugin.pm
Expand Up @@ -30,7 +30,7 @@ our $VERSION = '$Rev$';
# This is a free-form string you can use to "name" your own plugin version.
# It is *not* used by the build automation tools, but is reported as part
# of the version number in PLUGINDESCRIPTIONS.
our $RELEASE = '4.13';
our $RELEASE = '4.14';

our $ENCODE_START = '--EditTableEncodeStart--';
our $ENCODE_END = '--EditTableEncodeEnd--';
Expand Down
21 changes: 13 additions & 8 deletions EditTablePlugin/lib/Foswiki/Plugins/EditTablePlugin/Core.pm
Expand Up @@ -891,14 +891,19 @@ sub handleTableStart {

sub hiddenField {
my ( $prefix, $name, $value, $suffix ) = @_;
$prefix = defined $prefix ? $prefix : '';
$suffix = defined $suffix ? $suffix : '';

return "$prefix"
. CGI::hidden(
-name => $name,
-value => $value
) . $suffix;

$prefix ||= '';
$suffix ||= '';

# Somehow this does not work at all:
# return $prefix
# . CGI::hidden(
# -name => $name,
# -value => $value
# ) . $suffix;

return
"$prefix<input type=\"hidden\" name=\"$name\" value=\"$value\" />$suffix";
}

=pod
Expand Down

0 comments on commit eda58cb

Please sign in to comment.