Skip to content

Commit

Permalink
feat(proposals/): Refine pre_recorded_policy
Browse files Browse the repository at this point in the history
  • Loading branch information
setmao committed Feb 28, 2022
1 parent 7bcdc2d commit 009e816
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 7 deletions.
33 changes: 28 additions & 5 deletions src/proposals/forms/mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ class Meta:
'detailed_description': SimpleMDEWidget(),
'outline': SimpleMDEWidget(),
'supplementary': SimpleMDEWidget(),
'pre_recorded_policy': forms.CheckboxInput(),
}
help_texts = {
'abstract': _(
Expand Down Expand Up @@ -75,9 +76,11 @@ class Meta:
"target='_blank' rel='noopener'>Markdown</a>."
),
'recording_policy': format_html_lazy(
_("Whether you agree to give permission to PyCon Taiwan to "
"record, edit, and release audio and video of your "
"presentation. More information can be found at "
_("PyCon Taiwan will do post-processing to all the presentation "
"videos, including but not limited to applying video template, "
"banners of sponsors’ logos. Do you agree to give permission to "
"PyCon Taiwan to release audio and video of your presentation "
"after the conference? More information can be found at "
"<a href='{frontend_host}/en-us/speaking/recording' target='_blank'>"
"Recording Release</a> page."),
frontend_host=f"{settings.FRONTEND_HOST}"
Expand Down Expand Up @@ -139,11 +142,14 @@ class Meta:
"After your proposal is accepted, a pre-recording of the presentation "
"will be provided to the PyCon APAC 2022 organizing team prior to the "
"conference.<br>"
"<strong>Bonus for living in Taiwan</strong>"
"<strong>Bonus for living in Taiwan</strong><br>"
"For speakers who reside in Taiwan, we will offer a slot and assist you "
"to record the presentation in a professional video studio in Taipei "
"(travel expenses covered)."
)
),
'talk_language': _(
"If your previous option is not English, please enter your speaking language"
),
}


Expand All @@ -158,6 +164,7 @@ class Meta:
'detailed_description': SimpleMDEWidget(),
'outline': SimpleMDEWidget(),
'supplementary': SimpleMDEWidget(),
'pre_recorded_policy': forms.CheckboxInput(),
}
help_texts = {
'duration': _(
Expand Down Expand Up @@ -238,4 +245,20 @@ class Meta:
"only for the remote attendees to watch ? (we will not release "
"audio and video of your presentation)"
),
'pre_recorded_policy': _(
"Due to the ongoing global pandemic, <strong>PyCon APAC 2022 will "
"be held fully remote. All online talks this year will be pre-recorded "
"</strong> so we can broadcast your presentation to the audience "
"without the network troubles and the time zone differences.<br>"
"After your proposal is accepted, a pre-recording of the presentation "
"will be provided to the PyCon APAC 2022 organizing team prior to the "
"conference.<br>"
"<strong>Bonus for living in Taiwan</strong><br>"
"For speakers who reside in Taiwan, we will offer a slot and assist you "
"to record the presentation in a professional video studio in Taipei "
"(travel expenses covered)."
),
'talk_language': _(
"If your previous option is not English, please enter your speaking language"
),
}
4 changes: 2 additions & 2 deletions src/proposals/forms/proposals.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ class Meta(TalkProposalMixin.Meta):
'first_time_speaker',
'referring_policy',
'prefer_time',
'pre_recorded_policy',
'living_in_taiwan',
'pre_recorded_policy',
]


Expand Down Expand Up @@ -79,8 +79,8 @@ class Meta(TutorialProposalMixin.Meta):
'recording_policy',
'live_stream_policy',
'prefer_time',
'living_in_taiwan',
'pre_recorded_policy',
'living_in_taiwan',
]


Expand Down
12 changes: 12 additions & 0 deletions src/static/js/proposals/proposal_form.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,16 @@
}
});

if (!$('#id_pre_recorded_policy').is(':checked')) {
$('button.btn-primary:submit').prop('disabled', true);
}

$('#id_pre_recorded_policy').change(function() {
if (this.checked) {
$('button.btn-primary:submit').prop('disabled', false);
} else {
$('button.btn-primary:submit').prop('disabled', true);
}
});

})(jQuery);

0 comments on commit 009e816

Please sign in to comment.