fix: keep edited username on refresh
This commit is contained in:
parent
1dedb7e35c
commit
23bff41601
|
@ -84,14 +84,14 @@ $purifier = new HTMLPurifier($purifier_config);
|
||||||
|
|
||||||
<body data-turbolinks="false">
|
<body data-turbolinks="false">
|
||||||
|
|
||||||
<header id="header">
|
<header>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<small class="form-text text-muted">
|
<small class="form-text text-muted">
|
||||||
You have <span class="badge badge-pill badge-info"><?php echo count($emails); ?> </span> messages in your
|
You have <span class="badge badge-pill badge-info"><?php echo count($emails); ?> </span> messages in your
|
||||||
mailbox:
|
mailbox:
|
||||||
</small>
|
</small>
|
||||||
|
|
||||||
<form data-turbolinks-permanent action="?" method="post">
|
<form id="header-form" data-turbolinks-permanent action="?" method="post">
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
|
|
||||||
<div class="col-sm-4">
|
<div class="col-sm-4">
|
||||||
|
@ -154,7 +154,7 @@ $purifier = new HTMLPurifier($purifier_config);
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
foreach ($emails as $email) {
|
foreach ($emails as $email) {
|
||||||
|
$safe_email_id = filter_var($email->id, FILTER_VALIDATE_INT);
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="email-table">
|
<div class="email-table">
|
||||||
|
@ -172,25 +172,25 @@ $purifier = new HTMLPurifier($purifier_config);
|
||||||
|
|
||||||
<button type="button" class="btn btn-outline-info btn-sm"
|
<button type="button" class="btn btn-outline-info btn-sm"
|
||||||
style="display: inline-block"
|
style="display: inline-block"
|
||||||
id="show-html-button-<?php echo filter_var($email->id, FILTER_VALIDATE_INT); ?>"
|
id="show-html-button-<?php echo $safe_email_id; ?>"
|
||||||
onclick="showHtml(<?php echo filter_var($email->id, FILTER_VALIDATE_INT); ?>)">
|
onclick="showHtml(<?php echo $safe_email_id; ?>)">
|
||||||
show html
|
show html
|
||||||
</button>
|
</button>
|
||||||
<button type="button" class="btn btn-outline-info btn-sm"
|
<button type="button" class="btn btn-outline-info btn-sm"
|
||||||
style="display: none"
|
style="display: none"
|
||||||
id="show-plain-button-<?php echo filter_var($email->id, FILTER_VALIDATE_INT); ?>"
|
id="show-plain-button-<?php echo $safe_email_id; ?>"
|
||||||
onclick="showPlain(<?php echo filter_var($email->id, FILTER_VALIDATE_INT); ?>)">
|
onclick="showPlain(<?php echo $safe_email_id; ?>)">
|
||||||
show text
|
show text
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<a class="btn btn-sm btn-outline-primary " download="true"
|
<a class="btn btn-sm btn-outline-primary " download="true"
|
||||||
role="button"
|
role="button"
|
||||||
href="?download_email_id=<?php echo filter_var($email->id, FILTER_VALIDATE_INT); ?>&address=<?php echo $address ?>">Download
|
href="?download_email_id=<?php echo $safe_email_id; ?>&address=<?php echo $address ?>">Download
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<a class="btn btn-sm btn-outline-danger"
|
<a class="btn btn-sm btn-outline-danger"
|
||||||
role="button"
|
role="button"
|
||||||
href="?delete_email_id=<?php echo filter_var($email->id, FILTER_VALIDATE_INT); ?>&address=<?php echo $address ?>">Delete
|
href="?delete_email_id=<?php echo $safe_email_id; ?>&address=<?php echo $address ?>">Delete
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
@ -230,7 +230,7 @@ $purifier = new HTMLPurifier($purifier_config);
|
||||||
|
|
||||||
<div class="mt-2 card-text">
|
<div class="mt-2 card-text">
|
||||||
<!-- show plaintext or html -->
|
<!-- show plaintext or html -->
|
||||||
<div id="email-<?php echo filter_var($email->id, FILTER_VALIDATE_INT); ?>-plain"
|
<div id="email-<?php echo $safe_email_id; ?>-plain"
|
||||||
style="display: block;">
|
style="display: block;">
|
||||||
<?php $text = filter_var($email->textPlain, FILTER_SANITIZE_SPECIAL_CHARS);
|
<?php $text = filter_var($email->textPlain, FILTER_SANITIZE_SPECIAL_CHARS);
|
||||||
// Keep newlines
|
// Keep newlines
|
||||||
|
@ -238,12 +238,9 @@ $purifier = new HTMLPurifier($purifier_config);
|
||||||
echo \AutoLinkExtension::auto_link_text($text)
|
echo \AutoLinkExtension::auto_link_text($text)
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
<div id="email-<?php echo filter_var($email->id, FILTER_VALIDATE_INT); ?>-html"
|
<div id="email-<?php echo $safe_email_id; ?>-html"
|
||||||
style="display: none;">
|
style="display: none;">
|
||||||
<?php
|
<?php echo $purifier->purify($email->textHtml); ?>
|
||||||
$clean_html = $purifier->purify($email->textHtml);
|
|
||||||
echo $clean_html;
|
|
||||||
?>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -252,8 +249,8 @@ $purifier = new HTMLPurifier($purifier_config);
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
}
|
} // end foreach $email
|
||||||
}
|
} // end: has emails
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user