Merge pull request #1346 from 9401adarsh/password-input-bug-fix

fix: reset password input field on creation of new paste
This commit is contained in:
El RIDO 2024-05-29 22:12:56 +02:00 committed by GitHub
commit 4875bedac7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 16 additions and 3 deletions

View file

@ -3767,6 +3767,18 @@ jQuery.PrivateBin = (function($, RawDeflate) {
}
}
/**
* Clear the password input in the top navigation
*
* @name TopNav.clearPasswordInput
* @function
*/
function clearPasswordInput()
{
$passwordInput.val('');
}
/**
* Clear the attachment input in the top navigation.
@ -4349,6 +4361,7 @@ jQuery.PrivateBin = (function($, RawDeflate) {
me.resetInput = function()
{
clearAttachmentInput();
clearPasswordInput();
$burnAfterReading.prop('checked', burnAfterReadingDefault);
$openDiscussion.prop('checked', openDiscussionDefault);
if (openDiscussionDefault || !burnAfterReadingDefault) $openDiscussionOption.removeClass('buttondisabled');

View file

@ -73,7 +73,7 @@ endif;
?>
<script type="text/javascript" data-cfasync="false" src="js/purify-3.1.3.js" integrity="sha512-t/FKG/ucQVMWTWVouSMABSEx1r+uSyAI9eNDq0KEr9mPhkgxpJztHI/E72JIpv/+VwPs/Q4husxj14TE9Ps/wg==" 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-zpTPe2Mntv4/cR6XYcmAxKHbIhfj4QsW0dqoBcZzT9BAveLJl7TFnUo+PRVD2tJCEMtR9uSYHeRzNzTCME9VVA==" crossorigin="anonymous"></script>
<script type="text/javascript" data-cfasync="false" src="js/privatebin.js?<?php echo rawurlencode($VERSION); ?>" integrity="sha512-z4U1tebeHNrv3CvUQJg/Y6C8YGOEDmUzLKHy+4hV6N1auYlWwIZy9K4ND+7HtR0aIsEMFfdFFbnFaoZMEtLOYw==" 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

@ -57,7 +57,7 @@ endif;
?>
<script type="text/javascript" data-cfasync="false" src="js/purify-3.1.3.js" integrity="sha512-t/FKG/ucQVMWTWVouSMABSEx1r+uSyAI9eNDq0KEr9mPhkgxpJztHI/E72JIpv/+VwPs/Q4husxj14TE9Ps/wg==" 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-zpTPe2Mntv4/cR6XYcmAxKHbIhfj4QsW0dqoBcZzT9BAveLJl7TFnUo+PRVD2tJCEMtR9uSYHeRzNzTCME9VVA==" crossorigin="anonymous"></script>
<script type="text/javascript" data-cfasync="false" src="js/privatebin.js?<?php echo rawurlencode($VERSION); ?>" integrity="sha512-z4U1tebeHNrv3CvUQJg/Y6C8YGOEDmUzLKHy+4hV6N1auYlWwIZy9K4ND+7HtR0aIsEMFfdFFbnFaoZMEtLOYw==" 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

@ -51,7 +51,7 @@ endif;
?>
<script type="text/javascript" data-cfasync="false" src="js/purify-3.1.3.js" integrity="sha512-t/FKG/ucQVMWTWVouSMABSEx1r+uSyAI9eNDq0KEr9mPhkgxpJztHI/E72JIpv/+VwPs/Q4husxj14TE9Ps/wg==" 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-zpTPe2Mntv4/cR6XYcmAxKHbIhfj4QsW0dqoBcZzT9BAveLJl7TFnUo+PRVD2tJCEMtR9uSYHeRzNzTCME9VVA==" crossorigin="anonymous"></script>
<script type="text/javascript" data-cfasync="false" src="js/privatebin.js?<?php echo rawurlencode($VERSION); ?>" integrity="sha512-z4U1tebeHNrv3CvUQJg/Y6C8YGOEDmUzLKHy+4hV6N1auYlWwIZy9K4ND+7HtR0aIsEMFfdFFbnFaoZMEtLOYw==" 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" />