- # TODO save to real path
- IkiWiki::Setup::dump("/tmp/s");
- $form->text(gettext("Setup saved."));
+
+ if (%rebuild && $form->submitted eq 'Save Setup') {
+ $form->text(gettext("The configuration changes shown below require a wiki rebuild to take effect."));
+ foreach my $field ($form->field) {
+ next if $rebuild{$field};
+ $form->field(name => $field, type => "hidden",
+ force => 1);
+ }
+ $form->reset(0); # doesn't really make sense here
+ $buttons=["Rebuild Wiki", "Cancel"];
+ }
+ else {
+ # TODO save to real path
+ IkiWiki::Setup::dump("/tmp/s");
+ $form->text(gettext("Setup saved."));
+
+ if (%rebuild) {
+ # TODO rebuild
+ }
+ }