From b60f63b79ab70f1a147359c6b2259d5937755d2c Mon Sep 17 00:00:00 2001 From: Keltena Date: Wed, 24 Jul 2024 14:50:30 -0400 Subject: [PATCH] #378: Add a checkbox to the comp submission form reaffirming Rule 2 for Authors --- IFComp/root/src/entry/_form.tt | 35 ++++++++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 4 deletions(-) diff --git a/IFComp/root/src/entry/_form.tt b/IFComp/root/src/entry/_form.tt index 102f27b6..757a4300 100644 --- a/IFComp/root/src/entry/_form.tt +++ b/IFComp/root/src/entry/_form.tt @@ -38,6 +38,17 @@ [% END %] +[% UNLESS entry.id %] +
+
+ +
+
+[% END %] + [% UNLESS entry.id %]

If you're only declaring your intent to enter at this time, then you may use the button below to submit this form right now with just its title, subtitle, and platform information. That will serve as your intent, and you'll be able to update, rename, or otherwise modify your entry as much as you please through the [% current_comp.intents_close.strftime( '%{month_name} %{day}' ) %] deadline.

[% form.field('submit').render %] @@ -287,6 +298,7 @@ var playtime = $( '#playtime' ); update_playtime_warning(); update_unreleased_warning(); +update_rights_grant(); playtime.change( function() { update_playtime_warning() @@ -307,14 +319,29 @@ $( '#game\\.entry\\.unreleased' ).change( function() { function update_unreleased_warning() { if ( $( '#game\\.entry\\.unreleased' ).val() == 0 ) { - $( '#released-game-warning' ).show(); - $(':input[type="submit"]').prop('disabled', true); + $( '#released-game-warning' ).show(); } else { $( '#released-game-warning' ).hide(); - $(':input[type="submit"]').prop('disabled', false); - } + } + disable_submission(); +} + +$( '#game\\.entry\\.rights_grant' ).change( function() { + update_rights_grant() +} ); + +function update_rights_grant() { + disable_submission(); } +function disable_submission() { + if ( $('#game\\.entry\\.unreleased').val() == 1 && $('#game\\.entry\\.rights_grant').is(':checked') ) { + $(':input[type="submit"]').prop('disabled', false); + } + else { + $(':input[type="submit"]').prop('disabled', true); + } +} [% END %]