Use labels for selects in record edit form

This commit is contained in:
Claudio Ortolina
2025-01-24 12:22:29 +00:00
parent ed5447660d
commit 01ed11c0ab
2 changed files with 11 additions and 2 deletions
+9
View File
@@ -203,6 +203,15 @@ defmodule MusicLibrary.Records.Record do
end
def formats, do: @formats
def types, do: @types
def formats_with_labels do
Enum.map(@formats, fn f -> {format_long_label(f), f} end)
end
def types_with_labels do
Enum.map(@types, fn t -> {type_long_label(t), t} end)
end
def format_long_label(:cd), do: "CD"
def format_long_label(:backup), do: "Backup"