mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-11 18:01:10 -06:00
#2428 profile image auto save fixed
This commit is contained in:
parent
53f7596ba5
commit
f681b6ecf9
@ -102,7 +102,7 @@
|
||||
<div class="tab-pane fade" id="nav-details" role="tabpanel"
|
||||
aria-labelledby="nav-details-tab">
|
||||
{% set profileForm = form('profile').entry(user.id).get() %}
|
||||
{{ profileForm.open()|raw }}
|
||||
{{ profileForm.open({ 'id': 'profile-detail' })|raw }}
|
||||
<div class="row">
|
||||
<div class="col-md-12 profile-pic">
|
||||
{% if setting_value('visiosoft.module.profile::upload_avatar') %}
|
||||
|
||||
@ -64,6 +64,9 @@ $(function () {
|
||||
var response = JSON.parse(file.xhr.response);
|
||||
|
||||
uploaded.push(response.id);
|
||||
$('[data-provides="visiosoft.field_type.singlefile"]').val(response.id)
|
||||
$('#file-modal').modal('hide');
|
||||
$('#profile-detail').submit();
|
||||
|
||||
file.previewElement.querySelector('[data-dz-uploadprogress]').setAttribute('class', 'progress progress-success');
|
||||
|
||||
@ -80,12 +83,4 @@ $(function () {
|
||||
|
||||
alert(message.error ? message.error : message);
|
||||
});
|
||||
|
||||
// When all files are processed.
|
||||
dropzone.on('queuecomplete', function () {
|
||||
|
||||
uploader.find('.uploaded .modal-body').html(element.data('loading') + '...');
|
||||
|
||||
uploader.find('.uploaded').load(REQUEST_ROOT_PATH + '/streams/singlefile-field_type/recent?uploaded=' + uploaded.join(','));
|
||||
});
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user