Fixes mineurs #583
@ -151,7 +151,7 @@ export class EnvironmentSheetHelper {
|
||||
|
||||
static activateListeners(sheet, html) {
|
||||
if (!sheet.options.editable) return;
|
||||
html.find("a.milieu-add").click(event => EnvironmentSheetHelper.onAddMilieu(sheet, event));
|
||||
html.find("a.milieu-add").click(event => EnvironmentSheetHelper.onAddMilieu(html, sheet, event));
|
||||
html.find("div.environnement-milieu a.milieu-delete").click(event => EnvironmentSheetHelper.onDeleteMilieu(sheet, event));
|
||||
html.find("div.environnement-milieu select.environnement-rarete").change(event => EnvironmentSheetHelper.onChange(sheet, event,
|
||||
(updated) => {
|
||||
@ -168,8 +168,8 @@ export class EnvironmentSheetHelper {
|
||||
}));
|
||||
}
|
||||
|
||||
static async onAddMilieu(sheet, event) {
|
||||
const milieu = $("input.input-selection-milieu").val();
|
||||
static async onAddMilieu(html, sheet, event) {
|
||||
const milieu = html.find('input.input-selection-milieu').val();
|
||||
if (!milieu) {
|
||||
ui.notifications.warn(`Choisissez le milieu dans lequel se trouve le/la ${sheet.item.name}`);
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user