Fix button names in scanmailboxform

Closes: #1147
This commit is contained in:
eikek 2021-11-12 23:42:37 +01:00
parent 28b4546607
commit ee2a4aaaf0
2 changed files with 21 additions and 4 deletions

View File

@ -788,6 +788,9 @@ view2 texts flags extraClasses settings model =
tabActive t = tabActive t =
( tabLook t, ToggleAkkordionTab t.name ) ( tabLook t, ToggleAkkordionTab t.name )
isNew =
model.settings.id == ""
in in
div div
[ class extraClasses [ class extraClasses
@ -797,19 +800,24 @@ view2 texts flags extraClasses settings model =
{ start = { start =
[ MB.PrimaryButton [ MB.PrimaryButton
{ tagger = Submit { tagger = Submit
, label = texts.basics.submit , label = texts.save
, title = texts.basics.submitThisForm , title =
if isNew then
texts.saveNewTitle
else
texts.updateTitle
, icon = Just "fa fa-save" , icon = Just "fa fa-save"
} }
, MB.SecondaryButton , MB.SecondaryButton
{ tagger = Cancel { tagger = Cancel
, label = texts.basics.cancel , label = texts.basics.back
, title = texts.basics.backToList , title = texts.basics.backToList
, icon = Just "fa fa-arrow-left" , icon = Just "fa fa-arrow-left"
} }
] ]
, end = , end =
if model.settings.id /= "" then if not isNew then
[ startOnceBtn [ startOnceBtn
, MB.DeleteButton , MB.DeleteButton
{ tagger = RequestDelete { tagger = RequestDelete

View File

@ -72,6 +72,9 @@ type alias Texts =
, invalidCalEvent : String , invalidCalEvent : String
, attachmentsOnlyLabel : String , attachmentsOnlyLabel : String
, attachmentsOnlyInfo : String , attachmentsOnlyInfo : String
, save : String
, saveNewTitle : String
, updateTitle : String
} }
@ -153,6 +156,9 @@ gb =
, invalidCalEvent = "The calendar event is not valid." , invalidCalEvent = "The calendar event is not valid."
, attachmentsOnlyLabel = "Only import e-mail attachments" , attachmentsOnlyLabel = "Only import e-mail attachments"
, attachmentsOnlyInfo = "Discards the e-mail body and only imports the attachments." , attachmentsOnlyInfo = "Discards the e-mail body and only imports the attachments."
, save = "Save"
, saveNewTitle = "Save a new task"
, updateTitle = "Update the task"
} }
@ -229,4 +235,7 @@ kann hier ein Wert für alle festgelegt werden. Bei 'Automatisch' wird auf den S
, invalidCalEvent = "Das Kalenderereignis ist ungültig." , invalidCalEvent = "Das Kalenderereignis ist ungültig."
, attachmentsOnlyLabel = "Nur Anhänge importieren" , attachmentsOnlyLabel = "Nur Anhänge importieren"
, attachmentsOnlyInfo = "Verwirft den E-Mail Text und importiert nur die Anhänge." , attachmentsOnlyInfo = "Verwirft den E-Mail Text und importiert nur die Anhänge."
, save = "Speichern"
, saveNewTitle = "Einen neuen Auftrag speichern"
, updateTitle = "Den Auftrag aktualisieren"
} }