expiration time selection for bootstrap template, fixes #1309
This commit is contained in:
parent
08aa10a4b7
commit
2c8b5ed0e4
5 changed files with 10 additions and 5 deletions
|
@ -1,6 +1,7 @@
|
||||||
# PrivateBin version history
|
# PrivateBin version history
|
||||||
|
|
||||||
## 1.7.3 (not yet released)
|
## 1.7.3 (not yet released)
|
||||||
|
* FIXED: Selected expiration not being applied, when using bootstrap template (#1309)
|
||||||
|
|
||||||
## 1.7.2 (2024-05-05)
|
## 1.7.2 (2024-05-05)
|
||||||
* ADDED: Allow use of `shortenviayourls` in query parameters (#1267)
|
* ADDED: Allow use of `shortenviayourls` in query parameters (#1267)
|
||||||
|
|
|
@ -4371,7 +4371,7 @@ jQuery.PrivateBin = (function($, RawDeflate) {
|
||||||
*/
|
*/
|
||||||
me.getExpiration = function()
|
me.getExpiration = function()
|
||||||
{
|
{
|
||||||
return Model.getExpirationDefault() || pasteExpiration;
|
return pasteExpiration;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -4554,6 +4554,10 @@ jQuery.PrivateBin = (function($, RawDeflate) {
|
||||||
// bootstrap template drop downs
|
// bootstrap template drop downs
|
||||||
$('ul.dropdown-menu li a', $('#expiration').parent()).click(updateExpiration);
|
$('ul.dropdown-menu li a', $('#expiration').parent()).click(updateExpiration);
|
||||||
$('ul.dropdown-menu li a', $('#formatter').parent()).click(updateFormat);
|
$('ul.dropdown-menu li a', $('#formatter').parent()).click(updateFormat);
|
||||||
|
// bootstrap5 & page drop downs
|
||||||
|
$('#pasteExpiration').on('change', function() {
|
||||||
|
pasteExpiration = Model.getExpirationDefault();
|
||||||
|
});
|
||||||
$('#pasteFormatter').on('change', function() {
|
$('#pasteFormatter').on('change', function() {
|
||||||
PasteViewer.setFormat(Model.getFormatDefault());
|
PasteViewer.setFormat(Model.getFormatDefault());
|
||||||
});
|
});
|
||||||
|
@ -4565,7 +4569,7 @@ jQuery.PrivateBin = (function($, RawDeflate) {
|
||||||
// get default values from template or fall back to set value
|
// get default values from template or fall back to set value
|
||||||
burnAfterReadingDefault = me.getBurnAfterReading();
|
burnAfterReadingDefault = me.getBurnAfterReading();
|
||||||
openDiscussionDefault = me.getOpenDiscussion();
|
openDiscussionDefault = me.getOpenDiscussion();
|
||||||
pasteExpiration = Model.getExpirationDefault() || pasteExpiration;
|
pasteExpiration = Model.getExpirationDefault();
|
||||||
|
|
||||||
createButtonsDisplayed = false;
|
createButtonsDisplayed = false;
|
||||||
viewButtonsDisplayed = false;
|
viewButtonsDisplayed = false;
|
||||||
|
|
|
@ -73,7 +73,7 @@ endif;
|
||||||
?>
|
?>
|
||||||
<script type="text/javascript" data-cfasync="false" src="js/purify-3.1.2.js" integrity="sha512-voYCOVXik5/jcT+McTiptsB00iB0NWQrhBmSwSEfj0IH3UDphU8w12JV8w1y+m8FRaozbzW4efHSEWKZpOA+JQ==" crossorigin="anonymous"></script>
|
<script type="text/javascript" data-cfasync="false" src="js/purify-3.1.2.js" integrity="sha512-voYCOVXik5/jcT+McTiptsB00iB0NWQrhBmSwSEfj0IH3UDphU8w12JV8w1y+m8FRaozbzW4efHSEWKZpOA+JQ==" 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/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-QnwyZIEFZg8uvFAsnXbeHTNarA4hPhGcMv8RTAIS4cOgR6oh0ofxjY3OdiGzccArf6VeFFKjqkFo94CrcUXkxQ==" crossorigin="anonymous"></script>
|
<script type="text/javascript" data-cfasync="false" src="js/privatebin.js?<?php echo rawurlencode($VERSION); ?>" integrity="sha512-gVZBjRO45BZ7OeSspLHUVNmNF98wdxk3zebL5KUV/3Ty607YkD6CZw1ORqKpAGvKrKFp/jcaWV5uwpCqfoQGlw==" crossorigin="anonymous"></script>
|
||||||
<!-- icon -->
|
<!-- icon -->
|
||||||
<link rel="apple-touch-icon" href="<?php echo I18n::encode($BASEPATH); ?>img/apple-touch-icon.png" sizes="180x180" />
|
<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" />
|
<link rel="icon" type="image/png" href="img/favicon-32x32.png" sizes="32x32" />
|
||||||
|
|
|
@ -57,7 +57,7 @@ endif;
|
||||||
?>
|
?>
|
||||||
<script type="text/javascript" data-cfasync="false" src="js/purify-3.1.2.js" integrity="sha512-voYCOVXik5/jcT+McTiptsB00iB0NWQrhBmSwSEfj0IH3UDphU8w12JV8w1y+m8FRaozbzW4efHSEWKZpOA+JQ==" crossorigin="anonymous"></script>
|
<script type="text/javascript" data-cfasync="false" src="js/purify-3.1.2.js" integrity="sha512-voYCOVXik5/jcT+McTiptsB00iB0NWQrhBmSwSEfj0IH3UDphU8w12JV8w1y+m8FRaozbzW4efHSEWKZpOA+JQ==" 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/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-QnwyZIEFZg8uvFAsnXbeHTNarA4hPhGcMv8RTAIS4cOgR6oh0ofxjY3OdiGzccArf6VeFFKjqkFo94CrcUXkxQ==" crossorigin="anonymous"></script>
|
<script type="text/javascript" data-cfasync="false" src="js/privatebin.js?<?php echo rawurlencode($VERSION); ?>" integrity="sha512-gVZBjRO45BZ7OeSspLHUVNmNF98wdxk3zebL5KUV/3Ty607YkD6CZw1ORqKpAGvKrKFp/jcaWV5uwpCqfoQGlw==" crossorigin="anonymous"></script>
|
||||||
<!-- icon -->
|
<!-- icon -->
|
||||||
<link rel="apple-touch-icon" href="<?php echo I18n::encode($BASEPATH); ?>img/apple-touch-icon.png" sizes="180x180" />
|
<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" />
|
<link rel="icon" type="image/png" href="img/favicon-32x32.png" sizes="32x32" />
|
||||||
|
|
|
@ -51,7 +51,7 @@ endif;
|
||||||
?>
|
?>
|
||||||
<script type="text/javascript" data-cfasync="false" src="js/purify-3.1.2.js" integrity="sha512-voYCOVXik5/jcT+McTiptsB00iB0NWQrhBmSwSEfj0IH3UDphU8w12JV8w1y+m8FRaozbzW4efHSEWKZpOA+JQ==" crossorigin="anonymous"></script>
|
<script type="text/javascript" data-cfasync="false" src="js/purify-3.1.2.js" integrity="sha512-voYCOVXik5/jcT+McTiptsB00iB0NWQrhBmSwSEfj0IH3UDphU8w12JV8w1y+m8FRaozbzW4efHSEWKZpOA+JQ==" 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/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-QnwyZIEFZg8uvFAsnXbeHTNarA4hPhGcMv8RTAIS4cOgR6oh0ofxjY3OdiGzccArf6VeFFKjqkFo94CrcUXkxQ==" crossorigin="anonymous"></script>
|
<script type="text/javascript" data-cfasync="false" src="js/privatebin.js?<?php echo rawurlencode($VERSION); ?>" integrity="sha512-gVZBjRO45BZ7OeSspLHUVNmNF98wdxk3zebL5KUV/3Ty607YkD6CZw1ORqKpAGvKrKFp/jcaWV5uwpCqfoQGlw==" crossorigin="anonymous"></script>
|
||||||
<!-- icon -->
|
<!-- icon -->
|
||||||
<link rel="apple-touch-icon" href="img/apple-touch-icon.png?<?php echo rawurlencode($VERSION); ?>" sizes="180x180" />
|
<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" />
|
<link rel="icon" type="image/png" href="img/favicon-32x32.png?<?php echo rawurlencode($VERSION); ?>" sizes="32x32" />
|
||||||
|
|
Loading…
Reference in a new issue