Commit 5ab3abd8 authored by sikeda's avatar sikeda
Browse files

[feature] Internationalisation of options for list parameters and subscriber options.

- Options on edit_list page are shown by internationalised titles.
  - Only listmasters can view real config values.
- Subscriber options on review pages, command results, subscriber option pages and so on are shown by internationalised titles (along with real option values).


git-svn-id: https://subversion.renater.fr/sympa/branches/sympa-6.2-branch@7987 05aa8bb8-cd2b-0410-b1d7-8918dfa770ce
parent 211d796d
......@@ -117,7 +117,16 @@ you subscribed from a different e-mail address ?[%END-%]
Your configuration regarding this command has not been updated.[%END-%]
[% ELSIF u_err.entry == 'available_reception_mode' -%]
[%|loc(u_err.listname,u_err.modes)%]List %1 allows only these reception modes: %2[%END%]
[%|loc(u_err.listname)%]List %1 allows only these reception modes: [%END -%]
[%- FOREACH m = u_err.reception_modes -%]
[%- IF loop.size >= 2 && loop.count == loop.size -%]
[%|loc%], and [%END%][%|optdesc('reception',1)%][% m %][%END-%]
[%- ELSIF loop.count > 1 -%]
[%|loc%], [%END%][%|optdesc('reception',1)%][% m %][%END-%]
[%- ELSE -%]
[%|optdesc('reception',1)%][% m %][%END-%]
[%- END -%]
[%- END -%]
[% ELSIF u_err.entry == 'empty_archives' -%]
[%|loc()%]This list archive is empty.[%END%]
......
......@@ -5,25 +5,34 @@ Subject: [% FILTER qencode %][%|loc(list.name)%]INFO %1[%END%][%END%]
[%|wrap(0,20)%][%|loc(list.subject)%]Subject : %1[%END%]
[% FOREACH o = owner -%]
[% IF o.visibility != 'conceal' %]
[% IF o.visibility != 'conceal' -%]
[%|loc(o.gecos)%]Owner : %1[%END%] <[% o.email %]>
[% END %]
[% END %]
[% END -%]
[%- END -%]
[% FOREACH e = editor -%]
[% IF o.visibility != 'conceal' %]
[% IF o.visibility != 'conceal' -%]
[%|loc(e.gecos)%]Moderator : %1[%END%] <[% e.email %]>
[% END %]
[% END %]
[% END -%]
[%- END -%]
[%|loc(subscribe)%]Subscription : %1[%END%]
[%|loc(unsubscribe)%]Unsubscription : %1[%END%]
[%|loc(send)%]Sending messages : %1[%END%]
[%|loc(review)%]Review subscribers: %1[%END%]
[%|loc(reply_to_header.value)%]Reply to : %1[%END%]
[%|loc('')%]Reply to : %1[%END%][%|optdesc%][% reply_to_header.value %][%END%][% IF reply_to_header.value == 'other_email' || reply_to_header.value == 'all' %] ([% reply_to_header.other_email %])[% END %]
[%|loc(max_size)%]Maximum size : %1[%END%]
[% IF digest -%]
[%|loc(digest)%]Digest : %1[%END%]
[% END %]
[%|loc(available_reception_mode)%]Receiving modes : %1[%END%]
[% END -%]
[%|loc('')%]Receiving modes : %1[%END-%]
[%- FOREACH m = available_reception_modeA -%]
[%- IF loop.size >= 2 && loop.count == loop.size -%]
[%|loc%], and [%END%][%|optdesc('reception',1)%][% m %][%END-%]
[%- ELSIF loop.count > 1 -%]
[%|loc%], [%END%][%|optdesc('reception',1)%][% m %][%END-%]
[%- ELSE -%]
[%|optdesc('reception',1)%][% m %][%END-%]
[%- END -%]
[%- END %]
[%|loc(url)%]Homepage : %1[%END%][%END#wrap%]
[% TRY %]
......
......@@ -4,7 +4,7 @@ Subject: [% FILTER qencode %][%subject%][%END%]
[%|loc(list.name,list.host)%]Here are the subscribers of %1@%2 mailing list:[%END%]
[%|wrap(0,4)%][% FOREACH u = users -%]
[% u.email %] - [% u.gecos %] - [% u.reception %]
[% u.email %] - [% u.gecos %] - [%|optdesc('reception')%][% u.reception %][% END %]
[% END %][%END#wrap%]
[%|loc(total)%]Total subscribers: %1[%END%]
......@@ -1199,8 +1199,11 @@ sub info {
($list->digest->{'minute'});
}
## Reception mode
$data->{'available_reception_mode'} =
$list->available_reception_mode();
$data->{'available_reception_modeA'} =
[$list->available_reception_mode()];
my $wwsympa_url = $robot->wwsympa_url;
$data->{'url'} = $wwsympa_url . '/info/' . $list->name;
......@@ -2536,8 +2539,10 @@ sub set {
&report::reject_report_cmd(
'user',
'available_reception_mode',
{ 'listname' => $which,
'modes' => $list->available_reception_mode
{ 'listname' => $which,
'modes' =>
join(' ', $list->available_reception_mode()),
'reception_modes' => [$list->available_reception_mode()]
},
$cmd_line
);
......
......@@ -2316,6 +2316,202 @@ my %alias = (
}
);
## List parameter values except for parameters below.
my %list_option = (
# reply_to_header.apply
'forced' => {'gettext_id' => 'overwrite Reply-To: header field'},
'respect' => {'gettext_id' => 'preserve existing header field'},
# reply_to_header.value
'sender' => {'gettext_id' => 'sender'},
# reply_to_header.value, include_remote_sympa_list.cert
'list' => {'gettext_id' => 'list'},
# include_ldap_2level_query.select2, include_ldap_2level_query.select1,
# include_ldap_query.select, reply_to_header.value
'all' => {'gettext_id' => 'all'},
# reply_to_header.value
'other_email' => {'gettext_id' => 'other email address'},
# msg_topic_keywords_apply_on
'subject' => {'gettext_id' => 'subject field'},
'body' => {'gettext_id' => 'message body'},
'subject_and_body' => {'gettext_id' => 'subject and body'},
# bouncers_level2.notification, bouncers_level2.action,
# bouncers_level1.notification, bouncers_level1.action,
# spam_protection, dkim_signature_apply_on, web_archive_spam_protection
'none' => {'gettext_id' => 'do nothing'},
# bouncers_level2.notification, bouncers_level1.notification,
# welcome_return_path, remind_return_path, rfc2369_header_fields,
# archive.access
'owner' => {'gettext_id' => 'owner'},
# bouncers_level2.notification, bouncers_level1.notification
'listmaster' => {'gettext_id' => 'listmaster'},
# bouncers_level2.action, bouncers_level1.action
'remove_bouncers' => {'gettext_id' => 'remove bouncing users'},
'notify_bouncers' => {'gettext_id' => 'send notify to bouncing users'},
# pictures_feature, dkim_feature, merge_feature,
# inclusion_notification_feature
'on' => {'gettext_id' => 'enabled'},
'off' => {'gettext_id' => 'disabled'},
# include_remote_sympa_list.cert
'robot' => {'gettext_id' => 'robot'},
# include_ldap_2level_query.select2, include_ldap_2level_query.select1,
# include_ldap_query.select
'first' => {'gettext_id' => 'first entry'},
# include_ldap_2level_query.select2, include_ldap_2level_query.select1
'regex' => {'gettext_id' => 'entries matching regular expression'},
# include_ldap_2level_query.scope2, include_ldap_2level_query.scope1,
# include_ldap_query.scope
'base' => {'gettext_id' => 'base'},
'one' => {'gettext_id' => 'one level'},
'sub' => {'gettext_id' => 'subtree'},
# include_ldap_2level_query.use_ssl, include_ldap_query.use_ssl
'yes' => {'gettext_id' => 'yes'},
'no' => {'gettext_id' => 'no'},
# include_ldap_2level_query.ssl_version, include_ldap_query.ssl_version
'sslv2' => {'gettext_id' => 'SSL version 2'},
'sslv3' => {'gettext_id' => 'SSL version 3'},
'tls' => {'gettext_id' => 'TLS'},
# editor.reception, owner_include.reception, owner.reception,
# editor_include.reception
'mail' => {'gettext_id' => 'receive notification email'},
'nomail' => {'gettext_id' => 'no notifications'},
# editor.visibility, owner_include.visibility, owner.visibility,
# editor_include.visibility
'conceal' => {'gettext_id' => 'concealed from list menu'},
'noconceal' => {'gettext_id' => 'listed on the list menu'},
# welcome_return_path, remind_return_path
'unique' => {'gettext_id' => 'bounce management'},
# owner_include.profile, owner.profile
'privileged' => {'gettext_id' => 'privileged owner'},
'normal' => {'gettext_id' => 'normal owner'},
# priority
'0' => {'gettext_id' => '0 - highest priority'},
'9' => {'gettext_id' => '9 - lowest priority'},
'z' => {'gettext_id' => 'queue messages only'},
# spam_protection, web_archive_spam_protection
'at' => {'gettext_id' => 'replace @ characters'},
'javascript' => {'gettext_id' => 'use JavaScript'},
# msg_topic_tagging
'required_sender' => {'gettext_id' => 'required to post message'},
'required_moderator' =>
{'gettext_id' => 'required to distribute message'},
# msg_topic_tagging, custom_attribute.optional
'optional' => {'gettext_id' => 'optional'},
# custom_attribute.optional
'required' => {'gettext_id' => 'required'},
# custom_attribute.type
'string' => {'gettext_id' => 'string'},
'text' => {'gettext_id' => 'multi-line text'},
'integer' => {'gettext_id' => 'number'},
'enum' => {'gettext_id' => 'set of keywords'},
# footer_type
'mime' => {'gettext_id' => 'add a new MIME part'},
'append' => {'gettext_id' => 'append to message body'},
# archive.access
'open' => {'gettext_id' => 'open'},
'closed' => {'gettext_id' => 'closed'},
'private' => {'gettext_id' => 'subscribers only'},
'public' => {'gettext_id' => 'public'},
## ## user_data_source
## 'database' => {'gettext_id' => 'RDBMS'},
## 'file' => {'gettext_id' => 'include from local file'},
## 'include' => {'gettext_id' => 'include from external source'},
## 'include2' => {'gettext_id' => 'general datasource'},
# rfc2369_header_fields
'help' => {'gettext_id' => 'help'},
'subscribe' => {'gettext_id' => 'subscription'},
'unsubscribe' => {'gettext_id' => 'unsubscription'},
'post' => {'gettext_id' => 'posting address'},
'archive' => {'gettext_id' => 'list archive'},
# dkim_signature_apply_on
'md5_authenticated_messages' =>
{'gettext_id' => 'authenticated by password'},
'smime_authenticated_messages' =>
{'gettext_id' => 'authenticated by S/MIME signature'},
'dkim_authenticated_messages' =>
{'gettext_id' => 'authenticated by DKIM signature'},
'editor_validated_messages' => {'gettext_id' => 'approved by editor'},
'any' => {'gettext_id' => 'any messages'},
# archive.period
'day' => {'gettext_id' => 'daily'},
'week' => {'gettext_id' => 'weekly'},
'month' => {'gettext_id' => 'monthly'},
'quarter' => {'gettext_id' => 'quarterly'},
'year' => {'gettext_id' => 'yearly'},
# web_archive_spam_protection
'cookie' => {'gettext_id' => 'use HTTP cookie'},
# verp_rate
'100%' => {'gettext_id' => '100% - always'},
'0%' => {'gettext_id' => '0% - never'},
# archive_crypted_msg
'original' => {'gettext_id' => 'original messages'},
'decrypted' => {'gettext_id' => 'decrypted messages'},
);
## Values for subscriber reception mode.
my %reception_mode = (
'mail' => {'gettext_id' => 'standard (direct reception)'},
'digest' => {'gettext_id' => 'digest MIME format'},
'digestplain' => {'gettext_id' => 'digest plain text format'},
'summary' => {'gettext_id' => 'summary mode'},
'notice' => {'gettext_id' => 'notice mode'},
'txt' => {'gettext_id' => 'text-only mode'},
'html' => {'gettext_id' => 'html-only mode'},
'urlize' => {'gettext_id' => 'urlize mode'},
'nomail' => {'gettext_id' => 'no mail'},
'not_me' => {'gettext_id' => 'you do not receive your own posts'}
);
## Values for subscriber visibility mode.
my %visibility_mode = (
'noconceal' => {'gettext_id' => 'listed in the list review page'},
'conceal' => {'gettext_id' => 'concealed'}
);
## Values for list status.
my %list_status = (
'open' => {'gettext_id' => 'in operation'},
'pending' => {'gettext_id' => 'pending'},
'error_config' => {'gettext_id' => 'erroneous configuration'},
'family_closed' => {'gettext_id' => 'closed family instance'},
'closed' => {'gettext_id' => 'closed list'},
);
## This is the generic hash which keeps all lists in memory.
our %list_of_topics = ();
my %edit_list_conf = ();
......@@ -12339,8 +12535,11 @@ sub is_available_reception_mode {
}
# List the parameter reception of the available_user_options section
# Note: Since Sympa 6.2a.33, this returns an array under array context.
sub available_reception_mode {
my $self = shift;
my $self = shift;
return @{$self->available_user_options->{'reception'}}
if wantarray;
return join(' ', @{$self->available_user_options->{'reception'}});
}
......@@ -14028,6 +14227,32 @@ sub user {
return $self->{'user'}{$role}{$who} = $info;
}
##
## Method for UI
##
sub get_option_title {
my $self = shift;
my $option = shift;
my $type = shift || '';
my $withval = shift || 0;
my $map = { 'reception' => \%reception_mode,
'visibility' => \%visibility_mode,
'status' => \%list_status,
}->{$type} || \%list_option;
my $t = $map->{$option} || {};
if ($t->{'gettext_id'}) {
my $ret = gettext($t->{'gettext_id'});
$ret =~ s/^\s+//;
$ret =~ s/\s+$//;
return sprintf '%s (%s)', $ret, $option if $withval;
return $ret;
}
return $option;
}
###### END of the List package ######
############################################################################
......
......@@ -68,8 +68,8 @@ sub new {
my $status = $robot->load($name, %options);
unless (defined $status) {
Site->robots($name, undef);
return undef;
}
return undef;
}
}
## Initialize internal list cache
......
......@@ -177,6 +177,26 @@ sub wrap {
};
}
# IN:
# $context: Context.
# $type: type of list parameter value: 'reception', 'visibility', 'status'
# or others (default).
# $withval: if parameter value is added to the description. False by
# default.
# OUT:
# Subref to generate i18n'ed description of list parameter value.
sub optdesc {
my ($context, $type, $withval) = @_;
return sub {
my $x = shift;
return undef unless defined $x;
return undef unless $x =~ /\S/;
$x =~ s/^\s+//;
$x =~ s/\s+$//;
return List->get_option_title($x, $type, $withval);
};
}
## To add a directory to the TT2 include_path
sub add_include_path {
my $path = shift;
......@@ -237,6 +257,7 @@ sub parse_tt2 {
helploc => [\&tt2::maketext, 1],
locdt => [\&tt2::locdatetime, 1],
wrap => [\&tt2::wrap, 1],
optdesc => [\&tt2::optdesc, 1],
qencode => [\&qencode, 0],
escape_xml => [\&escape_xml, 0],
escape_url => [\&escape_url, 0],
......
......@@ -51,7 +51,7 @@
[% END %]
[% IF is_listmaster %]
[% IF p.default == '1' %]
(default)
[%|loc%](default)[%END%]
[% END %]
[% END %]
</h4>
......@@ -64,7 +64,7 @@
<!-- Multiple Enum -->
[% IF p.may_edit == 'write' %]
<select name="multiple_param.[% p.name %]" multiple="multiple">
<select name="multiple_param.[% p.name %]" multiple="multiple" style="vertical-align: top">
[% FOREACH enum = p.value %]
<option value="[% enum.key %]"
[% IF enum.value.selected == '1' %]
......@@ -73,7 +73,7 @@
[% IF enum.value.title %]
>[% enum.value.title %]</option>
[% ELSE %]
>[% enum.key %]</option>
>[%|optdesc('',is_listmaster)%][% enum.key %][%END%]</option>
[% END %]
[% END %]
</select>
......@@ -83,7 +83,7 @@
[% IF enum.value.title %]
[% enum.value.title %]
[% ELSE %]
[% enum.key %]
[%|optdesc('',is_listmaster)%][% enum.key %][%END%]
[% END %]
[% END %]
[% END %]
......@@ -101,9 +101,9 @@
[% IF key.may_edit != 'hidden' %]
<label for="single_param.[% p.name %].[% o_INDEX %].[% key.name %]">
[% IF key.title %]
[% key.title %][%|loc%]:[%END%]
[% key.title %][% IF is_listmaster %] ([% key.name %])[% END %][%|loc%]:[%END%]
[% ELSE %]
[% key.name %][%|loc%]:[%END%]
[%|optdesc('',is_listmaster)%][% key.name %][%END%][%|loc%]:[%END%]
[% END %]
</label>
......@@ -116,14 +116,14 @@
[%- IF enum.value.selected == '1' -%]
selected="selected"
[%- END -%]
>[% enum.key %]
>[% IF enum.value.title %][% enum.value.title %][% ELSE %][%|optdesc('',is_listmaster)%][% enum.key %][%END%][% END %]
</option>
[% END %]
</select>
[% ELSIF key.may_edit == 'read' %]
[% FOREACH enum = key.value %]
[% IF enum.value.selected == '1' %]
[% enum.key %]
[% IF enum.value.title %][% enum.value.title %][% ELSE %][%|optdesc('',is_listmaster)%][% enum.key %][%END%][% END %]
<input type="hidden" name="single_param.[% p.name %].[% o_INDEX %].[% key.name %]" value="[% enum.key %]" />
[% END %]
[% END %]
......@@ -145,7 +145,7 @@
[% ELSIF key.may_edit == 'read' %]
[% FOREACH source = key.value %]
[% IF source.value.selected == '1' %]
[% source.value.title %] ([% source.value.name %])
[% source.value.title %][% IF is_listmaster && source.value.name %] ([% source.value.name %])[% END %]
<input type="hidden" name="single_param.[% p.name %].[% o_INDEX %].[% key.name %]" value="[% source.value.name %]" />
[% END %]
[% END %]
......@@ -201,7 +201,7 @@
[% IF scenario.value.selected == '1' %]
selected="selected"
[% END %]
>[% scenario.value.web_title %] ([% scenario.value.name %])</option>
>[% scenario.value.web_title %][% IF is_listmaster && scenario.value.name %] ([% scenario.value.name %])[% END %]</option>
[% END %]
[% END %]
</select>
......@@ -209,7 +209,7 @@
[% ELSIF p.may_edit == 'read' %]
[% FOREACH scenario = p.value %]
[% IF scenario.value.selected == '1' %]
[% scenario.value.web_title %] ([% scenario.value.name %])
[% scenario.value.web_title %][% IF is_listmaster && scenario.value.name %] ([% scenario.value.name %])[% END %]
[% END %]
[% END %]
[% END %]
......@@ -223,13 +223,13 @@
[% IF task.value.selected == '1' %]
selected="selected"
[% END %]
>[% task.value.title %] ([% task.value.name %])</option>
>[% task.value.title %][% IF is_listmaster && task.value.name %] ([% task.value.name %])[% END %]</option>
[% END %]
</select>
[% ELSIF p.may_edit == 'read' %]
[% FOREACH task = p.value %]
[% IF task.value.selected == '1' %]
[% task.value.title %] ([% task.value.name %])
[% task.value.title %][% IF is_listmaster && task.vakue.name %] ([% task.value.name %])[% END %]
[% END %]
[% END %]
[% END %]
......@@ -242,13 +242,13 @@
[% IF source.value.selected == '1' %]
selected="selected"
[% END %]
>[% source.value.title %] ([% source.value.name %])</option>
>[% source.value.title %][% IF is_listmaster && source.value.name %] ([% source.value.name %])[% END %]</option>
[% END %]
</select>
[% ELSIF p.may_edit == 'read' %]
[% FOREACH source = p.value %]
[% IF source.value.selected == '1' %]
[% source.value.title %] ([% source.value.name %])
[% source.value.title %][% IF is_listmaster && source.value.name %] ([% source.value.name %])[% END %]
[% END %]
[% END %]
[% END %]
......@@ -259,9 +259,9 @@
[% IF key.may_edit != 'hidden' %]
<label for="single_param.[% p.name %].[% key.name %].name">
[% IF key.title %]
[% key.title %][%|loc%]:[%END%]
[% key.title %][% IF is_listmaster %] ([% key.name %])[% END %][%|loc%]:[%END%]
[% ELSE %]
[% key.name %][%|loc%]:[%END%]
[%|optdesc('',is_listmaster)%][% key.name %][%END%][%|loc%]:[%END%]
[% END %]
</label>
......@@ -274,14 +274,14 @@
[% IF scenario.value.selected == '1' %]
selected="selected"
[% END %]
>[% scenario.value.web_title %] ([% scenario.value.name %])</option>
>[% scenario.value.web_title %][% IF is_listmaster && scenario.value.name %] ([% scenario.value.name %])[% END %]</option>
[% END %]
</select>
<br />
[% ELSIF key.may_edit == 'read' %]
[% FOREACH scenario = key.value %]
[% IF scenario.value.selected == '1' %]
[% scenario.value.web_title %] ([% scenario.value.name %])
[% scenario.value.web_title %][% IF is_listmaster && scenario.value.name %] ([% scenario.value.name %])[% END %]
[% END %]
[% END %]
[% END %]
......@@ -294,13 +294,13 @@
[% IF task.value.selected == '1' %]
selected="selected"
[% END %]
>[% task.value.title %] ([% task.value.name %])</option>
>[% task.value.title %][% IF is_listmaster && task.value.name %] ([% task.value.name %])[% END %]</option>
[% END %]
</select>
[% ELSIF key.may_edit == 'read' %]
[% FOREACH task = key.value %]
[% IF task.value.selected == '1' %]
[% task.value.title %] ([% task.value.name %])
[% task.value.title %][% IF is_listmaster && task.value.name %] ([% task.value.name %])[% END %]
[% END %]
[% END %]
[% END %]
......@@ -313,13 +313,13 @@
[% IF source.value.selected == '1' %]
selected="selected"
[% END %]
>[% source.value.title %] ([% source.value.name %])</option>
>[% source.value.title %][% IF is_listmaster && source.value.name %] ([% source.value.name %])[% END %]</option>
[% END %]
</select>
[% ELSIF key.may_edit == 'read' %]
[% FOREACH source = key.value %]
[% IF source.value.selected == '1' %]
[% source.value.title %] ([% source.value.name %])
[% source.value.title %][% IF is_listmaster && source.value.name %] ([% source.value.name %])[% END %]
[% END %]
[% END %]
[% END %]
......@@ -328,7 +328,7 @@
<!-- Enum -->
[% IF key.may_edit == 'write' %]
[% IF key.occurrence == 'multiple' %]
<select name="multiple_param.[% p.name %].[% key.name %]" id="single_param.[% p.name %].[% key.name %].name" multiple="multiple">
<select name="multiple_param.[% p.name %].[% key.name %]" id="single_param.[% p.name %].[% key.name %].name" multiple="multiple" style="vertical-align: top">
[% ELSE %]
<select name="single_param.[% p.name %].[% key.name %]" id="single_param.[% p.name %].[% key.name %].name">
[% END %]
......@@ -340,7 +340,7 @@
[% IF enum.value.title %]
>[% enum.value.title %]</option>
[% ELSE %]
>[% enum.key %]</option>
>[%|optdesc('',is_listmaster)%][% enum.key %][%END%]</option>
[% END %]
[% END %]
</select>
......@@ -349,9 +349,9 @@
[% FOREACH enum = key.value %]
[% IF enum.value.selected == '1' %]
[% IF enum.value.title %]
[% enum.value.title %]
[% enum.value.title %]
[% ELSE %]
[% enum.key %]
[%|optdesc('',is_listmaster)%][% enum.key %][%END%]
[% END %]
[% END %]
[% END %]
......@@ -385,14 +385,14 @@
[% IF enum.value.title %]
>[% enum.value.title %]</option>
[% ELSE %]
>[% enum.key %]</option>
>[%|optdesc('',is_listmaster)%][% enum.key %][%END%]</option>
[% END %]
[% END %]
</select>
[% ELSIF p.may_edit == 'read' %]
[% FOREACH enum = p.value %]
[% IF enum.value.selected == '1' %]
[% enum.key %]
[% IF enum.value.title %][% enum.value.title %][% ELSE %][%|optdesc('',is_listmaster)%][% enum.key %][%END%][% END %]
[% END %]
[% END %]
[% END %]
......
......@@ -37,7 +37,7 @@
[% IF l.value.is_editor %][%|loc%]editor[%END%] [% END %]
</td>
<td>
[% l.value.reception %]
[%|optdesc('reception')%][% l.value.reception %][% END %]
</td>
<td>
[% l.value.topic %]
......
......@@ -11,17 +11,27 @@
[%|loc%]Last update:[%END%] [% subscriber.update_date %] <br /><br />
<input type="hidden" name="list" value="[% list %]" />
[%|loc%]Receiving mode:[%END%]
[% SET single_option = 0 %][% FOREACH r = reception %]
[% IF loop.size == 1 %][% SET single_option = 1 %][% END %][% LAST %]
[% END %]
[% IF single_option %]
[% FOREACH r = reception %]
<input type="hidden" name="reception" value="[% r.key %]" />
[% r.value.description %]
[% END %]
[% ELSE %]
<select name="reception">
[% FOREACH r = reception %]
<option value="[% r.key %]" [% r.value.selected %]>[% r.value.description %]</option>
[% END %]