Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Update facebook-share view to include csrfToken and badge body hash i…
…n order to pass necessary data to Facebook lib.
  • Loading branch information
davelester committed Mar 10, 2013
1 parent d0639cb commit d599302
Showing 1 changed file with 12 additions and 18 deletions.
30 changes: 12 additions & 18 deletions views/badge-facebook-share.html
Expand Up @@ -11,29 +11,23 @@
</tr>
<tr>
<td>
<strong>{{badge.attributes.body.badge.issuer.name}}</strong>
</td>
</tr>
<tr>
<td>
{{badge.attributes.body.badge.description|escape}}
<form action="/backpack/facebook" method="POST" class="facebook-share">
<input type="hidden" name="_csrf" value="{{ csrfToken }}"></input>
<input type="hidden" name="badge_body_hash" value="{{badge.attributes.body_hash}}"></input>
<strong>{{badge.attributes.body.badge.issuer.name}}</strong><br />
{{badge.attributes.body.badge.description|escape}}
<textarea name='facebookcomment' tabindex=1 class='comment' placeholder='Add your personal comment'></textarea>
<input type="checkbox" name="facebook_automatic_push" value="facebook_automatic_push">Automatically publish badges to Facebook when they are added to my backpack.</td>
</td>
</tr>
<tr>
<td>
<textarea name='facebook-share-comment' tabindex=1 class='comment' placeholder='Add your personal comment'></textarea>
</td>
</tr>
<tr>
<td><input type="checkbox" name="facebook-automatic-push" value="{{user.facebook_auto_share}}">Automatically publish badges to Facebook when they are added to my backpack.</td>
</tr>
<tr>
<td>
<div class='buttons'>
<button class='btn nope'>Cancel</button>
<div class='buttons'>
<a href="/backpack" class="btn">Cancel</a>
<button class='btn yep btn-primary'>Share on Facebook</button>
</div>
</td>
</tr>
</form>
</td>
</tr>
</tbody>
</table>

0 comments on commit d599302

Please sign in to comment.