diff --git a/swad_MFU.c b/swad_MFU.c
index 404d97f7..b927ae03 100644
--- a/swad_MFU.c
+++ b/swad_MFU.c
@@ -249,7 +249,8 @@ void MFU_WriteBigMFUActions (struct MFU_ListMFUActions *ListMFUActions)
Gbl.Prefs.URLIconSet,
Act_GetIcon (Action),
MenuStr);
- fprintf (Gbl.F.Out," %s",TabMenuStr);
+ fprintf (Gbl.F.Out," %s",TabMenuStr);
+ Frm_LinkFormEnd ();
Frm_EndForm ();
HTM_LI_End ();
}
@@ -280,9 +281,8 @@ void MFU_WriteSmallMFUActions (struct MFU_ListMFUActions *ListMFUActions)
HTM_DIV_Begin ("id=\"MFU_actions\"");
Frm_StartForm (ActMFUAct);
Frm_LinkFormSubmit (Txt_My_frequent_actions,NULL,NULL);
- fprintf (Gbl.F.Out," %s"
- "",
- Txt_Frequent_ACTIONS);
+ fprintf (Gbl.F.Out," %s",Txt_Frequent_ACTIONS);
+ Frm_LinkFormEnd ();
Frm_EndForm ();
/***** Write list of frequently used actions *****/
@@ -312,7 +312,8 @@ void MFU_WriteSmallMFUActions (struct MFU_ListMFUActions *ListMFUActions)
Gbl.Prefs.URLIconSet,
Act_GetIcon (Action),
MenuStr);
- fprintf (Gbl.F.Out," %s",MenuStr);
+ fprintf (Gbl.F.Out," %s",MenuStr);
+ Frm_LinkFormEnd ();
Frm_EndForm ();
HTM_LI_End ();
}
diff --git a/swad_changelog.h b/swad_changelog.h
index 4dc632b6..8d5ea022 100644
--- a/swad_changelog.h
+++ b/swad_changelog.h
@@ -487,14 +487,14 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - *
En OpenSWAD:
ps2pdf source.ps destination.pdf
*/
-#define Log_PLATFORM_VERSION "SWAD 19.45.1 (2019-10-27)"
+#define Log_PLATFORM_VERSION "SWAD 19.45.2 (2019-10-27)"
#define CSS_FILE "swad19.45.css"
#define JS_FILE "swad19.39.js"
/*
// TODO: Hacer un nuevo rol en los TFG: tutor externo (profesor de áreas no vinculadas con el centro, profesionales de empresas, etc.)
// TODO: Impedir la creación y edición de proyectos si no son editables.
-// TODO: Cambiar por Frm_LinkFormEnd (); a partir de swad_layout incluido.
+ Version 19.45.2: Oct 27, 2019 Code refactoring in HTML forms. (246498 lines)
Version 19.45.1: Oct 27, 2019 Code refactoring in HTML forms. (246481 lines)
Version 19.45: Oct 26, 2019 Code refactoring in HTML lists. (246444 lines)
Version 19.44.4: Oct 26, 2019 Fixed bug in HTML divs. (246370 lines)
diff --git a/swad_layout.c b/swad_layout.c
index 42c0cf44..8f5a9a0b 100644
--- a/swad_layout.c
+++ b/swad_layout.c
@@ -934,27 +934,26 @@ static void Lay_WritePageTopHeading (void)
Frm_LinkFormSubmit (Txt_System,NULL,NULL);
fprintf (Gbl.F.Out,""
- "", // head_row_1_logo_small
+ " style=\"width:%upx; height:%upx;\" />",
Cfg_URL_ICON_PUBLIC,Cfg_PLATFORM_LOGO_SMALL_FILENAME,
Cfg_PLATFORM_SHORT_NAME,Cfg_PLATFORM_FULL_NAME,
Cfg_PLATFORM_LOGO_SMALL_WIDTH,Cfg_PLATFORM_LOGO_SMALL_HEIGHT);
- HTM_DIV_End ();
+ Frm_LinkFormEnd ();
+ HTM_DIV_End (); // head_row_1_logo_small
HTM_DIV_Begin ("id=\"head_row_1_logo_big\"");
Frm_LinkFormSubmit (Txt_System,NULL,NULL);
fprintf (Gbl.F.Out,""
- "", // head_row_1_logo_big
+ " style=\"width:%upx; height:%upx;\" />",
Cfg_URL_ICON_PUBLIC,Cfg_PLATFORM_LOGO_BIG_FILENAME,
Cfg_PLATFORM_SHORT_NAME,Cfg_PLATFORM_FULL_NAME,
Cfg_PLATFORM_LOGO_BIG_WIDTH,Cfg_PLATFORM_LOGO_BIG_HEIGHT);
- HTM_DIV_End ();
+ Frm_LinkFormEnd ();
+ HTM_DIV_End (); // head_row_1_logo_big
HTM_DIV_Begin ("id=\"head_row_1_tagline\"");
Frm_LinkFormSubmit (Txt_TAGLINE,The_ClassTagline[Gbl.Prefs.Theme],NULL);
- fprintf (Gbl.F.Out,"%s"
- "",
- Txt_TAGLINE_BR);
+ fprintf (Gbl.F.Out,"%s",Txt_TAGLINE_BR);
+ Frm_LinkFormEnd ();
HTM_DIV_End (); // head_row_1_tagline
/* End form to go to home page */
@@ -1209,7 +1208,7 @@ void Lay_PutContextualLinkIconText (Act_Action_t NextAction,const char *Anchor,
/***** Put icon and text with link *****/
Frm_LinkFormSubmit (Text,The_ClassFormOutBoxBold[Gbl.Prefs.Theme],NULL);
Ico_PutIconTextLink (Icon,Text);
- fprintf (Gbl.F.Out,"");
+ Frm_LinkFormEnd ();
/***** End form *****/
Frm_EndForm ();
@@ -1243,7 +1242,7 @@ void Lay_PutContextualLinkIconTextOnSubmit (Act_Action_t NextAction,const char *
/***** Put icon with link *****/
Frm_LinkFormSubmit (Text,The_ClassFormOutBoxBold[Gbl.Prefs.Theme],OnSubmit);
Ico_PutIconTextLink (Icon,Text);
- fprintf (Gbl.F.Out,"");
+ Frm_LinkFormEnd ();
/***** End form *****/
Frm_EndForm ();
@@ -1447,7 +1446,9 @@ static void Lay_WriteAboutZone (void)
/***** Questions and problems *****/
HTM_DIV_Begin (NULL);
fprintf (Gbl.F.Out,"%s: "
- "%s",
+ ""
+ "%s"
+ "",
Txt_Questions_and_problems,
Cfg_PLATFORM_RESPONSIBLE_EMAIL,Cfg_PLATFORM_RESPONSIBLE_EMAIL);
HTM_DIV_End ();
diff --git a/swad_link.c b/swad_link.c
index 0a9cc5be..b4a750bc 100644
--- a/swad_link.c
+++ b/swad_link.c
@@ -166,9 +166,8 @@ void Lnk_WriteMenuWithInstitutionalLinks (void)
Frm_StartForm (ActSeeLnk);
Frm_LinkFormSubmit (Txt_Links,NULL,NULL);
- fprintf (Gbl.F.Out," %s"
- "",
- Txt_Links);
+ fprintf (Gbl.F.Out," %s",Txt_Links);
+ Frm_LinkFormEnd ();
Frm_EndForm ();
Lnk_WriteListOfLinks ();
diff --git a/swad_mail.c b/swad_mail.c
index c38b88ae..ec296ad7 100644
--- a/swad_mail.c
+++ b/swad_mail.c
@@ -143,7 +143,7 @@ void Mai_SeeMailDomains (void)
fprintf (Gbl.F.Out,"%s",Txt_EMAIL_DOMAIN_ORDER[Order]);
if (Order == Gbl.Mails.SelectedOrder)
fprintf (Gbl.F.Out,"");
- fprintf (Gbl.F.Out,"");
+ Frm_LinkFormEnd ();
Frm_EndForm ();
HTM_TH_End ();
diff --git a/swad_match.c b/swad_match.c
index 43cc8b88..2e55146f 100644
--- a/swad_match.c
+++ b/swad_match.c
@@ -1225,7 +1225,7 @@ static void Mch_PutFormNewMatch (struct Game *Game)
" alt=\"%s\" title=\"%s\""
" class=\"CONTEXT_OPT ICO_HIGHLIGHT ICO64x64\" />",
Cfg_URL_ICON_PUBLIC,Txt_Play,Txt_Play);
- fprintf (Gbl.F.Out,"");
+ Frm_LinkFormEnd ();
/***** End box *****/
Box_BoxEnd ();
diff --git a/swad_menu.c b/swad_menu.c
index baaf21d0..d2c912fa 100644
--- a/swad_menu.c
+++ b/swad_menu.c
@@ -368,19 +368,17 @@ void Mnu_WriteMenuThisTab (void)
Frm_StartForm (NumAct);
Frm_LinkFormSubmit (Title,The_ClassTxtMenu[Gbl.Prefs.Theme],NULL);
- /***** Icon *****/
+ /***** Icon and text *****/
HTM_DIV_Begin ("class=\"MENU_ICO\" style=\"background-image:url('%s/%s');\"",
Gbl.Prefs.URLIconSet,
Act_GetIcon (NumAct));
-
- /***** Text *****/
HTM_DIV_Begin ("class=\"MENU_TEXT %s\"",The_ClassTxtMenu[Gbl.Prefs.Theme]);
fprintf (Gbl.F.Out,"%s",Txt_MENU_TITLE[Gbl.Action.Tab][NumOptInMenu]);
HTM_DIV_End ();
+ HTM_DIV_End ();
/***** End link and form *****/
- HTM_DIV_End ();
- fprintf (Gbl.F.Out,"");
+ Frm_LinkFormEnd ();
Frm_EndForm ();
/***** End container used to highlight this option *****/
diff --git a/swad_message.c b/swad_message.c
index a0092f7a..527e6bc1 100644
--- a/swad_message.c
+++ b/swad_message.c
@@ -3183,7 +3183,7 @@ static void Msg_WriteSentOrReceivedMsgSubject (long MsgCod,const char *Subject,b
fprintf (Gbl.F.Out,"[%s]",Txt_no_subject);
/***** End form to expand the message *****/
- fprintf (Gbl.F.Out,"");
+ Frm_LinkFormEnd ();
Frm_EndForm ();
/***** End cell *****/
@@ -3300,8 +3300,9 @@ bool Msg_WriteCrsOrgMsg (long CrsCod)
Txt_Go_to_X,
Crs.FullName);
Frm_LinkFormSubmit (Gbl.Title,"AUTHOR_TXT",NULL);
- fprintf (Gbl.F.Out,"%s)",
- Crs.ShrtName);
+ fprintf (Gbl.F.Out,"%s",Crs.ShrtName);
+ Frm_LinkFormEnd ();
+ fprintf (Gbl.F.Out,")");
HTM_DIV_End ();
Frm_EndForm ();
}
@@ -3594,7 +3595,7 @@ static void Msg_WriteMsgTo (long MsgCod)
Frm_LinkFormSubmit (Txt_View_all_recipients,"AUTHOR_TXT",NULL);
fprintf (Gbl.F.Out,Txt_and_X_other_recipients,
NumRecipientsKnown - NumRecipientsToShow);
- fprintf (Gbl.F.Out,"");
+ Frm_LinkFormEnd ();
Frm_EndForm ();
HTM_TD_End ();
diff --git a/swad_notice.c b/swad_notice.c
index 81102fed..e0117721 100644
--- a/swad_notice.c
+++ b/swad_notice.c
@@ -698,7 +698,7 @@ static void Not_DrawANotice (Not_Listing_t TypeNoticesListing,
UniqueId);
if (TypeNoticesListing == Not_LIST_BRIEF_NOTICES)
{
- fprintf (Gbl.F.Out,"");
+ Frm_LinkFormEnd ();
Frm_EndForm ();
}
fprintf (Gbl.F.Out,"