<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">#!/usr/bin/perl -w
# This file was preprocessed, do not edit!


package Debconf::Element::Web::Multiselect;
use strict;
use base qw(Debconf::Element::Multiselect);


sub show {
	my $this=shift;

	$_=$this-&gt;question-&gt;extended_description;
	s/\n/\n&lt;br&gt;\n/g;
	$_.="\n&lt;p&gt;\n";

	my %value = map { $_ =&gt; 1 } $this-&gt;translate_default;

	my $id=$this-&gt;id;
	$_.="&lt;b&gt;".$this-&gt;question-&gt;description."&lt;/b&gt;\n&lt;select multiple name=\"$id\"&gt;\n";
	my $c=0;
	foreach my $x ($this-&gt;question-&gt;choices_split) {
		if (! $value{$x}) {
			$_.="&lt;option value=".$c++."&gt;$x\n";
		}
		else {
			$_.="&lt;option value=".$c++." selected&gt;$x\n";
		}
	}
	$_.="&lt;/select&gt;\n";
	
	return $_;
}


sub value {
	my $this=shift;

	return $this-&gt;SUPER::value() unless @_;

	my @values=@_;

	$this-&gt;question-&gt;template-&gt;i18n('');
	my @choices=$this-&gt;question-&gt;choices_split;
	$this-&gt;question-&gt;template-&gt;i18n(1);
	
	$this-&gt;SUPER::value(join(', ',  $this-&gt;order_values(map { $choices[$_] } @values)));
}


1
</pre></body></html>