Commit graph

31 commits

Author SHA1 Message Date
Martin Hebnes Pedersen
063c15f38f Require Go 1.24 (and update deps) 2025-09-04 11:47:20 +02:00
Martin Hebnes Pedersen
6760cbcf63 Pass automatic locator updates to forms manager 2025-08-31 18:55:35 +02:00
Martin Hebnes Pedersen
36eb6ade59 Fix parsing of ReplyTemplate template command 2025-07-05 13:32:30 +02:00
Martin Hebnes Pedersen
6ae942e13b Refactor to prepare for hot reloading of config
* Remove singletons
* Split into app, cli and api packages

Ref #6
2025-06-14 07:50:42 +02:00
Martin Hebnes Pedersen
8a3159e8f2 Improve template parsing/detection 2025-05-30 07:07:43 +02:00
Martin Hebnes Pedersen
d840b17101 Add endpoints for text-template editor in web gui 2025-05-29 16:47:10 +02:00
Martin Hebnes Pedersen
922b4ba43f templates: Add support for {FormFolder} tag
Resolves #458
2025-05-26 11:37:58 +02:00
Martin Hebnes Pedersen
4dc5577eb0 Fix panic on empty attached_text form values
Resolves #470
2025-01-21 19:40:56 +01:00
Martin Hebnes Pedersen
3a2c12b6b3 Add support for template sequence numbers 2024-12-27 13:55:28 +01:00
Martin Hebnes Pedersen
4d1615fbf8 Enhance support for reply templates
* Add insertion tags MsgOriginal*
* Insert original body as citation at the end of the message.
2024-12-19 23:53:46 +01:00
Martin Hebnes Pedersen
47b15734e8 Properly close response body on internet check 2024-12-19 23:53:14 +01:00
Martin Hebnes Pedersen
fc36ba5626 Add support for <InternetAvailable> insertion tag 2024-12-19 23:29:56 +01:00
Martin Hebnes Pedersen
42856f11d7 Handle UTF-8 BOM when reading templates files 2024-12-13 18:34:04 +01:00
Martin Hebnes Pedersen
855c8678b4 Implement multi-line prompt for text templates
Resolves #444
2024-12-13 13:00:00 +01:00
Martin Hebnes Pedersen
51e115fd17 Trim whitespace from form vars in XML attachment
I found this difference when comparing against Winlink Express's output
using the same Form template. Winlink Express trims trailing whitespace
before writing the form variables as XML.
2024-04-13 07:33:20 +02:00
Martin Hebnes Pedersen
12def2e3b7 Remove trailing space in GPSValid insertion tag
Winlink Express does include this, and neither should we.
2024-04-13 07:33:20 +02:00
Martin Hebnes Pedersen
94a3caf749 Fix <Ask ...,UP> (uppercase prompt) 2024-04-13 07:33:20 +02:00
Martin Hebnes Pedersen
504d905153 Support attached_textN/attached_fileN
Issue #437
2024-04-13 07:33:20 +02:00
Martin Hebnes Pedersen
4d7ab34e65 Cleanup 2024-04-13 07:33:20 +02:00
Martin Hebnes Pedersen
64dd3cd29d Resolve Form files by referencing the template
By referencing the template instead of the "initial_uri" (Forms
composer), the backend is able to more precisely identify the correct
HTML file for any given template. It also makes handling of reply
templates much easier.

In addition to a less complex implementation, this simplifies the API as
we no longer need to supply the frontend with URIs for all HTML
variants. We also get increased performance because of the simplified
file search, and by not having to parse reply templates upfront.

This also opens up the possibility of serving a specialized HTML-based
composer for text-only templates in the future, without having to change
the existing frontend.
2024-04-13 07:33:20 +02:00
Martin Hebnes Pedersen
f0c78674e5 Fix missing appname for tag <ProgramVersion> 2024-04-13 07:33:20 +02:00
Martin Hebnes Pedersen
9f99d104f9 Avoid "." as reply template value if path is empty 2024-04-13 07:33:20 +02:00
Martin Hebnes Pedersen
60474bde9e Marshal XML attachment using the xml package 2024-04-13 07:33:20 +02:00
Martin Hebnes Pedersen
a0076fd6a9 Refactor XML marshalling and add tests
Also fixed issue of inconsistent output due to unstable ordering of form
variables.
2024-04-13 07:33:20 +02:00
Martin Hebnes Pedersen
bc9512e159 Add a couple of missing insertion Tags + docs
<Day>, <UDay>, <GPSLatitude> and <GPSLongitude>
2024-04-13 07:33:20 +02:00
Martin Hebnes Pedersen
35988914fb Add more insertion tags tests 2024-04-13 07:33:20 +02:00
Martin Hebnes Pedersen
c98746ed2a Customizable time.Now and location for testing 2024-04-13 07:33:20 +02:00
Martin Hebnes Pedersen
bda13dc25e Refactor gridSquare position formatting 2024-04-13 07:33:20 +02:00
Martin Hebnes Pedersen
f72a5ad888 Handle <Ask ...,UP> (uppercase prompt) 2024-04-13 07:33:20 +02:00
Martin Hebnes Pedersen
ebcaa4bc71 Fix resolve of Def: bug introduced in refactoring 2024-04-13 07:33:20 +02:00
Martin Hebnes Pedersen
a3191fb802 Refactor message builder 2024-04-13 07:33:20 +02:00
Renamed from internal/forms/message.go (Browse further)