*** edit.orig Sun Jan 4 20:53:32 2004
--- edit Sun Jan 4 20:54:48 2004
***************
*** 232,239 ****
--- 232,241 ----
# Don't want to render form fields, so this after getRenderedVersion
my %formMeta = $meta->findOne( "FORM" );
my $form = "";
+ my $formlabel = "";
$form = $formMeta{"name"} if( %formMeta );
if( $form && $saveCmd ne "repRev" ) {
+ $formlabel = "Change form";
my @fieldDefs = &TWiki::Form::getFormDef( $templateWeb, $form );
if( ! @fieldDefs ) {
***************
*** 244,258 ****
my $formText = &TWiki::Form::renderForEdit( $webName, $topic, $form, $meta, $query, @fieldDefs );
$tmpl =~ s/%FORMFIELDS%/$formText/go;
} elsif( $saveCmd ne "repRev" && TWiki::Prefs::getPreferencesValue( "WEBFORMS", $webName )) {
! $form = '
'
! . &TWiki::Form::chooseFormButton( "Add form" )
! . ' |
';
! $tmpl =~ s/%FORMFIELDS%/$form/go;
} else {
$tmpl =~ s/%FORMFIELDS%//go;
}
$tmpl =~ s/%FORMTEMPLATE%//go; # Clear if not being used
$tmpl =~ s/%TEXT%/$text/go;
$tmpl =~ s|( ?) **nop/*>\n?|$1|gois; # remove tags
--- 246,266 ----
my $formText = &TWiki::Form::renderForEdit( $webName, $topic, $form, $meta, $query, @fieldDefs );
$tmpl =~ s/%FORMFIELDS%/$formText/go;
} elsif( $saveCmd ne "repRev" && TWiki::Prefs::getPreferencesValue( "WEBFORMS", $webName )) {
! $formlabel = "Add form";
! $tmpl =~ s/%FORMFIELDS%//go;
} else {
$tmpl =~ s/%FORMFIELDS%//go;
}
$tmpl =~ s/%FORMTEMPLATE%//go; # Clear if not being used
+
+ if ($formlabel) {
+ $form = &TWiki::Form::chooseFormButton( $formlabel );
+ $tmpl =~ s/%FORMEDIT%/$form/go;
+ } else {
+ $tmpl =~ s/%FORMEDIT%//go;
+ }
+
$tmpl =~ s/%TEXT%/$text/go;
$tmpl =~ s|( ?) **nop/*>\n?|$1|gois; # remove tags