diff -urNad debconf-1.5.23.orig/Debconf/Element/Web/Boolean.pm debconf-1.5.23/Debconf/Element/Web/Boolean.pm --- debconf-1.5.23.orig/Debconf/Element/Web/Boolean.pm 2008-08-02 04:39:11.000000000 +0100 +++ debconf-1.5.23/Debconf/Element/Web/Boolean.pm 2008-08-02 05:21:02.000000000 +0100 @@ -28,15 +28,16 @@ my $this=shift; $_=$this->question->extended_description; - s/\n/\n
\n/g; - $_.="\n

\n"; + s/\n(\s+[-\*]\s)/\n$1<\/tt>/g; + s/\n+/<\/p>\n

/g; + $_ = "

\n

".$this->question->description."

\n

".$_."

\n"; my $default=''; $default=$this->question->value if defined $this->question->value; my $id=$this->id; - $_.="\n". - $this->question->description.""; - + $_.="\n"; + $_.="\n
"; return $_; } diff -urNad debconf-1.5.23.orig/Debconf/Element/Web/Error.pm debconf-1.5.23/Debconf/Element/Web/Error.pm --- debconf-1.5.23.orig/Debconf/Element/Web/Error.pm 2008-08-02 04:39:11.000000000 +0100 +++ debconf-1.5.23/Debconf/Element/Web/Error.pm 2008-08-02 05:21:10.000000000 +0100 @@ -8,12 +8,40 @@ package Debconf::Element::Web::Error; use strict; -use base qw(Debconf::Element::Web::Text); +use base qw(Debconf::Element); =head1 DESCRIPTION -This element handles an error message on a web form. It is identical to -Debconf::Element::Web::Text. +This element handles an error message on a form. + +=head1 METHODS + +=over 4 + +=item show + +Generates and returns html for the error message. + +=cut + +sub show { + my $this=shift; + + $_=$this->question->extended_description; + s/\n(\s+[-\*]\s)/\n$1<\/tt>/g; + s/\n/\n
\n/g; + + $_="
\n

".$this->question->description."

\n". + "

".$_."

\n
"; + + return $_; +} + +=back + +=head1 AUTHOR + +Joey Hess =cut diff -urNad debconf-1.5.23.orig/Debconf/Element/Web/Multiselect.pm debconf-1.5.23/Debconf/Element/Web/Multiselect.pm --- debconf-1.5.23.orig/Debconf/Element/Web/Multiselect.pm 2008-08-02 04:39:11.000000000 +0100 +++ debconf-1.5.23/Debconf/Element/Web/Multiselect.pm 2008-08-02 05:20:44.000000000 +0100 @@ -28,13 +28,15 @@ my $this=shift; $_=$this->question->extended_description; - s/\n/\n
\n/g; - $_.="\n

\n"; + s/\n(\s+[-\*]\s)/\n$1<\/tt>/g; + s/\n+/<\/p>\n

/g; my %value = map { $_ => 1 } $this->translate_default; my $id=$this->id; - $_.="".$this->question->description."\n\n"; my $c=0; foreach my $x ($this->question->choices_split) { if (! $value{$x}) { @@ -44,7 +46,7 @@ $_.="


\n"; return $_; } diff -urNad debconf-1.5.23.orig/Debconf/Element/Web/Password.pm debconf-1.5.23/Debconf/Element/Web/Password.pm --- debconf-1.5.23.orig/Debconf/Element/Web/Password.pm 2008-08-02 04:39:11.000000000 +0100 +++ debconf-1.5.23/Debconf/Element/Web/Password.pm 2008-08-02 05:20:49.000000000 +0100 @@ -28,13 +28,14 @@ my $this=shift; $_=$this->question->extended_description; - s/\n/\n
\n/g; - $_.="\n

\n"; + s/\n(\s+[-\*]\s)/\n$1<\/tt>/g; + s/\n+/<\/p>\n

/g; + $_ = "

\n

".$this->question->description."

\n

".$_."

\n"; my $default=''; $default=$this->question->value if defined $this->question->value; my $id=$this->id; - $_.="".$this->question->description."\n"; + $_.="\n
"; return $_; } diff -urNad debconf-1.5.23.orig/Debconf/Element/Web/Select.pm debconf-1.5.23/Debconf/Element/Web/Select.pm --- debconf-1.5.23.orig/Debconf/Element/Web/Select.pm 2008-08-02 04:39:11.000000000 +0100 +++ debconf-1.5.23/Debconf/Element/Web/Select.pm 2008-08-02 05:20:53.000000000 +0100 @@ -28,12 +28,13 @@ my $this=shift; $_=$this->question->extended_description; - s/\n/\n
\n/g; - $_.="\n

\n"; + s/\n(\s+[-\*]\s)/\n$1<\/tt>/g; + s/\n+/<\/p>\n

/g; my $default=$this->translate_default; my $id=$this->id; - $_.="".$this->question->description."\n\n"; my $c=0; foreach my $x ($this->question->choices_split) { if ($x ne $default) { @@ -43,7 +44,7 @@ $_.="


\n"; return $_; } diff -urNad debconf-1.5.23.orig/Debconf/Element/Web/String.pm debconf-1.5.23/Debconf/Element/Web/String.pm --- debconf-1.5.23.orig/Debconf/Element/Web/String.pm 2008-08-02 04:39:11.000000000 +0100 +++ debconf-1.5.23/Debconf/Element/Web/String.pm 2008-08-02 05:20:57.000000000 +0100 @@ -28,13 +28,14 @@ my $this=shift; $_=$this->question->extended_description; - s/\n/\n
\n/g; - $_.="\n

\n"; + s/\n(\s+[-\*]\s)/\n$1<\/tt>/g; + s/\n+/<\/p>\n

/g; + $_ = "

\n

".$this->question->description."

\n

".$_."

\n"; my $default=''; $default=$this->question->value if defined $this->question->value; my $id=$this->id; - $_.="".$this->question->description."\n"; + $_.="\n
"; return $_; } diff -urNad debconf-1.5.23.orig/Debconf/Element/Web/Text.pm debconf-1.5.23/Debconf/Element/Web/Text.pm --- debconf-1.5.23.orig/Debconf/Element/Web/Text.pm 2008-08-02 04:39:11.000000000 +0100 +++ debconf-1.5.23/Debconf/Element/Web/Text.pm 2008-08-02 05:20:59.000000000 +0100 @@ -28,10 +28,12 @@ my $this=shift; $_=$this->question->extended_description; + s/\n(\s+[-\*]\s)/\n$1<\/tt>/g; s/\n/\n
\n/g; - $_.="\n

\n"; - return "".$this->question->description."$_

"; + $_="

\n

".$this->question->description."

\n

".$_."

\n
"; + + return $_; } =back diff -urNad debconf-1.5.23.orig/Debconf/FrontEnd/Web.pm debconf-1.5.23/Debconf/FrontEnd/Web.pm --- debconf-1.5.23.orig/Debconf/FrontEnd/Web.pm 2008-08-02 04:39:11.000000000 +0100 +++ debconf-1.5.23/Debconf/FrontEnd/Web.pm 2008-08-02 05:21:30.000000000 +0100 @@ -146,7 +146,7 @@ $elt->id($id++); my $html=$elt->show; if ($html ne '') { - $form.=$html."
\n"; + $form.=$html."\n"; } } # If the elements generated no html, return now so we @@ -157,9 +157,93 @@ my $formid=$this->formid(1 + $this->formid); # Add the standard header to the html we already have. - $form="\n".$this->title."\n\n". - "
\n". - $form."

\n"; + my $title = $this->title; + $form = < + +$title + + + +

+

$title

+
+
+ + + +$form + +
+HTML # Should the back button be displayed? if ($this->capb_backup) {