<commit_before>{% extends "mobile/base.html" %}

{% block body %}
{% load markup %}
<div data-role="page">
  <header data-role="header" data-theme="b"> 
     <a href="{% url mobile_quests 'available' %}" rel="external" data-role="button" data-icon="home">Back</a>
    <h1>{{quest.name}}</h1>
<a href="{% url mobile_quest_popup %}" data-rel="dialog" data-icon="gear" data-direction="reverse" class="ui-btn-right jqm-home">Redeem Code</a>
  </header>


  <div data-role="content"> 
   {{quest.description|markdown}}
   {% if referer == "accepted" %}
   <form action="{% url quests_cancel quest.quest_slug %}" method="POST" style="display: inline">
        <button type="submit" onClick="history.go(0)" style="margin-right: 20px">Cancel this quest</button>
      </form> 
   {% endif %}
   {% if referer == "available" %}
      <form action="{% url quests_accept quest.quest_slug %}" method="POST" style="display: inline">
        <button type="submit" onClick="history.go(1)" style="margin-right: 20px">I accept this quest</button>
      </form> 
   {% endif %}
  </div>
  
  <footer>
  </footer>
</div>

{% endblock %}<commit_msg>Trying to get rid of quests that linger after being accepted/removed<commit_after>{% extends "mobile/base.html" %}

{% block body %}
{% load markup %}
<div data-role="page">
  <header data-role="header" data-theme="b"> 
     <a href="{% url mobile_quests 'available' %}" rel="external" data-role="button" data-icon="home">Back</a>
    <h1>{{quest.name}}</h1>
<a href="{% url mobile_quest_popup %}" data-rel="dialog" data-icon="gear" data-direction="reverse" class="ui-btn-right jqm-home">Redeem Code</a>
  </header>


  <div data-role="content"> 
   {{quest.description|markdown}}
   {% if referer == "accepted" %}
   <form action="{% url quests_cancel quest.quest_slug %}" rel="external" method="POST" style="display: inline">
        <button type="submit" onClick="history.go(0)" style="margin-right: 20px">Cancel this quest</button>
      </form> 
   {% endif %}
   {% if referer == "available" %}
      <form action="{% url quests_accept quest.quest_slug %}" rel="external" method="POST" style="display: inline">
        <button type="submit" onClick="history.go(1)" style="margin-right: 20px">I accept this quest</button>
      </form> 
   {% endif %}
  </div>
  
  <footer>
  </footer>
</div>

{% endblock %}
{'fraction_non_alphanumeric': 0.20102432778489115, 'fraction_numerical': 0.006828851899274435, 'mean_word_length': 4.208888888888889, 'pattern_counts': {'":': 0, '<': 47, '<?xml version=': 0, '>': 47, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3628129', 'n_tokens_mistral': 838, 'n_tokens_neox': 771, 'n_words': 174}