Skip to content

Instantly share code, notes, and snippets.

@fosterdill
Created December 29, 2014 18:57
Show Gist options
  • Save fosterdill/d6fb1c8e800bccd90c75 to your computer and use it in GitHub Desktop.
Save fosterdill/d6fb1c8e800bccd90c75 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<title>Heinz</title>
<link href="//cdn.getchute.com.s3.amazonaws.com/apps/rights-lp/heinz/style.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css">
<script src="//code.jquery.com/jquery-1.10.2.min.js"></script>
<script src="//static.getchute.com/exposure/rails.js"></script>
<script src="{{AppConfig['chute']['auth_script']}}"></script>
<script type='text/javascript'>
//<![CDATA[
$(document).ready(function () {
$('body').on('click', '.auth-link', function(e) {
e.preventDefault();
var isWebView = /(iPhone|iPod|iPad).*AppleWebKit(?!.*Version)/i.test(navigator.userAgent);
{% if asset.provider == "facebook" %}
var provider = "facebook";
var scope = "email";
{% else %}
var provider = "{{asset.provider}}";
var scope = "comments";
{% endif %}
if (isWebView) {
// alternate flow where the entire page redirects
Chute.Auth.start("{{AppConfig['chute']['app_id']}}", provider, { scope: scope, host: "{{AppConfig['chute']['auth_host']}}", redirectTo: document.location.href });
} else {
// normal flow where a popup is opened
Chute.Auth.start("{{AppConfig['chute']['app_id']}}", provider, { scope: scope, host: "{{AppConfig['chute']['auth_host']}}"}, function(err, response) {
window.location.hash = "header";
window.location.reload(true);
});
}
});
});
//]]>
</script>
<meta content="{{csrf_meta['csrf-param']}}" name="csrf-param">
<meta content="{{csrf_meta['csrf-token']}}" name="csrf-token">
</head>
{% if is_asset_owner_and_pending %}
<body>
<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/1.8.2/jquery.min.js" type="text/javascript"></script>
<script src="http://cdn.getchute.com.s3.amazonaws.com/apps/rights-lp/heinz/validate.js" type="text/javascript"></script>
<!-- <script src="http://ajax.aspnetcdn.com/ajax/jquery.validate/1.12.0/jquery.validate.min.js" type="text/javascript"></script> -->
<!-- <script src="http://ajax.aspnetcdn.com/ajax/jquery.validate/1.12.0/additional-methods.min.js" type="text/javascript"></script> -->
<!-- <script src="http://cdnjs.cloudflare.com/ajax/libs/moment.js/2.7.0/moment.min.js" type="text/javascript"></script> -->
<!-- <script src="//cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.min.js" type="text/javascript"></script> -->
<div class="chute-background">
<div class="chute-opacity"></div>
<div class="chute-user-info">
<form action="{{ form_action }}" id='form' method="post" class="accept_offer" accept-charset="UTF-8" id="submissionForm">
<input name="utf8" value="" type="hidden">
<input name="_method" value="patch" type="hidden">
<input name="custom_landing_page" value="true" type="hidden">
<input type="hidden" name="offer[asset_attributes][user_attributes][id]" value="{{ user.user_id }}">
<input type="hidden" name="offer[asset_attributes][id]" value="{{ asset.asset_id }}">
<header class='main-header'>
<h1>FILL IN YOUR INFORMATION</h1>
</header>
<div class='chute-info'>
<div class="chute-info-text-fields">
<label>
First Name (required)
</label>
<input type='text'name="offer[asset_attributes][user_attributes][custom_data][first_name]" class='field'/>
</div>
<div class="chute-info-text-fields">
<label>
Last Name (required)
</label>
<input type='text' name="offer[asset_attributes][user_attributes][custom_data][last_name]" class='field'/>
</div>
<div class="chute-info-text-fields">
<label>
Zip Code (required)
</label>
<input type='text' name="offer[asset_attributes][user_attributes][custom_data][zip]" class='field'/>
</div>
<div class="chute-info-text-fields">
<label>
Your Email Address (required)
</label>
<input type='text' name="offer[asset_attributes][user_attributes][email]" name="mail" class='field'/>
</div>
<div>
<div class="chute-info-check-fields">
<input type='checkbox' name="offer[asset_attributes][user_attributes][custom_data][agree]" class='chute-agree'>
<label class='chute-checkbox-label'>I have read & agree to be bound by the <a href="//www.heinzketchup.com/Superbowl/Rules">Official Rules</a>.</label>
</div>
<div class="chute-info-check-fields">
<input type='checkbox' name="offer[asset_attributes][user_attributes][custom_data][age]" class='chute-age'>
<label class='chute-checkbox-label' >Yes, I am 18 years of age or older.</label>
</div>
<div class="chute-info-check-fields">
<input type='checkbox' name="offer[asset_attributes][user_attributes][custom_data][newslatter]">
<label class='chute-checkbox-label'>I would like to receive news and information from H.J Heinz Company, L.P, including product updates, special offers, and recipes.</label>
</div>
</div>
</div>
<footer>
<!-- <button class="next">NEXT</button> -->
<input type="submit" value="next" class='next'/>
<hr class="chute-yellow-line">
<hr class="chute-white-line">
<hr class="chute-green-line">
</footer>
</form>
<section id="thanks" class="chute-thanks invisible">
<header>
<hr class="chute-yellow-line">
<hr class="chute-white-line">
<hr class="chute-green-line">
</header>
<div class="thanks">
<h1 class="thanksMessage">THANK YOU!</h1>
<p>YOUR VIDEO HAS BEEN SUBMITTED</p>
<p class="chute-hyperlink">
<a target='_blank' href='http://www.heinzketchup.com/superbowl/Retail'>Click here to enter a comment for another chance to win!</a>
</p>
<div class="chute-social">
<a href="https://www.facebook.com/dialog/feed?app_id=143143919079785&amp;redirect_uri=http%3A%2F%2Fwww.getchute.com%2Fclose&amp;display=popup&amp;picture=http://cdn.getchute.com.s3.amazonaws.com/apps/heinz.chooser/production/images/heinz.jpg&amp;name=Win%20the%20ultimate%20trip%20to%20Phoenix%20this%20February&amp;caption=How do you happy? Tag your submission with&amp; #HeinzHappyContest or enter at HowDoYouHappy.com for a chance to win." class="chute-icon" onclick="window.open('https://www.facebook.com/dialog/feed?app_id=143143919079785&amp;redirect_uri=http%3A%2F%2Fwww.getchute.com%2Fclose&amp;display=popup&amp;picture=http://cdn.getchute.com.s3.amazonaws.com/apps/heinz.chooser/production/images/heinz.jpg&amp;name=How Do You Happy?&amp;caption=I shared my happiness, and you should too. Tag your submission with %20%23HeinzHappyContest or enter at HowDoYouHappy.com for a chance to win.', 'newwindow', 'width=630, height=415'); return false;"><i class="fa fa-facebook-square"></i></a>
<a href="https://twitter.com/intent/tweet?text=How do you happy? Tag your submission with HeinzHappyContest or enter at HowDoYouHappy.com for a chance to win." class="chute-icon" onclick="window.open('https://twitter.com/intent/tweet?text=How do you happy? Tag your submission with %20%23HeinzHappyContest or enter at HowDoYouHappy.com for a chance to win.', 'newwindow', 'width=735, height=420'); return false;"><i class="fa fa-twitter"></i></a>
</div>
</div>
<footer>
<hr class="chute-yellow-line">
<hr class="chute-white-line">
<hr class="chute-green-line">
</footer>
</section>
</div>
<div>
{% else %}
{% if is_not_the_owner %}
<body>
<h4>
We're sorry, this page is meant for a specific user's entry that you don't have access to. Please visit HowDoYouHappy.com to learn more.
</h4>
{% elsif is_rejected %}
<body>
Oh no! You rejected the request to use your photo.
{% elsif is_accepted %}
<body>
<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/1.8.2/jquery.min.js" type="text/javascript"></script>
<script src="http://cdn.getchute.com.s3.amazonaws.com/apps/rights-lp/heinz/validate.js" type="text/javascript"></script>
<!-- <script src="http://ajax.aspnetcdn.com/ajax/jquery.validate/1.12.0/jquery.validate.min.js" type="text/javascript"></script> -->
<!-- <script src="http://ajax.aspnetcdn.com/ajax/jquery.validate/1.12.0/additional-methods.min.js" type="text/javascript"></script> -->
<!-- <script src="http://cdnjs.cloudflare.com/ajax/libs/moment.js/2.7.0/moment.min.js" type="text/javascript"></script> -->
<!-- <script src="//cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.min.js" type="text/javascript"></script> -->
<div class="chute-background">
<div class="chute-opacity"></div>
<div class="chute-user-info">
<section id="thanks" class="chute-thanks">
<header>
<hr class="chute-yellow-line">
<hr class="chute-white-line">
<hr class="chute-green-line">
</header>
<div class="thanks">
<h1 class="thanksMessage">THANK YOU!</h1>
<p>YOUR VIDEO HAS BEEN SUBMITTED</p>
<p class="chute-hyperlink">
<a target='_blank' href='http://heinzketchup.heinzna.heinz.boondoggle.eu/superbowl'>Click here</a> to enter a comment for another chance to win!
</p>
<div class="chute-social">
<a href="https://www.facebook.com/dialog/feed?app_id=143143919079785&amp;redirect_uri=http%3A%2F%2Fwww.getchute.com%2Fclose&amp;display=popup&amp;picture=http://cdn.getchute.com.s3.amazonaws.com/apps/heinz.chooser/production/images/heinz.jpg&amp;name=Win%20the%20ultimate%20trip%20to%20Phoenix%20this%20February&amp;caption=How do you happy? Tag your submission with&amp; #HeinzHappyContest or enter at HowDoYouHappy.com for a chance to win." class="chute-icon" onclick="window.open('https://www.facebook.com/dialog/feed?app_id=143143919079785&amp;redirect_uri=http%3A%2F%2Fwww.getchute.com%2Fclose&amp;display=popup&amp;picture=http://cdn.getchute.com.s3.amazonaws.com/apps/heinz.chooser/production/images/heinz.jpg&amp;name=How Do You Happy?&amp;caption=I shared my happiness, and you should too. Tag your submission with %20%23HeinzHappyContest or enter at HowDoYouHappy.com for a chance to win.', 'newwindow', 'width=630, height=415'); return false;"><i class="fa fa-facebook-square"></i></a>
<a href="https://twitter.com/intent/tweet?text=How do you happy? Tag your submission with HeinzHappyContest or enter at HowDoYouHappy.com for a chance to win." class="chute-icon" onclick="window.open('https://twitter.com/intent/tweet?text=How do you happy? Tag your submission with %20%23HeinzHappyContest or enter at HowDoYouHappy.com for a chance to win.', 'newwindow', 'width=735, height=420'); return false;"><i class="fa fa-twitter"></i></a>
</div>
</div>
<footer>
<hr class="chute-yellow-line">
<hr class="chute-white-line">
<hr class="chute-green-line">
</footer>
</section>
</div>
<div>
{% else %}
<body>
<h3>
Please verify your {{ asset.provider_name }} account.
</h3>
<a href="#" class="auth-link {{ asset.provider_name }}-link radius0">Log in with {{ asset.provider_name }}</a>
{% endif %}
</div>
</div>
</div>
</div>
{% endif %}
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-43233993-6', 'getchute.com');
ga('send', 'pageview');
</script>
</body>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment