Skip to content

Instantly share code, notes, and snippets.

@lucnap
Created February 14, 2017 09:41
Show Gist options
  • Save lucnap/6bb64514eec29b4c6c50f07dbfc815f2 to your computer and use it in GitHub Desktop.
Save lucnap/6bb64514eec29b4c6c50f07dbfc815f2 to your computer and use it in GitHub Desktop.
Accept Disclairmer
<!DOCTYPE html>
<html>
<head>
<title>Accept Disclaimer</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="https://code.jquery.com/jquery-1.11.3.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
<div class="header clearfix">
<h3 class="text-muted">Contract</h3>
</div>
<div class="jumbotron">
<p class="text1">
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
</p>
<br>
<div class="input-group">
<span class="input-group-addon" id="basic-addon1">Write ACCEPT if you understand and accept above text</span>
<input type="text" id="acceptFld" class="form-control" placeholder="write ACCEPT here" aria-describedby="basic-addon1">
</div>
<p><br><a id="btnAccept" class="btn btn-lg btn-success" href="#" role="button">Accept</a></p>
<p id="auth1" class="invisible">
Now you are authorized to download the document. Click the next button.
<br>
<a id="down1" class="btn btn-lg btn-primary" href="#" role="button">Download</a>
</p>
</div>
</div>
</body>
<script>
$( "#btnAccept" ).click(function() {
var acc;
acc = $( "#acceptFld" ).val();
if (acc === "ACCEPT") {
$("#auth1").attr('class', 'visible');
$("#down1").attr('href', 'http://www.mybigwebsite.it/document.pdf');
} else {
$("#auth1").attr('class', 'invisible')
$("#down1").attr('href', '#');
}
});
</script>
<style type="text/css">
/* Space out content a bit */
body {
padding-top: 20px;
padding-bottom: 20px;
}
.invisible {
display: none;
}
.visible {
display: block;
}
/* Everything but the jumbotron gets side spacing for mobile first views */
.header,
.marketing,
.footer {
padding-right: 15px;
padding-left: 15px;
}
/* Custom page header */
.header {
padding-bottom: 20px;
border-bottom: 1px solid #e5e5e5;
}
/* Make the masthead heading the same height as the navigation */
.header h3 {
margin-top: 0;
margin-bottom: 0;
line-height: 40px;
}
/* Custom page footer */
.footer {
padding-top: 19px;
color: #777;
border-top: 1px solid #e5e5e5;
}
/* Customize container */
@media (min-width: 768px) {
.container {
max-width: 730px;
}
}
.container-narrow > hr {
margin: 30px 0;
}
/* Main marketing message and sign up button */
.jumbotron {
/* text-align: center; */
border-bottom: 1px solid #e5e5e5;
}
.jumbotron .btn {
padding: 14px 14px;
font-size: 18px;
}
.jumbotron .text1 {
font-size: 14px;
}
/* Supporting marketing content */
.marketing {
margin: 40px 0;
}
.marketing p + h4 {
margin-top: 28px;
}
/* Responsive: Portrait tablets and up */
@media screen and (min-width: 768px) {
/* Remove the padding we set earlier */
.header,
.marketing,
.footer {
padding-right: 0;
padding-left: 0;
}
/* Space out the masthead */
.header {
margin-bottom: 30px;
}
/* Remove the bottom border on the jumbotron for visual effect */
.jumbotron {
border-bottom: 0;
}
}
</style>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment