Skip to content
Snippets Groups Projects
Commit a31bfa09 authored by Benoit Alessandroni's avatar Benoit Alessandroni
Browse files

Fixing entrepreneur and mentor creation picture input

parent 424cfd97
No related branches found
No related tags found
1 merge request!124Fixing the picture upload input
Pipeline #3865 passed with stage
in 2 minutes
......@@ -45,7 +45,7 @@ function openFakeTab(elmnt) {
* Set a preview image on load.
* @param {event} event - On file loading.
*/
function loadFile(event, inputName) {
function loadFile(event) {
//Création of the preview
var elt = document.createElement("img");
elt.src = URL.createObjectURL(event.target.files[0]);
......@@ -634,8 +634,10 @@ jQuery(document).ready(function($) {
refreshList("improvement_dialog_form", "pending_resources");
refreshList("entrepreneur_profile_creation", "entrepreneur_info");
refreshList("entrepreneur_profile_creation", "entrepreneur_contact");
initFileUpload("entrepreneur_profile_creation", "account.picture");
refreshList("entrepreneur_profile_creation", "entrepreneur_account_picture");
refreshList("mentor_profile_creation", "mentor_info");
initFileUpload("mentor_profile_creation", "account.picture");
refreshList("mentor_profile_creation", "mentor_complementary");
refreshList("mentor_profile_creation", "mentor_contact");
refreshList("mentor_profile_creation", "user_account_picture");
......@@ -722,7 +724,6 @@ jQuery(document).ready(function($) {
//Init the form file behaviour
initFileUpload("resource_creation_form", "preview_image");
initFileUpload("resource_edition_form", "preview_image");
initFileUpload("mentor_profile_creation", "account.picture");
initFileUpload("mentor_profile_edition", "account.picture");
//Manage the accordion in request mentor dashboard.
......@@ -772,8 +773,7 @@ jQuery(document).ready(function($) {
//Init the form file behaviour
// initFileUpload();
// initFileUpload("entrepreneur_profile_edition", "account.picture");
// initFileUpload("entrepreneur_profile_creation", "account.picture");
initFileUpload("entrepreneur_profile_edition", "account.picture");
//Correct the native default of pagination
refreshPagination();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment