timetracker/games/static/js/add_edition.js

25 lines
494 B
JavaScript
Raw Normal View History

2023-11-20 20:15:18 +00:00
import { syncSelectInputUntilChanged } from "./utils.js";
let syncData = [
{
2023-11-20 20:15:18 +00:00
source: "#id_game",
source_value: "dataset.name",
target: "#id_name",
target_value: "value",
},
{
2023-11-20 20:15:18 +00:00
source: "#id_game",
source_value: "textContent",
target: "#id_sort_name",
target_value: "value",
},
2023-11-09 14:20:30 +00:00
{
2023-11-20 20:15:18 +00:00
source: "#id_game",
source_value: "dataset.year",
target: "#id_year_released",
target_value: "value",
},
];
syncSelectInputUntilChanged(syncData, "form");