New fields on collection edition form and removes hack on collection validation. #388

This commit is contained in:
mateuswetah 2020-09-25 14:12:54 -03:00
parent eb125b1c53
commit 67ddf74ffe
4 changed files with 4 additions and 4 deletions

View File

@ -552,7 +552,7 @@ class Collection extends Entity {
* @return bool
*/
function get_submission_anonymous_user() {
return true || $this->get_mapped_property( 'submission_anonymous_user' ) != 'false';
return $this->get_mapped_property( 'submission_anonymous_user' ) != 'false';
}
/**

View File

@ -816,6 +816,9 @@ export default {
parent: this.form.parent,
enabled_view_modes: this.form.enabled_view_modes,
default_view_mode: this.form.default_view_mode,
allows_submission: this.form.allows_submission,
submission_anonymous_user: this.form.submission_anonymous_user,
submission_default_status: this.form.submission_default_status,
allow_comments: this.form.allow_comments,
hide_items_thumbnail_on_lists: this.form.hide_items_thumbnail_on_lists
};

View File

@ -347,7 +347,6 @@ export const finishItemSubmission = ({ commit }, { itemSubmission, fakeItemId })
let config = {
headers: { 'content-type': 'multipart/form-data' }
}
console.log(itemSubmission)
const formData = new FormData();
for (let key of Object.keys(itemSubmission)) {
@ -358,7 +357,6 @@ export const finishItemSubmission = ({ commit }, { itemSubmission, fakeItemId })
formData.append(key + '[' + i + ']', itemSubmission[key][i]);
}
}
console.log(formData)
axios.tainacan.post('/collection/' + itemSubmission.collection_id + '/items/submission/' + fakeItemId + '/finish', formData, config )
.then( res => {
resolve( res.data );

View File

@ -208,6 +208,5 @@ export const deleteGroupFromItemSubmissionMetadatum = (state, { metadatum_id, ch
existingMetadatum.value = existingMetadatumValue;
Vue.set(state.itemSubmissionMetadata, existingMetadatumIndex, existingMetadatum);
}
console.log('store', JSON.parse(JSON.stringify(state.itemSubmissionMetadata[existingMetadatumIndex].value)))
}
}