Closed Monviech closed 5 months ago
No the fields cant be shared. For maintainability and seperation if concerns, every DNS Provider needs its own keys in the model. Otherwise unexpected things happen while saving the form.
The template and forms also needs adjustement for this change.
This will also be a breaking change, since DNS Provider Data has to be resubmitted after this change.
(I feel like I opened Pandoras Box with this change, lol, thought it would be straightforward. But its better for the future.)
No, this is the wrong way to do it. The old way was way more simple, efficient, and it just worked.
This was a big sink of time for no benefit. I'll close this.
Every DNS Provider will get a partial view, which is loaded based on the select picker of the DNS Providers.
That enables the front end to display the right names for every field the DNS Provider needs, as well as showing customized help text to the right github links for any of them.
The fields in the backend can be shared between all providers, and leftovers in invisible fields arent loaded anyway due to template logic.
e.g. dnsprovidercloudflareForm dnsproviderazureForm etc...
They're loaded like this: general.volt
The javascript to select them: