Unverified Commit 20d39dc0 authored by IKEDA Soji's avatar IKEDA Soji Committed by GitHub
Browse files

Merge pull request #1025 from ldidry/show-mail-subject-when-deleting-from-archive by ldidry

Show subjects of archived mails before deletion’s confirmation
parents e993c6af beb4b342
......@@ -235,7 +235,12 @@ IDXPGEND
<LITEMPLATE>
<li>
($tag$% IF is_owner %$tag$)
<input type="checkbox" name="msgid" value="$MSGID$" />
($tag$% msgidx = msgidx || 0; msgidx = msgidx + 1 ~%$tag$)
<input type="checkbox" name="msgid" value="$MSGID$"
id="msgid($tag$% msgidx %$tag$)"/>
<input type="hidden" name="msg_subject" value="$SUBJECTNA$"
class="disableUnlessChecked"
data-selector="#msgid($tag$% msgidx %$tag$)" />
($tag$%END%$tag$)
<b>$SUBJECT$</b>, <em>$FROMNAME$</em>
</li>
......@@ -367,7 +372,12 @@ TIDXPGEND
<TSINGLETXT>
<li>
($tag$% IF is_owner %$tag$)
<input type="checkbox" name="msgid" value="$MSGID$" />
($tag$% msgidx = msgidx || 0; msgidx = msgidx + 1 ~%$tag$)
<input type="checkbox" name="msgid" value="$MSGID$"
id="msgid($tag$% msgidx %$tag$)"/>
<input type="hidden" name="msg_subject" value="$SUBJECTNA$"
class="disableUnlessChecked"
data-selector="#msgid($tag$% msgidx %$tag$)" />
($tag$%END%$tag$)
<b>$SUBJECT$</b>,
<em>$FROMNAME$, ($tag$%|locdt("$YYYYMMDD$")%$tag$)%m/%d/%Y($tag$%END%$tag$)</em>
......@@ -376,7 +386,12 @@ TIDXPGEND
<TTOPBEGIN>
<li>
($tag$% IF is_owner %$tag$)
<input type="checkbox" name="msgid" value="$MSGID$" />
($tag$% msgidx = msgidx || 0; msgidx = msgidx + 1 ~%$tag$)
<input type="checkbox" name="msgid" value="$MSGID$"
id="msgid($tag$% msgidx %$tag$)"/>
<input type="hidden" name="msg_subject" value="$SUBJECTNA$"
class="disableUnlessChecked"
data-selector="#msgid($tag$% msgidx %$tag$)" />
($tag$%END%$tag$)
<b>$SUBJECT$</b>,
<em>$FROMNAME$, ($tag$%|locdt("$YYYYMMDD$")%$tag$)%m/%d/%Y($tag$%END%$tag$)</em>
......@@ -385,7 +400,12 @@ TIDXPGEND
<TLITXT>
<li>
($tag$% IF is_owner %$tag$)
<input type="checkbox" name="msgid" value="$MSGID$" />
($tag$% msgidx = msgidx || 0; msgidx = msgidx + 1 ~%$tag$)
<input type="checkbox" name="msgid" value="$MSGID$"
id="msgid($tag$% msgidx %$tag$)"/>
<input type="hidden" name="msg_subject" value="$SUBJECTNA$"
class="disableUnlessChecked"
data-selector="#msgid($tag$% msgidx %$tag$)" />
($tag$%END%$tag$)
<b>$SUBJECT$</b>,
<em>$FROMNAME$, ($tag$%|locdt("$YYYYMMDD$")%$tag$)%m/%d/%Y($tag$%END%$tag$)</em>
......@@ -588,6 +608,7 @@ $POWERED_BY$
<input type="hidden" name="yyyy" value="$yyyy$" />
<input type="hidden" name="month" value="$mois$" />
<input type="hidden" name="msgid" value="$MSGID$" />
<input type="hidden" name="msg_subject" value="$SUBJECTNA$" />
<input type="hidden" name="action" value="" />
($tag$% from_addr = BLOCK ~%$tag$)
($tag$% '$FROMADDRNAME:J$@$FROMADDRDOMAIN$' | canonic_email %$tag$)
......
......@@ -495,6 +495,11 @@
[% FOREACH m = msgid ~%]
<input type="hidden" name="msgid" value="[% m %]" />
[%~ END %]
<ul class="styled-list">
[% FOREACH m = msg_subject ~%]
<li>[% m %]</li>
[%~ END %]
</ul>
[% IF is_listmaster || is_owner %]
<input type="checkbox" name="signal_as_spam"
[% IF signal_as_spam %]checked[% END %] />
......
......@@ -103,6 +103,9 @@ body {
ol, ul {
list-style: none;
}
ul.styled-list {
list-style: disc;
}
blockquote, q {
quotes: none;
......
......@@ -889,6 +889,7 @@ our %in_regexp = (
'msgid' => '[^\\\*\"\'\`\^\|\n]+',
'in_reply_to' => '[^\\\*\"\'\`\^\|\n]+',
'message_id' => '[^\\\*\"\'\`\^\|\n]+',
'msg_subject' => '.*',
 
## Password
'passwd' => '.+',
......@@ -8955,7 +8956,8 @@ sub do_remove_arc {
$in{'list'}, $in{'yyyy'}, $in{'month'});
 
# $in{'msgid'} = Sympa::Tools::Text::unescape_chars($in{'msgid'});
my @msgids = split /\0/, $in{'msgid'};
my @msgids = split /\0/, $in{'msgid'};
my @msg_subjects = split /\0/, $in{'msg_subject'};
 
unless (@msgids) {
Sympa::WWW::Report::reject_report_web('user', 'may_not_remove_arc',
......@@ -8975,6 +8977,7 @@ sub do_remove_arc {
$param->{'month'} = $in{'month'};
$param->{'signal_as_spam'} = $in{'signal_as_spam'};
$param->{'msgid'} = [@msgids];
$param->{'msg_subject'} = [@msg_subjects];
 
# Action confirmed?
my $next_action = $session->confirm_action(
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment