about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorPaul Fariello <paul@fariello.eu>2018-09-10 12:46:18 +0200
committerPaul Fariello <paul@fariello.eu>2018-09-10 12:50:01 +0200
commit371b64a8422b13e76b2d2af9f3f481351117f119 (patch)
tree42826e2243b9249ea4f089decbce8e792d7b6ec1 /src
parent6de60e7efc75d3eaa8e8d6b3676d3ee115ba0bd8 (diff)
downloadprofani-tty-371b64a8422b13e76b2d2af9f3f481351117f119.tar.gz
Don't show submit help on form if there is no submit callback
Could be missleading for user.
Diffstat (limited to 'src')
-rw-r--r--src/ui/confwin.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ui/confwin.c b/src/ui/confwin.c
index 80937f7d..9791e5cf 100644
--- a/src/ui/confwin.c
+++ b/src/ui/confwin.c
@@ -97,7 +97,9 @@ confwin_handle_configuration(ProfConfWin *confwin, DataForm *form)
     confwin_show_form(confwin);
 
     win_println(window, THEME_DEFAULT, '-', "");
-    win_println(window, THEME_DEFAULT, '-', "Use '/form submit' to save changes.");
+    if (confwin->submit != NULL) {
+        win_println(window, THEME_DEFAULT, '-', "Use '/form submit' to save changes.");
+    }
     win_println(window, THEME_DEFAULT, '-', "Use '/form cancel' to cancel changes.");
     win_println(window, THEME_DEFAULT, '-', "See '/form help' for more information.");
     win_println(window, THEME_DEFAULT, '-', "");