Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow hiding "Keep formatting" in "dont_override" config #9704

Closed
wants to merge 11 commits into from
6 changes: 5 additions & 1 deletion program/actions/mail/send.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ public function run($args = [])

$saveonly = !empty($_GET['_saveonly']);
$savedraft = !empty($_POST['_draft']) && !$saveonly;
$keepformatting = !empty($_POST['_keepformatting']);
if (in_array('keep_formatting', $rcmail->config->get('dont_override', []))) {
JE4GLE marked this conversation as resolved.
Show resolved Hide resolved
$keepformatting = false;
JE4GLE marked this conversation as resolved.
Show resolved Hide resolved
}
$SENDMAIL = new rcmail_sendmail($COMPOSE, [
'sendmail' => true,
'saveonly' => $saveonly,
Expand All @@ -55,7 +59,7 @@ public function run($args = [])
call_user_func_array([$rcmail->output, 'show_message'], $args);
$rcmail->output->send('iframe');
},
'keepformatting' => !empty($_POST['_keepformatting']),
'keepformatting' => $keepformatting,
]);

// Collect input for message headers
Expand Down
2 changes: 2 additions & 0 deletions skins/elastic/templates/compose.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,14 @@ <h2 id="aria-label-composeoptions" class="voice"><roundcube:label name="arialabe
</div>
</div>
<roundcube:endif />
<roundcube:if condition="!in_array('keep_formatting', (array)config:dont_override)" />
<div class="form-group row form-check">
<label for="compose-keep-formatting" class="col-form-label col-6"><roundcube:label name="keepformatting" /></label>
<div class="col-6 form-check">
<roundcube:object name="keepFormattingCheckBox" id="compose-keep-formatting" noform="true" tabindex="2" class="form-check-input" />
</div>
</div>
<roundcube:endif />
<div class="form-group row">
<label for="compose-priority" class="col-form-label col-6"><roundcube:label name="priority" /></label>
<div class="col-6">
Expand Down