add missing expiration reset

This commit is contained in:
El RIDO 2021-04-05 13:47:37 +02:00
parent 77ee40909f
commit a369202c51
No known key found for this signature in database
GPG Key ID: 0F5C940A6BD81F92
3 changed files with 11 additions and 5 deletions

View File

@ -4156,10 +4156,16 @@ jQuery.PrivateBin = (function($, RawDeflate) {
clearAttachmentInput();
$burnAfterReading.prop('checked', burnAfterReadingDefault);
$openDiscussion.prop('checked', openDiscussionDefault);
if (openDiscussionDefault) $openDiscussionOption.removeClass('buttondisabled');
if (burnAfterReadingDefault) $burnAfterReadingOption.removeClass('buttondisabled');
if (openDiscussionDefault || !burnAfterReadingDefault) $openDiscussionOption.removeClass('buttondisabled');
if (burnAfterReadingDefault || !openDiscussionDefault) $burnAfterReadingOption.removeClass('buttondisabled');
// TODO: reset expiration time
pasteExpiration = Model.getExpirationDefault() || pasteExpiration;
$('#pasteExpiration>option').each(function() {
const $this = $(this);
if ($this.val() === pasteExpiration) {
$('#pasteExpirationDisplay').text($this.text());
}
});
};
/**

View File

@ -72,7 +72,7 @@ endif;
?>
<script type="text/javascript" data-cfasync="false" src="js/purify-2.2.7.js" integrity="sha512-7Ka1I/nJuR2CL8wzIS5PJS4HgEMd0HJ6kfAl6fFhwFBB27rhztFbe0tS+Ex+Qg+5n4nZIT4lty4k4Di3+X9T4A==" crossorigin="anonymous"></script>
<script type="text/javascript" data-cfasync="false" src="js/legacy.js?<?php echo rawurlencode($VERSION); ?>" integrity="sha512-LYos+qXHIRqFf5ZPNphvtTB0cgzHUizu2wwcOwcwz/VIpRv9lpcBgPYz4uq6jx0INwCAj6Fbnl5HoKiLufS2jg==" crossorigin="anonymous"></script>
<script type="text/javascript" data-cfasync="false" src="js/privatebin.js?<?php echo rawurlencode($VERSION); ?>" integrity="sha512-vJA5JXQBkfshqUIYHM/SkXWjBpwrZLlSXYRm+NERFD7t4Dg0tEdDV0NdBsItj1NXqfJ1062fT5okEav5eqUSMA==" crossorigin="anonymous"></script>
<script type="text/javascript" data-cfasync="false" src="js/privatebin.js?<?php echo rawurlencode($VERSION); ?>" integrity="sha512-j14FgvVKISnKDHFcU10MHg1v+m148Txkz585Hx6UOqBe8nwldVF3uhDN+Ohp5ddg9gZS89aRzHplX4C7/ZfeTA==" crossorigin="anonymous"></script>
<!-- icon -->
<link rel="apple-touch-icon" href="<?php echo I18n::encode($BASEPATH); ?>img/apple-touch-icon.png" sizes="180x180" />
<link rel="icon" type="image/png" href="img/favicon-32x32.png" sizes="32x32" />

View File

@ -50,7 +50,7 @@ endif;
?>
<script type="text/javascript" data-cfasync="false" src="js/purify-2.2.7.js" integrity="sha512-7Ka1I/nJuR2CL8wzIS5PJS4HgEMd0HJ6kfAl6fFhwFBB27rhztFbe0tS+Ex+Qg+5n4nZIT4lty4k4Di3+X9T4A==" crossorigin="anonymous"></script>
<script type="text/javascript" data-cfasync="false" src="js/legacy.js?<?php echo rawurlencode($VERSION); ?>" integrity="sha512-LYos+qXHIRqFf5ZPNphvtTB0cgzHUizu2wwcOwcwz/VIpRv9lpcBgPYz4uq6jx0INwCAj6Fbnl5HoKiLufS2jg==" crossorigin="anonymous"></script>
<script type="text/javascript" data-cfasync="false" src="js/privatebin.js?<?php echo rawurlencode($VERSION); ?>" integrity="sha512-vJA5JXQBkfshqUIYHM/SkXWjBpwrZLlSXYRm+NERFD7t4Dg0tEdDV0NdBsItj1NXqfJ1062fT5okEav5eqUSMA==" crossorigin="anonymous"></script>
<script type="text/javascript" data-cfasync="false" src="js/privatebin.js?<?php echo rawurlencode($VERSION); ?>" integrity="sha512-j14FgvVKISnKDHFcU10MHg1v+m148Txkz585Hx6UOqBe8nwldVF3uhDN+Ohp5ddg9gZS89aRzHplX4C7/ZfeTA==" crossorigin="anonymous"></script>
<!-- icon -->
<link rel="apple-touch-icon" href="img/apple-touch-icon.png?<?php echo rawurlencode($VERSION); ?>" sizes="180x180" />
<link rel="icon" type="image/png" href="img/favicon-32x32.png?<?php echo rawurlencode($VERSION); ?>" sizes="32x32" />