You DO NOT want to pass the name of the file you want to change with root rights in the form parameters, do you?
I don't, however it's also necessary to be able to configure local settings (not everybody uses the same configuration file). That means that there is somewhere in the UI the way to change the file to work on, probably in a dedicated module.
This will limit you to CGI mode. Combined with AJAX, this will cause a nice load on your server.
This is an administrative interface. It won't be used constantly, and hardly by more than one user at the same time, so this is actually a non-problem.
Useless work, you need only one version. Make the code work with pure HTML, and add Javascript (with or without AJAX) for the nice look and feel.
Some fancy interfaces are really harder to build in dual-mode. AJAX sophisticated UIs degrade badly to the point of being close to useless in pure HTML mode. That's why for some of them it will be better to have two entirely distinct presentations.