Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add function to hide clone button if confidetial
  • Loading branch information
Julien Stuyck committed Oct 1, 2014
commit 48b89601c32d1130870af14f33e59ab6b43ba19d
5 changes: 3 additions & 2 deletions js/zerobin.js
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ function send_data() {
burnafterreading: $('input#burnafterreading').is(':checked') ? 1 : 0,
opendiscussion: $('input#opendiscussion').is(':checked') ? 1 : 0,
syntaxcoloring: $('input#syntaxcoloring').is(':checked') ? 1 : 0,
condfidential: $('input#confidential').is(':checked') ? 1 : 0
confidential: $('input#confidential').is(':checked') ? 1 : 0
};
$.post(scriptLocation(), data_to_send, 'json')
.error(function() {
Expand Down Expand Up @@ -432,12 +432,13 @@ function stateExistingPaste() {
$('button#sendbutton').hide();

// No "clone" for IE<10.
if ($('div#oldienotice').is(":visible")) {
if ($('div#oldienotice').is(":visible") || comments[0].meta.confidential ) {
$('button#clonebutton').hide();
}
else {
$('button#clonebutton').show();
}

$('button#rawtextbutton').show();

$('div#expiration').hide();
Expand Down
4 changes: 2 additions & 2 deletions tpl/page.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ <h3>{$VERSION}</h3>
<option value="10sec">10 seconds</option>
<option value="5min">5 minutes</option>
<option value="10min">10 minutes</option>
<option value="1hour">1 hour</option>
<option value="1hour" selected="selected">1 hour</option>
<option value="1day">1 day</option>
<option value="1week">1 week</option>
<option value="1month" selected="selected">1 month</option>
<option value="1month">1 month</option>
<option value="1year">1 year</option>
<option value="never">Never</option>
</select>
Expand Down