But my authors keep “forgeting” to send the second file…
So, here are my questions:
Where is the form generated by this line in {load_url_in_div id=“submissionFilesGridDiv” url=$submissionFilesGridUrl} in this file templates/submission/form/step2.tpl ? I will customize the form to have The “Article Component” selected as Article text. And if possible, duplicate it to have the “Article Component” selected as copyright (created at Worklow Setting)
Is there a way to limit the number of files that can be submited by the author? So, it will only continues after 2 files were sent.
The quickest route I can think of is to modify PKPSubmissionSubmitStep2Form's execute method. In that method you can check how many files have been submitted. If it’s more or less than 2, return an error.
Normally, a form’s execute method should fire a hook that would allow you to do this from a plugin. Unfortunately, it looks like this form bypasses the parent methods and so never fires the hook.
Do you know where can i find the file that creates the “Upload Submission File” modal. So I can add a few lines of text before the “Article Component*”, for example.
You will find that file at lib/pkp/templates/controllers/wizard/fileUpload/form/fileUploadForm.tpl. If you implement a custom theme you can overwrite it without modifying the core files.
The line you are looking for is here:
I suggest passing a locale key as the description arg for {fbvFormSection}:
Hi Rodrigo, could you please tell us how does this work? Where did you write the extra description lines that will force the author to upload the second file in step 2?
Thanks