New fields on collection edition form and removes hack on collection validation. #388
This commit is contained in:
parent
eb125b1c53
commit
67ddf74ffe
|
@ -552,7 +552,7 @@ class Collection extends Entity {
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
function get_submission_anonymous_user() {
|
function get_submission_anonymous_user() {
|
||||||
return true || $this->get_mapped_property( 'submission_anonymous_user' ) != 'false';
|
return $this->get_mapped_property( 'submission_anonymous_user' ) != 'false';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -816,6 +816,9 @@ export default {
|
||||||
parent: this.form.parent,
|
parent: this.form.parent,
|
||||||
enabled_view_modes: this.form.enabled_view_modes,
|
enabled_view_modes: this.form.enabled_view_modes,
|
||||||
default_view_mode: this.form.default_view_mode,
|
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,
|
allow_comments: this.form.allow_comments,
|
||||||
hide_items_thumbnail_on_lists: this.form.hide_items_thumbnail_on_lists
|
hide_items_thumbnail_on_lists: this.form.hide_items_thumbnail_on_lists
|
||||||
};
|
};
|
||||||
|
|
|
@ -347,7 +347,6 @@ export const finishItemSubmission = ({ commit }, { itemSubmission, fakeItemId })
|
||||||
let config = {
|
let config = {
|
||||||
headers: { 'content-type': 'multipart/form-data' }
|
headers: { 'content-type': 'multipart/form-data' }
|
||||||
}
|
}
|
||||||
console.log(itemSubmission)
|
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
|
|
||||||
for (let key of Object.keys(itemSubmission)) {
|
for (let key of Object.keys(itemSubmission)) {
|
||||||
|
@ -358,7 +357,6 @@ export const finishItemSubmission = ({ commit }, { itemSubmission, fakeItemId })
|
||||||
formData.append(key + '[' + i + ']', itemSubmission[key][i]);
|
formData.append(key + '[' + i + ']', itemSubmission[key][i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log(formData)
|
|
||||||
axios.tainacan.post('/collection/' + itemSubmission.collection_id + '/items/submission/' + fakeItemId + '/finish', formData, config )
|
axios.tainacan.post('/collection/' + itemSubmission.collection_id + '/items/submission/' + fakeItemId + '/finish', formData, config )
|
||||||
.then( res => {
|
.then( res => {
|
||||||
resolve( res.data );
|
resolve( res.data );
|
||||||
|
|
|
@ -208,6 +208,5 @@ export const deleteGroupFromItemSubmissionMetadatum = (state, { metadatum_id, ch
|
||||||
existingMetadatum.value = existingMetadatumValue;
|
existingMetadatum.value = existingMetadatumValue;
|
||||||
Vue.set(state.itemSubmissionMetadata, existingMetadatumIndex, existingMetadatum);
|
Vue.set(state.itemSubmissionMetadata, existingMetadatumIndex, existingMetadatum);
|
||||||
}
|
}
|
||||||
console.log('store', JSON.parse(JSON.stringify(state.itemSubmissionMetadata[existingMetadatumIndex].value)))
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue