5 * \defgroup ShowSysMsgs Editing of various text files on the Citadel server.
6 * \ingroup WebcitDisplayItems
13 * \brief display the form for editing something (room info, bio, etc)
14 * \param description the descriptive text for the box
15 * \param check_cmd command to check????
16 * \param read_cmd read answer from citadel server???
17 * \param save_cmd save comand to the citadel server??
18 * \param with_room_banner should we bisplay a room banner?
20 void display_edit(char *description, char *check_cmd,
21 char *read_cmd, char *save_cmd, int with_room_banner)
26 serv_getln(buf, sizeof buf);
29 safestrncpy(WC->ImportantMessage, &buf[4], sizeof WC->ImportantMessage);
33 if (with_room_banner) {
34 output_headers(1, 1, 1, 0, 0, 0);
37 output_headers(1, 1, 0, 0, 0, 0);
40 svprintf("BOXTITLE", WCS_STRING, _("Edit %s"), description);
41 do_template("beginbox");
43 wprintf("<div align=\"center\">");
44 wprintf(_("Enter %s below. Text is formatted to "
45 "the reader's screen width. To defeat the "
46 "formatting, indent a line at least one space."), description);
49 wprintf("<FORM METHOD=\"POST\" action=\"%s\">\n", save_cmd);
50 wprintf("<TEXTAREA NAME=\"msgtext\" wrap=soft "
51 "ROWS=10 COLS=80 WIDTH=80>\n");
53 serv_getln(buf, sizeof buf);
56 wprintf("</TEXTAREA><br /><br />\n");
57 wprintf("<INPUT TYPE=\"submit\" NAME=\"save_button\" VALUE=\"%s\">", _("Save changes"));
59 wprintf("<INPUT TYPE=\"submit\" NAME=\"cancel_button\" VALUE=\"%s\"><br />\n", _("Cancel"));
61 wprintf("</FORM></div>\n");
62 do_template("endbox");
68 * \brief save a screen which was displayed with display_edit()
69 * \param description the window title???
70 * \param enter_cmd which command to enter at the citadel server???
71 * \param regoto should we go to that room again after executing that command?
73 void save_edit(char *description, char *enter_cmd, int regoto)
77 if (strlen(bstr("save_button")) == 0) {
78 sprintf(WC->ImportantMessage,
79 _("Cancelled. %s was not saved."),
85 serv_getln(buf, sizeof buf);
87 safestrncpy(WC->ImportantMessage, &buf[4], sizeof WC->ImportantMessage);
91 text_to_server(bstr("msgtext"));
95 smart_goto(WC->wc_roomname);
97 sprintf(WC->ImportantMessage,
98 _("%s has been saved."),