From febfd792ce3a63314c980cc29440cf2f127953b4 Mon Sep 17 00:00:00 2001 From: "Jannis M. Hoffmann" Date: Thu, 5 May 2022 14:41:10 +0200 Subject: propper cram support (baring some details rng) --- templates/webmail/login.html.ep | 26 +++++++++++++++++++++++++- templates/webmail/readmail.html.ep | 2 +- templates/webmail/writemail.html.ep | 3 ++- 3 files changed, 28 insertions(+), 3 deletions(-) (limited to 'templates') diff --git a/templates/webmail/login.html.ep b/templates/webmail/login.html.ep index 3e224a8..0b7b080 100644 --- a/templates/webmail/login.html.ep +++ b/templates/webmail/login.html.ep @@ -1,5 +1,7 @@ % layout 'mainlayout'; +% my $uses_cram = config->{session}{secure} eq 'cram'; +

@@ -22,14 +24,36 @@ %= label_for password => ucfirst l 'passwd' %= password_field 'password' => (required => '')

+% if ($uses_cram) { + %= hidden_field challenge => rand +% }
- %= submit_button l('login') => (class => 'pure-button pure-button-primary') + %= submit_button l('login') => (class => 'pure-button pure-button-primary') => (name => 'submit_button') => $uses_cram ? (disabled => '') : ()
% end +% if ($uses_cram) { + + + + +% } + %= javascript begin if (!document.login1.userid.value) { document.login1.userid.focus(); diff --git a/templates/webmail/readmail.html.ep b/templates/webmail/readmail.html.ep index f39dd0e..5bad9f3 100644 --- a/templates/webmail/readmail.html.ep +++ b/templates/webmail/readmail.html.ep @@ -12,7 +12,7 @@

Read Mail

-
+
<%= uc l 'subject' %>
<%= $msg->{head}{subject} %>
diff --git a/templates/webmail/writemail.html.ep b/templates/webmail/writemail.html.ep index 6342927..9d148c1 100644 --- a/templates/webmail/writemail.html.ep +++ b/templates/webmail/writemail.html.ep @@ -27,7 +27,8 @@ %= email_field 'back_to' %= label_for txt => ucfirst l 'content' - %= text_area body => (cols => 80) => (rows => 24) => (name => 'txt') + %# text_area body => (cols => 80) => (rows => 24) => (name => 'txt') + %= text_area body => (style => 'width: 100%') => (rows => 24) => (name => 'txt') %= label_for attach => ucfirst l 'attach file' %= file_field 'attach' -- cgit v1.2.3