Skip to content

Commit

Permalink
Merge pull request Dolibarr#32353 from Hystepik/fix-#32352
Browse files Browse the repository at this point in the history
Fix Dolibarr#32352 upload file and URL form on firefox
  • Loading branch information
eldy authored Dec 13, 2024
2 parents ff4c352 + a5d4be4 commit 9199565
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions htdocs/core/class/html.formfile.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1387,7 +1387,7 @@ public function list_of_documents($filearray, $object, $modulepart, $param = '',
// Show title of list of existing files
$morehtmlright = '';
if (!empty($moreoptions['showhideaddbutton']) && $conf->use_javascript_ajax) {
$tmpurlforbutton = 'javascript:console.log("open add file form");jQuery(".divattachnewfile").toggle(); if (!jQuery(".divattachnewfile").is(":hidden")) { jQuery("input[type=\'file\']").click(); }';
$tmpurlforbutton = 'javascript:console.log("open add file form");jQuery(".divattachnewfile").toggle(); if (!jQuery(".divattachnewfile").is(":hidden")) { jQuery("input[type=\'file\']").click();}void(0);';
$morehtmlright .= dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', $tmpurlforbutton, '', $permtoeditline);
}

Expand Down Expand Up @@ -2221,7 +2221,7 @@ public function listOfLinks($object, $permissiontodelete = 1, $action = null, $s

$morehtmlright = '';
if (!empty($moreoptions['showhideaddbutton']) && $conf->use_javascript_ajax) {
$morehtmlright .= dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', 'javascript:console.log("open addlink form"); jQuery(".divlinkfile").toggle();', '', $permissiontoedit);
$morehtmlright .= dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', 'javascript:console.log("open addlink form"); jQuery(".divlinkfile").toggle(); void(0);', '', $permissiontoedit);
}

// Show list of associated links
Expand Down

0 comments on commit 9199565

Please sign in to comment.