def _process(self): form = PaperSubmissionForm() if form.validate_on_submit(): paper = Paper(self.contribution) create_paper_revision(paper, session.user, form.files.data) return jsonify_data(flash=False) return jsonify_form( form, form_header_kwargs={'action': request.relative_url}, disable_if_locked=False)
def _process(self): form = PaperSubmissionForm() if form.validate_on_submit(): if self.paper is None: paper = Paper(self.contribution) create_paper_revision(paper, session.user, form.files.data) return jsonify_data(flash=False) else: create_paper_revision(self.paper, session.user, form.files.data) return jsonify_data(flash=False, html=render_paper_page(self.paper)) return jsonify_form(form, form_header_kwargs={'action': request.relative_url}, disable_if_locked=False)
def _process(self): form = PaperSubmissionForm() if form.validate_on_submit(): if self.paper is None: paper = Paper(self.contribution) create_paper_revision(paper, session.user, form.files.data) return jsonify_data(flash=False) else: create_paper_revision(self.paper, session.user, form.files.data) return jsonify_data(flash=False, html=render_paper_page(self.paper)) return jsonify_form( form, form_header_kwargs={'action': request.relative_url})