From e7c6055b3fc6f9910d59791d4f34967b15e5927d Mon Sep 17 00:00:00 2001
From: James Tauber <jtauber@jtauber.com>
Date: Sat, 8 Sep 2012 19:07:34 -0400
Subject: [PATCH] added cancel and disable next

---
 symposion/templates/reviews/result_notification.html       | 7 ++++++-
 .../templates/reviews/result_notification_prepare.html     | 1 +
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/symposion/templates/reviews/result_notification.html b/symposion/templates/reviews/result_notification.html
index 37e29462..655a3cb5 100644
--- a/symposion/templates/reviews/result_notification.html
+++ b/symposion/templates/reviews/result_notification.html
@@ -28,7 +28,7 @@
                 {% endfor %}
             </select>
             <br/>
-            <button type="submit" class="btn btn-primary">Next <i class="icon icon-chevron-right"></i></button>
+            <button id="next-button" type="submit" class="btn btn-primary" disabled>Next <i class="icon icon-chevron-right"></i></button>
         </p>
         
         <table class="table table-striped table-bordered">
@@ -93,6 +93,11 @@
                         }
                         return value;
                     });
+                    if (sel == 0) {
+                        $("#next-button").prop("disabled", true);
+                    } else {
+                        $("#next-button").prop("disabled", false);
+                    }
                 }
                 // Check state of checkboxes and reinit state if needed
                 $(this).filter(":checked").each(function(i) {
diff --git a/symposion/templates/reviews/result_notification_prepare.html b/symposion/templates/reviews/result_notification_prepare.html
index c417a18a..1a14d563 100644
--- a/symposion/templates/reviews/result_notification_prepare.html
+++ b/symposion/templates/reviews/result_notification_prepare.html
@@ -37,6 +37,7 @@
                     replaced with the title of the proposal when the email is sent.
                 </p>
                 <button type="submit" class="btn btn-primary">Send {{ proposals|length }} Email{{ proposals|length|pluralize }}</button>
+                <a class="btn" href="{% url result_notification section_slug status %}">Cancel</a>
             </form>
         </div>
     </form>