aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Fripost/Panel
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Fripost/Panel')
-rw-r--r--lib/Fripost/Panel/Interface.pm27
1 files changed, 20 insertions, 7 deletions
diff --git a/lib/Fripost/Panel/Interface.pm b/lib/Fripost/Panel/Interface.pm
index f102a21..ff9b291 100644
--- a/lib/Fripost/Panel/Interface.pm
+++ b/lib/Fripost/Panel/Interface.pm
@@ -167,7 +167,9 @@ sub EditDomain : Runmode {
domain => $d,
isactive => $q->param('isactive'),
description => $q->param('description'),
- catchalls => $q->param('catchalls')
+ catchalls => $q->param('catchalls'),
+ canCreateAlias => $q->param('canCreateAlias'),
+ canCreateList => $q->param('canCreateList')
}, -concat => "(\n|\x{0D}\x{0A})");
}
my %domain = $fp->domain->get( $d, -die => 404 );
@@ -177,21 +179,24 @@ sub EditDomain : Runmode {
, loop_context_vars => 1
, global_vars => 1 );
$template->param( $self->userInfo );
- $template->param( domain => encode_entities($d) );
+ $template->param( domain => encode_entities($d)
+ , isPostmaster => $domain{permissions} eq 'p');
if ($error) {
# Preserve the (incorrect) form
$template->param( isactive => $q->param('isactive')
, description => $q->param('description')
, catchalls => $q->param('catchalls')
+ , canCreateAlias => $q->param('canCreateAlias')
+ , canCreateList => $q->param('canCreateList')
, error => encode_entities ($error) );
}
else {
$template->param( isactive => $domain{isactive}
- , description => join ("\x{0D}\x{0A}",
- @{$domain{description}})
- , catchalls => join ("\x{0D}\x{0A}",
- map { encode_entities ($_) }
- @{$domain{catchalls}}) );
+ , description => &mkFormContent (@{$domain{description}})
+ , catchalls => &mkFormContentE (@{$domain{catchalls}})
+ , canCreateAlias => &mkFormContentE (@{$domain{canCreateAlias}})
+ , canCreateList => &mkFormContentE (@{$domain{canCreateList}})
+ );
}
$template->param( newChanges => defined $q->param('submit') );
return $template->output;
@@ -458,6 +463,14 @@ sub userInfo {
)
}
+sub mkFormContentE {
+ &mkFormContent (map { encode_entities ($_) } @_);
+}
+
+sub mkFormContent {
+ join ("\x{0D}\x{0A}", @_);
+}
+
=head1 AUTHOR
Guilhem Moulin C<< <guilhem at fripost.org> >>