",
- The_ClassForm[Gbl.Prefs.Theme],
- Txt_MSG_Subject,
- The_ClassForm[Gbl.Prefs.Theme],
- Txt_MSG_Message);
+ Ann_PutSubjectMessage ("Subject",Txt_MSG_Subject, 2);
+ Ann_PutSubjectMessage ("Content",Txt_MSG_Message,20);
/***** Users' roles who can view the announcement *****/
fprintf (Gbl.F.Out,"
"
@@ -472,6 +452,29 @@ void Ann_ShowFormAnnouncement (void)
Act_FormEnd ();
}
+/*****************************************************************************/
+/*********** Put form field for message subject or message content ***********/
+/*****************************************************************************/
+
+static void Ann_PutSubjectMessage (const char *Field,const char *Label,
+ unsigned Rows)
+ {
+ extern const char *The_ClassForm[The_NUM_THEMES];
+
+ fprintf (Gbl.F.Out,"
"
+ "
"
+ ""
+ "
"
+ "
"
+ ""
+ "
"
+ "
",
+ Field,The_ClassForm[Gbl.Prefs.Theme],Label,
+ Field,Field,Rows);
+ }
+
/*****************************************************************************/
/****** Receive a new announcement from a form and store it in database ******/
/*****************************************************************************/
@@ -519,7 +522,6 @@ static void Ann_CreateAnnouncement (unsigned Roles,const char *Subject,const cha
DB_QueryINSERT (Query,"can not create announcement");
}
-
/*****************************************************************************/
/*********** Mark as hidden a global announcement that was active ************/
/*****************************************************************************/
diff --git a/swad_changelog.h b/swad_changelog.h
index 2d03ed38b..0d634a10a 100644
--- a/swad_changelog.h
+++ b/swad_changelog.h
@@ -189,13 +189,14 @@
/****************************** Public constants *****************************/
/*****************************************************************************/
-#define Log_PLATFORM_VERSION "SWAD 16.107.3 (2016-12-26)"
+#define Log_PLATFORM_VERSION "SWAD 16.107.4 (2016-12-26)"
#define CSS_FILE "swad16.106.5.css"
#define JS_FILE "swad16.101.js"
// Number of lines (includes comments but not blank lines) has been got with the following command:
// nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*?.h sql/swad*.sql | tail -1
/*
+ Version 16.107.4: Dec 26, 2016 Code refactoring in announcements. (211532 lines)
Version 16.107.3: Dec 26, 2016 Changes in behaviour of labels in forms. (211531 lines)
Version 16.107.2: Dec 26, 2016 Changes in behaviour of labels in forms. (211525 lines)
Version 16.107.1: Dec 26, 2016 Changes in behaviour of labels in forms.