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");
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("<input type=\"hidden\" name=\"nonce\" value=\"%ld\">\n", WC->nonce);
51 wprintf("<TEXTAREA NAME=\"msgtext\" wrap=soft "
52 "ROWS=10 COLS=80 WIDTH=80>\n");
54 serv_getln(buf, sizeof buf);
57 wprintf("</TEXTAREA><br /><br />\n");
58 wprintf("<INPUT TYPE=\"submit\" NAME=\"save_button\" VALUE=\"%s\">", _("Save changes"));
60 wprintf("<INPUT TYPE=\"submit\" NAME=\"cancel_button\" VALUE=\"%s\"><br />\n", _("Cancel"));
62 wprintf("</FORM></div>\n");
63 do_template("endbox");
69 * \brief save a screen which was displayed with display_edit()
70 * \param description the window title???
71 * \param enter_cmd which command to enter at the citadel server???
72 * \param regoto should we go to that room again after executing that command?
74 void save_edit(char *description, char *enter_cmd, int regoto)
78 if (IsEmptyStr(bstr("save_button"))) {
79 sprintf(WC->ImportantMessage,
80 _("Cancelled. %s was not saved."),
86 serv_getln(buf, sizeof buf);
88 safestrncpy(WC->ImportantMessage, &buf[4], sizeof WC->ImportantMessage);
92 text_to_server(bstr("msgtext"));
96 smart_goto(WC->wc_roomname);
98 sprintf(WC->ImportantMessage,
99 _("%s has been saved."),