Migration complete
This commit is contained in:
@@ -27,7 +27,7 @@ const ERROR_TABLE = {
|
||||
noGame: "Please provide a game or create a new one and fill all the required fields.",
|
||||
noLanguages: "Please select at least a language.",
|
||||
noAuthors: "Please provide at least an author or create a new one and fill all the required fields.",
|
||||
noMainImage: "Please select a main image.",
|
||||
noMainImage: "Please upload a main image.",
|
||||
noGalleryImages: "Please select at least a gallery image.",
|
||||
isSubmitting: "The entry is already during submission."
|
||||
}
|
||||
@@ -269,75 +269,75 @@ window.Submission = function(){
|
||||
*/
|
||||
verifyForm(){
|
||||
|
||||
console.log( "Step 1" );
|
||||
console.info( "Step 1: During File upload" );
|
||||
if( !SubmissionVerifications.step1_DuringFSUpload( this.Uploader ) ){
|
||||
this.errorKey = "isUploading";
|
||||
return false;
|
||||
}
|
||||
|
||||
console.log( "Step 2" );
|
||||
console.info( "Step 2: No files uploaded" );
|
||||
if( !SubmissionVerifications.step2_NoFilesFSUpload( this.Uploader ) ){
|
||||
this.errorKey = "noFiles";
|
||||
return false;
|
||||
}
|
||||
|
||||
console.log( "Step 3" );
|
||||
console.info( 'Step 3: Error in file upload')
|
||||
if( !SubmissionVerifications.step3_ErrorsFSUpload( this.Uploader ) ){
|
||||
this.errorKey = "uploadError";
|
||||
return false;
|
||||
}
|
||||
|
||||
console.log( "Step 4" );
|
||||
console.info("Step 4: All files uploaded");
|
||||
if( !SubmissionVerifications.step4_AllFilesUploadedFSUpload( this.Uploader ) ){
|
||||
this.errorKey = "notAllFilesDone";
|
||||
return false;
|
||||
}
|
||||
|
||||
if( SECTION() === "romhacks" || SECTION() === "lua-scripts" ){
|
||||
console.log( "Step 5" );
|
||||
console.info( "Step 5: Verify modifications")
|
||||
if( !SubmissionVerifications.step5_RomhacksModificationsCheckboxes()){
|
||||
this.errorKey = "noModifications";
|
||||
return false;
|
||||
}
|
||||
} else if( SECTION() === "utilities" ){
|
||||
console.log( "Step 5" );
|
||||
console.info( "Step 5: Verify systems");
|
||||
if( !SubmissionVerifications.step5_UtilitiesSystemsCheckboxes()){
|
||||
this.errorKey = "noSystems";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
console.log( "Step 6" );
|
||||
console.info( "Step 6: Verify description");
|
||||
if( !SubmissionVerifications.step6_VerifyDescription() ){
|
||||
this.errorKey = "noDescription";
|
||||
return false;
|
||||
}
|
||||
|
||||
console.log( "Step 7" );
|
||||
console.info( "Step 7: Verify game");
|
||||
if( !SubmissionVerifications.step7_VerifyGame( this.$el ) ){
|
||||
this.errorKey = "noGame";
|
||||
return false;
|
||||
}
|
||||
|
||||
console.log( "Step 8" );
|
||||
console.info("Step 8: Verify languages");
|
||||
if( !SubmissionVerifications.step8_LanguagesCheckboxes()){
|
||||
this.errorKey = "noLanguages";
|
||||
return false;
|
||||
}
|
||||
|
||||
console.log( "Step 9" );
|
||||
console.info( "Step 9: Verify authors" );
|
||||
if( !SubmissionVerifications.step9_verifyAuthors()){
|
||||
this.errorKey = "noAuthors";
|
||||
return false;
|
||||
}
|
||||
|
||||
console.log( "Step 10" );
|
||||
console.info( "Step 10: Verify Main image" );
|
||||
if( !SubmissionVerifications.step10_verifyMainImage( this.$el )){
|
||||
this.errorKey = "noMainImage";
|
||||
return false;
|
||||
}
|
||||
|
||||
console.log( "Step 11" );
|
||||
console.info( "Step 11: Verify gallery images" );
|
||||
if( !SubmissionVerifications.step11_verifyGallery( this.$el )){
|
||||
this.errorKey = "noGalleryImages";
|
||||
return false;
|
||||
@@ -367,9 +367,13 @@ window.Submission = function(){
|
||||
isSubmitting: 'submitButton'
|
||||
};
|
||||
|
||||
const target = this.$refs[refMap[this.errorKey]]
|
||||
|| this.$el.querySelector('.upload-list')
|
||||
|| this.$el.querySelector('.form-upload');
|
||||
const targetKey = refMap[this.errorKey];
|
||||
|
||||
const target = this.$refs[targetKey]
|
||||
|| this.$el.querySelector(`[data-target="${targetKey}"]`)
|
||||
|| this.$el.querySelector(`[x-ref="${targetKey}"]`)
|
||||
|| this.$el.querySelector('.upload-list')
|
||||
|| this.$el.querySelector('.form-upload');
|
||||
|
||||
if (target) {
|
||||
target.scrollIntoView({behavior: 'smooth', block: 'center'});
|
||||
|
||||
Reference in New Issue
Block a user