Cleanup the submission form, fix reset button
This commit is contained in:
parent
df0aa087fb
commit
e810fd442f
5 changed files with 6 additions and 7 deletions
|
|
@ -175,8 +175,7 @@ $( document ).ready(function() {
|
|||
$("#submission-minimum-word-count").text(min);
|
||||
word_count($('#event_abstract').get(0), 'abstract-count', max);
|
||||
word_count($('#event_submission_text').get(0), 'submission-count', max);
|
||||
})
|
||||
.trigger('change');
|
||||
}).trigger('change');
|
||||
|
||||
/* Count the proposal abstract length */
|
||||
$("#event_abstract").bind('change keyup paste input', function() {
|
||||
|
|
@ -193,7 +192,7 @@ $( document ).ready(function() {
|
|||
});
|
||||
|
||||
/* Listen for reset template button, wait for confirm, and reset. */
|
||||
$('#sub_text_reset').click((e) => {
|
||||
$('.js-resetSubmissionText').click((e) => {
|
||||
let $selected = $("#event_event_type_id option:selected");
|
||||
let $this = $(e.target);
|
||||
let affirm = confirm($this.data('confirm'));
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ module EventsHelper
|
|||
data: {
|
||||
min_words: type.minimum_abstract_length,
|
||||
max_words: type.maximum_abstract_length,
|
||||
help: type.submission_instructions
|
||||
instructions: type.submission_instructions
|
||||
}
|
||||
]
|
||||
end
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
%span{ class: 'help-block select-help-text collapse event_difficulty_level_id', id: "#{difficulty_level.id}-help" }
|
||||
= difficulty_level.description
|
||||
|
||||
= render 'submission_type_content_form', f: f, program: @program
|
||||
= render 'proposals/submission_type_content_form', f: f, program: @program
|
||||
|
||||
- if @program.cfp&.enable_registrations?
|
||||
= f.inputs 'Enable pre-registration' do
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@
|
|||
.panel-body
|
||||
= markdown(event_type.submission_instructions)
|
||||
.panel-footer
|
||||
%button.btn.btn-warning.btn-xs{ type: 'button', id: 'sub_text_reset', data: { confirm: 'Do you really want to reset your submission text to the provided template?' } }
|
||||
%button.btn.btn-warning.btn-xs.js-resetSubmissionText{ type: 'button', data: { confirm: 'Do you really want to reset your submission text to the provided template?' } }
|
||||
Reset Submission to Template
|
||||
%span.small You may want to use this if you have changed the submission type.
|
||||
|
||||
|
|
|
|||
|
|
@ -206,7 +206,7 @@ feature Event do
|
|||
fill_in 'event_submission_text', with: 'Lorem ipsum example submission text'
|
||||
|
||||
accept_confirm do
|
||||
click_button 'Reset to Template'
|
||||
click_button 'Reset Submission to Template'
|
||||
end
|
||||
|
||||
expect(page.find('#event_submission_text').value).to eq(event_type.submisson_instructions)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue