diff --git a/swad_ID.c b/swad_ID.c index 08272fc2..fcc785fd 100644 --- a/swad_ID.c +++ b/swad_ID.c @@ -511,7 +511,7 @@ void ID_ShowFormChangeMyID (bool IShouldFillInID) extern const char *Txt_ID; char StrRecordWidth[Cns_MAX_DECIMAL_DIGITS_UINT + 2 + 1]; - /***** Start section *****/ + /***** Begin section *****/ HTM_SECTION_Begin (ID_ID_SECTION_ID); /***** Begin box *****/ @@ -541,7 +541,7 @@ void ID_ShowFormChangeOtherUsrID (void) extern const char *Txt_ID; char StrRecordWidth[Cns_MAX_DECIMAL_DIGITS_UINT + 2 + 1]; - /***** Start section *****/ + /***** Begin section *****/ HTM_SECTION_Begin (ID_ID_SECTION_ID); /***** Begin box *****/ diff --git a/swad_MFU.c b/swad_MFU.c index 34952419..a93de58c 100644 --- a/swad_MFU.c +++ b/swad_MFU.c @@ -243,7 +243,7 @@ void MFU_WriteBigMFUActions (struct MFU_ListMFUActions *ListMFUActions) /* Icon and text */ HTM_LI_Begin ("class=\"ICO_HIGHLIGHT\""); - Frm_StartForm (Action); + Frm_BeginForm (Action); HTM_BUTTON_SUBMIT_Begin (TabMenuStr,The_ClassFormLinkInBoxNoWrap[Gbl.Prefs.Theme],NULL); HTM_IMG (Gbl.Prefs.URLIconSet,Act_GetIcon (Action),MenuStr, NULL); @@ -277,7 +277,7 @@ void MFU_WriteSmallMFUActions (struct MFU_ListMFUActions *ListMFUActions) /***** Start div and link *****/ HTM_DIV_Begin ("id=\"MFU_actions\""); - Frm_StartForm (ActMFUAct); + Frm_BeginForm (ActMFUAct); HTM_BUTTON_SUBMIT_Begin (Txt_My_frequent_actions,"BT_LINK MFU_TITLE",NULL); HTM_TxtF ("%s",Txt_Frequent_ACTIONS); HTM_BUTTON_End (); @@ -301,7 +301,7 @@ void MFU_WriteSmallMFUActions (struct MFU_ListMFUActions *ListMFUActions) /* Icon and text */ HTM_LI_Begin ("class=\"ICO_HIGHLIGHT\""); - Frm_StartForm (Action); + Frm_BeginForm (Action); HTM_BUTTON_SUBMIT_Begin (TabMenuStr,"BT_LINK",NULL); HTM_IMG (Gbl.Prefs.URLIconSet,Act_GetIcon (Action),MenuStr, NULL); diff --git a/swad_account.c b/swad_account.c index 9f739621..6674b91d 100644 --- a/swad_account.c +++ b/swad_account.c @@ -158,7 +158,7 @@ static void Acc_ShowFormCheckIfIHaveAccount (const char *Title) Ale_ShowAlert (Ale_INFO,Txt_If_you_think_you_may_have_been_registered_); /***** Form to request user's ID for possible account already created *****/ - Frm_StartForm (ActChkUsrAcc); + Frm_BeginForm (ActChkUsrAcc); HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]); HTM_TxtColonNBSP (Txt_ID); HTM_INPUT_TEXT ("ID",ID_MAX_CHARS_USR_ID,"",HTM_DONT_SUBMIT_ON_CHANGE, @@ -168,7 +168,7 @@ static void Acc_ShowFormCheckIfIHaveAccount (const char *Title) Frm_EndForm (); /***** Form to skip this step *****/ - Frm_StartForm (ActCreMyAcc); + Frm_BeginForm (ActCreMyAcc); Btn_PutConfirmButton (Txt_Skip_this_step); Frm_EndForm (); @@ -312,7 +312,7 @@ static void Acc_WriteRowEmptyAccount (unsigned NumUsr,const char *ID,struct UsrD /***** Button to login with this account *****/ HTM_TD_Begin ("class=\"RT COLOR%u\"",Gbl.RowEvenOdd); - Frm_StartForm (ActLogInNew); + Frm_BeginForm (ActLogInNew); Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod); Btn_PutCreateButtonInline (Txt_Its_me); Frm_EndForm (); @@ -366,7 +366,7 @@ static void Acc_ShowFormRequestNewAccountWithParams (const char NewNickWithoutAr char NewNickWithArr[Nck_MAX_BYTES_NICK_FROM_FORM + 1]; /***** Begin form to enter some data of the new user *****/ - Frm_StartForm (ActCreUsrAcc); + Frm_BeginForm (ActCreUsrAcc); /***** Begin box and table *****/ Box_BoxTableBegin (NULL,Txt_Create_account, @@ -437,7 +437,7 @@ void Acc_ShowFormGoToRequestNewAccount (void) Str_FreeString (); /***** Button to go to request the creation of a new account *****/ - Frm_StartForm (ActFrmMyAcc); + Frm_BeginForm (ActFrmMyAcc); Btn_PutCreateButton (Txt_Create_account); Frm_EndForm (); @@ -488,7 +488,7 @@ void Acc_ShowFormChgMyAccount (void) } } - /***** Start container for this user *****/ + /***** Begin container for this user *****/ HTM_DIV_Begin ("class=\"REC_USR\""); /***** Show form to change my password and my nickname ****/ @@ -503,7 +503,7 @@ void Acc_ShowFormChgMyAccount (void) ID_ShowFormChangeMyID (IShouldFillInMyIDNow); HTM_DIV_End (); - /***** Start container for this user *****/ + /***** Begin container for this user *****/ HTM_DIV_End (); } @@ -527,7 +527,7 @@ void Acc_ShowFormChgOtherUsrAccount (void) Rec_ShowSharedUsrRecord (Rec_SHA_RECORD_LIST, &Gbl.Usrs.Other.UsrDat,NULL); - /***** Start container for this user *****/ + /***** Begin container for this user *****/ HTM_DIV_Begin ("class=\"REC_USR\""); /***** Show form to change password and nickname *****/ @@ -542,7 +542,7 @@ void Acc_ShowFormChgOtherUsrAccount (void) ID_ShowFormChangeOtherUsrID (); HTM_DIV_End (); - /***** Start container for this user *****/ + /***** Begin container for this user *****/ HTM_DIV_End (); } else @@ -944,14 +944,14 @@ void Acc_AskIfRemoveMyAccount (void) extern const char *Txt_Eliminate_my_user_account; /***** Show question and button to remove my user account *****/ - /* Start alert */ + /* Begin alert */ Ale_ShowAlertAndButton1 (Ale_QUESTION,Txt_Do_you_really_want_to_completely_eliminate_your_user_account); /* Show my record */ Rec_ShowSharedRecordUnmodifiable (&Gbl.Usrs.Me.UsrDat); /* Show form to request confirmation */ - Frm_StartForm (ActRemMyAcc); + Frm_BeginForm (ActRemMyAcc); Pwd_AskForConfirmationOnDangerousAction (); Btn_PutRemoveButton (Txt_Eliminate_my_user_account); Frm_EndForm (); @@ -973,14 +973,14 @@ static void Acc_AskIfRemoveOtherUsrAccount (void) if (Usr_ChkIfUsrCodExists (Gbl.Usrs.Other.UsrDat.UsrCod)) { /***** Show question and button to remove user account *****/ - /* Start alert */ + /* Begin alert */ Ale_ShowAlertAndButton1 (Ale_QUESTION,Txt_Do_you_really_want_to_completely_eliminate_the_following_user); /* Show user's record */ Rec_ShowSharedRecordUnmodifiable (&Gbl.Usrs.Other.UsrDat); /* Show form to request confirmation */ - Frm_StartForm (ActRemUsrGbl); + Frm_BeginForm (ActRemUsrGbl); Usr_PutParamOtherUsrCodEncrypted (Gbl.Usrs.Other.UsrDat.EnUsrCod); Pwd_AskForConfirmationOnDangerousAction (); Btn_PutRemoveButton (Txt_Eliminate_user_account); diff --git a/swad_action.c b/swad_action.c index 7be0c855..7721694b 100644 --- a/swad_action.c +++ b/swad_action.c @@ -146,8 +146,8 @@ const struct Act_Actions Act_Actions[Act_NUM_ACTIONS] = [ActRefNewPubGblTL ] = {1509,-1,TabUnk,ActSeeGblTL ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_AJAX_RFRESH,TL_Who_GetParamWho ,TL_RefreshNewTimelineGbl ,NULL}, [ActRefOldPubGblTL ] = {1510,-1,TabUnk,ActSeeGblTL ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_AJAX_NORMAL,TL_Who_GetParamWho ,TL_RefreshOldTimelineGbl ,NULL}, [ActRcvPstGblTL ] = {1492,-1,TabUnk,ActSeeGblTL ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_DATA,Act_BRW_1ST_TAB,TL_Who_GetParamWho ,TL_Pst_ReceivePostGbl ,NULL}, - [ActRcvComGblTL ] = {1503,-1,TabUnk,ActSeeGblTL ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_DATA,Act_BRW_1ST_TAB,TL_Who_GetParamWho ,TL_Com_ReceiveCommentGbl ,NULL}, - [ActShoHidComGblTL ] = {1806,-1,TabUnk,ActSeeGblTL ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_AJAX_NORMAL,NULL ,TL_Com_ShowHiddenCommentsGbl ,NULL}, + [ActRcvComGblTL ] = {1503,-1,TabUnk,ActSeeGblTL ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_DATA,Act_BRW_1ST_TAB,TL_Who_GetParamWho ,TL_Com_ReceiveCommGbl ,NULL}, + [ActShoHidComGblTL ] = {1806,-1,TabUnk,ActSeeGblTL ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_AJAX_NORMAL,NULL ,TL_Com_ShowHiddenCommsGbl ,NULL}, [ActAllShaNotGblTL ] = {1766,-1,TabUnk,ActSeeGblTL ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_AJAX_NORMAL,NULL ,TL_Sha_ShowAllSharersNoteGbl ,NULL}, [ActAllFavNotGblTL ] = {1767,-1,TabUnk,ActSeeGblTL ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_AJAX_NORMAL,NULL ,TL_Fav_ShowAllFaversNoteGbl ,NULL}, [ActAllFavComGblTL ] = {1768,-1,TabUnk,ActSeeGblTL ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_AJAX_NORMAL,NULL ,TL_Fav_ShowAllFaversComGbl ,NULL}, @@ -155,8 +155,8 @@ const struct Act_Actions Act_Actions[Act_NUM_ACTIONS] = [ActUnsNotGblTL ] = {1496,-1,TabUnk,ActSeeGblTL ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_AJAX_NORMAL,NULL ,TL_Sha_UnsNoteGbl ,NULL}, [ActFavNotGblTL ] = {1512,-1,TabUnk,ActSeeGblTL ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_AJAX_NORMAL,NULL ,TL_Fav_FavNoteGbl ,NULL}, [ActUnfNotGblTL ] = {1513,-1,TabUnk,ActSeeGblTL ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_AJAX_NORMAL,NULL ,TL_Fav_UnfNoteGbl ,NULL}, - [ActFavComGblTL ] = {1516,-1,TabUnk,ActSeeGblTL ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_AJAX_NORMAL,NULL ,TL_Fav_FavCommentGbl ,NULL}, - [ActUnfComGblTL ] = {1517,-1,TabUnk,ActSeeGblTL ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_AJAX_NORMAL,NULL ,TL_Fav_UnfCommentGbl ,NULL}, + [ActFavComGblTL ] = {1516,-1,TabUnk,ActSeeGblTL ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_AJAX_NORMAL,NULL ,TL_Fav_FavCommGbl ,NULL}, + [ActUnfComGblTL ] = {1517,-1,TabUnk,ActSeeGblTL ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_AJAX_NORMAL,NULL ,TL_Fav_UnfCommGbl ,NULL}, [ActReqRemPubGblTL ] = {1494,-1,TabUnk,ActSeeGblTL ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,TL_Who_GetParamWho ,TL_Not_RequestRemNoteGbl ,NULL}, [ActRemPubGblTL ] = {1493,-1,TabUnk,ActSeeGblTL ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,TL_Who_GetParamWho ,TL_Not_RemoveNoteGbl ,NULL}, [ActReqRemComGblTL ] = {1505,-1,TabUnk,ActSeeGblTL ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,TL_Who_GetParamWho ,TL_Com_RequestRemComGbl ,NULL}, @@ -166,8 +166,8 @@ const struct Act_Actions Act_Actions[Act_NUM_ACTIONS] = [ActRefOldPubUsrTL ] = {1511,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_AJAX_NORMAL,NULL ,TL_RefreshOldTimelineUsr ,NULL}, [ActRcvPstUsrTL ] = {1498,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_DATA,Act_BRW_1ST_TAB,NULL ,TL_Pst_ReceivePostUsr ,NULL}, - [ActRcvComUsrTL ] = {1504,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_DATA,Act_BRW_1ST_TAB,NULL ,TL_Com_ReceiveCommentUsr ,NULL}, - [ActShoHidComUsrTL ] = {1807,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_AJAX_NORMAL,NULL ,TL_Com_ShowHiddenCommentsUsr ,NULL}, + [ActRcvComUsrTL ] = {1504,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_DATA,Act_BRW_1ST_TAB,NULL ,TL_Com_ReceiveCommUsr ,NULL}, + [ActShoHidComUsrTL ] = {1807,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_AJAX_NORMAL,NULL ,TL_Com_ShowHiddenCommsUsr ,NULL}, [ActAllShaNotUsrTL ] = {1769,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_AJAX_NORMAL,NULL ,TL_Sha_ShowAllSharersNoteUsr ,NULL}, [ActAllFavNotUsrTL ] = {1770,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_AJAX_NORMAL,NULL ,TL_Fav_ShowAllFaversNoteUsr ,NULL}, [ActAllFavComUsrTL ] = {1771,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_AJAX_NORMAL,NULL ,TL_Fav_ShowAllFaversComUsr ,NULL}, @@ -175,8 +175,8 @@ const struct Act_Actions Act_Actions[Act_NUM_ACTIONS] = [ActUnsNotUsrTL ] = {1500,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_AJAX_NORMAL,NULL ,TL_Sha_UnsNoteUsr ,NULL}, [ActFavNotUsrTL ] = {1514,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_AJAX_NORMAL,NULL ,TL_Fav_FavNoteUsr ,NULL}, [ActUnfNotUsrTL ] = {1515,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_AJAX_NORMAL,NULL ,TL_Fav_UnfNoteUsr ,NULL}, - [ActFavComUsrTL ] = {1518,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_AJAX_NORMAL,NULL ,TL_Fav_FavCommentUsr ,NULL}, - [ActUnfComUsrTL ] = {1519,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_AJAX_NORMAL,NULL ,TL_Fav_UnfCommentUsr ,NULL}, + [ActFavComUsrTL ] = {1518,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_AJAX_NORMAL,NULL ,TL_Fav_FavCommUsr ,NULL}, + [ActUnfComUsrTL ] = {1519,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_AJAX_NORMAL,NULL ,TL_Fav_UnfCommUsr ,NULL}, [ActReqRemPubUsrTL ] = {1501,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,TL_Not_RequestRemNoteUsr ,NULL}, [ActRemPubUsrTL ] = {1502,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,TL_Not_RemoveNoteUsr ,NULL}, [ActReqRemComUsrTL ] = {1506,-1,TabUnk,ActSeeSocPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,TL_Com_RequestRemComUsr ,NULL}, diff --git a/swad_agenda.c b/swad_agenda.c index 7e72f513..c00c6d49 100644 --- a/swad_agenda.c +++ b/swad_agenda.c @@ -241,7 +241,7 @@ static void Agd_ShowFormToSelPast__FutureEvents (const struct Agd_Agenda *Agenda HTM_DIV_Begin ("class=\"%s\"", (Agenda->Past__FutureEvents & (1 << PstFut)) ? "PREF_ON" : "PREF_OFF"); - Frm_StartForm (ActSeeMyAgd); + Frm_BeginForm (ActSeeMyAgd); Agd_PutParamsMyAgenda (Agenda->Past__FutureEvents ^ (1 << PstFut), // Toggle Agenda->PrivatPublicEvents, Agenda->HiddenVisiblEvents, @@ -278,7 +278,7 @@ static void Agd_ShowFormToSelPrivatPublicEvents (const struct Agd_Agenda *Agenda HTM_DIV_Begin ("class=\"%s\"", (Agenda->PrivatPublicEvents & (1 << PrvPub)) ? "PREF_ON" : "PREF_OFF"); - Frm_StartForm (ActSeeMyAgd); + Frm_BeginForm (ActSeeMyAgd); Agd_PutParamsMyAgenda (Agenda->Past__FutureEvents, Agenda->PrivatPublicEvents ^ (1 << PrvPub), // Toggle Agenda->HiddenVisiblEvents, @@ -315,7 +315,7 @@ static void Agd_ShowFormToSelHiddenVisiblEvents (const struct Agd_Agenda *Agenda HTM_DIV_Begin ("class=\"%s\"", (Agenda->HiddenVisiblEvents & (1 << HidVis)) ? "PREF_ON" : "PREF_OFF"); - Frm_StartForm (ActSeeMyAgd); + Frm_BeginForm (ActSeeMyAgd); Agd_PutParamsMyAgenda (Agenda->Past__FutureEvents, Agenda->PrivatPublicEvents, Agenda->HiddenVisiblEvents ^ (1 << HidVis), // Toggle @@ -642,12 +642,12 @@ static void Agd_WriteHeaderListEvents (const struct Agd_Agenda *Agenda, { case Agd_MY_AGENDA_TODAY: case Agd_MY_AGENDA: - Frm_StartForm (ActSeeMyAgd); + Frm_BeginForm (ActSeeMyAgd); Pag_PutHiddenParamPagNum (Pag_MY_AGENDA,Agenda->CurrentPage); break; case Agd_ANOTHER_AGENDA_TODAY: case Agd_ANOTHER_AGENDA: - Frm_StartForm (ActSeeUsrAgd); + Frm_BeginForm (ActSeeUsrAgd); Usr_PutParamOtherUsrCodEncrypted (Gbl.Usrs.Other.UsrDat.EnUsrCod); Pag_PutHiddenParamPagNum (Pag_ANOTHER_AGENDA,Agenda->CurrentPage); break; @@ -764,7 +764,7 @@ static void Agd_PutButtonToCreateNewEvent (const struct Agd_Agenda *Agenda) { extern const char *Txt_New_event; - Frm_StartForm (ActFrmNewEvtMyAgd); + Frm_BeginForm (ActFrmNewEvtMyAgd); Agd_PutParamsMyAgenda (Agenda->Past__FutureEvents, Agenda->PrivatPublicEvents, Agenda->HiddenVisiblEvents, @@ -1599,12 +1599,12 @@ void Agd_RequestCreatOrEditEvent (void) /***** Begin form *****/ if (ItsANewEvent) { - Frm_StartForm (ActNewEvtMyAgd); + Frm_BeginForm (ActNewEvtMyAgd); Agenda.AgdCodToEdit = -1L; } else { - Frm_StartForm (ActChgEvtMyAgd); + Frm_BeginForm (ActChgEvtMyAgd); Agenda.AgdCodToEdit = AgdEvent.AgdCod; } Agd_PutCurrentParamsMyAgenda (&Agenda); diff --git a/swad_alert.c b/swad_alert.c index 0b2c6c86..d082b242 100644 --- a/swad_alert.c +++ b/swad_alert.c @@ -444,7 +444,7 @@ void Ale_ShowAlertAndButton2 (Act_Action_t NextAction,const char *Anchor,const c if (TxtButton[0]) { /* Begin form */ - Frm_StartFormAnchorOnSubmit (NextAction,Anchor,OnSubmit); + Frm_BeginFormAnchorOnSubmit (NextAction,Anchor,OnSubmit); if (FuncParams) FuncParams (Args); diff --git a/swad_announcement.c b/swad_announcement.c index ea64d2a2..432303de 100644 --- a/swad_announcement.c +++ b/swad_announcement.c @@ -197,7 +197,7 @@ static void Ann_PutButtonToAddNewAnnouncement (void) { extern const char *Txt_New_announcement; - Frm_StartForm (ActWriAnn); + Frm_BeginForm (ActWriAnn); Btn_PutConfirmButton (Txt_New_announcement); Frm_EndForm (); } @@ -396,7 +396,7 @@ void Ann_ShowFormAnnouncement (void) extern const char *Txt_Create_announcement; /***** Begin form *****/ - Frm_StartForm (ActRcvAnn); + Frm_BeginForm (ActRcvAnn); /***** Begin box and table *****/ Box_BoxTableBegin (NULL,Txt_New_announcement, diff --git a/swad_assignment.c b/swad_assignment.c index b5a9f6f5..3c582b75 100644 --- a/swad_assignment.c +++ b/swad_assignment.c @@ -237,7 +237,7 @@ static void Asg_PutHeadForSeeing (struct Asg_Assignments *Assignments, if (!PrintView) { - Frm_StartForm (ActSeeAsg); + Frm_BeginForm (ActSeeAsg); WhichGroups = Grp_GetParamWhichGroups (); Grp_PutParamWhichGroups (&WhichGroups); Pag_PutHiddenParamPagNum (Pag_ASSIGNMENTS,Assignments->CurrentPage); @@ -318,7 +318,7 @@ static void Asg_PutButtonToCreateNewAsg (void *Assignments) { ((struct Asg_Assignments *) Assignments)->AsgCodToEdit = -1L; - Frm_StartForm (ActFrmNewAsg); + Frm_BeginForm (ActFrmNewAsg); Asg_PutParams (Assignments); Btn_PutConfirmButton (Txt_New_assignment); Frm_EndForm (); @@ -537,7 +537,7 @@ static void Asg_WriteAssignmentFolder (struct Asg_Assignment *Asg,bool PrintView { case Rol_STD: Gbl.FileBrowser.Type = Brw_ADMI_ASG_USR; // User assignments - Frm_StartForm (ActFrmCreAsgUsr); + Frm_BeginForm (ActFrmCreAsgUsr); break; case Rol_NET: case Rol_TCH: @@ -546,7 +546,7 @@ static void Asg_WriteAssignmentFolder (struct Asg_Assignment *Asg,bool PrintView Str_Copy (Gbl.Usrs.Other.UsrDat.EnUsrCod,Gbl.Usrs.Me.UsrDat.EnUsrCod, sizeof (Gbl.Usrs.Other.UsrDat.EnUsrCod) - 1); Usr_CreateListSelectedUsrsCodsAndFillWithOtherUsr (&Gbl.Usrs.Selected); - Frm_StartForm (ActFrmCreAsgCrs); + Frm_BeginForm (ActFrmCreAsgCrs); break; default: Rol_WrongRoleExit (); @@ -1246,12 +1246,12 @@ void Asg_RequestCreatOrEditAsg (void) /***** Begin form *****/ if (ItsANewAssignment) { - Frm_StartForm (ActNewAsg); + Frm_BeginForm (ActNewAsg); Assignments.AsgCodToEdit = -1L; } else { - Frm_StartForm (ActChgAsg); + Frm_BeginForm (ActChgAsg); Assignments.AsgCodToEdit = Asg.AsgCod; } Asg_PutParams (&Assignments); diff --git a/swad_attendance.c b/swad_attendance.c index c6b14b93..c0b5d980 100644 --- a/swad_attendance.c +++ b/swad_attendance.c @@ -272,7 +272,7 @@ static void Att_ShowAllAttEvents (struct Att_Events *Events) { HTM_TH_Begin (1,1,"LM"); - Frm_StartForm (ActSeeAtt); + Frm_BeginForm (ActSeeAtt); WhichGroups = Grp_GetParamWhichGroups (); Grp_PutParamWhichGroups (&WhichGroups); Pag_PutHiddenParamPagNum (Pag_ATT_EVENTS,Events->CurrentPage); @@ -397,7 +397,7 @@ static void Att_PutButtonToCreateNewAttEvent (struct Att_Events *Events) { extern const char *Txt_New_event; - Frm_StartForm (ActFrmNewAtt); + Frm_BeginForm (ActFrmNewAtt); Att_PutParamsToCreateNewAttEvent (Events); Btn_PutConfirmButton (Txt_New_event); Frm_EndForm (); @@ -939,7 +939,7 @@ void Att_AskRemAttEvent (void) Att_GetDataOfAttEventByCodAndCheckCrs (&Event); /***** Button of confirmation of removing *****/ - Frm_StartForm (ActRemAtt); + Frm_BeginForm (ActRemAtt); Att_PutParamAttCod (Event.AttCod); Dat_PutHiddenParamOrder (Events.SelectedOrder); WhichGroups = Grp_GetParamWhichGroups (); @@ -1132,10 +1132,10 @@ void Att_RequestCreatOrEditAttEvent (void) /***** Begin form *****/ if (ItsANewAttEvent) - Frm_StartForm (ActNewAtt); + Frm_BeginForm (ActNewAtt); else { - Frm_StartForm (ActChgAtt); + Frm_BeginForm (ActChgAtt); Att_PutParamAttCod (Event.AttCod); } Dat_PutHiddenParamOrder (Events.SelectedOrder); @@ -1913,7 +1913,7 @@ static void Att_ListAttOnlyMeAsStudent (struct Att_Event *Event) /***** Begin form *****/ if (Event->Open) { - Frm_StartForm (ActRecAttMe); + Frm_BeginForm (ActRecAttMe); Att_PutParamAttCod (Event->AttCod); } @@ -1987,7 +1987,7 @@ static void Att_ListAttStudents (struct Att_Events *Events, Grp_ShowFormToSelectSeveralGroups (Att_PutParamSelectedAttCod,Events, Grp_MY_GROUPS); - /***** Start section with user list *****/ + /***** Begin section with user list *****/ HTM_SECTION_Begin (Usr_USER_LIST_SECTION_ID); if (Gbl.Usrs.LstUsrs[Rol_STD].NumUsrs) @@ -1999,7 +1999,7 @@ static void Att_ListAttStudents (struct Att_Events *Events, Usr_UsrDataConstructor (&UsrDat); /* Begin form */ - Frm_StartForm (ActRecAttStd); + Frm_BeginForm (ActRecAttStd); Att_PutParamAttCod (Event->AttCod); Grp_PutParamsCodGrps (); @@ -2213,7 +2213,7 @@ static void Att_PutLinkAttEvent (struct Att_Event *AttEvent, const char *Title,const char *Txt, const char *Class) { - Frm_StartForm (ActSeeOneAtt); + Frm_BeginForm (ActSeeOneAtt); Att_PutParamAttCod (AttEvent->AttCod); Att_PutParamsCodGrps (AttEvent->AttCod); HTM_BUTTON_SUBMIT_Begin (Title,Class,NULL); @@ -3320,7 +3320,7 @@ static void Att_ListUsrsAttendanceTable (const struct Att_Events *Events, /***** Initialize structure with user's data *****/ Usr_UsrDataConstructor (&UsrDat); - /***** Start section with attendance table *****/ + /***** Begin section with attendance table *****/ HTM_SECTION_Begin (Att_ATTENDANCE_TABLE_ID); /***** Begin table *****/ @@ -3547,7 +3547,7 @@ static void Att_ListStdsWithAttEventsDetails (const struct Att_Events *Events, /***** Initialize structure with user's data *****/ Usr_UsrDataConstructor (&UsrDat); - /***** Start section with attendance details *****/ + /***** Begin section with attendance details *****/ HTM_SECTION_Begin (Att_ATTENDANCE_DETAILS_ID); /***** Begin box and table *****/ diff --git a/swad_banner.c b/swad_banner.c index 14ebcd3a..4e50d98d 100644 --- a/swad_banner.c +++ b/swad_banner.c @@ -161,7 +161,7 @@ void Ban_SeeBanners (void) /***** Button to create banner *****/ if (Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM) { - Frm_StartForm (ActEdiBan); + Frm_BeginForm (ActEdiBan); Btn_PutConfirmButton (Txt_New_banner); Frm_EndForm (); } @@ -473,7 +473,7 @@ static void Ban_ListBannersForEdition (struct Ban_Banners *Banners) /* Banner short name */ HTM_TD_Begin ("class=\"CM\""); - Frm_StartForm (ActRenBanSho); + Frm_BeginForm (ActRenBanSho); Ban_PutParamBanCodToEdit (&Banners->BanCodToEdit); HTM_INPUT_TEXT ("ShortName",Ban_MAX_CHARS_SHRT_NAME,Ban->ShrtName, HTM_SUBMIT_ON_CHANGE, @@ -483,7 +483,7 @@ static void Ban_ListBannersForEdition (struct Ban_Banners *Banners) /* Banner full name */ HTM_TD_Begin ("class=\"CM\""); - Frm_StartForm (ActRenBanFul); + Frm_BeginForm (ActRenBanFul); Ban_PutParamBanCodToEdit (&Banners->BanCodToEdit); HTM_INPUT_TEXT ("FullName",Ban_MAX_CHARS_FULL_NAME,Ban->FullName, HTM_SUBMIT_ON_CHANGE, @@ -493,7 +493,7 @@ static void Ban_ListBannersForEdition (struct Ban_Banners *Banners) /* Banner image */ HTM_TD_Begin ("class=\"CM\""); - Frm_StartForm (ActChgBanImg); + Frm_BeginForm (ActChgBanImg); Ban_PutParamBanCodToEdit (&Banners->BanCodToEdit); HTM_INPUT_TEXT ("Img",Ban_MAX_CHARS_IMAGE,Ban->Img, HTM_SUBMIT_ON_CHANGE, @@ -503,7 +503,7 @@ static void Ban_ListBannersForEdition (struct Ban_Banners *Banners) /* Banner WWW */ HTM_TD_Begin ("class=\"CM\""); - Frm_StartForm (ActChgBanWWW); + Frm_BeginForm (ActChgBanWWW); Ban_PutParamBanCodToEdit (&Banners->BanCodToEdit); HTM_INPUT_URL ("WWW",Ban->WWW,HTM_SUBMIT_ON_CHANGE, "class=\"INPUT_WWW_NARROW\" required=\"required\""); @@ -904,7 +904,7 @@ static void Ban_PutFormToCreateBanner (const struct Ban_Banner *Ban) extern const char *Txt_Create_banner; /***** Begin form *****/ - Frm_StartForm (ActNewBan); + Frm_BeginForm (ActNewBan); /***** Begin box and table *****/ Box_BoxTableBegin (NULL,Txt_New_banner, @@ -1095,7 +1095,7 @@ void Ban_WriteMenuWithBanners (void) { /* Write data of this banner */ HTM_DIV_Begin ("class=\"CM\""); - Frm_StartForm (ActClkBan); + Frm_BeginForm (ActClkBan); Ban_PutParamBanCod (Banners.Lst[NumBan].BanCod); Par_PutHiddenParamString (NULL,"URL",Banners.Lst[NumBan].WWW); HTM_INPUT_IMAGE (Cfg_URL_BANNER_PUBLIC,Banners.Lst[NumBan].Img, diff --git a/swad_building.c b/swad_building.c index bf2cb1e4..43f38d42 100644 --- a/swad_building.c +++ b/swad_building.c @@ -133,7 +133,7 @@ void Bld_SeeBuildings (void) Order++) { HTM_TH_Begin (1,1,"LM"); - Frm_StartForm (ActSeeBld); + Frm_BeginForm (ActSeeBld); Par_PutHiddenParamUnsigned (NULL,"Order",(unsigned) Order); HTM_BUTTON_SUBMIT_Begin (Txt_BUILDINGS_HELP_ORDER[Order],"BT_LINK TIT_TBL",NULL); if (Order == Buildings.SelectedOrder) @@ -178,7 +178,7 @@ void Bld_SeeBuildings (void) /***** Button to create building *****/ if (Bld_CheckIfICanCreateBuildings ()) { - Frm_StartForm (ActEdiBld); + Frm_BeginForm (ActEdiBld); Btn_PutConfirmButton (Txt_New_building); Frm_EndForm (); } @@ -797,7 +797,7 @@ static void Bld_PutFormToCreateBuilding (void) extern const char *Txt_Create_building; /***** Begin form *****/ - Frm_StartForm (ActNewBld); + Frm_BeginForm (ActNewBld); /***** Begin box and table *****/ Box_BoxTableBegin (NULL,Txt_New_building, diff --git a/swad_calendar.c b/swad_calendar.c index 2c1e42f9..8ee6b299 100644 --- a/swad_calendar.c +++ b/swad_calendar.c @@ -124,7 +124,7 @@ void Cal_ShowFormToSelFirstDayOfWeek (Act_Action_t Action, HTM_DIV_Begin ("class=\"%s\"", FirstDayOfWeek == Gbl.Prefs.FirstDayOfWeek ? "PREF_ON" : "PREF_OFF"); - Frm_StartForm (Action); + Frm_BeginForm (Action); Par_PutHiddenParamUnsigned (NULL,"FirstDayOfWeek",FirstDayOfWeek); if (FuncParams) // Extra parameters depending on the action FuncParams (Args); diff --git a/swad_centre.c b/swad_centre.c index d46f070c..c81ac382 100644 --- a/swad_centre.c +++ b/swad_centre.c @@ -219,7 +219,7 @@ void Ctr_DrawCentreLogoAndNameWithLink (struct Ctr_Centre *Ctr,Act_Action_t Acti const char *ClassLink,const char *ClassLogo) { /***** Begin form *****/ - Frm_StartFormGoTo (Action); + Frm_BeginFormGoTo (Action); Ctr_PutParamCtrCod (Ctr->CtrCod); /***** Link to action *****/ @@ -307,7 +307,7 @@ static void Ctr_ListCentres (void) /***** Button to create centre *****/ if (Ctr_CheckIfICanCreateCentres ()) { - Frm_StartForm (ActEdiCtr); + Frm_BeginForm (ActEdiCtr); Btn_PutConfirmButton (Gbl.Hierarchy.Ctrs.Num ? Txt_Create_another_centre : Txt_Create_centre); Frm_EndForm (); @@ -866,7 +866,7 @@ void Ctr_WriteSelectorOfCentre (void) long CtrCod; /***** Begin form *****/ - Frm_StartFormGoTo (ActSeeDeg); + Frm_BeginFormGoTo (ActSeeDeg); if (Gbl.Hierarchy.Ins.InsCod > 0) HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE, @@ -986,7 +986,7 @@ static void Ctr_ListCentresForEdition (const struct Plc_Places *Places) HTM_TD_Begin ("class=\"DAT LM\""); if (ICanEdit) { - Frm_StartForm (ActChgCtrPlc); + Frm_BeginForm (ActChgCtrPlc); Ctr_PutParamOtherCtrCod (&Ctr->CtrCod); HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE, "name=\"PlcCod\" class=\"PLC_SEL\""); @@ -1014,7 +1014,7 @@ static void Ctr_ListCentresForEdition (const struct Plc_Places *Places) HTM_TD_Begin ("class=\"DAT LM\""); if (ICanEdit) { - Frm_StartForm (ActRenCtrSho); + Frm_BeginForm (ActRenCtrSho); Ctr_PutParamOtherCtrCod (&Ctr->CtrCod); HTM_INPUT_TEXT ("ShortName",Cns_HIERARCHY_MAX_CHARS_SHRT_NAME,Ctr->ShrtName, HTM_SUBMIT_ON_CHANGE, @@ -1029,7 +1029,7 @@ static void Ctr_ListCentresForEdition (const struct Plc_Places *Places) HTM_TD_Begin ("class=\"DAT LM\""); if (ICanEdit) { - Frm_StartForm (ActRenCtrFul); + Frm_BeginForm (ActRenCtrFul); Ctr_PutParamOtherCtrCod (&Ctr->CtrCod); HTM_INPUT_TEXT ("FullName",Cns_HIERARCHY_MAX_CHARS_FULL_NAME,Ctr->FullName, HTM_SUBMIT_ON_CHANGE, @@ -1044,7 +1044,7 @@ static void Ctr_ListCentresForEdition (const struct Plc_Places *Places) HTM_TD_Begin ("class=\"DAT LM\""); if (ICanEdit) { - Frm_StartForm (ActChgCtrWWW); + Frm_BeginForm (ActChgCtrWWW); Ctr_PutParamOtherCtrCod (&Ctr->CtrCod); HTM_INPUT_URL ("WWW",Ctr->WWW,HTM_SUBMIT_ON_CHANGE, "class=\"INPUT_WWW_NARROW\" required=\"required\""); @@ -1090,7 +1090,7 @@ static void Ctr_ListCentresForEdition (const struct Plc_Places *Places) if (Gbl.Usrs.Me.Role.Logged >= Rol_INS_ADM && StatusTxt == Ctr_STATUS_PENDING) { - Frm_StartForm (ActChgCtrSta); + Frm_BeginForm (ActChgCtrSta); Ctr_PutParamOtherCtrCod (&Ctr->CtrCod); HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE, "name=\"Status\" class=\"INPUT_STATUS\""); @@ -1595,9 +1595,9 @@ static void Ctr_PutFormToCreateCentre (const struct Plc_Places *Places) /***** Begin form *****/ if (Gbl.Usrs.Me.Role.Logged >= Rol_INS_ADM) - Frm_StartForm (ActNewCtr); + Frm_BeginForm (ActNewCtr); else if (Gbl.Usrs.Me.Role.Max >= Rol_GST) - Frm_StartForm (ActReqCtr); + Frm_BeginForm (ActReqCtr); else Lay_NoPermissionExit (); @@ -1719,7 +1719,7 @@ static void Ctr_PutHeadCentresForSeeing (bool OrderSelectable) "RM"); if (OrderSelectable) { - Frm_StartForm (ActSeeCtr); + Frm_BeginForm (ActSeeCtr); Par_PutHiddenParamUnsigned (NULL,"Order",(unsigned) Order); HTM_BUTTON_SUBMIT_Begin (Txt_CENTRES_HELP_ORDER[Order], Order == Ctr_ORDER_BY_CENTRE ? "BT_LINK LM TIT_TBL" : diff --git a/swad_centre_config.c b/swad_centre_config.c index 85cd1fe3..0184fd24 100644 --- a/swad_centre_config.c +++ b/swad_centre_config.c @@ -372,7 +372,7 @@ static void CtrCfg_Latitude (void) /* Data */ HTM_TD_Begin ("class=\"LB\""); - Frm_StartForm (ActChgCtrLatCfg); + Frm_BeginForm (ActChgCtrLatCfg); HTM_INPUT_FLOAT ("Latitude", -90.0, // South Pole 90.0, // North Pole @@ -397,7 +397,7 @@ static void CtrCfg_Longitude (void) /* Data */ HTM_TD_Begin ("class=\"LB\""); - Frm_StartForm (ActChgCtrLgtCfg); + Frm_BeginForm (ActChgCtrLgtCfg); HTM_INPUT_FLOAT ("Longitude", -180.0, // West 180.0, // East @@ -422,7 +422,7 @@ static void CtrCfg_Altitude (void) /* Data */ HTM_TD_Begin ("class=\"LB\""); - Frm_StartForm (ActChgCtrAltCfg); + Frm_BeginForm (ActChgCtrAltCfg); HTM_INPUT_FLOAT ("Altitude", -413.0, // Dead Sea shore 8848.0, // Mount Everest @@ -481,7 +481,7 @@ static void CtrCfg_Photo (bool PrintView,bool PutForm,bool PutLink, if (PutForm) { HTM_DIV_Begin ("class=\"CM\""); - Frm_StartForm (ActChgCtrPhoAtt); + Frm_BeginForm (ActChgCtrPhoAtt); HTM_TEXTAREA_Begin ("id=\"AttributionArea\" name=\"Attribution\" rows=\"3\"" " onchange=\"document.getElementById('%s').submit();return false;\"", Gbl.Form.Id); @@ -577,7 +577,7 @@ static void CtrCfg_Institution (bool PrintView,bool PutForm) Ins_GetBasicListOfInstitutions (Gbl.Hierarchy.Cty.CtyCod); /* Put form to select institution */ - Frm_StartForm (ActChgCtrInsCfg); + Frm_BeginForm (ActChgCtrInsCfg); HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE, "id=\"OthInsCod\" name=\"OthInsCod\"" " class=\"INPUT_SHORT_NAME\""); @@ -597,7 +597,7 @@ static void CtrCfg_Institution (bool PrintView,bool PutForm) { if (!PrintView) { - Frm_StartFormGoTo (ActSeeInsInf); + Frm_BeginFormGoTo (ActSeeInsInf); Ins_PutParamInsCod (Gbl.Hierarchy.Ins.InsCod); HTM_BUTTON_SUBMIT_Begin (Hie_BuildGoToMsg (Gbl.Hierarchy.Ins.ShrtName), "BT_LINK LT DAT",NULL); @@ -675,7 +675,7 @@ static void CtrCfg_Place (bool PutForm) Plc_GetListPlaces (&Places); /* Put form to select place */ - Frm_StartForm (ActChgCtrPlcCfg); + Frm_BeginForm (ActChgCtrPlcCfg); HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE, "name=\"PlcCod\" class=\"INPUT_SHORT_NAME\""); HTM_OPTION (HTM_Type_STRING,"0", @@ -766,7 +766,7 @@ static void CtrCfg_NumDegs (void) /* Data */ HTM_TD_Begin ("class=\"LB\""); - Frm_StartFormGoTo (ActSeeDeg); + Frm_BeginFormGoTo (ActSeeDeg); Ctr_PutParamCtrCod (Gbl.Hierarchy.Ctr.CtrCod); HTM_BUTTON_SUBMIT_Begin (Str_BuildStringStr (Txt_Degrees_of_CENTRE_X, Gbl.Hierarchy.Ctr.ShrtName), @@ -843,7 +843,7 @@ void CtrCfg_RequestPhoto (void) extern const char *Txt_File_with_the_photo; /***** Begin form to upload photo *****/ - Frm_StartForm (ActRecCtrPho); + Frm_BeginForm (ActRecCtrPho); /***** Begin box *****/ Box_BoxBegin (NULL,Txt_Photo, diff --git a/swad_changelog.h b/swad_changelog.h index 312bde97..fcb20807 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -598,10 +598,11 @@ TODO: DNI de un estudiante sale err TODO: BUG: Cuando un tipo de grupo sólo tiene un grupo, inscribirse es voluntario, el estudiante sólo puede pertenecer a un grupo, y se inscribe en él, debería poder desapuntarse. Ahora no puede. TODO: Salvador Romero Cortés: @acanas opción para editar posts */ -#define Log_PLATFORM_VERSION "SWAD 20.37 (2021-03-01)" +#define Log_PLATFORM_VERSION "SWAD 20.38 (2021-03-02)" #define CSS_FILE "swad20.33.9.css" #define JS_FILE "swad20.6.2.js" /* + Version 20.38: Mar 02, 2021 Code refactoring in timeline. (305756 lines) Version 20.37: Mar 01, 2021 Code refactoring and more error messages in timeline. (305681 lines) Version 20.36.49: Mar 01, 2021 Cleaning unused header files in timeline modules. (305544 lines) Version 20.36.48: Mar 01, 2021 Query moved to module swad_timeline_database. (305553 lines) diff --git a/swad_chat.c b/swad_chat.c index 6cd54a57..56f94fdc 100644 --- a/swad_chat.c +++ b/swad_chat.c @@ -302,7 +302,7 @@ static void Cht_WriteLinkToChat1 (const char *RoomCode,const char *RoomShrtName, HTM_LI_Begin (NULL); Lay_IndentDependingOnLevel (Level,IsLastItemInLevel); - Frm_StartForm (ActCht); + Frm_BeginForm (ActCht); Cht_WriteParamsRoomCodeAndNames (RoomCode,RoomShrtName,RoomFullName); HTM_BUTTON_SUBMIT_Begin (RoomFullName,The_ClassFormLinkInBox[Gbl.Prefs.Theme],NULL); diff --git a/swad_connected.c b/swad_connected.c index c0a1eb7b..7ccb1ca9 100644 --- a/swad_connected.c +++ b/swad_connected.c @@ -132,7 +132,7 @@ static void Con_PutIconToUpdateConnected (__attribute__((unused)) void *Args) { extern const char *Txt_Update; - Frm_StartForm (ActLstCon); + Frm_BeginForm (ActLstCon); Sco_PutParamScope ("ScopeCon",Gbl.Scope.Current); HTM_BUTTON_Animated_Begin (Txt_Update,"BT_LINK",NULL); Ico_PutCalculateIcon (Txt_Update); @@ -169,7 +169,7 @@ void Con_ShowGlobalConnectedUsrs (void) /***** Number of sessions *****/ /* Link to view more details about connected users */ - Frm_StartFormUnique (ActLstCon); // Must be unique because + Frm_BeginFormUnique (ActLstCon); // Must be unique because // the list of connected users // is dynamically updated via AJAX HTM_BUTTON_SUBMIT_Begin (Txt_Connected_users,"BT_LINK CONNECTED_TXT",NULL); @@ -266,7 +266,7 @@ static void Con_ShowConnectedUsrsBelongingToLocation (void) extern const char *Txt_from; struct ConnectedUsrs Usrs; - /***** Start container *****/ + /***** Begin container *****/ HTM_DIV_Begin ("class=\"CONNECTED\""); /***** Number of connected users who belong to scope *****/ @@ -275,7 +275,7 @@ static void Con_ShowConnectedUsrsBelongingToLocation (void) HTM_TxtF ("%u %s ",Usrs.NumUsrs,Txt_from); /* Put form to change scope */ - Frm_StartForm (ActLstCon); + Frm_BeginForm (ActLstCon); Sco_PutSelectorScope ("ScopeCon",HTM_SUBMIT_ON_CHANGE); Frm_EndForm (); @@ -312,12 +312,12 @@ void Con_ShowConnectedUsrsBelongingToCurrentCrs (void) if (Gbl.Hierarchy.Crs.CrsCod <= 0) // No course selected return; - /***** Start container *****/ + /***** Begin container *****/ HTM_DIV_Begin ("class=\"CONNECTED\""); /***** Number of connected users who belong to course *****/ /* Link to view more details about connected users */ - Frm_StartFormUnique (ActLstCon); // Must be unique because + Frm_BeginFormUnique (ActLstCon); // Must be unique because // the list of connected users // is dynamically updated via AJAX HTM_BUTTON_SUBMIT_Begin (Txt_Connected_users,"BT_LINK CONNECTED_TXT",NULL); @@ -407,7 +407,7 @@ static void Con_ShowConnectedUsrsWithARoleBelongingToCurrentCrsOnRightColumn (Ro HTM_TR_Begin (NULL); HTM_TD_Begin ("colspan=\"3\" class=\"CT\""); - Frm_StartFormUnique (ActLstCon); // Must be unique because + Frm_BeginFormUnique (ActLstCon); // Must be unique because // the list of connected users // is dynamically updated via AJAX Sco_PutParamScope ("ScopeCon",Hie_Lvl_CRS); @@ -840,11 +840,11 @@ static void Con_WriteRowConnectedUsrOnRightColumn (Rol_Role_t Role) switch (Role) { case Rol_STD: - Frm_StartFormUnique (ActSeeRecOneStd); + Frm_BeginFormUnique (ActSeeRecOneStd); break; case Rol_NET: case Rol_TCH: - Frm_StartFormUnique (ActSeeRecOneTch); + Frm_BeginFormUnique (ActSeeRecOneTch); break; default: Rol_WrongRoleExit (); @@ -1065,11 +1065,11 @@ static void Con_ShowConnectedUsrsCurrentLocationOneByOneOnMainZone (Rol_Role_t R switch (Role) { case Rol_STD: - Frm_StartForm (ActSeeRecOneStd); + Frm_BeginForm (ActSeeRecOneStd); break; case Rol_NET: case Rol_TCH: - Frm_StartForm (ActSeeRecOneTch); + Frm_BeginForm (ActSeeRecOneTch); break; default: Rol_WrongRoleExit (); diff --git a/swad_cookie.c b/swad_cookie.c index 24707319..398eac09 100644 --- a/swad_cookie.c +++ b/swad_cookie.c @@ -65,7 +65,7 @@ void Coo_EditMyPrefsOnCookies (void) extern const char *Txt_Cookies; extern const char *Txt_Accept_third_party_cookies_to_view_multimedia_content_from_other_websites; - /***** Start section with preferences about cookies *****/ + /***** Begin section with preferences about cookies *****/ HTM_SECTION_Begin (Coo_COOKIES_ID); /***** Begin box and table *****/ @@ -77,7 +77,7 @@ void Coo_EditMyPrefsOnCookies (void) /* Begin form */ Frm_StartFormAnchor (ActChgCooPrf,Coo_COOKIES_ID); - /* Start container */ + /* Begin container */ HTM_DIV_Begin ("class=\"%s\"", (Gbl.Usrs.Me.UsrDat.Prefs.AcceptThirdPartyCookies) ? "DAT_N LIGHT_BLUE" : "DAT"); diff --git a/swad_country.c b/swad_country.c index 0b4eac5b..3fce6474 100644 --- a/swad_country.c +++ b/swad_country.c @@ -380,7 +380,7 @@ static void Cty_PutHeadCountriesForSeeing (bool OrderSelectable) "RM"); if (OrderSelectable) { - Frm_StartForm (ActSeeCty); + Frm_BeginForm (ActSeeCty); Par_PutHiddenParamUnsigned (NULL,"Order",(unsigned) Order); HTM_BUTTON_SUBMIT_Begin (Txt_COUNTRIES_HELP_ORDER[Order],"BT_LINK TIT_TBL",NULL); if (Order == Gbl.Hierarchy.Ctys.SelectedOrder) @@ -519,7 +519,7 @@ void Cty_DrawCountryMapAndNameWithLink (struct Cty_Countr *Cty,Act_Action_t Acti char CountryName[Cty_MAX_BYTES_NAME + 1]; /***** Begin form *****/ - Frm_StartFormGoTo (Action); + Frm_BeginFormGoTo (Action); Cty_PutParamCtyCod (Cty->CtyCod); HTM_DIV_Begin ("class=\"%s\"",ClassContainer); @@ -948,7 +948,7 @@ void Cty_WriteSelectorOfCountry (void) long CtyCod; /***** Begin form *****/ - Frm_StartFormGoTo (ActSeeIns); + Frm_BeginFormGoTo (ActSeeIns); HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE, "id=\"cty\" name=\"cty\" class=\"HIE_SEL\""); HTM_OPTION (HTM_Type_STRING,"",Gbl.Hierarchy.Cty.CtyCod < 0,true, @@ -1006,7 +1006,7 @@ void Cty_WriteCountryName (long CtyCod,const char *ClassLink) if (PutForm) { /***** Write country name with link to country information *****/ - Frm_StartForm (ActSeeCtyInf); + Frm_BeginForm (ActSeeCtyInf); Cty_PutParamCtyCod (CtyCod); HTM_BUTTON_SUBMIT_Begin (Act_GetActionText (ActSeeCtyInf),ClassLink,NULL); HTM_Txt (CtyName); @@ -1251,7 +1251,7 @@ static void Cty_ListCountriesForEdition (void) /* Name */ HTM_TD_Begin ("class=\"LT\""); - Frm_StartForm (ActRenCty); + Frm_BeginForm (ActRenCty); Cty_PutParamOtherCtyCod (&Cty->CtyCod); Par_PutHiddenParamUnsigned (NULL,"Lan",(unsigned) Lan); HTM_INPUT_TEXT ("Name",Cty_MAX_CHARS_NAME,Cty->Name[Lan], @@ -1262,7 +1262,7 @@ static void Cty_ListCountriesForEdition (void) /* WWW */ HTM_TD_Begin ("class=\"LT\""); - Frm_StartForm (ActChgCtyWWW); + Frm_BeginForm (ActChgCtyWWW); Cty_PutParamOtherCtyCod (&Cty->CtyCod); Par_PutHiddenParamUnsigned (NULL,"Lan",(unsigned) Lan); HTM_INPUT_URL ("WWW",Cty->WWW[Lan],HTM_SUBMIT_ON_CHANGE, @@ -1605,7 +1605,7 @@ static void Cty_PutFormToCreateCountry (void) char StrName[32]; /***** Begin form *****/ - Frm_StartForm (ActNewCty); + Frm_BeginForm (ActNewCty); /***** Begin box and table *****/ Box_BoxTableBegin (NULL,Txt_New_country, diff --git a/swad_country_config.c b/swad_country_config.c index fc865a81..e4274def 100644 --- a/swad_country_config.c +++ b/swad_country_config.c @@ -367,7 +367,7 @@ static void CtyCfg_MapImage (bool PrintView,bool PutLink) if (!PrintView && Cty_CheckIfICanEditCountries ()) { HTM_DIV_Begin ("class=\"CM\""); - Frm_StartForm (ActChgCtyMapAtt); + Frm_BeginForm (ActChgCtyMapAtt); HTM_TEXTAREA_Begin ("id=\"AttributionArea\" name=\"Attribution\" rows=\"3\"" " onchange=\"document.getElementById('%s').submit();return false;\"", Gbl.Form.Id); @@ -406,7 +406,7 @@ static void CtyCfg_Platform (bool PrintView) HTM_TD_Begin ("class=\"DAT LB\""); if (!PrintView) { - Frm_StartFormGoTo (ActSeeSysInf); + Frm_BeginFormGoTo (ActSeeSysInf); HTM_BUTTON_SUBMIT_Begin (Hie_BuildGoToMsg (Cfg_PLATFORM_SHORT_NAME), "BT_LINK LT DAT",NULL); Hie_FreeGoToMsg (); @@ -508,7 +508,7 @@ static void CtyCfg_NumInss (void) /* Data */ HTM_TD_Begin ("class=\"LB\""); - Frm_StartFormGoTo (ActSeeIns); + Frm_BeginFormGoTo (ActSeeIns); Cty_PutParamCtyCod (Gbl.Hierarchy.Cty.CtyCod); HTM_BUTTON_SUBMIT_Begin (Str_BuildStringStr (Txt_Institutions_of_COUNTRY_X, Gbl.Hierarchy.Cty.Name[Gbl.Prefs.Language]), diff --git a/swad_course.c b/swad_course.c index 2b4fe175..c484c2dd 100644 --- a/swad_course.c +++ b/swad_course.c @@ -191,7 +191,7 @@ static void Crs_WriteListMyCoursesToSelectOne (void) Highlight = (Gbl.Hierarchy.Cty.CtyCod <= 0); HTM_LI_Begin ("class=\"%s\"",Highlight ? ClassHighlight : ClassNormal); - Frm_StartForm (ActMyCrs); + Frm_BeginForm (ActMyCrs); Cty_PutParamCtyCod (-1L); HTM_BUTTON_SUBMIT_Begin (Txt_System, Highlight ? ClassHighlight : @@ -224,7 +224,7 @@ static void Crs_WriteListMyCoursesToSelectOne (void) ClassNormal); IsLastItemInLevel[1] = (NumCty == NumCtys - 1); Lay_IndentDependingOnLevel (1,IsLastItemInLevel); - Frm_StartForm (ActMyCrs); + Frm_BeginForm (ActMyCrs); Cty_PutParamCtyCod (Hie.Cty.CtyCod); HTM_BUTTON_SUBMIT_Begin (Act_GetActionText (ActSeeCtyInf), Highlight ? ClassHighlight : @@ -258,7 +258,7 @@ static void Crs_WriteListMyCoursesToSelectOne (void) ClassNormal); IsLastItemInLevel[2] = (NumIns == NumInss - 1); Lay_IndentDependingOnLevel (2,IsLastItemInLevel); - Frm_StartForm (ActMyCrs); + Frm_BeginForm (ActMyCrs); Ins_PutParamInsCod (Hie.Ins.InsCod); HTM_BUTTON_SUBMIT_Begin (Act_GetActionText (ActSeeInsInf), Highlight ? ClassHighlight : @@ -292,7 +292,7 @@ static void Crs_WriteListMyCoursesToSelectOne (void) ClassNormal); IsLastItemInLevel[3] = (NumCtr == NumCtrs - 1); Lay_IndentDependingOnLevel (3,IsLastItemInLevel); - Frm_StartForm (ActMyCrs); + Frm_BeginForm (ActMyCrs); Ctr_PutParamCtrCod (Hie.Ctr.CtrCod); HTM_BUTTON_SUBMIT_Begin (Act_GetActionText (ActSeeCtrInf), Highlight ? ClassHighlight : @@ -326,7 +326,7 @@ static void Crs_WriteListMyCoursesToSelectOne (void) ClassNormal); IsLastItemInLevel[4] = (NumDeg == NumDegs - 1); Lay_IndentDependingOnLevel (4,IsLastItemInLevel); - Frm_StartForm (ActMyCrs); + Frm_BeginForm (ActMyCrs); Deg_PutParamDegCod (Hie.Deg.DegCod); HTM_BUTTON_SUBMIT_Begin (Act_GetActionText (ActSeeDegInf), Highlight ? ClassHighlight : @@ -360,7 +360,7 @@ static void Crs_WriteListMyCoursesToSelectOne (void) ClassNormal); IsLastItemInLevel[5] = (NumCrs == NumCrss - 1); Lay_IndentDependingOnLevel (5,IsLastItemInLevel); - Frm_StartForm (ActMyCrs); + Frm_BeginForm (ActMyCrs); Crs_PutParamCrsCod (Hie.Crs.CrsCod); HTM_BUTTON_SUBMIT_Begin (Hie_BuildGoToMsg (Hie.Crs.ShrtName), Highlight ? ClassHighlight : @@ -664,7 +664,7 @@ void Crs_WriteSelectorOfCourse (void) long CrsCod; /***** Begin form *****/ - Frm_StartFormGoTo (ActSeeCrsInf); + Frm_BeginFormGoTo (ActSeeCrsInf); if (Gbl.Hierarchy.Deg.DegCod > 0) HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE, "id=\"crs\" name=\"crs\" class=\"HIE_SEL\""); @@ -830,7 +830,7 @@ void Crs_WriteSelectorMyCoursesInBreadcrumb (void) Usr_GetMyCourses (); /***** Begin form *****/ - Frm_StartFormGoTo (Gbl.Usrs.Me.MyCrss.Num ? ActSeeCrsInf : + Frm_BeginFormGoTo (Gbl.Usrs.Me.MyCrss.Num ? ActSeeCrsInf : ActReqSch); /***** Start selector of courses *****/ @@ -926,7 +926,7 @@ static void Crs_ListCourses (void) /***** Button to create course *****/ if (Crs_CheckIfICanCreateCourses ()) { - Frm_StartForm (ActEdiCrs); + Frm_BeginForm (ActEdiCrs); Btn_PutConfirmButton (Gbl.Hierarchy.Crss.Num ? Txt_Create_another_course : Txt_Create_course); Frm_EndForm (); @@ -1044,7 +1044,7 @@ static bool Crs_ListCoursesOfAYearForSeeing (unsigned Year) /* Course full name */ HTM_TD_Begin ("class=\"%s LM %s\"",TxtClassStrong,BgColor); - Frm_StartFormGoTo (ActSeeCrsInf); + Frm_BeginFormGoTo (ActSeeCrsInf); Crs_PutParamCrsCod (Crs->CrsCod); HTM_BUTTON_SUBMIT_Begin (Hie_BuildGoToMsg (Crs->FullName), TxtClassStrong,NULL); @@ -1242,7 +1242,7 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year) HTM_TD_Begin ("class=\"DAT CM\""); if (ICanEdit) { - Frm_StartForm (ActChgInsCrsCod); + Frm_BeginForm (ActChgInsCrsCod); Crs_PutParamOtherCrsCod (&Crs->CrsCod); HTM_INPUT_TEXT ("InsCrsCod",Crs_MAX_CHARS_INSTITUTIONAL_CRS_COD, Crs->InstitutionalCrsCod,HTM_SUBMIT_ON_CHANGE, @@ -1257,7 +1257,7 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year) HTM_TD_Begin ("class=\"DAT CM\""); if (ICanEdit) { - Frm_StartForm (ActChgCrsYea); + Frm_BeginForm (ActChgCrsYea); Crs_PutParamOtherCrsCod (&Crs->CrsCod); HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE, "name=\"OthCrsYear\" class=\"HIE_SEL_NARROW\""); @@ -1278,7 +1278,7 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year) HTM_TD_Begin ("class=\"DAT LM\""); if (ICanEdit) { - Frm_StartForm (ActRenCrsSho); + Frm_BeginForm (ActRenCrsSho); Crs_PutParamOtherCrsCod (&Crs->CrsCod); HTM_INPUT_TEXT ("ShortName",Cns_HIERARCHY_MAX_CHARS_SHRT_NAME,Crs->ShrtName, HTM_SUBMIT_ON_CHANGE, @@ -1293,7 +1293,7 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year) HTM_TD_Begin ("class=\"DAT LM\""); if (ICanEdit) { - Frm_StartForm (ActRenCrsFul); + Frm_BeginForm (ActRenCrsFul); Crs_PutParamOtherCrsCod (&Crs->CrsCod); HTM_INPUT_TEXT ("FullName",Cns_HIERARCHY_MAX_CHARS_FULL_NAME,Crs->FullName, HTM_SUBMIT_ON_CHANGE, @@ -1328,7 +1328,7 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year) if (Gbl.Usrs.Me.Role.Logged >= Rol_DEG_ADM && StatusTxt == Crs_STATUS_PENDING) { - Frm_StartForm (ActChgCrsSta); + Frm_BeginForm (ActChgCrsSta); Crs_PutParamOtherCrsCod (&Crs->CrsCod); HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE, "name=\"Status\" class=\"INPUT_STATUS\""); @@ -1422,9 +1422,9 @@ static void Crs_PutFormToCreateCourse (void) /***** Begin form *****/ if (Gbl.Usrs.Me.Role.Logged >= Rol_DEG_ADM) - Frm_StartForm (ActNewCrs); + Frm_BeginForm (ActNewCrs); else if (Gbl.Usrs.Me.Role.Max >= Rol_GST) - Frm_StartForm (ActReqCrs); + Frm_BeginForm (ActReqCrs); else Lay_NoPermissionExit (); @@ -2346,7 +2346,7 @@ void Crs_ContEditAfterChgCrs (void) if (Ale_GetTypeOfLastAlert () == Ale_SUCCESS) { - /***** Start alert *****/ + /***** Begin alert *****/ Ale_ShowLastAlertAndButton1 (); /***** Put button to go to course changed *****/ @@ -2404,7 +2404,7 @@ static void Crs_PutButtonToGoToCrs (void) // If the course being edited is different to the current one... if (Crs_EditingCrs->CrsCod != Gbl.Hierarchy.Crs.CrsCod) { - Frm_StartForm (ActSeeCrsInf); + Frm_BeginForm (ActSeeCrsInf); Crs_PutParamCrsCod (Crs_EditingCrs->CrsCod); Btn_PutConfirmButton (Hie_BuildGoToMsg (Crs_EditingCrs->ShrtName)); Hie_FreeGoToMsg (); @@ -2420,7 +2420,7 @@ static void Crs_PutButtonToRegisterInCrs (void) { extern const char *Txt_Register_me_in_X; - Frm_StartForm (ActReqSignUp); + Frm_BeginForm (ActReqSignUp); // If the course being edited is different to the current one... if (Crs_EditingCrs->CrsCod != Gbl.Hierarchy.Crs.CrsCod) Crs_PutParamCrsCod (Crs_EditingCrs->CrsCod); @@ -2474,7 +2474,7 @@ void Crs_PutIconToSelectMyCoursesInBreadcrumb (void) if (Gbl.Usrs.Me.Logged) // I am logged { /***** Begin form *****/ - Frm_StartForm (ActMyCrs); + Frm_BeginForm (ActMyCrs); /***** Put icon with link *****/ HTM_INPUT_IMAGE (Gbl.Prefs.URLTheme,"sitemap.svg",Txt_My_courses, @@ -2781,7 +2781,7 @@ static void Crs_WriteRowCrsData (unsigned NumCrs,MYSQL_ROW row,bool WriteColumnA /***** Write degree logo, degree short name (row[2]) and centre short name (row[6]) *****/ HTM_TD_Begin ("class=\"LT %s\"",BgColor); - Frm_StartFormGoTo (ActSeeDegInf); + Frm_BeginFormGoTo (ActSeeDegInf); Deg_PutParamDegCod (Deg.DegCod); HTM_BUTTON_SUBMIT_Begin (Hie_BuildGoToMsg (row[2]),ClassLink,NULL); Hie_FreeGoToMsg (); @@ -2798,7 +2798,7 @@ static void Crs_WriteRowCrsData (unsigned NumCrs,MYSQL_ROW row,bool WriteColumnA /***** Write course full name (row[5]) *****/ HTM_TD_Begin ("class=\"LT %s\"",BgColor); - Frm_StartFormGoTo (ActSeeCrsInf); + Frm_BeginFormGoTo (ActSeeCrsInf); Crs_PutParamCrsCod (CrsCod); HTM_BUTTON_SUBMIT_Begin (Hie_BuildGoToMsg (row[5]),ClassLink,NULL); Hie_FreeGoToMsg (); @@ -2873,7 +2873,7 @@ void Crs_AskRemoveOldCrss (void) unsigned i; /***** Begin form *****/ - Frm_StartForm (ActRemOldCrs); + Frm_BeginForm (ActRemOldCrs); /***** Begin box *****/ Box_BoxBegin (NULL,Txt_Eliminate_old_courses, diff --git a/swad_course_config.c b/swad_course_config.c index d365175c..36bb201d 100644 --- a/swad_course_config.c +++ b/swad_course_config.c @@ -237,7 +237,7 @@ static void CrsCfg_Degree (bool PrintView,bool PutForm) Deg_GetListDegsInCurrentCtr (); /* Put form to select degree */ - Frm_StartForm (ActChgCrsDegCfg); + Frm_BeginForm (ActChgCrsDegCfg); HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE, "id=\"OthDegCod\" name=\"OthDegCod\"" " class=\"INPUT_SHORT_NAME\""); @@ -257,7 +257,7 @@ static void CrsCfg_Degree (bool PrintView,bool PutForm) { if (!PrintView) { - Frm_StartFormGoTo (ActSeeDegInf); + Frm_BeginFormGoTo (ActSeeDegInf); Deg_PutParamDegCod (Gbl.Hierarchy.Deg.DegCod); HTM_BUTTON_SUBMIT_Begin (Hie_BuildGoToMsg (Gbl.Hierarchy.Deg.ShrtName), "BT_LINK LT DAT",NULL); @@ -322,7 +322,7 @@ static void CrsCfg_Year (bool PutForm) HTM_TD_Begin ("class=\"DAT LB\""); if (PutForm) { - Frm_StartForm (ActChgCrsYeaCfg); + Frm_BeginForm (ActChgCrsYeaCfg); HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE, "id=\"OthCrsYear\" name=\"OthCrsYear\""); for (Year = 0; @@ -362,7 +362,7 @@ static void CrsCfg_InstitutionalCode (bool PutForm) HTM_TD_Begin ("class=\"DAT LB\""); if (PutForm) { - Frm_StartForm (ActChgInsCrsCodCfg); + Frm_BeginForm (ActChgInsCrsCodCfg); HTM_INPUT_TEXT ("InsCrsCod",Crs_MAX_CHARS_INSTITUTIONAL_CRS_COD, Gbl.Hierarchy.Crs.InstitutionalCrsCod, HTM_SUBMIT_ON_CHANGE, @@ -441,7 +441,7 @@ static void CrsCfg_Indicators (void) /* Data */ HTM_TD_Begin ("class=\"LB\""); - Frm_StartForm (ActReqStaCrs); + Frm_BeginForm (ActReqStaCrs); if (asprintf (&Title,"%u %s %u", IndicatorsCrs.NumIndicators, Txt_of_PART_OF_A_TOTAL,Ind_NUM_INDICATORS) < 0) diff --git a/swad_date.c b/swad_date.c index 1b5fbdff..5e755383 100644 --- a/swad_date.c +++ b/swad_date.c @@ -133,7 +133,7 @@ void Dat_PutBoxToSelectDateFormat (void) Hlp_PROFILE_Settings_dates,Box_NOT_CLOSABLE); /***** Form with list of options *****/ - Frm_StartForm (ActChgDatFmt); + Frm_BeginForm (ActChgDatFmt); HTM_UL_Begin ("class=\"LIST_LEFT\""); for (Format = (Dat_Format_t) 0; @@ -328,12 +328,12 @@ void Dat_ShowClientLocalTime (void) extern const char *Txt_Show_agenda; /***** Draw the current date and time *****/ - /* Start container */ + /* Begin container */ HTM_DIV_Begin ("id=\"current_date\""); /* Month with link to calendar */ HTM_DIV_Begin ("id=\"current_month\""); - Frm_StartForm (ActSeeCal); + Frm_BeginForm (ActSeeCal); HTM_BUTTON_SUBMIT_Begin (Txt_Show_calendar,"BT_LINK CURRENT_MONTH",NULL); HTM_SPAN_Begin ("id=\"current_month_txt\""); // JavaScript will write HTML here @@ -346,7 +346,7 @@ void Dat_ShowClientLocalTime (void) HTM_DIV_Begin ("id=\"current_day\""); if (Gbl.Usrs.Me.Logged) { - Frm_StartForm (ActSeeMyAgd); + Frm_BeginForm (ActSeeMyAgd); HTM_BUTTON_SUBMIT_Begin (Txt_Show_agenda,"BT_LINK CURRENT_DAY",NULL); } HTM_SPAN_Begin ("id=\"current_day_txt\""); diff --git a/swad_degree.c b/swad_degree.c index 8f25614b..cc5fe3fe 100644 --- a/swad_degree.c +++ b/swad_degree.c @@ -222,7 +222,7 @@ void Deg_DrawDegreeLogoAndNameWithLink (struct Deg_Degree *Deg,Act_Action_t Acti const char *ClassLink,const char *ClassLogo) { /***** Begin form *****/ - Frm_StartFormGoTo (Action); + Frm_BeginFormGoTo (Action); Deg_PutParamDegCod (Deg->DegCod); /***** Link to action *****/ @@ -254,7 +254,7 @@ void Deg_WriteSelectorOfDegree (void) long DegCod; /***** Begin form *****/ - Frm_StartFormGoTo (ActSeeCrs); + Frm_BeginFormGoTo (ActSeeCrs); if (Gbl.Hierarchy.Ctr.CtrCod > 0) HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE, "id=\"deg\" name=\"deg\" class=\"HIE_SEL\""); @@ -397,7 +397,7 @@ static void Deg_ListDegreesForEdition (void) HTM_TD_Begin ("class=\"DAT LM\""); if (ICanEdit) { - Frm_StartForm (ActRenDegSho); + Frm_BeginForm (ActRenDegSho); Deg_PutParamOtherDegCod (&Deg->DegCod); HTM_INPUT_TEXT ("ShortName",Cns_HIERARCHY_MAX_CHARS_SHRT_NAME,Deg->ShrtName, HTM_SUBMIT_ON_CHANGE, @@ -412,7 +412,7 @@ static void Deg_ListDegreesForEdition (void) HTM_TD_Begin ("class=\"DAT LM\""); if (ICanEdit) { - Frm_StartForm (ActRenDegFul); + Frm_BeginForm (ActRenDegFul); Deg_PutParamOtherDegCod (&Deg->DegCod); HTM_INPUT_TEXT ("FullName",Cns_HIERARCHY_MAX_CHARS_FULL_NAME,Deg->FullName, HTM_SUBMIT_ON_CHANGE, @@ -427,7 +427,7 @@ static void Deg_ListDegreesForEdition (void) HTM_TD_Begin ("class=\"DAT LM\""); if (ICanEdit) { - Frm_StartForm (ActChgDegTyp); + Frm_BeginForm (ActChgDegTyp); Deg_PutParamOtherDegCod (&Deg->DegCod); HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE, "name=\"OthDegTypCod\" class=\"HIE_SEL_NARROW\""); @@ -456,7 +456,7 @@ static void Deg_ListDegreesForEdition (void) HTM_TD_Begin ("class=\"DAT LM\""); if (ICanEdit) { - Frm_StartForm (ActChgDegWWW); + Frm_BeginForm (ActChgDegWWW); Deg_PutParamOtherDegCod (&Deg->DegCod); HTM_INPUT_URL ("WWW",Deg->WWW,HTM_SUBMIT_ON_CHANGE, "class=\"INPUT_WWW_NARROW\" required=\"required\""); @@ -497,7 +497,7 @@ static void Deg_ListDegreesForEdition (void) if (Gbl.Usrs.Me.Role.Logged >= Rol_CTR_ADM && StatusTxt == Deg_STATUS_PENDING) { - Frm_StartForm (ActChgDegSta); + Frm_BeginForm (ActChgDegSta); Deg_PutParamOtherDegCod (&Deg->DegCod); HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE, "name=\"Status\" class=\"INPUT_STATUS\""); @@ -589,9 +589,9 @@ static void Deg_PutFormToCreateDegree (void) /***** Begin form *****/ if (Gbl.Usrs.Me.Role.Logged >= Rol_CTR_ADM) - Frm_StartForm (ActNewDeg); + Frm_BeginForm (ActNewDeg); else if (Gbl.Usrs.Me.Role.Max >= Rol_GST) - Frm_StartForm (ActReqDeg); + Frm_BeginForm (ActReqDeg); else Lay_NoPermissionExit (); @@ -825,7 +825,7 @@ static void Deg_ListDegrees (void) /***** Button to create degree *****/ if (Deg_CheckIfICanCreateDegrees ()) { - Frm_StartForm (ActEdiDeg); + Frm_BeginForm (ActEdiDeg); Btn_PutConfirmButton (Gbl.Hierarchy.Degs.Num ? Txt_Create_another_degree : Txt_Create_degree); Frm_EndForm (); diff --git a/swad_degree_config.c b/swad_degree_config.c index 71161d9f..2012bde4 100644 --- a/swad_degree_config.c +++ b/swad_degree_config.c @@ -229,7 +229,7 @@ static void DegCfg_Centre (bool PrintView,bool PutForm) Ctr_GetBasicListOfCentres (Gbl.Hierarchy.Ins.InsCod); /* Put form to select centre */ - Frm_StartForm (ActChgDegCtrCfg); + Frm_BeginForm (ActChgDegCtrCfg); HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE, "id=\"OthCtrCod\" name=\"OthCtrCod\"" " class=\"INPUT_SHORT_NAME\""); @@ -249,7 +249,7 @@ static void DegCfg_Centre (bool PrintView,bool PutForm) { if (!PrintView) { - Frm_StartFormGoTo (ActSeeCtrInf); + Frm_BeginFormGoTo (ActSeeCtrInf); Ctr_PutParamCtrCod (Gbl.Hierarchy.Ctr.CtrCod); HTM_BUTTON_SUBMIT_Begin (Hie_BuildGoToMsg (Gbl.Hierarchy.Ctr.ShrtName), "BT_LINK LT DAT",NULL); @@ -335,7 +335,7 @@ static void DegCfg_NumCrss (void) /* Data */ HTM_TD_Begin ("class=\"LB\""); - Frm_StartFormGoTo (ActSeeCrs); + Frm_BeginFormGoTo (ActSeeCrs); Deg_PutParamDegCod (Gbl.Hierarchy.Deg.DegCod); HTM_BUTTON_SUBMIT_Begin (Str_BuildStringStr (Txt_Courses_of_DEGREE_X, Gbl.Hierarchy.Deg.ShrtName), diff --git a/swad_degree_type.c b/swad_degree_type.c index 1eac5d31..710bceb7 100644 --- a/swad_degree_type.c +++ b/swad_degree_type.c @@ -230,7 +230,7 @@ static void DT_ListDegreeTypes (Act_Action_t NextAction, /***** Button to create degree type *****/ if (DT_CheckIfICanCreateDegreeTypes ()) { - Frm_StartForm (ActEdiDegTyp); + Frm_BeginForm (ActEdiDegTyp); Btn_PutConfirmButton (Gbl.DegTypes.Num ? Txt_Create_another_type_of_degree : Txt_Create_type_of_degree); Frm_EndForm (); @@ -417,7 +417,7 @@ static void DT_ListDegreeTypesForEdition (void) /* Name of degree type */ HTM_TD_Begin ("class=\"LM\""); - Frm_StartForm (ActRenDegTyp); + Frm_BeginForm (ActRenDegTyp); DT_PutParamOtherDegTypCod (&Gbl.DegTypes.Lst[NumDegTyp].DegTypCod); HTM_INPUT_TEXT ("DegTypName",Deg_MAX_CHARS_DEGREE_TYPE_NAME, Gbl.DegTypes.Lst[NumDegTyp].DegTypName, @@ -457,7 +457,7 @@ static void DT_PutFormToCreateDegreeType (void) extern const char *Txt_Create_type_of_degree; /***** Begin form *****/ - Frm_StartForm (ActNewDegTyp); + Frm_BeginForm (ActNewDegTyp); /***** Begin box and table *****/ Box_BoxTableBegin (NULL,Txt_New_type_of_degree, @@ -521,7 +521,7 @@ static void DT_PutHeadDegreeTypesForSeeing (Act_Action_t NextAction, "RM"); /* Begin form to change order */ - Frm_StartForm (NextAction); + Frm_BeginForm (NextAction); if (NextAction == ActSeeUseGbl) { Figures.Scope = Scope; diff --git a/swad_department.c b/swad_department.c index 6aeeabef..65b7462d 100644 --- a/swad_department.c +++ b/swad_department.c @@ -152,7 +152,7 @@ void Dpt_SeeDepts (void) HTM_TH_Begin (1,1,Order == Dpt_ORDER_BY_NUM_TCHS ? "RM" : "LM"); - Frm_StartForm (ActSeeDpt); + Frm_BeginForm (ActSeeDpt); Par_PutHiddenParamUnsigned (NULL,"Order",(unsigned) Order); HTM_BUTTON_SUBMIT_Begin (Txt_DEPARTMENTS_HELP_ORDER[Order],"BT_LINK TIT_TBL",NULL); if (Order == Departments.SelectedOrder) @@ -553,7 +553,7 @@ static void Dpt_ListDepartmentsForEdition (const struct Dpt_Departments *Departm /* Institution */ HTM_TD_Begin ("class=\"CM\""); - Frm_StartForm (ActChgDptIns); + Frm_BeginForm (ActChgDptIns); Dpt_PutParamDptCod (&Dpt->DptCod); HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE, "name=\"OthInsCod\" class=\"HIE_SEL_NARROW\""); @@ -571,7 +571,7 @@ static void Dpt_ListDepartmentsForEdition (const struct Dpt_Departments *Departm /* Department short name */ HTM_TD_Begin ("class=\"CM\""); - Frm_StartForm (ActRenDptSho); + Frm_BeginForm (ActRenDptSho); Dpt_PutParamDptCod (&Dpt->DptCod); HTM_INPUT_TEXT ("ShortName",Cns_HIERARCHY_MAX_CHARS_SHRT_NAME,Dpt->ShrtName, HTM_SUBMIT_ON_CHANGE, @@ -581,7 +581,7 @@ static void Dpt_ListDepartmentsForEdition (const struct Dpt_Departments *Departm /* Department full name */ HTM_TD_Begin ("class=\"CM\""); - Frm_StartForm (ActRenDptFul); + Frm_BeginForm (ActRenDptFul); Dpt_PutParamDptCod (&Dpt->DptCod); HTM_INPUT_TEXT ("FullName",Cns_HIERARCHY_MAX_CHARS_FULL_NAME,Dpt->FullName, HTM_SUBMIT_ON_CHANGE, @@ -591,7 +591,7 @@ static void Dpt_ListDepartmentsForEdition (const struct Dpt_Departments *Departm /* Department WWW */ HTM_TD_Begin ("class=\"CM\""); - Frm_StartForm (ActChgDptWWW); + Frm_BeginForm (ActChgDptWWW); Dpt_PutParamDptCod (&Dpt->DptCod); HTM_INPUT_URL ("WWW",Dpt->WWW,HTM_SUBMIT_ON_CHANGE, "class=\"INPUT_WWW_NARROW\" required=\"required\""); @@ -905,7 +905,7 @@ static void Dpt_PutFormToCreateDepartment (void) unsigned NumIns; /***** Begin form *****/ - Frm_StartForm (ActNewDpt); + Frm_BeginForm (ActNewDpt); /***** Begin box and table *****/ Box_BoxTableBegin (NULL,Txt_New_department, diff --git a/swad_duplicate.c b/swad_duplicate.c index 3aa8a9b4..5670ba86 100644 --- a/swad_duplicate.c +++ b/swad_duplicate.c @@ -407,7 +407,7 @@ static void Dup_PutButtonToViewSimilarUsrs (const struct UsrData *UsrDat) { extern const char *Txt_Similar_users; - Frm_StartForm (ActLstSimUsr); + Frm_BeginForm (ActLstSimUsr); Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod); Btn_PutConfirmButtonInline (Txt_Similar_users); Frm_EndForm (); @@ -421,7 +421,7 @@ static void Dup_PutButtonToEliminateUsrAccount (const struct UsrData *UsrDat) { extern const char *Txt_Eliminate_user_account; - Frm_StartForm (ActUpdOth); + Frm_BeginForm (ActUpdOth); Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod); Par_PutHiddenParamUnsigned (NULL,"RegRemAction",(unsigned) Enr_ELIMINATE_ONE_USR_FROM_PLATFORM); Btn_PutRemoveButtonInline (Txt_Eliminate_user_account); @@ -436,7 +436,7 @@ static void Dup_PutButtonToRemoveFromListOfDupUsrs (const struct UsrData *UsrDat { extern const char *Txt_Not_duplicated; - Frm_StartForm (ActRemDupUsr); + Frm_BeginForm (ActRemDupUsr); Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod); Btn_PutConfirmButtonInline (Txt_Not_duplicated); Frm_EndForm (); diff --git a/swad_enrolment.c b/swad_enrolment.c index ad691a69..bd2a74d9 100644 --- a/swad_enrolment.c +++ b/swad_enrolment.c @@ -207,7 +207,7 @@ void Enr_PutButtonInlineToRegisterStds (long CrsCod) if (!Usr_GetNumUsrsInCrss (Hie_Lvl_CRS,CrsCod, 1 << Rol_STD)) // No students in course { - Frm_StartForm (ActReqEnrSevStd); + Frm_BeginForm (ActReqEnrSevStd); Crs_PutParamCrsCod (CrsCod); Btn_PutCreateButtonInline (Txt_Register_students); Frm_EndForm (); @@ -394,7 +394,7 @@ void Enr_WriteFormToReqAnotherUsrID (Act_Action_t NextAction,void (*FuncParams) extern const char *Txt_Continue; /***** Form to request user's ID, @nickname or email address *****/ - Frm_StartForm (NextAction); + Frm_BeginForm (NextAction); if (FuncParams) FuncParams (); HTM_LABEL_Begin ("for=\"OtherUsrIDNickOrEMail\" class=\"%s RM\"", @@ -439,13 +439,13 @@ void Enr_ReqAcceptRegisterInCrs (void) switch (Gbl.Usrs.Me.UsrDat.Roles.InCurrentCrs.Role) { case Rol_STD: - Frm_StartForm (ActAccEnrStd); + Frm_BeginForm (ActAccEnrStd); break; case Rol_NET: - Frm_StartForm (ActAccEnrNET); + Frm_BeginForm (ActAccEnrNET); break; case Rol_TCH: - Frm_StartForm (ActAccEnrTch); + Frm_BeginForm (ActAccEnrTch); break; default: Rol_WrongRoleExit (); @@ -457,13 +457,13 @@ void Enr_ReqAcceptRegisterInCrs (void) switch (Gbl.Usrs.Me.UsrDat.Roles.InCurrentCrs.Role) { case Rol_STD: - Frm_StartForm (ActRemMe_Std); + Frm_BeginForm (ActRemMe_Std); break; case Rol_NET: - Frm_StartForm (ActRemMe_NET); + Frm_BeginForm (ActRemMe_NET); break; case Rol_TCH: - Frm_StartForm (ActRemMe_Tch); + Frm_BeginForm (ActRemMe_Tch); break; default: Rol_WrongRoleExit (); @@ -739,7 +739,7 @@ static void Enr_ShowFormRegRemSeveralUsrs (Rol_Role_t Role) Rol_WrongRoleExit (); break; } - Frm_StartForm (NextAction); + Frm_BeginForm (NextAction); /***** Begin box *****/ Box_BoxBegin (NULL,Title, @@ -819,7 +819,7 @@ void Enr_AskRemoveOldUsrs (void) unsigned Months; /***** Begin form *****/ - Frm_StartForm (ActRemOldUsr); + Frm_BeginForm (ActRemOldUsr); /***** Begin box *****/ Box_BoxBegin (NULL,Txt_Eliminate_old_users, @@ -1858,13 +1858,13 @@ void Enr_AskRemAllStdsThisCrs (void) if (NumStds) { /***** Show question and button to remove students *****/ - /* Start alert */ + /* Begin alert */ Ale_ShowAlertAndButton1 (Ale_QUESTION,Txt_Do_you_really_want_to_remove_the_X_students_from_the_course_Y_, NumStds, Gbl.Hierarchy.Crs.FullName); /* Show form to request confirmation */ - Frm_StartForm (ActRemAllStdCrs); + Frm_BeginForm (ActRemAllStdCrs); Grp_PutParamAllGroups (); Pwd_AskForConfirmationOnDangerousAction (); Btn_PutRemoveButton (Txt_Remove_all_students); @@ -2133,7 +2133,7 @@ void Enr_AskIfRejectSignUp (void) Role == Rol_TCH) { /***** Show question and button to reject user's enrolment request *****/ - /* Start alert */ + /* Begin alert */ Ale_ShowAlertAndButton1 (Ale_QUESTION,Txt_Do_you_really_want_to_reject_the_enrolment_request_, Gbl.Usrs.Other.UsrDat.FullName, Txt_ROLES_SINGUL_abc[Role][Gbl.Usrs.Other.UsrDat.Sex], @@ -2288,7 +2288,7 @@ static void Enr_ShowEnrolmentRequestsGivenRoles (unsigned RolesSelected) /***** Selection of scope and roles *****/ /* Begin form and table */ - Frm_StartForm (ActUpdSignUpReq); + Frm_BeginForm (ActUpdSignUpReq); HTM_TABLE_BeginWideMarginPadding (2); /* Scope (whole platform, current centre, current degree or current course) */ @@ -2860,7 +2860,7 @@ static void Enr_ShowEnrolmentRequestsGivenRoles (unsigned RolesSelected) Deg.DegCod = Crs.DegCod; Deg_GetDataOfDegreeByCod (&Deg); HTM_TD_Begin (NULL); - Frm_StartFormGoTo (ActSeeCrsInf); + Frm_BeginFormGoTo (ActSeeCrsInf); Crs_PutParamCrsCod (Crs.CrsCod); HTM_BUTTON_SUBMIT_Begin (Hie_BuildGoToMsg (Crs.FullName), "BT_LINK LT DAT",NULL); @@ -2917,7 +2917,7 @@ static void Enr_ShowEnrolmentRequestsGivenRoles (unsigned RolesSelected) Rol_WrongRoleExit (); break; } - Frm_StartForm (NextAction); + Frm_BeginForm (NextAction); Crs_PutParamCrsCod (Crs.CrsCod); Usr_PutParamUsrCodEncrypted (UsrDat.EnUsrCod); Btn_PutCreateButtonInline (Txt_Register); @@ -2926,7 +2926,7 @@ static void Enr_ShowEnrolmentRequestsGivenRoles (unsigned RolesSelected) /***** Button to reject the request *****/ HTM_TD_Begin ("class=\"DAT LT\""); - Frm_StartForm (ActReqRejSignUp); + Frm_BeginForm (ActReqRejSignUp); Crs_PutParamCrsCod (Crs.CrsCod); Usr_PutParamUsrCodEncrypted (UsrDat.EnUsrCod); Btn_PutRemoveButtonInline (Txt_Reject); @@ -3648,7 +3648,7 @@ static void Enr_ReqAddAdm (Hie_Lvl_Level_t Scope,long Cod,const char *InsCtrDegN else { /***** Show question and button to register user as administrator *****/ - /* Start alert */ + /* Begin alert */ Ale_ShowAlertAndButton1 (Ale_QUESTION,Txt_Do_you_really_want_to_register_the_following_user_as_an_administrator_of_X, InsCtrDegName); @@ -4049,7 +4049,7 @@ static void Enr_AskIfRemoveUsrFromCrs (struct UsrData *UsrDat) ItsMe = Usr_ItsMe (Gbl.Usrs.Other.UsrDat.UsrCod); /***** Show question and button to remove user as administrator *****/ - /* Start alert */ + /* Begin alert */ Ale_ShowAlertAndButton1 (Ale_QUESTION,ItsMe ? Txt_Do_you_really_want_to_be_removed_from_the_course_X : Txt_Do_you_really_want_to_remove_the_following_user_from_the_course_X, Gbl.Hierarchy.Crs.FullName); @@ -4074,7 +4074,7 @@ static void Enr_AskIfRemoveUsrFromCrs (struct UsrData *UsrDat) Rol_WrongRoleExit (); break; } - Frm_StartForm (NextAction); + Frm_BeginForm (NextAction); Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod); Pwd_AskForConfirmationOnDangerousAction (); Btn_PutRemoveButton (ItsMe ? Txt_Remove_me_from_this_course : @@ -4217,7 +4217,7 @@ static void Enr_AskIfRemAdm (bool ItsMe,Hie_Lvl_Level_t Scope, if (Usr_ChkIfUsrCodExists (Gbl.Usrs.Other.UsrDat.UsrCod)) { /***** Show question and button to remove user as administrator *****/ - /* Start alert */ + /* Begin alert */ Ale_ShowAlertAndButton1 (Ale_QUESTION,ItsMe ? Txt_Do_you_really_want_to_be_removed_as_an_administrator_of_X : Txt_Do_you_really_want_to_remove_the_following_user_as_an_administrator_of_X, InsCtrDegName); diff --git a/swad_exam.c b/swad_exam.c index 2fd0f930..7760fb12 100644 --- a/swad_exam.c +++ b/swad_exam.c @@ -259,7 +259,7 @@ static void Exa_ListAllExams (struct Exa_Exams *Exams) HTM_TH_Begin (1,1,"LM"); /* Form to change order */ - Frm_StartForm (ActSeeAllExa); + Frm_BeginForm (ActSeeAllExa); Pag_PutHiddenParamPagNum (Pag_EXAMS,Exams->CurrentPage); Par_PutHiddenParamUnsigned (NULL,"Order",(unsigned) Order); HTM_BUTTON_SUBMIT_Begin (Txt_EXAMS_ORDER_HELP[Order],"BT_LINK TIT_TBL",NULL); @@ -387,7 +387,7 @@ static void Exa_PutButtonToCreateNewExam (struct Exa_Exams *Exams) { extern const char *Txt_New_exam; - Frm_StartForm (ActFrmNewExa); + Frm_BeginForm (ActFrmNewExa); Exa_PutParamsToCreateNewExam (Exams); Btn_PutConfirmButton (Txt_New_exam); Frm_EndForm (); @@ -552,7 +552,7 @@ static void Exa_ShowOneExam (struct Exa_Exams *Exams, /* Exam title */ Exams->ExaCod = Exam->ExaCod; HTM_ARTICLE_Begin (Anchor); - Frm_StartForm (ActSeeExa); + Frm_BeginForm (ActSeeExa); Exa_PutParams (Exams); HTM_BUTTON_SUBMIT_Begin (Txt_View_exam, Exam->Hidden ? "BT_LINK LT ASG_TITLE_LIGHT": @@ -583,7 +583,7 @@ static void Exa_ShowOneExam (struct Exa_Exams *Exams, HTM_TD_Begin ("class=\"RT COLOR%u\"",Gbl.RowEvenOdd); Exams->ExaCod = Exam->ExaCod; - Frm_StartForm (ActSeeExa); + Frm_BeginForm (ActSeeExa); Exa_PutParams (Exams); HTM_BUTTON_SUBMIT_Begin (Txt_Sessions, Exam->Hidden ? "BT_LINK LT ASG_TITLE_LIGHT" : @@ -1482,7 +1482,7 @@ void Exa_PutFormEditionExam (struct Exa_Exams *Exams, /***** Begin form *****/ Exams->ExaCod = Exam->ExaCod; - Frm_StartForm (ItsANewExam ? ActNewExa : + Frm_BeginForm (ItsANewExam ? ActNewExa : ActChgExa); Exa_PutParams (Exams); diff --git a/swad_exam_announcement.c b/swad_exam_announcement.c index 3101120e..e0c3ffa1 100644 --- a/swad_exam_announcement.c +++ b/swad_exam_announcement.c @@ -452,7 +452,7 @@ void ExaAnn_ReqRemoveExamAnn (void) Lay_ShowErrorAndExit ("Code of exam announcement is missing."); /***** Show question and button to remove exam announcement *****/ - /* Start alert */ + /* Begin alert */ Ale_ShowAlertAndButton1 (Ale_QUESTION,Txt_Do_you_really_want_to_remove_the_following_announcement_of_exam); /* Show announcement */ @@ -781,7 +781,7 @@ static void ExaAnn_PutButtonToCreateNewExamAnn (void) { extern const char *Txt_New_announcement_OF_EXAM; - Frm_StartForm (ActEdiExaAnn); + Frm_BeginForm (ActEdiExaAnn); Btn_PutConfirmButton (Txt_New_announcement_OF_EXAM); Frm_EndForm (); } diff --git a/swad_exam_print.c b/swad_exam_print.c index e336f451..a79f4aec 100644 --- a/swad_exam_print.c +++ b/swad_exam_print.c @@ -765,7 +765,7 @@ static void ExaPrn_ShowTableWithQstsToFill (struct Exa_Exams *Exams, HTM_TABLE_End (); /***** Form to end/close this exam print *****/ - Frm_StartFormId (ActEndExaPrn,"finished"); + Frm_BeginFormId (ActEndExaPrn,"finished"); ExaSes_PutParamsEdit (Exams); Btn_PutCreateButton (Txt_I_have_finished); Frm_EndForm (); @@ -823,7 +823,7 @@ static void ExaPrn_WriteQstAndAnsToFill (const struct ExaPrn_Print *Print, "TEST_MED_SHOW"); /* Answers */ - Frm_StartFormNoAction (); // Form that can not be submitted, to avoid enter key to send it + Frm_BeginFormNoAction (); // Form that can not be submitted, to avoid enter key to send it ExaPrn_WriteAnswersToFill (Print,NumQst,Question); Frm_EndForm (); @@ -1122,7 +1122,7 @@ void ExaPrn_ReceivePrintAnswer (void) Ale_ShowAlert (Ale_INFO,Txt_You_dont_have_access_to_the_exam); /***** Form to end/close this exam print *****/ - Frm_StartForm (ActEndExaPrn); + Frm_BeginForm (ActEndExaPrn); ExaSes_PutParamsEdit (&Exams); Btn_PutCreateButton (Txt_Continue); Frm_EndForm (); diff --git a/swad_exam_result.c b/swad_exam_result.c index 1a09206b..07ef8e05 100644 --- a/swad_exam_result.c +++ b/swad_exam_result.c @@ -1157,11 +1157,11 @@ static void ExaRes_ShowResults (struct Exa_Exams *Exams, switch (MeOrOther) { case Usr_ME: - Frm_StartForm (ActSeeOneExaResMe); + Frm_BeginForm (ActSeeOneExaResMe); ExaSes_PutParamsEdit (Exams); break; case Usr_OTHER: - Frm_StartForm (ActSeeOneExaResOth); + Frm_BeginForm (ActSeeOneExaResOth); ExaSes_PutParamsEdit (Exams); Usr_PutParamOtherUsrCodEncrypted (Gbl.Usrs.Other.UsrDat.EnUsrCod); break; diff --git a/swad_exam_session.c b/swad_exam_session.c index 8f211ddb..eedca5e3 100644 --- a/swad_exam_session.c +++ b/swad_exam_session.c @@ -620,7 +620,7 @@ static void ExaSes_ListOneOrMoreSessionsTitleGrps (struct Exa_Exams *Exams, HTM_ARTICLE_Begin (Anchor); if (ExaSes_CheckIfICanAnswerThisSession (Exam,Session)) { - Frm_StartForm (ActSeeExaPrn); + Frm_BeginForm (ActSeeExaPrn); Exa_PutParams (Exams); ExaSes_PutParamSesCod (Session->SesCod); HTM_BUTTON_SUBMIT_Begin (Gbl.Usrs.Me.Role.Logged == Rol_STD ? Txt_Play : @@ -1272,11 +1272,11 @@ static void ExaSes_PutFormSession (const struct ExaSes_Session *Session) }; bool ItsANewSession = Session->SesCod <= 0; - /***** Start section for a new exam session *****/ + /***** Begin section for a new exam session *****/ HTM_SECTION_Begin (ExaSes_NEW_SESSION_SECTION_ID); /***** Begin form *****/ - Frm_StartForm (ItsANewSession ? ActNewExaSes : // New session + Frm_BeginForm (ItsANewSession ? ActNewExaSes : // New session ActChgExaSes); // Existing session Exa_PutParamExamCod (Session->ExaCod); if (!ItsANewSession) // Existing session diff --git a/swad_exam_set.c b/swad_exam_set.c index d5599d18..3538eb3b 100644 --- a/swad_exam_set.c +++ b/swad_exam_set.c @@ -290,7 +290,7 @@ static void ExaSet_PutFormNewSet (struct Exa_Exams *Exams, /***** Begin form *****/ Exams->ExaCod = Exam->ExaCod; - Frm_StartForm (ActNewExaSet); + Frm_BeginForm (ActNewExaSet); Exa_PutParams (Exams); /***** Begin box and table *****/ @@ -2299,7 +2299,7 @@ static void ExaSet_PutButtonToAddNewQuestions (struct Exa_Exams *Exams) { extern const char *Txt_Add_questions; - Frm_StartForm (ActReqAddQstExaSet); + Frm_BeginForm (ActReqAddQstExaSet); ExaSet_PutParamsOneSet (Exams); Btn_PutConfirmButtonInline (Txt_Add_questions); Frm_EndForm (); diff --git a/swad_figure.c b/swad_figure.c index 69f144a4..d66c6ba1 100644 --- a/swad_figure.c +++ b/swad_figure.c @@ -220,7 +220,7 @@ static void Fig_ReqShowFigure (Fig_FigureType_t SelectedFigureType) unsigned FigureTypeUnsigned; /***** Form to show statistic *****/ - Frm_StartForm (ActSeeUseGbl); + Frm_BeginForm (ActSeeUseGbl); /***** Begin box *****/ Box_BoxBegin (NULL,Txt_Figures, @@ -1487,7 +1487,7 @@ static void Fig_ShowInss (MYSQL_RES **mysql_res,unsigned NumInss, HTM_TD_Begin ("class=\"%s LM\"", The_ClassFormInBox[Gbl.Prefs.Theme]); /* Icon and name of this institution */ - Frm_StartForm (ActSeeInsInf); + Frm_BeginForm (ActSeeInsInf); Ins_PutParamInsCod (Ins.InsCod); HTM_BUTTON_SUBMIT_Begin (Ins.ShrtName,The_ClassFormLinkInBox[Gbl.Prefs.Theme],NULL); if (Gbl.Usrs.Listing.WithPhotos) diff --git a/swad_file_browser.c b/swad_file_browser.c index 389a6444..9261fa31 100644 --- a/swad_file_browser.c +++ b/swad_file_browser.c @@ -3276,7 +3276,7 @@ static void Brw_FormToChangeCrsGrpZone (void) Grp_GetLstCodGrpsWithFileZonesIBelong (&LstMyGrps); /***** Begin form *****/ - Frm_StartForm (Brw_ActChgZone[Gbl.FileBrowser.Type]); + Frm_BeginForm (Brw_ActChgZone[Gbl.FileBrowser.Type]); Brw_PutHiddenParamFullTreeIfSelected (&Gbl.FileBrowser.FullTree); /***** List start *****/ @@ -3400,7 +3400,7 @@ static void Brw_ShowDataOwnerAsgWrk (struct UsrData *UsrDat) Rol_WrongRoleExit (); break; } - Frm_StartForm (NextAction); + Frm_BeginForm (NextAction); Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod); /***** Show user's ID *****/ @@ -3761,7 +3761,7 @@ static void Brw_PutButtonToShowEdit (void) case Brw_ICON_VIEW: if (Brw_ActFromAdmToSee[Gbl.FileBrowser.Type] != ActUnk) { - Frm_StartForm (Brw_ActFromAdmToSee[Gbl.FileBrowser.Type]); + Frm_BeginForm (Brw_ActFromAdmToSee[Gbl.FileBrowser.Type]); Brw_PutHiddenParamFullTreeIfSelected (&Gbl.FileBrowser.FullTree); Btn_PutConfirmButton (Txt_View); Frm_EndForm (); @@ -3770,7 +3770,7 @@ static void Brw_PutButtonToShowEdit (void) case Brw_ICON_EDIT: if (Brw_ActFromSeeToAdm[Gbl.FileBrowser.Type] != ActUnk) { - Frm_StartForm (Brw_ActFromSeeToAdm[Gbl.FileBrowser.Type]); + Frm_BeginForm (Brw_ActFromSeeToAdm[Gbl.FileBrowser.Type]); Brw_PutHiddenParamFullTreeIfSelected (&Gbl.FileBrowser.FullTree); Btn_PutConfirmButton (Txt_Edit); Frm_EndForm (); @@ -5867,7 +5867,7 @@ static void Brw_PutIconToExpandFolder (const char *FileBrowserId,const char *Row extern const char *Txt_Expand; char JavaScriptFuncToExpandFolder[256 + Brw_MAX_ROW_ID]; - /***** Start container *****/ + /***** Begin container *****/ if (Hidden) HTM_DIV_Begin ("id=\"expand_%s_%s\" style=\"display:none;\"",FileBrowserId,RowId); else @@ -5877,7 +5877,7 @@ static void Brw_PutIconToExpandFolder (const char *FileBrowserId,const char *Row snprintf (JavaScriptFuncToExpandFolder,sizeof (JavaScriptFuncToExpandFolder), "ExpandFolder('%s_%s')", FileBrowserId,RowId); - Frm_StartFormAnchorOnSubmit (Brw_ActExpandFolder[Gbl.FileBrowser.Type], + Frm_BeginFormAnchorOnSubmit (Brw_ActExpandFolder[Gbl.FileBrowser.Type], FileBrowserId, JavaScriptFuncToExpandFolder); // JavaScript function to unhide rows Brw_PutImplicitParamsFileBrowser (&Gbl.FileBrowser.FilFolLnk); @@ -5898,7 +5898,7 @@ static void Brw_PutIconToContractFolder (const char *FileBrowserId,const char *R extern const char *Txt_Contract; char JavaScriptFuncToContractFolder[256 + Brw_MAX_ROW_ID]; - /***** Start container *****/ + /***** Begin container *****/ if (Hidden) HTM_DIV_Begin ("id=\"contract_%s_%s\" style=\"display:none;\"",FileBrowserId,RowId); else @@ -5908,7 +5908,7 @@ static void Brw_PutIconToContractFolder (const char *FileBrowserId,const char *R snprintf (JavaScriptFuncToContractFolder,sizeof (JavaScriptFuncToContractFolder), "ContractFolder('%s_%s')", FileBrowserId,RowId); - Frm_StartFormAnchorOnSubmit (Brw_ActContractFolder[Gbl.FileBrowser.Type], + Frm_BeginFormAnchorOnSubmit (Brw_ActContractFolder[Gbl.FileBrowser.Type], FileBrowserId, JavaScriptFuncToContractFolder); // JavaScript function to hide rows Brw_PutImplicitParamsFileBrowser (&Gbl.FileBrowser.FilFolLnk); @@ -6042,7 +6042,7 @@ static void Brw_PutIconFolderWithoutPlus (const char *FileBrowserId,const char * { extern const char *Txt_Folder; - /***** Start container *****/ + /***** Begin container *****/ if (Hidden) HTM_DIV_Begin ("id=\"folder_%s_%s_%s\" style=\"display:none;\"", Open ? "open" : @@ -6070,7 +6070,7 @@ static void Brw_PutIconFolderWithoutPlus (const char *FileBrowserId,const char * static void Brw_PutIconFolderWithPlus (const char *FileBrowserId,const char *RowId, bool Open,bool Hidden) { - /***** Start container *****/ + /***** Begin container *****/ if (Hidden) HTM_DIV_Begin ("id=\"folder_%s_%s_%s\" style=\"display:none;\"", Open ? "open" : @@ -6116,7 +6116,7 @@ static void Brw_PutIconFileWithLinkToViewMetadata (struct FileMetadata *FileMeta HTM_TD_Begin ("class=\"BM%u\"",Gbl.RowEvenOdd); /***** Begin form *****/ - Frm_StartForm (Brw_ActReqDatFile[Gbl.FileBrowser.Type]); + Frm_BeginForm (Brw_ActReqDatFile[Gbl.FileBrowser.Type]); Brw_PutParamsFileBrowser (NULL, // Not used NULL, // Not used Brw_IS_UNKNOWN, // Not used @@ -6244,7 +6244,7 @@ static void Brw_WriteFileName (unsigned Level,bool IsPublic) /***** Form to rename folder *****/ if (ICanEditFileOrFolder) // Can I rename this folder? { - Frm_StartForm (Brw_ActRenameFolder[Gbl.FileBrowser.Type]); + Frm_BeginForm (Brw_ActRenameFolder[Gbl.FileBrowser.Type]); Brw_PutImplicitParamsFileBrowser (&Gbl.FileBrowser.FilFolLnk); } @@ -6292,7 +6292,7 @@ static void Brw_WriteFileName (unsigned Level,bool IsPublic) HTM_NBSP (); - Frm_StartForm (Brw_ActDowFile[Gbl.FileBrowser.Type]); + Frm_BeginForm (Brw_ActDowFile[Gbl.FileBrowser.Type]); Brw_PutImplicitParamsFileBrowser (&Gbl.FileBrowser.FilFolLnk); /* Link to the form and to the file */ @@ -8299,7 +8299,7 @@ static void Brw_PutFormToCreateAFolder (const char FileNameToShow[NAME_MAX + 1]) extern const char *Txt_Folder; /***** Begin form *****/ - Frm_StartForm (Brw_ActCreateFolder[Gbl.FileBrowser.Type]); + Frm_BeginForm (Brw_ActCreateFolder[Gbl.FileBrowser.Type]); Brw_PutImplicitParamsFileBrowser (&Gbl.FileBrowser.FilFolLnk); /***** Begin box *****/ @@ -8371,7 +8371,7 @@ static void Brw_PutFormToUploadFilesUsingDropzone (const char *FileNameToShow) HTM_Txt (""); /***** Put button to refresh file browser after upload *****/ - Frm_StartForm (Brw_ActRefreshAfterUploadFiles[Gbl.FileBrowser.Type]); + Frm_BeginForm (Brw_ActRefreshAfterUploadFiles[Gbl.FileBrowser.Type]); Brw_PutParamsFileBrowser (NULL, // Not used NULL, // Not used Brw_IS_UNKNOWN, // Not used @@ -8408,7 +8408,7 @@ static void Brw_PutFormToUploadOneFileClassic (const char *FileNameToShow) FileNameToShow); /***** Form to upload one files using the classic way *****/ - Frm_StartForm (Brw_ActUploadFileClassic[Gbl.FileBrowser.Type]); + Frm_BeginForm (Brw_ActUploadFileClassic[Gbl.FileBrowser.Type]); Brw_PutImplicitParamsFileBrowser (&Gbl.FileBrowser.FilFolLnk); HTM_INPUT_FILE (Fil_NAME_OF_PARAM_FILENAME_ORG,"*", HTM_DONT_SUBMIT_ON_CHANGE, @@ -8433,7 +8433,7 @@ static void Brw_PutFormToPasteAFileOrFolder (const char *FileNameToShow) extern const char *Txt_or_you_can_make_a_file_copy_to_the_folder_X; /***** Begin form *****/ - Frm_StartForm (Brw_ActPaste[Gbl.FileBrowser.Type]); + Frm_BeginForm (Brw_ActPaste[Gbl.FileBrowser.Type]); Brw_PutImplicitParamsFileBrowser (&Gbl.FileBrowser.FilFolLnk); /***** Begin box *****/ @@ -8467,7 +8467,7 @@ static void Brw_PutFormToCreateALink (const char *FileNameToShow) char *Label; /***** Begin form *****/ - Frm_StartForm (Brw_ActCreateLink[Gbl.FileBrowser.Type]); + Frm_BeginForm (Brw_ActCreateLink[Gbl.FileBrowser.Type]); Brw_PutImplicitParamsFileBrowser (&Gbl.FileBrowser.FilFolLnk); /***** Begin box *****/ @@ -9441,7 +9441,7 @@ void Brw_ShowFileMetadata (void) break; } - Frm_StartForm (Brw_ActRecDatFile[Gbl.FileBrowser.Type]); + Frm_BeginForm (Brw_ActRecDatFile[Gbl.FileBrowser.Type]); Brw_PutParamsFileBrowser (NULL, // Not used NULL, // Not used Brw_IS_UNKNOWN, // Not used @@ -9967,7 +9967,7 @@ static void Brw_WriteBigLinkToDownloadFile (const char *URL, Gbl.FileBrowser.Type == Brw_SHOW_MRK_GRP) { /* Form to see marks */ - Frm_StartForm (Gbl.FileBrowser.Type == Brw_SHOW_MRK_CRS ? ActSeeMyMrkCrs : + Frm_BeginForm (Gbl.FileBrowser.Type == Brw_SHOW_MRK_CRS ? ActSeeMyMrkCrs : ActSeeMyMrkGrp); Str_Copy (Gbl.FileBrowser.FilFolLnk.Path,FileMetadata->FilFolLnk.Path, sizeof (Gbl.FileBrowser.FilFolLnk.Path) - 1); @@ -10018,7 +10018,7 @@ static void Brw_WriteSmallLinkToDownloadFile (const char *URL, Gbl.FileBrowser.Type == Brw_SHOW_MRK_GRP) { /* Form to see marks */ - Frm_StartForm (Gbl.FileBrowser.Type == Brw_SHOW_MRK_CRS ? ActSeeMyMrkCrs : + Frm_BeginForm (Gbl.FileBrowser.Type == Brw_SHOW_MRK_CRS ? ActSeeMyMrkCrs : ActSeeMyMrkGrp); Str_Copy (Gbl.FileBrowser.FilFolLnk.Path,FileMetadata->FilFolLnk.Path, sizeof (Gbl.FileBrowser.FilFolLnk.Path) - 1); @@ -11908,7 +11908,7 @@ static void Brw_WriteRowDocData (unsigned long *NumDocsNotHidden,MYSQL_ROW row) HTM_TD_Begin ("class=\"LT %s\"",BgColor); if (InsCod > 0) { - Frm_StartFormGoTo (ActSeeInsInf); + Frm_BeginFormGoTo (ActSeeInsInf); Deg_PutParamDegCod (InsCod); HTM_BUTTON_SUBMIT_Begin (Hie_BuildGoToMsg (InsShortName), "BT_LINK LT DAT",NULL); @@ -11924,7 +11924,7 @@ static void Brw_WriteRowDocData (unsigned long *NumDocsNotHidden,MYSQL_ROW row) HTM_TD_Begin ("class=\"LT %s\"",BgColor); if (CtrCod > 0) { - Frm_StartFormGoTo (ActSeeCtrInf); + Frm_BeginFormGoTo (ActSeeCtrInf); Deg_PutParamDegCod (CtrCod); HTM_BUTTON_SUBMIT_Begin (Hie_BuildGoToMsg (CtrShortName), "BT_LINK LT DAT",NULL); @@ -11940,7 +11940,7 @@ static void Brw_WriteRowDocData (unsigned long *NumDocsNotHidden,MYSQL_ROW row) HTM_TD_Begin ("class=\"LT %s\"",BgColor); if (DegCod > 0) { - Frm_StartFormGoTo (ActSeeDegInf); + Frm_BeginFormGoTo (ActSeeDegInf); Deg_PutParamDegCod (DegCod); HTM_BUTTON_SUBMIT_Begin (Hie_BuildGoToMsg (DegShortName), "BT_LINK LT DAT",NULL); @@ -11956,7 +11956,7 @@ static void Brw_WriteRowDocData (unsigned long *NumDocsNotHidden,MYSQL_ROW row) HTM_TD_Begin ("class=\"LT %s\"",BgColor); if (CrsCod > 0) { - Frm_StartFormGoTo (ActSeeCrsInf); + Frm_BeginFormGoTo (ActSeeCrsInf); Crs_PutParamCrsCod (CrsCod); HTM_BUTTON_SUBMIT_Begin (Hie_BuildGoToMsg (CrsShortName),"BT_LINK DAT",NULL); Hie_FreeGoToMsg (); @@ -12028,28 +12028,28 @@ static void Brw_WriteRowDocData (unsigned long *NumDocsNotHidden,MYSQL_ROW row) if (CrsCod > 0) { - Frm_StartFormGoTo (Action); + Frm_BeginFormGoTo (Action); Crs_PutParamCrsCod (CrsCod); // Go to course if (GrpCod > 0) Grp_PutParamGrpCod (&GrpCod); } else if (DegCod > 0) { - Frm_StartFormGoTo (Action); + Frm_BeginFormGoTo (Action); Deg_PutParamDegCod (DegCod); // Go to degree } else if (CtrCod > 0) { - Frm_StartFormGoTo (Action); + Frm_BeginFormGoTo (Action); Ctr_PutParamCtrCod (CtrCod); // Go to centre } else if (InsCod > 0) { - Frm_StartFormGoTo (Action); + Frm_BeginFormGoTo (Action); Ins_PutParamInsCod (InsCod); // Go to institution } else - Frm_StartForm (Action); + Frm_BeginForm (Action); /* Parameters to go to file / folder */ if (FileMetadata.FilFolLnk.Type == Brw_IS_FOLDER) @@ -12113,7 +12113,7 @@ void Brw_AskRemoveOldFiles (void) Brw_GetParAndInitFileBrowser (); /***** Begin form *****/ - Frm_StartForm (ActRemOldBrf); + Frm_BeginForm (ActRemOldBrf); Brw_PutHiddenParamFullTreeIfSelected (&Gbl.FileBrowser.FullTree); /***** Begin box *****/ diff --git a/swad_follow.c b/swad_follow.c index 233a7753..5140b262 100644 --- a/swad_follow.c +++ b/swad_follow.c @@ -212,11 +212,11 @@ void Fol_SuggestUsrsToFollowMainZoneOnRightColumn (void) Fol_SUGGEST_ONLY_USERS_WITH_PHOTO, &mysql_res))) { - /***** Start container *****/ + /***** Begin container *****/ HTM_DIV_Begin ("class=\"CONNECTED\""); /***** Title with link to suggest more users to follow *****/ - Frm_StartForm (ActSeeSocPrf); + Frm_BeginForm (ActSeeSocPrf); HTM_BUTTON_SUBMIT_Begin (Txt_Who_to_follow,"BT_LINK CONNECTED_TXT",NULL); HTM_Txt (Txt_Who_to_follow); HTM_BUTTON_End (); @@ -438,7 +438,7 @@ static void Fol_PutIconToUpdateWhoToFollow (void) { extern const char *Txt_Update; - Frm_StartForm (ActSeeSocPrf); + Frm_BeginForm (ActSeeSocPrf); HTM_BUTTON_Animated_Begin (Txt_Update,"BT_LINK",NULL); Ico_PutCalculateIcon (Txt_Update); HTM_BUTTON_End (); @@ -519,7 +519,7 @@ void Fol_ShowFollowingAndFollowers (const struct UsrData *UsrDat, extern const char *Txt_Follow; bool ItsMe = Usr_ItsMe (UsrDat->UsrCod); - /***** Start section *****/ + /***** Begin section *****/ HTM_SECTION_Begin (Fol_FOLLOW_SECTION_ID); /***** Followed users *****/ @@ -555,7 +555,7 @@ void Fol_ShowFollowingAndFollowers (const struct UsrData *UsrDat, if (Gbl.Usrs.Me.Logged && // Logged !ItsMe) // Not me! { - Frm_StartForm (IFollowUsr ? ActUnfUsr : + Frm_BeginForm (IFollowUsr ? ActUnfUsr : ActFolUsr); Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod); HTM_INPUT_IMAGE (Cfg_URL_ICON_PUBLIC, @@ -590,7 +590,7 @@ static void Fol_ShowNumberOfFollowingOrFollowers (const struct UsrData *UsrDat, extern const char *The_ClassFormLinkOutBox[The_NUM_THEMES]; extern const char *The_ClassFormLinkOutBoxBold[The_NUM_THEMES]; - /***** Start container *****/ + /***** Begin container *****/ HTM_DIV_Begin ("class=\"FOLLOW_BOX\""); /***** Number *****/ @@ -844,7 +844,7 @@ static void Fol_ShowFollowedOrFollower (struct UsrData *UsrDat) if (Visible) { /* Put form to go to public profile */ - Frm_StartForm (ActSeeOthPubPrf); + Frm_BeginForm (ActSeeOthPubPrf); Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod); HTM_DIV_Begin ("class=\"FOLLOW_USR_NAME\""); // Limited width HTM_BUTTON_SUBMIT_Begin (Txt_Another_user_s_profile,"BT_LINK LT DAT",NULL); @@ -901,7 +901,7 @@ static void Fol_WriteRowUsrToFollowOnRightColumn (struct UsrData *UsrDat) if (Visible) { /* Put form to go to public profile */ - Frm_StartForm (ActSeeOthPubPrf); + Frm_BeginForm (ActSeeOthPubPrf); Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod); HTM_DIV_Begin ("class=\"CON_NAME_FOLLOW\""); // Limited width HTM_BUTTON_SUBMIT_Begin (Txt_Another_user_s_profile,"BT_LINK CON_NAME_FOLLOW CON_CRS",NULL); @@ -955,7 +955,7 @@ static void Fol_PutIconToFollow (struct UsrData *UsrDat) extern const char *Txt_Follow; /***** Form to unfollow *****/ - Frm_StartForm (ActFolUsr); + Frm_BeginForm (ActFolUsr); Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod); HTM_INPUT_IMAGE (Cfg_URL_ICON_PUBLIC,"user-plus.svg", Txt_Follow,"FOLLOW_USR_ICO ICO_HIGHLIGHT ICO16x16"); @@ -971,7 +971,7 @@ static void Fol_PutIconToUnfollow (struct UsrData *UsrDat) extern const char *Txt_Unfollow; /* Form to follow */ - Frm_StartForm (ActUnfUsr); + Frm_BeginForm (ActUnfUsr); Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod); HTM_INPUT_IMAGE (Cfg_URL_ICON_PUBLIC,"user-check.svg", Txt_Unfollow,"FOLLOW_USR_ICO ICO_HIGHLIGHT ICO16x16"); diff --git a/swad_form.c b/swad_form.c index 916dea8a..70eaaaec 100644 --- a/swad_form.c +++ b/swad_form.c @@ -47,71 +47,71 @@ extern struct Globals Gbl; /**************************** Private prototypes *****************************/ /*****************************************************************************/ -static void Frm_StartFormInternal (Act_Action_t NextAction,bool PutParameterLocationIfNoSesion, +static void Frm_BeginFormInternal (Act_Action_t NextAction,bool PutParameterLocationIfNoSesion, const char *Id,const char *Anchor,const char *OnSubmit); /*****************************************************************************/ /******************************** Start a form *******************************/ /*****************************************************************************/ -void Frm_StartFormGoTo (Act_Action_t NextAction) +void Frm_BeginFormGoTo (Act_Action_t NextAction) { Gbl.Form.Num++; // Initialized to -1. The first time it is incremented, it will be equal to 0 snprintf (Gbl.Form.Id,sizeof (Gbl.Form.Id),"form_%d",Gbl.Form.Num); - Frm_StartFormInternal (NextAction,false,Gbl.Form.Id,NULL,NULL); // Do not put now parameter location + Frm_BeginFormInternal (NextAction,false,Gbl.Form.Id,NULL,NULL); // Do not put now parameter location } -void Frm_StartForm (Act_Action_t NextAction) +void Frm_BeginForm (Act_Action_t NextAction) { - Frm_StartFormAnchorOnSubmit (NextAction,NULL,NULL); + Frm_BeginFormAnchorOnSubmit (NextAction,NULL,NULL); } void Frm_StartFormAnchor (Act_Action_t NextAction,const char *Anchor) { - Frm_StartFormAnchorOnSubmit (NextAction,Anchor,NULL); + Frm_BeginFormAnchorOnSubmit (NextAction,Anchor,NULL); } -void Frm_StartFormOnSubmit (Act_Action_t NextAction,const char *OnSubmit) +void Frm_BeginFormOnSubmit (Act_Action_t NextAction,const char *OnSubmit) { - Frm_StartFormAnchorOnSubmit (NextAction,NULL,OnSubmit); + Frm_BeginFormAnchorOnSubmit (NextAction,NULL,OnSubmit); } -void Frm_StartFormAnchorOnSubmit (Act_Action_t NextAction,const char *Anchor,const char *OnSubmit) +void Frm_BeginFormAnchorOnSubmit (Act_Action_t NextAction,const char *Anchor,const char *OnSubmit) { Gbl.Form.Num++; // Initialized to -1. The first time it is incremented, it will be equal to 0 snprintf (Gbl.Form.Id,sizeof (Gbl.Form.Id),"form_%d",Gbl.Form.Num); - Frm_StartFormInternal (NextAction,true,Gbl.Form.Id,Anchor,OnSubmit); // Do put now parameter location (if no open session) + Frm_BeginFormInternal (NextAction,true,Gbl.Form.Id,Anchor,OnSubmit); // Do put now parameter location (if no open session) } -void Frm_StartFormUnique (Act_Action_t NextAction) +void Frm_BeginFormUnique (Act_Action_t NextAction) { - Frm_StartFormUniqueAnchor (NextAction,NULL); + Frm_BeginFormUniqueAnchor (NextAction,NULL); } -void Frm_StartFormUniqueAnchor (Act_Action_t NextAction,const char *Anchor) +void Frm_BeginFormUniqueAnchor (Act_Action_t NextAction,const char *Anchor) { Gbl.Form.Num++; // Initialized to -1. The first time it is incremented, it will be equal to 0 snprintf (Gbl.Form.UniqueId,sizeof (Gbl.Form.UniqueId),"form_%s_%d", Gbl.UniqueNameEncrypted,Gbl.Form.Num); - Frm_StartFormInternal (NextAction,true,Gbl.Form.UniqueId,Anchor,NULL); // Do put now parameter location (if no open session) + Frm_BeginFormInternal (NextAction,true,Gbl.Form.UniqueId,Anchor,NULL); // Do put now parameter location (if no open session) } -void Frm_StartFormUniqueAnchorOnSubmit (Act_Action_t NextAction,const char *Anchor,const char *OnSubmit) +void Frm_BeginFormUniqueAnchorOnSubmit (Act_Action_t NextAction,const char *Anchor,const char *OnSubmit) { Gbl.Form.Num++; // Initialized to -1. The first time it is incremented, it will be equal to 0 snprintf (Gbl.Form.UniqueId,sizeof (Gbl.Form.UniqueId),"form_%s_%d", Gbl.UniqueNameEncrypted,Gbl.Form.Num); - Frm_StartFormInternal (NextAction,true,Gbl.Form.UniqueId,Anchor,OnSubmit); // Do put now parameter location (if no open session) + Frm_BeginFormInternal (NextAction,true,Gbl.Form.UniqueId,Anchor,OnSubmit); // Do put now parameter location (if no open session) } -void Frm_StartFormId (Act_Action_t NextAction,const char *Id) +void Frm_BeginFormId (Act_Action_t NextAction,const char *Id) { Gbl.Form.Num++; // Initialized to -1. The first time it is incremented, it will be equal to 0 - Frm_StartFormInternal (NextAction,true,Id,NULL,NULL); // Do put now parameter location (if no open session) + Frm_BeginFormInternal (NextAction,true,Id,NULL,NULL); // Do put now parameter location (if no open session) } // Id can not be NULL -static void Frm_StartFormInternal (Act_Action_t NextAction,bool PutParameterLocationIfNoSesion, +static void Frm_BeginFormInternal (Act_Action_t NextAction,bool PutParameterLocationIfNoSesion, const char *Id,const char *Anchor,const char *OnSubmit) { extern const char *Lan_STR_LANG_ID[1 + Lan_NUM_LANGUAGES]; @@ -158,7 +158,7 @@ static void Frm_StartFormInternal (Act_Action_t NextAction,bool PutParameterLoca ==> we use the value property of input fields to build the parameters sent using XMLHttp.send ==> ==> the value property is always codified in UTF-8 ==> accept-charset is irrelevant */ -void Frm_StartFormNoAction (void) +void Frm_BeginFormNoAction (void) { if (!Gbl.Form.Inside) { diff --git a/swad_form.h b/swad_form.h index 27a0f4d7..269238fe 100644 --- a/swad_form.h +++ b/swad_form.h @@ -50,16 +50,16 @@ /***************************** Public prototypes *****************************/ /*****************************************************************************/ -void Frm_StartFormGoTo (Act_Action_t NextAction); -void Frm_StartForm (Act_Action_t NextAction); -void Frm_StartFormOnSubmit (Act_Action_t NextAction,const char *OnSubmit); -void Frm_StartFormAnchorOnSubmit (Act_Action_t NextAction,const char *Anchor,const char *OnSubmit); -void Frm_StartFormUnique (Act_Action_t NextAction); +void Frm_BeginFormGoTo (Act_Action_t NextAction); +void Frm_BeginForm (Act_Action_t NextAction); +void Frm_BeginFormOnSubmit (Act_Action_t NextAction,const char *OnSubmit); +void Frm_BeginFormAnchorOnSubmit (Act_Action_t NextAction,const char *Anchor,const char *OnSubmit); +void Frm_BeginFormUnique (Act_Action_t NextAction); void Frm_StartFormAnchor (Act_Action_t NextAction,const char *Anchor); -void Frm_StartFormUniqueAnchor (Act_Action_t NextAction,const char *Anchor); -void Frm_StartFormUniqueAnchorOnSubmit (Act_Action_t NextAction,const char *Anchor,const char *OnSubmit); -void Frm_StartFormId (Act_Action_t NextAction,const char *Id); -void Frm_StartFormNoAction (void); +void Frm_BeginFormUniqueAnchor (Act_Action_t NextAction,const char *Anchor); +void Frm_BeginFormUniqueAnchorOnSubmit (Act_Action_t NextAction,const char *Anchor,const char *OnSubmit); +void Frm_BeginFormId (Act_Action_t NextAction,const char *Id); +void Frm_BeginFormNoAction (void); void Frm_SetParamsForm (char ParamsStr[Frm_MAX_BYTES_PARAMS_STR],Act_Action_t NextAction, bool PutParameterLocationIfNoSesion); void Frm_EndForm (void); diff --git a/swad_forum.c b/swad_forum.c index f87ff1bd..f15effbe 100644 --- a/swad_forum.c +++ b/swad_forum.c @@ -1764,7 +1764,7 @@ static void For_PutFormWhichForums (const struct For_Forums *Forums) /***** Form to select which forums I want to see: - all my forums - only the forums of current institution/degree/course *****/ - Frm_StartForm (ActSeeFor); + Frm_BeginForm (ActSeeFor); Dat_PutHiddenParamOrder (Forums->ThreadsOrder); HTM_DIV_Begin ("class=\"SEL_BELOW_TITLE\""); HTM_UL_Begin (NULL); diff --git a/swad_game.c b/swad_game.c index 35a8a651..8e620c53 100644 --- a/swad_game.c +++ b/swad_game.c @@ -287,7 +287,7 @@ static void Gam_ListAllGames (struct Gam_Games *Games) HTM_TH_Begin (1,1,"LM"); /* Form to change order */ - Frm_StartForm (ActSeeAllGam); + Frm_BeginForm (ActSeeAllGam); Pag_PutHiddenParamPagNum (Pag_GAMES,Games->CurrentPage); Par_PutHiddenParamUnsigned (NULL,"Order",(unsigned) Order); HTM_BUTTON_SUBMIT_Begin (Txt_GAMES_ORDER_HELP[Order],"BT_LINK TIT_TBL",NULL); @@ -432,7 +432,7 @@ static void Gam_PutButtonToCreateNewGame (struct Gam_Games *Games) { extern const char *Txt_New_game; - Frm_StartForm (ActFrmNewGam); + Frm_BeginForm (ActFrmNewGam); Gam_PutParamsToCreateNewGame (Games); Btn_PutConfirmButton (Txt_New_game); Frm_EndForm (); @@ -607,7 +607,7 @@ static void Gam_ShowOneGame (struct Gam_Games *Games, /* Game title */ Games->GamCod = Game->GamCod; HTM_ARTICLE_Begin (Anchor); - Frm_StartForm (ActSeeGam); + Frm_BeginForm (ActSeeGam); Gam_PutParams (Games); HTM_BUTTON_SUBMIT_Begin (Txt_View_game, Game->Hidden ? "BT_LINK LT ASG_TITLE_LIGHT": @@ -638,7 +638,7 @@ static void Gam_ShowOneGame (struct Gam_Games *Games, HTM_TD_Begin ("class=\"RT COLOR%u\"",Gbl.RowEvenOdd); Games->GamCod = Game->GamCod; - Frm_StartForm (ActSeeGam); + Frm_BeginForm (ActSeeGam); Gam_PutParams (Games); HTM_BUTTON_SUBMIT_Begin (Txt_Matches, Game->Hidden ? "BT_LINK LT ASG_TITLE_LIGHT" : @@ -1464,7 +1464,7 @@ static void Gam_PutFormsEditionGame (struct Gam_Games *Games, /***** Begin form *****/ Games->GamCod = Game->GamCod; - Frm_StartForm (ItsANewGame ? ActNewGam : + Frm_BeginForm (ItsANewGame ? ActNewGam : ActChgGam); Gam_PutParams (Games); @@ -2201,7 +2201,7 @@ static void Gam_PutButtonToAddNewQuestions (struct Gam_Games *Games) { extern const char *Txt_Add_questions; - Frm_StartForm (ActAddOneGamQst); + Frm_BeginForm (ActAddOneGamQst); Gam_PutParams (Games); Btn_PutConfirmButton (Txt_Add_questions); Frm_EndForm (); diff --git a/swad_group.c b/swad_group.c index ea72993c..e41cb3ed 100644 --- a/swad_group.c +++ b/swad_group.c @@ -1845,7 +1845,7 @@ void Grp_ShowLstGrpsToChgMyGrps (void) { /***** Begin form *****/ if (PutFormToChangeGrps) - Frm_StartForm (ActChgGrp); + Frm_BeginForm (ActChgGrp); /***** List the groups the user belongs to for change *****/ HTM_TABLE_BeginWidePadding (2); @@ -1877,7 +1877,7 @@ void Grp_ShowLstGrpsToChgMyGrps (void) /***** Button to create group *****/ if (ICanEdit) { - Frm_StartForm (ActReqEdiGrp); + Frm_BeginForm (ActReqEdiGrp); Btn_PutConfirmButton (Txt_Create_group); Frm_EndForm (); } @@ -3989,7 +3989,7 @@ static void Grp_AskConfirmRemGrpTypWithGrps (unsigned NumGrps) /***** Get data of the group type from database *****/ Grp_GetDataOfGroupTypeByCod (&Gbl.Crs.Grps.GrpTyp); - /***** Start section to edit group types *****/ + /***** Begin section to edit group types *****/ Grp_ReqEditGroupsInternal0 (); /***** Show question and button to remove type of group *****/ @@ -5003,7 +5003,7 @@ void Grp_ShowFormToSelWhichGrps (Act_Action_t Action, HTM_DIV_Begin ("class=\"%s\"", WhichGrps == Gbl.Crs.Grps.WhichGrps ? "PREF_ON" : "PREF_OFF"); - Frm_StartForm (Action); + Frm_BeginForm (Action); Par_PutHiddenParamUnsigned (NULL,"WhichGrps",(unsigned) WhichGrps); if (FuncParams) // Extra parameters depending on the action FuncParams (Args); diff --git a/swad_help.c b/swad_help.c index 6c99c568..2fefe9a7 100644 --- a/swad_help.c +++ b/swad_help.c @@ -271,7 +271,7 @@ static void Hlp_ShowRowHelpWhatWouldYouLikeToDo (const char *Description, /***** Button *****/ HTM_TD_Begin ("class=\"LM\""); - Frm_StartForm (Action); + Frm_BeginForm (Action); Btn_PutButtonInline (Button,TxtButton); Frm_EndForm (); HTM_TD_End (); diff --git a/swad_hierarchy.c b/swad_hierarchy.c index 23730b68..a7f85e93 100644 --- a/swad_hierarchy.c +++ b/swad_hierarchy.c @@ -201,7 +201,7 @@ void Hie_WriteHierarchyInBreadcrumb (void) HTM_DIV_Begin ("class=\"BC %s\"",ClassTxt); HTM_NBSP (); - Frm_StartFormGoTo (ActMnu); + Frm_BeginFormGoTo (ActMnu); Par_PutHiddenParamUnsigned (NULL,"NxtTab",(unsigned) TabSys); HTM_BUTTON_SUBMIT_Begin (Txt_System,ClassLink,NULL); HTM_Txt (Txt_System); @@ -218,7 +218,7 @@ void Hie_WriteHierarchyInBreadcrumb (void) HTM_Txt (" > "); /***** Form to go to see institutions of this country *****/ - Frm_StartFormGoTo (ActSeeIns); + Frm_BeginFormGoTo (ActSeeIns); Cty_PutParamCtyCod (Gbl.Hierarchy.Cty.CtyCod); HTM_BUTTON_SUBMIT_Begin (Gbl.Hierarchy.Cty.Name[Gbl.Prefs.Language],ClassLink,NULL); HTM_Txt (Gbl.Hierarchy.Cty.Name[Gbl.Prefs.Language]); @@ -235,7 +235,7 @@ void Hie_WriteHierarchyInBreadcrumb (void) HTM_Txt (" > "); /***** Form to go to select countries *****/ - Frm_StartFormGoTo (ActSeeCty); + Frm_BeginFormGoTo (ActSeeCty); HTM_BUTTON_SUBMIT_Begin (Txt_Country,ClassLink,NULL); HTM_Txt (Txt_Country); HTM_BUTTON_End (); @@ -252,7 +252,7 @@ void Hie_WriteHierarchyInBreadcrumb (void) HTM_Txt (" > "); /***** Form to see centres of this institution *****/ - Frm_StartFormGoTo (ActSeeCtr); + Frm_BeginFormGoTo (ActSeeCtr); Ins_PutParamInsCod (Gbl.Hierarchy.Ins.InsCod); HTM_BUTTON_SUBMIT_Begin (Gbl.Hierarchy.Ins.FullName,ClassLink,NULL); HTM_Txt (Gbl.Hierarchy.Ins.ShrtName); @@ -269,7 +269,7 @@ void Hie_WriteHierarchyInBreadcrumb (void) HTM_Txt (" > "); /***** Form to go to select institutions *****/ - Frm_StartFormGoTo (ActSeeIns); + Frm_BeginFormGoTo (ActSeeIns); HTM_BUTTON_SUBMIT_Begin (Txt_Institution,ClassLink,NULL); HTM_Txt (Txt_Institution); HTM_BUTTON_End (); @@ -298,7 +298,7 @@ void Hie_WriteHierarchyInBreadcrumb (void) HTM_Txt (" > "); /***** Form to see degrees of this centre *****/ - Frm_StartFormGoTo (ActSeeDeg); + Frm_BeginFormGoTo (ActSeeDeg); Ctr_PutParamCtrCod (Gbl.Hierarchy.Ctr.CtrCod); HTM_BUTTON_SUBMIT_Begin (Gbl.Hierarchy.Ctr.FullName,ClassLink,NULL); HTM_Txt (Gbl.Hierarchy.Ctr.ShrtName); @@ -315,7 +315,7 @@ void Hie_WriteHierarchyInBreadcrumb (void) HTM_Txt (" > "); /***** Form to go to select centres *****/ - Frm_StartFormGoTo (ActSeeCtr); + Frm_BeginFormGoTo (ActSeeCtr); HTM_BUTTON_SUBMIT_Begin (Txt_Centre,ClassLink,NULL); HTM_Txt (Txt_Centre); HTM_BUTTON_End (); @@ -344,7 +344,7 @@ void Hie_WriteHierarchyInBreadcrumb (void) HTM_Txt (" > "); /***** Form to go to see courses of this degree *****/ - Frm_StartFormGoTo (ActSeeCrs); + Frm_BeginFormGoTo (ActSeeCrs); Deg_PutParamDegCod (Gbl.Hierarchy.Deg.DegCod); HTM_BUTTON_SUBMIT_Begin (Gbl.Hierarchy.Deg.FullName,ClassLink,NULL); HTM_Txt (Gbl.Hierarchy.Deg.ShrtName); @@ -361,7 +361,7 @@ void Hie_WriteHierarchyInBreadcrumb (void) HTM_Txt (" > "); /***** Form to go to select degrees *****/ - Frm_StartFormGoTo (ActSeeDeg); + Frm_BeginFormGoTo (ActSeeDeg); HTM_BUTTON_SUBMIT_Begin (Txt_Degree,ClassLink,NULL); HTM_Txt (Txt_Degree); HTM_BUTTON_End (); diff --git a/swad_hierarchy_config.c b/swad_hierarchy_config.c index 883e567d..1a97c2d0 100644 --- a/swad_hierarchy_config.c +++ b/swad_hierarchy_config.c @@ -99,7 +99,7 @@ void HieCfg_FullName (bool PutForm,const char *Label,Act_Action_t NextAction, if (PutForm) { /* Form to change full name */ - Frm_StartForm (NextAction); + Frm_BeginForm (NextAction); HTM_INPUT_TEXT ("FullName",Cns_HIERARCHY_MAX_CHARS_FULL_NAME,FullName, HTM_SUBMIT_ON_CHANGE, "id=\"FullName\" class=\"INPUT_FULL_NAME\"" @@ -135,7 +135,7 @@ void HieCfg_ShrtName (bool PutForm,Act_Action_t NextAction, if (PutForm) { /* Form to change short name */ - Frm_StartForm (NextAction); + Frm_BeginForm (NextAction); HTM_INPUT_TEXT ("ShortName",Cns_HIERARCHY_MAX_CHARS_SHRT_NAME,ShrtName, HTM_SUBMIT_ON_CHANGE, "id=\"ShortName\" class=\"INPUT_SHORT_NAME\"" @@ -171,7 +171,7 @@ void HieCfg_WWW (bool PrintView,bool PutForm,Act_Action_t NextAction, if (PutForm) { /* Form to change web */ - Frm_StartForm (NextAction); + Frm_BeginForm (NextAction); HTM_INPUT_URL ("WWW",WWW,HTM_SUBMIT_ON_CHANGE, "id=\"WWW\" class=\"INPUT_WWW_WIDE\" required=\"required\""); Frm_EndForm (); @@ -250,7 +250,7 @@ void HieCfg_NumCtrs (unsigned NumCtrs,bool PutForm) HTM_TD_Begin ("class=\"LB\""); if (PutForm) { - Frm_StartFormGoTo (ActSeeCtr); + Frm_BeginFormGoTo (ActSeeCtr); Ins_PutParamInsCod (Gbl.Hierarchy.Ins.InsCod); HTM_BUTTON_SUBMIT_Begin (Str_BuildStringStr (Txt_Centres_of_INSTITUTION_X, Gbl.Hierarchy.Ins.ShrtName), diff --git a/swad_holiday.c b/swad_holiday.c index fcbc3d7f..703186fb 100644 --- a/swad_holiday.c +++ b/swad_holiday.c @@ -141,7 +141,7 @@ void Hld_SeeHolidays (void) { HTM_TH_Begin (1,1,"LM"); - Frm_StartForm (ActSeeHld); + Frm_BeginForm (ActSeeHld); Par_PutHiddenParamUnsigned (NULL,"Order",(unsigned) Order); HTM_BUTTON_SUBMIT_Begin (Txt_HOLIDAYS_HELP_ORDER[Order],"BT_LINK TIT_TBL",NULL); if (Order == Holidays.SelectedOrder) @@ -208,7 +208,7 @@ void Hld_SeeHolidays (void) /***** Button to create centre *****/ if (Gbl.Usrs.Me.Role.Logged >= Rol_INS_ADM) // Institution admin or system admin { - Frm_StartForm (ActEdiHld); + Frm_BeginForm (ActEdiHld); Btn_PutConfirmButton (Txt_New_holiday); Frm_EndForm (); } @@ -609,7 +609,7 @@ static void Hld_ListHolidaysForEdition (const struct Hld_Holidays *Holidays, /* Holiday place */ HTM_TD_Begin ("class=\"CM\""); - Frm_StartForm (ActChgHldPlc); + Frm_BeginForm (ActChgHldPlc); Hld_PutParamHldCod (&Hld->HldCod); HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE, "name=\"PlcCod\" class=\"PLC_SEL\""); @@ -627,7 +627,7 @@ static void Hld_ListHolidaysForEdition (const struct Hld_Holidays *Holidays, /* Holiday type */ HTM_TD_Begin ("class=\"CM\""); - Frm_StartForm (ActChgHldTyp); + Frm_BeginForm (ActChgHldTyp); Hld_PutParamHldCod (&Hld->HldCod); HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE, "name=\"HldTyp\" style=\"width:62px;\""); @@ -646,7 +646,7 @@ static void Hld_ListHolidaysForEdition (const struct Hld_Holidays *Holidays, /* Holiday date / Non school period start date */ HTM_TD_Begin ("class=\"CM\""); - Frm_StartForm (ActChgHldStrDat); + Frm_BeginForm (ActChgHldStrDat); Hld_PutParamHldCod (&Hld->HldCod); Dat_WriteFormDate (Gbl.Now.Date.Year - 1, Gbl.Now.Date.Year + 1, @@ -658,7 +658,7 @@ static void Hld_ListHolidaysForEdition (const struct Hld_Holidays *Holidays, /* Non school period end date */ HTM_TD_Begin ("class=\"CM\""); - Frm_StartForm (ActChgHldEndDat); + Frm_BeginForm (ActChgHldEndDat); Hld_PutParamHldCod (&Hld->HldCod); Dat_WriteFormDate (Gbl.Now.Date.Year - 1, Gbl.Now.Date.Year + 1, @@ -670,7 +670,7 @@ static void Hld_ListHolidaysForEdition (const struct Hld_Holidays *Holidays, /* Holiday name */ HTM_TD_Begin ("class=\"CM\""); - Frm_StartForm (ActRenHld); + Frm_BeginForm (ActRenHld); Hld_PutParamHldCod (&Hld->HldCod); HTM_INPUT_TEXT ("Name",Hld_MAX_CHARS_HOLIDAY_NAME,Hld->Name, HTM_SUBMIT_ON_CHANGE, @@ -986,7 +986,7 @@ static void Hld_PutFormToCreateHoliday (const struct Plc_Places *Places) unsigned HolidayTypeUnsigned; /***** Begin form *****/ - Frm_StartForm (ActNewHld); + Frm_BeginForm (ActNewHld); /***** Begin box and table *****/ Box_BoxTableBegin (NULL,Txt_New_holiday, diff --git a/swad_icon.c b/swad_icon.c index 5b8817c9..d694de11 100644 --- a/swad_icon.c +++ b/swad_icon.c @@ -127,7 +127,7 @@ void Ico_PutIconsToSelectIconSet (void) HTM_DIV_Begin ("class=\"%s\"", IconSet == Gbl.Prefs.IconSet ? "PREF_ON" : "PREF_OFF"); - Frm_StartForm (ActChgIco); + Frm_BeginForm (ActChgIco); Par_PutHiddenParamString (NULL,"IconSet",Ico_IconSetId[IconSet]); snprintf (Icon,sizeof (Icon),"%s/%s/cog.svg", Cfg_ICON_FOLDER_SETS, diff --git a/swad_indicator.c b/swad_indicator.c index e89bc533..3c149ce3 100644 --- a/swad_indicator.c +++ b/swad_indicator.c @@ -123,7 +123,7 @@ void Ind_ReqIndicatorsCourses (void) /***** Form to update indicators *****/ /* Begin form and table */ - Frm_StartForm (ActReqStaCrs); + Frm_BeginForm (ActReqStaCrs); HTM_TABLE_BeginWidePadding (2); /* Scope */ @@ -213,7 +213,7 @@ void Ind_ReqIndicatorsCourses (void) Ind_ShowTableOfCoursesWithIndicators (&Indicators,Ind_INDICATORS_BRIEF,NumCrss,mysql_res); /* Button to show more details */ - Frm_StartForm (ActSeeAllStaCrs); + Frm_BeginForm (ActSeeAllStaCrs); Sco_PutParamScope ("ScopeInd",Gbl.Scope.Current); Par_PutHiddenParamLong (NULL,"OthDegTypCod",Indicators.DegTypCod); Par_PutHiddenParamLong (NULL,Dpt_PARAM_DPT_COD_NAME,Indicators.DptCod); diff --git a/swad_info.c b/swad_info.c index 7c550f31..5067cfbb 100644 --- a/swad_info.c +++ b/swad_info.c @@ -442,7 +442,7 @@ static void Inf_PutButtonToEditInfo (void) { extern const char *Txt_Edit; - Frm_StartForm (Inf_ActionsEditInfo[Gbl.Crs.Info.Type]); + Frm_BeginForm (Inf_ActionsEditInfo[Gbl.Crs.Info.Type]); Btn_PutConfirmButton (Txt_Edit); Frm_EndForm (); } @@ -590,7 +590,7 @@ void Inf_WriteMsgYouMustReadInfo (void) if (Gbl.Crs.Info.MustBeRead[InfoType]) { HTM_LI_Begin (NULL); - Frm_StartForm (Inf_ActionsSeeInfo[InfoType]); + Frm_BeginForm (Inf_ActionsSeeInfo[InfoType]); HTM_BUTTON_SUBMIT_Begin (Act_GetTitleAction (Inf_ActionsSeeInfo[InfoType]), The_ClassFormLinkInBox[Gbl.Prefs.Theme],NULL); HTM_Txt (Act_GetTitleAction (Inf_ActionsSeeInfo[InfoType])); @@ -1059,7 +1059,7 @@ void Inf_FormsToSelSendInfo (void) HTM_TD_Begin ("class=\"DAT LT LIGHT_BLUE\""); else HTM_TD_Begin ("class=\"DAT LT\""); - Frm_StartForm (Inf_ActionsSelecInfoSrc[Gbl.Crs.Info.Type]); + Frm_BeginForm (Inf_ActionsSelecInfoSrc[Gbl.Crs.Info.Type]); HTM_INPUT_RADIO ("InfoSrc",InfoSrc != InfoSrcSelected && (InfoSrc == Inf_INFO_SRC_NONE || @@ -1149,7 +1149,7 @@ void Inf_FormToEnterIntegratedEditor (Inf_InfoSrc_t InfoSrc) { extern const char *Txt_Edit; - Frm_StartForm (Inf_ActionsInfo[InfoSrc][Gbl.Crs.Info.Type]); + Frm_BeginForm (Inf_ActionsInfo[InfoSrc][Gbl.Crs.Info.Type]); Btn_PutConfirmButton (Txt_Edit); Frm_EndForm (); } @@ -1162,7 +1162,7 @@ void Inf_FormToEnterPlainTextEditor (Inf_InfoSrc_t InfoSrc) { extern const char *Txt_Edit_plain_text; - Frm_StartForm (Inf_ActionsInfo[InfoSrc][Gbl.Crs.Info.Type]); + Frm_BeginForm (Inf_ActionsInfo[InfoSrc][Gbl.Crs.Info.Type]); Btn_PutConfirmButton (Txt_Edit_plain_text); Frm_EndForm (); } @@ -1175,7 +1175,7 @@ void Inf_FormToEnterRichTextEditor (Inf_InfoSrc_t InfoSrc) { extern const char *Txt_Edit_rich_text; - Frm_StartForm (Inf_ActionsInfo[InfoSrc][Gbl.Crs.Info.Type]); + Frm_BeginForm (Inf_ActionsInfo[InfoSrc][Gbl.Crs.Info.Type]); Btn_PutConfirmButton (Txt_Edit_rich_text); Frm_EndForm (); } @@ -1191,7 +1191,7 @@ void Inf_FormToSendPage (Inf_InfoSrc_t InfoSrc) extern const char *Txt_Upload_file; /***** Begin form *****/ - Frm_StartForm (Inf_ActionsInfo[InfoSrc][Gbl.Crs.Info.Type]); + Frm_BeginForm (Inf_ActionsInfo[InfoSrc][Gbl.Crs.Info.Type]); /***** File *****/ HTM_DIV_Begin ("class=\"CM\""); @@ -1226,7 +1226,7 @@ void Inf_FormToSendURL (Inf_InfoSrc_t InfoSrc) Inf_BuildPathURL (Gbl.Hierarchy.Crs.CrsCod,Gbl.Crs.Info.Type,PathFile); /***** Begin form *****/ - Frm_StartForm (Inf_ActionsInfo[InfoSrc][Gbl.Crs.Info.Type]); + Frm_BeginForm (Inf_ActionsInfo[InfoSrc][Gbl.Crs.Info.Type]); /***** Link *****/ if ((FileURL = fopen (PathFile,"rb")) != NULL) @@ -1937,7 +1937,7 @@ void Inf_EditPlainTxtInfo (void) Inf_AsignInfoType (&Gbl.Crs.Info,&Syllabus); /***** Begin form and box *****/ - Frm_StartForm (Inf_ActionsRcvPlaTxtInfo[Gbl.Crs.Info.Type]); + Frm_BeginForm (Inf_ActionsRcvPlaTxtInfo[Gbl.Crs.Info.Type]); Box_BoxBegin (NULL,Txt_INFO_TITLE[Gbl.Crs.Info.Type], NULL,NULL, HelpEdit[Gbl.Crs.Info.Type],Box_NOT_CLOSABLE); @@ -1992,7 +1992,7 @@ void Inf_EditRichTxtInfo (void) Inf_AsignInfoType (&Gbl.Crs.Info,&Syllabus); /***** Begin form and box *****/ - Frm_StartForm (Inf_ActionsRcvRchTxtInfo[Gbl.Crs.Info.Type]); + Frm_BeginForm (Inf_ActionsRcvRchTxtInfo[Gbl.Crs.Info.Type]); Box_BoxBegin (NULL,Txt_INFO_TITLE[Gbl.Crs.Info.Type], NULL,NULL, HelpEdit[Gbl.Crs.Info.Type],Box_NOT_CLOSABLE); diff --git a/swad_institution.c b/swad_institution.c index f97e42a1..d0e5e08a 100644 --- a/swad_institution.c +++ b/swad_institution.c @@ -227,7 +227,7 @@ void Ins_DrawInstitutionLogoWithLink (struct Ins_Instit *Ins,unsigned Size) if (PutLink) { - Frm_StartForm (ActSeeInsInf); + Frm_BeginForm (ActSeeInsInf); Ins_PutParamInsCod (Ins->InsCod); HTM_BUTTON_SUBMIT_Begin (Ins->FullName,"BT_LINK",NULL); } @@ -248,7 +248,7 @@ void Ins_DrawInstitutionLogoAndNameWithLink (struct Ins_Instit *Ins,Act_Action_t const char *ClassLink,const char *ClassLogo) { /***** Begin form *****/ - Frm_StartFormGoTo (Action); + Frm_BeginFormGoTo (Action); Ins_PutParamInsCod (Ins->InsCod); /***** Link to action *****/ @@ -335,7 +335,7 @@ static void Ins_ListInstitutions (void) /***** Button to create institution *****/ if (Ins_CheckIfICanCreateInstitutions ()) { - Frm_StartForm (ActEdiIns); + Frm_BeginForm (ActEdiIns); Btn_PutConfirmButton (Gbl.Hierarchy.Inss.Num ? Txt_Create_another_institution : Txt_Create_institution); Frm_EndForm (); @@ -495,7 +495,7 @@ static void Ins_PutHeadInstitutionsForSeeing (bool OrderSelectable) HTM_TH_Begin (1,1,ClassTH[Order]); if (OrderSelectable) { - Frm_StartForm (ActSeeIns); + Frm_BeginForm (ActSeeIns); Par_PutHiddenParamUnsigned (NULL,"Order",(unsigned) Order); HTM_BUTTON_SUBMIT_Begin (Txt_INSTITUTIONS_HELP_ORDER[Order],ClassButton[Order],NULL); if (Order == Gbl.Hierarchy.Inss.SelectedOrder) @@ -1010,7 +1010,7 @@ void Ins_WriteSelectorOfInstitution (void) long InsCod; /***** Begin form *****/ - Frm_StartFormGoTo (ActSeeCtr); + Frm_BeginFormGoTo (ActSeeCtr); if (Gbl.Hierarchy.Cty.CtyCod > 0) HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE, "id=\"ins\" name=\"ins\" class=\"HIE_SEL\""); @@ -1130,7 +1130,7 @@ static void Ins_ListInstitutionsForEdition (void) HTM_TD_Begin ("class=\"DAT LM\""); if (ICanEdit) { - Frm_StartForm (ActRenInsSho); + Frm_BeginForm (ActRenInsSho); Ins_PutParamOtherInsCod (&Ins->InsCod); HTM_INPUT_TEXT ("ShortName",Cns_HIERARCHY_MAX_CHARS_SHRT_NAME,Ins->ShrtName, HTM_SUBMIT_ON_CHANGE, @@ -1145,7 +1145,7 @@ static void Ins_ListInstitutionsForEdition (void) HTM_TD_Begin ("class=\"DAT LM\""); if (ICanEdit) { - Frm_StartForm (ActRenInsFul); + Frm_BeginForm (ActRenInsFul); Ins_PutParamOtherInsCod (&Ins->InsCod); HTM_INPUT_TEXT ("FullName",Cns_HIERARCHY_MAX_CHARS_FULL_NAME,Ins->FullName, HTM_SUBMIT_ON_CHANGE, @@ -1160,7 +1160,7 @@ static void Ins_ListInstitutionsForEdition (void) HTM_TD_Begin ("class=\"DAT LM\""); if (ICanEdit) { - Frm_StartForm (ActChgInsWWW); + Frm_BeginForm (ActChgInsWWW); Ins_PutParamOtherInsCod (&Ins->InsCod); HTM_INPUT_URL ("WWW",Ins->WWW,HTM_SUBMIT_ON_CHANGE, "class=\"INPUT_WWW_NARROW\" required=\"required\""); @@ -1206,7 +1206,7 @@ static void Ins_ListInstitutionsForEdition (void) if (Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM && StatusTxt == Ins_STATUS_PENDING) { - Frm_StartForm (ActChgInsSta); + Frm_BeginForm (ActChgInsSta); Ins_PutParamOtherInsCod (&Ins->InsCod); HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE, "name=\"Status\" class=\"INPUT_STATUS\""); @@ -1695,9 +1695,9 @@ static void Ins_PutFormToCreateInstitution (void) /***** Begin form *****/ if (Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM) - Frm_StartForm (ActNewIns); + Frm_BeginForm (ActNewIns); else if (Gbl.Usrs.Me.Role.Max >= Rol_GST) - Frm_StartForm (ActReqIns); + Frm_BeginForm (ActReqIns); else Lay_NoPermissionExit (); diff --git a/swad_institution_config.c b/swad_institution_config.c index e5e66342..344a6f08 100644 --- a/swad_institution_config.c +++ b/swad_institution_config.c @@ -368,7 +368,7 @@ static void InsCfg_Country (bool PrintView,bool PutForm) Cty_GetBasicListOfCountries (); /* Put form to select country */ - Frm_StartForm (ActChgInsCtyCfg); + Frm_BeginForm (ActChgInsCtyCfg); HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE, "id=\"OthCtyCod\" name=\"OthCtyCod\"" " class=\"INPUT_SHORT_NAME\""); @@ -388,7 +388,7 @@ static void InsCfg_Country (bool PrintView,bool PutForm) { if (!PrintView) { - Frm_StartFormGoTo (ActSeeCtyInf); + Frm_BeginFormGoTo (ActSeeCtyInf); Cty_PutParamCtyCod (Gbl.Hierarchy.Cty.CtyCod); HTM_BUTTON_SUBMIT_Begin (Hie_BuildGoToMsg (Gbl.Hierarchy.Cty.Name[Gbl.Prefs.Language]), "BT_LINK LT DAT",NULL); diff --git a/swad_language.c b/swad_language.c index cca54ee2..3d3abe68 100644 --- a/swad_language.c +++ b/swad_language.c @@ -118,7 +118,7 @@ void Lan_PutSelectorToSelectLanguage (void) Lan_Language_t Lan; unsigned LanUnsigned; - Frm_StartForm (ActReqChgLan); + Frm_BeginForm (ActReqChgLan); HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE, "name=\"Lan\" style=\"width:112px; margin:0;\""); for (Lan = (Lan_Language_t) 1; diff --git a/swad_layout.c b/swad_layout.c index b801b495..b4f8a0c0 100644 --- a/swad_layout.c +++ b/swad_layout.c @@ -1015,7 +1015,7 @@ static void Lay_WritePageTopHeading (void) HTM_DIV_Begin ("id=\"head_row_1_left\""); /* Begin form to go to home page */ - Frm_StartFormGoTo (ActMnu); + Frm_BeginFormGoTo (ActMnu); Par_PutHiddenParamUnsigned (NULL,"NxtTab",(unsigned) TabSys); HTM_DIV_Begin ("id=\"head_row_1_logo_small\""); @@ -1346,11 +1346,11 @@ void Lay_PutContextualCheckbox (Act_Action_t NextAction, // jumping to the next line on narrow screens /***** Begin form *****/ - Frm_StartForm (NextAction); + Frm_BeginForm (NextAction); if (FuncParams) FuncParams (); - /***** Start container and label *****/ + /***** Begin container and label *****/ HTM_DIV_Begin ("class=\"CONTEXT_OPT %s %s\" title=\"%s\"", Checked ? "CHECKBOX_CHECKED" : "CHECKBOX_UNCHECKED", diff --git a/swad_link.c b/swad_link.c index f2b18d13..9e3ab8a7 100644 --- a/swad_link.c +++ b/swad_link.c @@ -113,7 +113,7 @@ void Lnk_SeeLinks (void) /***** Button to create link *****/ if (Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM) { - Frm_StartForm (ActEdiLnk); + Frm_BeginForm (ActEdiLnk); Btn_PutConfirmButton (Txt_New_link); Frm_EndForm (); } @@ -165,7 +165,7 @@ void Lnk_WriteMenuWithInstitutionalLinks (void) { HTM_DIV_Begin ("id=\"institutional_links\""); - Frm_StartForm (ActSeeLnk); + Frm_BeginForm (ActSeeLnk); HTM_BUTTON_SUBMIT_Begin (Txt_Links,"BT_LINK LINK_TITLE",NULL); HTM_TxtF ("%s",Txt_Links); HTM_BUTTON_End (); @@ -427,7 +427,7 @@ static void Lnk_ListLinksForEdition (void) /* Link short name */ HTM_TD_Begin ("class=\"CM\""); - Frm_StartForm (ActRenLnkSho); + Frm_BeginForm (ActRenLnkSho); Lnk_PutParamLnkCod (&Lnk->LnkCod); HTM_INPUT_TEXT ("ShortName",Lnk_MAX_CHARS_LINK_SHRT_NAME,Lnk->ShrtName, HTM_SUBMIT_ON_CHANGE, @@ -437,7 +437,7 @@ static void Lnk_ListLinksForEdition (void) /* Link full name */ HTM_TD_Begin ("class=\"CM\""); - Frm_StartForm (ActRenLnkFul); + Frm_BeginForm (ActRenLnkFul); Lnk_PutParamLnkCod (&Lnk->LnkCod); HTM_INPUT_TEXT ("FullName",Lnk_MAX_CHARS_LINK_FULL_NAME,Lnk->FullName, HTM_SUBMIT_ON_CHANGE, @@ -447,7 +447,7 @@ static void Lnk_ListLinksForEdition (void) /* Link WWW */ HTM_TD_Begin ("class=\"CM\""); - Frm_StartForm (ActChgLnkWWW); + Frm_BeginForm (ActChgLnkWWW); Lnk_PutParamLnkCod (&Lnk->LnkCod); HTM_INPUT_URL ("WWW",Lnk->WWW,HTM_SUBMIT_ON_CHANGE, "class=\"INPUT_WWW_NARROW\" required=\"required\""); @@ -709,7 +709,7 @@ static void Lnk_PutFormToCreateLink (void) extern const char *Txt_Create_link; /***** Begin form *****/ - Frm_StartForm (ActNewLnk); + Frm_BeginForm (ActNewLnk); /***** Begin box and table *****/ Box_BoxTableBegin (NULL,Txt_New_link, diff --git a/swad_logo.c b/swad_logo.c index 50329571..58705f18 100644 --- a/swad_logo.c +++ b/swad_logo.c @@ -301,7 +301,7 @@ void Lgo_RequestLogo (Hie_Lvl_Level_t Scope) NULL,Box_NOT_CLOSABLE); /***** Begin form to upload logo *****/ - Frm_StartForm (ActionRec); + Frm_BeginForm (ActionRec); /***** Write help message *****/ Ale_ShowAlert (Ale_INFO,Txt_You_can_send_a_file_with_an_image_in_PNG_format_transparent_background_and_size_X_Y, diff --git a/swad_mail.c b/swad_mail.c index 81cc25ce..196905e9 100644 --- a/swad_mail.c +++ b/swad_mail.c @@ -144,7 +144,7 @@ void Mai_SeeMailDomains (void) { HTM_TH_Begin (1,1,"LM"); - Frm_StartForm (ActSeeMai); + Frm_BeginForm (ActSeeMai); Par_PutHiddenParamUnsigned (NULL,"Order",(unsigned) Order); HTM_BUTTON_SUBMIT_Begin (Txt_EMAIL_DOMAIN_HELP_ORDER[Order],"BT_LINK TIT_TBL",NULL); if (Order == Gbl.Mails.SelectedOrder) @@ -505,7 +505,7 @@ static void Mai_ListMailDomainsForEdition (void) /* Mail domain */ HTM_TD_Begin ("class=\"CM\""); - Frm_StartForm (ActRenMaiSho); + Frm_BeginForm (ActRenMaiSho); Mai_PutParamMaiCod (&Mai->MaiCod); HTM_INPUT_TEXT ("Domain",Cns_MAX_CHARS_EMAIL_ADDRESS,Mai->Domain, HTM_SUBMIT_ON_CHANGE, @@ -515,7 +515,7 @@ static void Mai_ListMailDomainsForEdition (void) /* Mail domain info */ HTM_TD_Begin ("class=\"CM\""); - Frm_StartForm (ActRenMaiFul); + Frm_BeginForm (ActRenMaiFul); Mai_PutParamMaiCod (&Mai->MaiCod); HTM_INPUT_TEXT ("Info",Mai_MAX_CHARS_MAIL_INFO,Mai->Info, HTM_SUBMIT_ON_CHANGE, @@ -741,7 +741,7 @@ static void Mai_PutFormToCreateMailDomain (void) extern const char *Txt_Create_email_domain; /***** Begin form *****/ - Frm_StartForm (ActNewMai); + Frm_BeginForm (ActNewMai); /***** Begin box and table *****/ Box_BoxTableBegin (NULL,Txt_New_email_domain, @@ -1154,7 +1154,7 @@ void Mai_ShowFormChangeMyEmail (bool IMustFillInEmail,bool IShouldConfirmEmail) extern const char *Txt_Email; char StrRecordWidth[Cns_MAX_DECIMAL_DIGITS_UINT + 2 + 1]; - /***** Start section *****/ + /***** Begin section *****/ HTM_SECTION_Begin (Mai_EMAIL_SECTION_ID); /***** Begin box *****/ @@ -1185,7 +1185,7 @@ void Mai_ShowFormChangeOtherUsrEmail (void) extern const char *Txt_Email; char StrRecordWidth[Cns_MAX_DECIMAL_DIGITS_UINT + 2 + 1]; - /***** Start section *****/ + /***** Begin section *****/ HTM_SECTION_Begin (Mai_EMAIL_SECTION_ID); /***** Begin box *****/ diff --git a/swad_mark.c b/swad_mark.c index 9f71a449..e3fd1f30 100644 --- a/swad_mark.c +++ b/swad_mark.c @@ -125,7 +125,7 @@ void Mrk_GetAndWriteNumRowsHeaderAndFooter (void) HTM_TD_Begin ("class=\"%s RT COLOR%u\"", The_ClassFormInBoxNoWrap[Gbl.Prefs.Theme], Gbl.RowEvenOdd); - Frm_StartForm (Gbl.Crs.Grps.GrpCod > 0 ? ActChgNumRowHeaGrp : // Group zone + Frm_BeginForm (Gbl.Crs.Grps.GrpCod > 0 ? ActChgNumRowHeaGrp : // Group zone ActChgNumRowHeaCrs); // Course zone Brw_PutImplicitParamsFileBrowser (&Gbl.FileBrowser.FilFolLnk); HTM_LABEL_Begin (NULL); @@ -143,7 +143,7 @@ void Mrk_GetAndWriteNumRowsHeaderAndFooter (void) HTM_TD_Begin ("class=\"%s RT COLOR%u\"", The_ClassFormInBoxNoWrap[Gbl.Prefs.Theme], Gbl.RowEvenOdd); - Frm_StartForm (Gbl.Crs.Grps.GrpCod > 0 ? ActChgNumRowFooGrp : // Group zone + Frm_BeginForm (Gbl.Crs.Grps.GrpCod > 0 ? ActChgNumRowFooGrp : // Group zone ActChgNumRowFooCrs); // Course zone Brw_PutImplicitParamsFileBrowser (&Gbl.FileBrowser.FilFolLnk); HTM_LABEL_Begin (NULL); diff --git a/swad_match.c b/swad_match.c index 282741a8..09b0b467 100644 --- a/swad_match.c +++ b/swad_match.c @@ -731,7 +731,7 @@ static void Mch_ListOneOrMoreMatchesTitleGrps (const struct Mch_Match *Match, HTM_ARTICLE_Begin (Anchor); /***** Match title *****/ - Frm_StartForm (Gbl.Usrs.Me.Role.Logged == Rol_STD ? ActJoiMch : + Frm_BeginForm (Gbl.Usrs.Me.Role.Logged == Rol_STD ? ActJoiMch : ActResMch); Mch_PutParamMchCod (Match->MchCod); HTM_BUTTON_SUBMIT_Begin (Gbl.Usrs.Me.Role.Logged == Rol_STD ? Txt_Play : @@ -1484,11 +1484,11 @@ static void Mch_PutFormNewMatch (const struct Gam_Game *Game) extern const char *Txt_Title; extern const char *Txt_Play; - /***** Start section for a new match *****/ + /***** Begin section for a new match *****/ HTM_SECTION_Begin (Mch_NEW_MATCH_SECTION_ID); /***** Begin form *****/ - Frm_StartForm (ActNewMch); + Frm_BeginForm (ActNewMch); Gam_PutParamGameCod (Game->GamCod); Gam_PutParamQstInd (0); // Start by first question in game @@ -2738,7 +2738,7 @@ static void Mch_PutCountdownAndHourglassIcon (struct Mch_Match *Match) static void Mch_PutFormsCountdown (struct Mch_Match *Match) { - /***** Start container *****/ + /***** Begin container *****/ HTM_DIV_Begin ("class=\"MCH_SHOW_HOURGLASS\""); /***** Put forms to start countdown *****/ @@ -2770,7 +2770,7 @@ static void Mch_PutFormCountdown (struct Mch_Match *Match,long Seconds,const cha Act_GetActCod (ActMchCntDwn),Gbl.Session.Id, Match->MchCod,Seconds) < 0) Lay_NotEnoughMemoryExit (); - Frm_StartFormOnSubmit (ActUnk,OnSubmit); + Frm_BeginFormOnSubmit (ActUnk,OnSubmit); } /***** Put icon *****/ @@ -3043,7 +3043,7 @@ static void Mch_ShowFormColumns (const struct Mch_Match *Match) "MCH_NUM_COL_OFF"); /* Begin form */ - Frm_StartForm (ActChgNumColMch); + Frm_BeginForm (ActChgNumColMch); Mch_PutParamMchCod (Match->MchCod); // Current match being played Mch_PutParamNumCols (NumCols); // Number of columns @@ -3086,7 +3086,7 @@ static void Mch_PutCheckboxResult (const struct Mch_Match *Match) HTM_DIV_Begin ("class=\"MCH_SHOW_RESULTS\""); /***** Begin form *****/ - Frm_StartForm (ActChgVisResMchQst); + Frm_BeginForm (ActChgVisResMchQst); Mch_PutParamMchCod (Match->MchCod); // Current match being played /***** Put icon with link *****/ @@ -3114,7 +3114,7 @@ static void Mch_PutIfAnswered (const struct Mch_Match *Match,bool Answered) extern const char *Txt_MATCH_QUESTION_Answered; extern const char *Txt_MATCH_QUESTION_Unanswered; - /***** Start container *****/ + /***** Begin container *****/ HTM_DIV_Begin ("class=\"MCH_SHOW_ANSWERED\""); /***** Put icon with link *****/ @@ -3123,7 +3123,7 @@ static void Mch_PutIfAnswered (const struct Mch_Match *Match,bool Answered) Answered) // I have answered this question { /* Begin form */ - Frm_StartForm (ActSeeMchAnsQstStd); + Frm_BeginForm (ActSeeMchAnsQstStd); Mch_PutParamMchCod (Match->MchCod); // Current match being played HTM_BUTTON_OnMouseDown_Begin (Txt_View_my_answer,"BT_LINK DAT_SMALL_GREEN"); @@ -3164,7 +3164,7 @@ static void Mch_PutIconToRemoveMyAnswer (const struct Mch_Match *Match) HTM_DIV_Begin ("class=\"MCH_REM_MY_ANS\""); /***** Begin form *****/ - Frm_StartForm (ActRemMchAnsQstStd); + Frm_BeginForm (ActRemMchAnsQstStd); Mch_PutParamMchCod (Match->MchCod); // Current match being played Gam_PutParamQstInd (Match->Status.QstInd); // Current question index shown @@ -3420,7 +3420,7 @@ static bool Mch_ShowQuestionAndAnswersStd (const struct Mch_Match *Match, Sumitting onmousedown instead of default onclick is necessary in order to be fast and not lose clicks due to refresh */ - Frm_StartForm (ActAnsMchQstStd); + Frm_BeginForm (ActAnsMchQstStd); Mch_PutParamMchCod (Match->MchCod); // Current match being played Gam_PutParamQstInd (Match->Status.QstInd); // Current question index shown Mch_PutParamNumOpt (NumOpt); // Number of button @@ -3712,7 +3712,7 @@ static void Mch_PutBigButton (Act_Action_t NextAction,const char *Id, long MchCod,const char *Icon,const char *Txt) { /***** Begin form *****/ - Frm_StartFormId (NextAction,Id); + Frm_BeginFormId (NextAction,Id); Mch_PutParamMchCod (MchCod); /***** Put icon with link *****/ @@ -4383,7 +4383,7 @@ void Mch_DrawBarNumUsrs (unsigned NumRespondersAns,unsigned NumRespondersQst,boo unsigned i; unsigned BarWidth = 0; - /***** Start container *****/ + /***** Begin container *****/ HTM_DIV_Begin ("class=\"MCH_RESULT\""); /***** Draw bar with a with proportional to the number of clicks *****/ diff --git a/swad_match_result.c b/swad_match_result.c index 73a749b0..648fc2a2 100644 --- a/swad_match_result.c +++ b/swad_match_result.c @@ -1011,11 +1011,11 @@ static void MchRes_ShowMchResults (struct Gam_Games *Games, switch (MeOrOther) { case Usr_ME: - Frm_StartForm (ActSeeOneMchResMe); + Frm_BeginForm (ActSeeOneMchResMe); Mch_PutParamsEdit (Games); break; case Usr_OTHER: - Frm_StartForm (ActSeeOneMchResOth); + Frm_BeginForm (ActSeeOneMchResOth); Mch_PutParamsEdit (Games); Usr_PutParamOtherUsrCodEncrypted (Gbl.Usrs.Other.UsrDat.EnUsrCod); break; diff --git a/swad_media.c b/swad_media.c index 59895970..7e32feb8 100644 --- a/swad_media.c +++ b/swad_media.c @@ -1777,7 +1777,7 @@ static void Med_AlertThirdPartyCookies (void) extern const char *Txt_Settings; /***** Alert to inform about third party cookies *****/ - /* Start alert */ + /* Begin alert */ Ale_ShowAlertAndButton1 (Ale_INFO,Txt_To_watch_multimedia_content_from_another_website_you_have_to_accept_third_party_cookies_in_your_personal_settings); /* Put form to change cookies preferences */ diff --git a/swad_menu.c b/swad_menu.c index 95fd027a..63ad3144 100644 --- a/swad_menu.c +++ b/swad_menu.c @@ -237,7 +237,7 @@ void Mnu_WriteMenuThisTab (void) HTM_LI_Begin ("class=\"MENU_LIST_ITEM\""); /***** Begin form and link *****/ - Frm_StartForm (NumAct); + Frm_BeginForm (NumAct); HTM_BUTTON_SUBMIT_Begin (Title, IsTheSelectedAction ? "BT_LINK MENU_OPT_ON" : "BT_LINK MENU_OPT_OFF", @@ -288,7 +288,7 @@ void Mnu_PutIconsToSelectMenu (void) { HTM_DIV_Begin ("class=\"%s\"",Menu == Gbl.Prefs.Menu ? "PREF_ON" : "PREF_OFF"); - Frm_StartForm (ActChgMnu); + Frm_BeginForm (ActChgMnu); Par_PutHiddenParamUnsigned (NULL,"Menu",(unsigned) Menu); Ico_PutSettingIconLink (Mnu_MenuIcons[Menu],Txt_MENU_NAMES[Menu]); Frm_EndForm (); diff --git a/swad_message.c b/swad_message.c index d4571a35..c5e89d8a 100644 --- a/swad_message.c +++ b/swad_message.c @@ -307,7 +307,7 @@ static void Msg_PutFormMsgUsrs (struct Msg_Messages *Messages, Grp_ShowFormToSelectSeveralGroups (Msg_PutParamsWriteMsg,Messages, Grp_MY_GROUPS); - /***** Start section with user list *****/ + /***** Begin section with user list *****/ HTM_SECTION_Begin (Usr_USER_LIST_SECTION_ID); if (NumUsrsInCrs) @@ -337,7 +337,7 @@ static void Msg_PutFormMsgUsrs (struct Msg_Messages *Messages, } /***** Begin form to select recipients and write the message *****/ - Frm_StartForm (ActRcvMsgUsr); + Frm_BeginForm (ActRcvMsgUsr); if (Messages->Reply.IsReply) { Par_PutHiddenParamChar ("IsReply",'Y'); @@ -956,7 +956,7 @@ void Msg_ReqDelAllRecMsgs (void) Messages.ShowOnlyUnreadMsgs = Msg_GetParamOnlyUnreadMsgs (); /***** Show question and button to remove messages received *****/ - /* Start alert */ + /* Begin alert */ if (Messages.FilterContent[0]) { if (Messages.ShowOnlyUnreadMsgs) @@ -1015,7 +1015,7 @@ void Msg_ReqDelAllSntMsgs (void) Msg_GetParamFilterContent (&Messages); /***** Show question and button to remove messages received *****/ - /* Start alert */ + /* Begin alert */ if (Messages.FilterContent[0]) Ale_ShowAlertAndButton1 (Ale_QUESTION,Txt_Do_you_really_want_to_delete_all_messages_sent_to_USER_X_from_COURSE_Y_related_to_CONTENT_Z, Messages.FilterFromTo[0] ? Messages.FilterFromTo : @@ -1890,7 +1890,7 @@ static void Msg_ShowSentOrReceivedMessages (struct Msg_Messages *Messages) HelpFilter[Messages->TypeOfMessages],Box_CLOSABLE); /* Form to see messages again */ - Frm_StartForm (ActionSee[Messages->TypeOfMessages]); + Frm_BeginForm (ActionSee[Messages->TypeOfMessages]); HTM_DIV_Begin ("class=\"CM\""); Msg_ShowFormSelectCourseSentOrRecMsgs (Messages); @@ -3359,7 +3359,7 @@ static void Msg_WriteSentOrReceivedMsgSubject (struct Msg_Messages *Messages, "MSG_TIT_BG_NEW"); /***** Begin form to expand/contract the message *****/ - Frm_StartForm (Messages->TypeOfMessages == Msg_RECEIVED ? (Expanded ? ActConRcvMsg : + Frm_BeginForm (Messages->TypeOfMessages == Msg_RECEIVED ? (Expanded ? ActConRcvMsg : ActExpRcvMsg) : (Expanded ? ActConSntMsg : ActExpSntMsg)); @@ -3484,7 +3484,7 @@ static bool Msg_WriteCrsOrgMsg (long CrsCod) else // Message sent from another course { /* Write course, including link */ - Frm_StartFormGoTo (ActSeeCrsInf); + Frm_BeginFormGoTo (ActSeeCrsInf); Crs_PutParamCrsCod (Crs.CrsCod); HTM_DIV_Begin ("class=\"AUTHOR_TXT\""); HTM_Txt ("("); @@ -3524,10 +3524,10 @@ static void Msg_WriteFormToReply (long MsgCod,long CrsCod, /***** Form start and parameters *****/ if (FromThisCrs) - Frm_StartForm (ActReqMsgUsr); + Frm_BeginForm (ActReqMsgUsr); else // Not the current course ==> go to another course { - Frm_StartFormGoTo (ActReqMsgUsr); + Frm_BeginFormGoTo (ActReqMsgUsr); Crs_PutParamCrsCod (CrsCod); } Grp_PutParamAllGroups (); @@ -3772,7 +3772,7 @@ static void Msg_WriteMsgTo (struct Msg_Messages *Messages,long MsgCod) HTM_TR_Begin (NULL); HTM_TD_Begin ("colspan=\"3\" class=\"AUTHOR_TXT LM\""); - Frm_StartForm (ActionSee[Messages->TypeOfMessages]); + Frm_BeginForm (ActionSee[Messages->TypeOfMessages]); Messages->MsgCod = MsgCod; // Message to be expanded with all recipients visible Msg_PutHiddenParamsOneMsg (Messages); Par_PutHiddenParamChar ("SeeAllRcpts",'Y'); @@ -3871,7 +3871,7 @@ static void Msg_PutFormToBanSender (struct Msg_Messages *Messages, { extern const char *Txt_Sender_permitted_click_to_ban_him; - Frm_StartForm (ActBanUsrMsg); + Frm_BeginForm (ActBanUsrMsg); Pag_PutHiddenParamPagNum (Msg_WhatPaginate[Messages->TypeOfMessages], Messages->CurrentPage); Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod); @@ -3889,7 +3889,7 @@ static void Msg_PutFormToUnbanSender (struct Msg_Messages *Messages, { extern const char *Txt_Sender_banned_click_to_unban_him; - Frm_StartForm (ActUnbUsrMsg); + Frm_BeginForm (ActUnbUsrMsg); Pag_PutHiddenParamPagNum (Msg_WhatPaginate[Messages->TypeOfMessages], Messages->CurrentPage); Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod); @@ -4064,7 +4064,7 @@ void Msg_ListBannedUsrs (void) /* Put form to unban user */ HTM_TD_Begin ("class=\"BM\""); - Frm_StartForm (ActUnbUsrLst); + Frm_BeginForm (ActUnbUsrLst); Usr_PutParamUsrCodEncrypted (UsrDat.EnUsrCod); Ico_PutIconLink ("lock.svg",Txt_Sender_banned_click_to_unban_him); Frm_EndForm (); diff --git a/swad_network.c b/swad_network.c index 6f2f5bab..aa17b038 100644 --- a/swad_network.c +++ b/swad_network.c @@ -211,7 +211,7 @@ void Net_ShowWebsAndSocialNets (const struct UsrData *UsrDat) Net_WebsAndSocialNetworks_t NumURL; char URL[Cns_MAX_BYTES_WWW + 1]; - /***** Start container *****/ + /***** Begin container *****/ HTM_DIV_Begin ("class=\"REC_WEBS\""); /***** Show link to public profile *****/ @@ -279,7 +279,7 @@ void Net_ShowFormMyWebsAndSocialNets (void) char StrRecordWidth[Cns_MAX_DECIMAL_DIGITS_UINT + 2 + 1]; char StrName[32]; - /***** Start section *****/ + /***** Begin section *****/ HTM_SECTION_Begin (Net_MY_WEBS_ID); /***** Begin box *****/ diff --git a/swad_nickname.c b/swad_nickname.c index 33ed02b1..2e6c4f2d 100644 --- a/swad_nickname.c +++ b/swad_nickname.c @@ -231,7 +231,7 @@ static void Nck_ShowFormChangeUsrNickname (bool ItsMe, const struct UsrData *UsrDat = (ItsMe ? &Gbl.Usrs.Me.UsrDat : &Gbl.Usrs.Other.UsrDat); - /***** Start section *****/ + /***** Begin section *****/ HTM_SECTION_Begin (Nck_NICKNAME_SECTION_ID); /***** Get my nicknames *****/ diff --git a/swad_notice.c b/swad_notice.c index 85339418..40118ab2 100644 --- a/swad_notice.c +++ b/swad_notice.c @@ -104,7 +104,7 @@ void Not_ShowFormNotice (void) Gbl.Hierarchy.Crs.FullName); /***** Begin form *****/ - Frm_StartForm (ActRcvNot); + Frm_BeginForm (ActRcvNot); /***** Begin box *****/ Box_BoxBegin (NULL,Txt_New_notice, @@ -293,7 +293,7 @@ void Not_RequestRemNotice (void) NotCod = Not_GetParamNotCod (); /***** Show question and button to remove this notice *****/ - /* Start alert */ + /* Begin alert */ Ale_ShowAlertAndButton1 (Ale_QUESTION,Txt_Do_you_really_want_to_remove_the_following_notice); /* Show notice */ @@ -544,7 +544,7 @@ static void Not_PutButtonToAddNewNotice (void) { extern const char *Txt_New_notice; - Frm_StartForm (ActWriNot); + Frm_BeginForm (ActWriNot); Btn_PutConfirmButton (Txt_New_notice); Frm_EndForm (); } diff --git a/swad_notification.c b/swad_notification.c index 3b3f93e8..46b0b6fb 100644 --- a/swad_notification.c +++ b/swad_notification.c @@ -713,7 +713,7 @@ static bool Ntf_StartFormGoToAction (Ntf_NotifyEvent_t NotifyEvent, default: // Not aplicable here break; } - Frm_StartForm (Action); + Frm_BeginForm (Action); if (GrpCod > 0) Grp_PutParamGrpCod (&GrpCod); Brw_PutHiddenParamFilCod (FileMetadata.FilCod); @@ -724,7 +724,7 @@ static bool Ntf_StartFormGoToAction (Ntf_NotifyEvent_t NotifyEvent, case Ntf_EVENT_TIMELINE_SHARE: case Ntf_EVENT_TIMELINE_MENTION: // Cod is the code of the social publishing - Frm_StartForm (ActSeeGblTL); + Frm_BeginForm (ActSeeGblTL); TL_Pub_PutHiddenParamPubCod (Cod); Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod); Ntf_PutHiddenParamNotifyEvent (NotifyEvent); @@ -733,16 +733,16 @@ static bool Ntf_StartFormGoToAction (Ntf_NotifyEvent_t NotifyEvent, if (UsrDat->EnUsrCod[0]) // User's code found ==> // go to user's public profile { - Frm_StartForm (ActSeeOthPubPrf); + Frm_BeginForm (ActSeeOthPubPrf); /* Put param to go to follower's profile */ Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod); } else // No user's code found ==> go to see my followers - Frm_StartForm (ActSeeFlr); + Frm_BeginForm (ActSeeFlr); break; case Ntf_EVENT_FORUM_POST_COURSE: case Ntf_EVENT_FORUM_REPLY: - Frm_StartForm (For_ActionsSeeFor[Forums->Forum.Type]); + Frm_BeginForm (For_ActionsSeeFor[Forums->Forum.Type]); For_PutAllHiddenParamsForum (1, // Page of threads = first 1, // Page of posts = first Forums->ForumSet, @@ -752,15 +752,15 @@ static bool Ntf_StartFormGoToAction (Ntf_NotifyEvent_t NotifyEvent, -1L); break; case Ntf_EVENT_NOTICE: - Frm_StartForm (ActSeeOneNot); + Frm_BeginForm (ActSeeOneNot); Not_PutHiddenParamNotCod (Cod); break; case Ntf_EVENT_MESSAGE: - Frm_StartForm (ActExpRcvMsg); + Frm_BeginForm (ActExpRcvMsg); Msg_PutHiddenParamMsgCod (Cod); break; default: - Frm_StartForm (Ntf_DefaultActions[NotifyEvent]); + Frm_BeginForm (Ntf_DefaultActions[NotifyEvent]); break; } @@ -1904,7 +1904,7 @@ void Ntf_PutFormChangeNotifSentByEMail (void) extern const char *Txt_NOTIFY_EVENTS_PLURAL[Ntf_NUM_NOTIFY_EVENTS]; Ntf_NotifyEvent_t NotifyEvent; - /***** Start section with settings on privacy *****/ + /***** Begin section with settings on privacy *****/ HTM_SECTION_Begin (Ntf_NOTIFICATIONS_ID); /***** Begin box *****/ @@ -1913,7 +1913,7 @@ void Ntf_PutFormChangeNotifSentByEMail (void) Hlp_PROFILE_Settings_notifications,Box_NOT_CLOSABLE); /***** Begin form *****/ - Frm_StartForm (ActChgNtfPrf); + Frm_BeginForm (ActChgNtfPrf); /***** Warning if I can not receive email notifications *****/ if (!Mai_CheckIfUsrCanReceiveEmailNotif (&Gbl.Usrs.Me.UsrDat)) @@ -2048,7 +2048,7 @@ void Ntf_WriteNumberOfNewNtfs (void) NumNewNtfs = Ntf_GetNumberOfMyNewUnseenNtfs (); /***** Begin form *****/ - Frm_StartFormId (ActSeeNewNtf,"form_ntf"); + Frm_BeginFormId (ActSeeNewNtf,"form_ntf"); HTM_BUTTON_SUBMIT_Begin (Txt_See_notifications,The_ClassNotif[Gbl.Prefs.Theme],NULL); /***** Number of unseen notifications *****/ diff --git a/swad_password.c b/swad_password.c index e7552ddc..9c96f403 100644 --- a/swad_password.c +++ b/swad_password.c @@ -279,7 +279,7 @@ void Pwd_ShowFormSendNewPwd (void) extern const char *Txt_Get_a_new_password; /***** Begin form *****/ - Frm_StartForm (ActSndNewPwd); + Frm_BeginForm (ActSndNewPwd); /***** Begin box *****/ Box_BoxBegin (NULL,Txt_Forgotten_password, @@ -662,7 +662,7 @@ void Pwd_ShowFormChgMyPwd (void) char StrRecordWidth[Cns_MAX_DECIMAL_DIGITS_UINT + 2 + 1]; bool IHaveAPasswordInDB = (bool) Gbl.Usrs.Me.UsrDat.Password[0]; - /***** Start section *****/ + /***** Begin section *****/ HTM_SECTION_Begin (Pwd_PASSWORD_SECTION_ID); /***** Begin form *****/ @@ -809,7 +809,7 @@ void Pwd_ShowFormChgOtherUsrPwd (void) NULL,NULL, NULL,Box_NOT_CLOSABLE); - /***** Start section *****/ + /***** Begin section *****/ HTM_SECTION_Begin (Pwd_PASSWORD_SECTION_ID); /***** Show possible alerts *****/ diff --git a/swad_photo.c b/swad_photo.c index 40717340..ad37b3d9 100644 --- a/swad_photo.c +++ b/swad_photo.c @@ -326,7 +326,7 @@ static void Pho_ReqPhoto (const struct UsrData *UsrDat) /***** Begin form *****/ if (ItsMe) - Frm_StartForm (ActDetMyPho); + Frm_BeginForm (ActDetMyPho); else { switch (Gbl.Usrs.Other.UsrDat.Roles.InCurrentCrs.Role) @@ -342,7 +342,7 @@ static void Pho_ReqPhoto (const struct UsrData *UsrDat) NextAction = ActDetOthPho; break; } - Frm_StartForm (NextAction); + Frm_BeginForm (NextAction); Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod); } @@ -442,7 +442,7 @@ void Pho_ReqRemoveMyPhoto (void) if (Pho_BuildLinkToPhoto (&Gbl.Usrs.Me.UsrDat,Gbl.Usrs.Me.PhotoURL)) { /***** Show question and button to remove my photo *****/ - /* Start alert */ + /* Begin alert */ Ale_ShowAlertAndButton1 (Ale_QUESTION,Txt_Do_you_really_want_to_remove_your_photo); /* Show current photo */ @@ -508,7 +508,7 @@ void Pho_ReqRemoveUsrPhoto (void) if (Pho_BuildLinkToPhoto (&Gbl.Usrs.Other.UsrDat,PhotoURL)) { /***** Show question and button to remove user's photo *****/ - /* Start alert */ + /* Begin alert */ Ale_ShowAlertAndButton1 (Ale_QUESTION,Txt_Do_you_really_want_to_remove_the_photo_of_X, Gbl.Usrs.Other.UsrDat.FullName); @@ -689,7 +689,7 @@ static bool Pho_ReceivePhotoAndDetectFaces (bool ItsMe,const struct UsrData *Usr { NumFacesGreen++; if (ItsMe) - Frm_StartForm (ActUpdMyPho); + Frm_BeginForm (ActUpdMyPho); else { switch (Gbl.Usrs.Other.UsrDat.Roles.InCurrentCrs.Role) @@ -705,7 +705,7 @@ static bool Pho_ReceivePhotoAndDetectFaces (bool ItsMe,const struct UsrData *Usr NextAction = ActUpdOthPho; break; } - Frm_StartForm (NextAction); + Frm_BeginForm (NextAction); Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod); } Par_PutHiddenParamString (NULL,"FileName",StrFileName); @@ -728,7 +728,7 @@ static bool Pho_ReceivePhotoAndDetectFaces (bool ItsMe,const struct UsrData *Usr break; } - /***** Start alert to the user about the number of faces detected in the image*****/ + /***** Begin alert to the user about the number of faces detected in the image*****/ if (NumFacesTotal == 0) Ale_ShowAlertAndButton1 (Ale_WARNING,Txt_Could_not_detect_any_face_in_front_position_); else if (NumFacesTotal == 1) @@ -888,7 +888,7 @@ static void Pho_UpdatePhoto2 (void) unsigned NumPhoto; char *Img; - /***** Start alert *****/ + /***** Begin alert *****/ Ale_ShowLastAlertAndButton1 (); /***** Show the three images resulting of the processing *****/ @@ -1182,9 +1182,9 @@ void Pho_ShowUsrPhoto (const struct UsrData *UsrDat,const char *PhotoURL, if (PutLinkToPublicProfile) { if (FormUnique) - Frm_StartFormUnique (ActSeeOthPubPrf); + Frm_BeginFormUnique (ActSeeOthPubPrf); else - Frm_StartForm (ActSeeOthPubPrf); + Frm_BeginForm (ActSeeOthPubPrf); Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod); HTM_BUTTON_SUBMIT_Begin (NULL,"BT_LINK",NULL); } @@ -1790,7 +1790,7 @@ static void Pho_PutSelectorForTypeOfAvg (const struct Pho_DegPhotos *DegPhotos) /* Data */ HTM_TD_Begin ("class=\"LT\""); - Frm_StartForm (ActSeePhoDeg); + Frm_BeginForm (ActSeePhoDeg); Pho_PutHiddenParamPhotoSize (DegPhotos->HowComputePhotoSize); Pho_PutHiddenParamOrderDegrees (DegPhotos->HowOrderDegrees); Usr_PutParamsPrefsAboutUsrList (); @@ -1854,7 +1854,7 @@ static void Pho_PutSelectorForHowComputePhotoSize (const struct Pho_DegPhotos *D /* Data */ HTM_TD_Begin ("class=\"LT\""); - Frm_StartForm (ActSeePhoDeg); + Frm_BeginForm (ActSeePhoDeg); Pho_PutHiddenParamTypeOfAvg (DegPhotos->TypeOfAverage); Pho_PutHiddenParamOrderDegrees (DegPhotos->HowOrderDegrees); Usr_PutParamsPrefsAboutUsrList (); @@ -1918,7 +1918,7 @@ static void Pho_PutSelectorForHowOrderDegrees (const struct Pho_DegPhotos *DegPh /* Data */ HTM_TD_Begin ("class=\"LT\""); - Frm_StartForm (ActSeePhoDeg); + Frm_BeginForm (ActSeePhoDeg); Pho_PutHiddenParamTypeOfAvg (DegPhotos->TypeOfAverage); Pho_PutHiddenParamPhotoSize (DegPhotos->HowComputePhotoSize); Usr_PutParamsPrefsAboutUsrList (); @@ -2010,7 +2010,7 @@ static void Pho_PutLinkToCalculateDegreeStats (const struct Pho_DegPhotos *DegPh Mnu_ContextMenuBegin (); /* Begin form */ - Frm_StartForm (ActCalPhoDeg); + Frm_BeginForm (ActCalPhoDeg); Pho_PutHiddenParamTypeOfAvg (DegPhotos->TypeOfAverage); Pho_PutHiddenParamPhotoSize (DegPhotos->HowComputePhotoSize); Pho_PutHiddenParamOrderDegrees (DegPhotos->HowOrderDegrees); @@ -2461,7 +2461,7 @@ static void Pho_ShowDegreeAvgPhotoAndStat (const struct Deg_Degree *Deg, /***** Put link to degree *****/ if (SeeOrPrint == Pho_DEGREES_SEE) { - Frm_StartFormGoTo (ActSeeDegInf); + Frm_BeginFormGoTo (ActSeeDegInf); Deg_PutParamDegCod (Deg->DegCod); HTM_BUTTON_SUBMIT_Begin (Hie_BuildGoToMsg (Deg->FullName),"BT_LINK",NULL); Hie_FreeGoToMsg (); diff --git a/swad_place.c b/swad_place.c index 64bad314..6694414a 100644 --- a/swad_place.c +++ b/swad_place.c @@ -137,7 +137,7 @@ void Plc_SeePlaces (void) { HTM_TH_Begin (1,1,"LM"); - Frm_StartForm (ActSeePlc); + Frm_BeginForm (ActSeePlc); Par_PutHiddenParamUnsigned (NULL,"Order",(unsigned) Order); HTM_BUTTON_SUBMIT_Begin (Txt_PLACES_HELP_ORDER[Order],"BT_LINK TIT_TBL",NULL); if (Order == Places.SelectedOrder) @@ -214,7 +214,7 @@ void Plc_SeePlaces (void) /***** Button to create place *****/ if (Plc_CheckIfICanCreatePlaces ()) { - Frm_StartForm (ActEdiPlc); + Frm_BeginForm (ActEdiPlc); Btn_PutConfirmButton (Txt_New_place); Frm_EndForm (); } @@ -555,7 +555,7 @@ static void Plc_ListPlacesForEdition (const struct Plc_Places *Places) /* Place short name */ HTM_TD_Begin ("class=\"CM\""); - Frm_StartForm (ActRenPlcSho); + Frm_BeginForm (ActRenPlcSho); Plc_PutParamPlcCod (&Plc->PlcCod); HTM_INPUT_TEXT ("ShortName",Plc_MAX_CHARS_PLACE_SHRT_NAME,Plc->ShrtName, HTM_SUBMIT_ON_CHANGE, @@ -565,7 +565,7 @@ static void Plc_ListPlacesForEdition (const struct Plc_Places *Places) /* Place full name */ HTM_TD_Begin ("class=\"CM\""); - Frm_StartForm (ActRenPlcFul); + Frm_BeginForm (ActRenPlcFul); Plc_PutParamPlcCod (&Plc->PlcCod); HTM_INPUT_TEXT ("FullName",Plc_MAX_CHARS_PLACE_FULL_NAME,Plc->FullName, HTM_SUBMIT_ON_CHANGE, @@ -799,7 +799,7 @@ static void Plc_PutFormToCreatePlace (void) extern const char *Txt_Create_place; /***** Begin form *****/ - Frm_StartForm (ActNewPlc); + Frm_BeginForm (ActNewPlc); /***** Begin box and table *****/ Box_BoxTableBegin (NULL,Txt_New_place, diff --git a/swad_plugin.c b/swad_plugin.c index c3b17c10..6a1019a9 100644 --- a/swad_plugin.c +++ b/swad_plugin.c @@ -392,7 +392,7 @@ static void Plg_ListPluginsForEdition (void) /* Plugin name */ HTM_TD_Begin ("class=\"CM\""); - Frm_StartForm (ActRenPlg); + Frm_BeginForm (ActRenPlg); Plg_PutParamPlgCod (&Plg->PlgCod); HTM_INPUT_TEXT ("Name",Plg_MAX_CHARS_PLUGIN_NAME,Plg->Name, HTM_SUBMIT_ON_CHANGE, @@ -402,7 +402,7 @@ static void Plg_ListPluginsForEdition (void) /* Plugin description */ HTM_TD_Begin ("class=\"CM\""); - Frm_StartForm (ActChgPlgDes); + Frm_BeginForm (ActChgPlgDes); Plg_PutParamPlgCod (&Plg->PlgCod); HTM_INPUT_TEXT ("Description",Plg_MAX_CHARS_PLUGIN_DESCRIPTION,Plg->Description, HTM_SUBMIT_ON_CHANGE, @@ -412,7 +412,7 @@ static void Plg_ListPluginsForEdition (void) /* Plugin logo */ HTM_TD_Begin ("class=\"CM\""); - Frm_StartForm (ActChgPlgLog); + Frm_BeginForm (ActChgPlgLog); Plg_PutParamPlgCod (&Plg->PlgCod); HTM_INPUT_TEXT ("Logo",Plg_MAX_CHARS_PLUGIN_LOGO,Plg->Logo, HTM_SUBMIT_ON_CHANGE, @@ -422,7 +422,7 @@ static void Plg_ListPluginsForEdition (void) /* Plugin application key */ HTM_TD_Begin ("class=\"CM\""); - Frm_StartForm (ActChgPlgAppKey); + Frm_BeginForm (ActChgPlgAppKey); Plg_PutParamPlgCod (&Plg->PlgCod); HTM_INPUT_TEXT ("AppKey",Plg_MAX_CHARS_PLUGIN_APP_KEY,Plg->AppKey, HTM_SUBMIT_ON_CHANGE, @@ -432,7 +432,7 @@ static void Plg_ListPluginsForEdition (void) /* Plugin URL */ HTM_TD_Begin ("class=\"CM\""); - Frm_StartForm (ActChgPlgURL); + Frm_BeginForm (ActChgPlgURL); Plg_PutParamPlgCod (&Plg->PlgCod); HTM_INPUT_URL ("URL",Plg->URL,HTM_SUBMIT_ON_CHANGE, "size=\"15\""); @@ -441,7 +441,7 @@ static void Plg_ListPluginsForEdition (void) /* Plugin IP */ HTM_TD_Begin ("class=\"CM\""); - Frm_StartForm (ActChgPlgIP); + Frm_BeginForm (ActChgPlgIP); Plg_PutParamPlgCod (&Plg->PlgCod); HTM_INPUT_TEXT ("IP",Cns_MAX_CHARS_IP,Plg->IP,HTM_SUBMIT_ON_CHANGE, "size=\"10\""); @@ -829,7 +829,7 @@ static void Plg_PutFormToCreatePlugin (void) extern const char *Txt_Create_plugin; /***** Begin form *****/ - Frm_StartForm (ActNewPlg); + Frm_BeginForm (ActNewPlg); /***** Begin box and table *****/ Box_BoxTableBegin (NULL,Txt_New_plugin, diff --git a/swad_privacy.c b/swad_privacy.c index 41b427a1..0e2273ba 100644 --- a/swad_privacy.c +++ b/swad_privacy.c @@ -88,7 +88,7 @@ void Pri_EditMyPrivacy (void) extern const char *Txt_Extended_public_profile; extern const char *Txt_Timeline; - /***** Start section with settings on privacy *****/ + /***** Begin section with settings on privacy *****/ HTM_SECTION_Begin (Pri_PRIVACY_ID); /***** If any of my settings about privacy is unknown *****/ diff --git a/swad_profile.c b/swad_profile.c index b0c8504d..3f238519 100644 --- a/swad_profile.c +++ b/swad_profile.c @@ -202,7 +202,7 @@ void Prf_RequestUserProfile (void) } /***** Begin form *****/ - Frm_StartForm (ActSeeOthPubPrf); + Frm_BeginForm (ActSeeOthPubPrf); /***** Begin box *****/ Box_BoxBegin (NULL,Txt_Another_user_s_profile, @@ -801,7 +801,7 @@ static void Prf_PutLinkCalculateFigures (const char *EncryptedUsrCod) extern const char *The_ClassFormLinkOutBoxBold[The_NUM_THEMES]; extern const char *Txt_Calculate; - Frm_StartForm (ActCalFig); + Frm_BeginForm (ActCalFig); Usr_PutParamUsrCodEncrypted (EncryptedUsrCod); HTM_BUTTON_Animated_Begin (Txt_Calculate, The_ClassFormLinkOutBoxBold[Gbl.Prefs.Theme], @@ -957,7 +957,7 @@ static void Prf_ShowRanking (unsigned long Rank,unsigned long NumUsrs) char *Title; /***** Rank in form to go to ranking *****/ - Frm_StartForm (ActSeeUseGbl); + Frm_BeginForm (ActSeeUseGbl); Sco_PutParamScope ("ScopeSta",Hie_Lvl_SYS); Par_PutHiddenParamUnsigned (NULL,"FigureType",(unsigned) Fig_USERS_RANKING); if (asprintf (&Title,"#%lu %s %lu",Rank,Txt_of_PART_OF_A_TOTAL,NumUsrs) < 0) @@ -1783,7 +1783,7 @@ static void Prf_ShowUsrInRanking (struct UsrData *UsrDat,unsigned Rank,bool ItsM HTM_TD_Begin ("class=\"COLOR%u\"",Gbl.RowEvenOdd); if (Visible) { - Frm_StartForm (ActSeeOthPubPrf); + Frm_BeginForm (ActSeeOthPubPrf); Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod); HTM_BUTTON_SUBMIT_Begin (Txt_Another_user_s_profile, ItsMe ? "BT_LINK RANK_USR DAT_SMALL_N" : diff --git a/swad_project.c b/swad_project.c index 2fe14131..6032d62f 100644 --- a/swad_project.c +++ b/swad_project.c @@ -588,7 +588,7 @@ static void Prj_ShowFormToFilterByMy_All (const struct Prj_Projects *Projects) HTM_DIV_Begin ("class=\"%s\"", (Projects->Filter.Who == Who) ? "PREF_ON" : "PREF_OFF"); - Frm_StartForm (Who == Usr_WHO_SELECTED ? ActReqUsrPrj : + Frm_BeginForm (Who == Usr_WHO_SELECTED ? ActReqUsrPrj : ActSeePrj); Filter.Who = Who; Filter.Assign = Projects->Filter.Assign; @@ -624,7 +624,7 @@ static void Prj_ShowFormToFilterByAssign (const struct Prj_Projects *Projects) HTM_DIV_Begin ("class=\"%s\"", (Projects->Filter.Assign & (1 << Assign)) ? "PREF_ON" : "PREF_OFF"); - Frm_StartForm (ActSeePrj); + Frm_BeginForm (ActSeePrj); Filter.Who = Projects->Filter.Who; Filter.Assign = Projects->Filter.Assign ^ (1 << Assign); // Toggle Filter.Hidden = Projects->Filter.Hidden; @@ -665,7 +665,7 @@ static void Prj_ShowFormToFilterByHidden (const struct Prj_Projects *Projects) HTM_DIV_Begin ("class=\"%s\"", (Projects->Filter.Hidden & (1 << HidVis)) ? "PREF_ON" : "PREF_OFF"); - Frm_StartForm (ActSeePrj); + Frm_BeginForm (ActSeePrj); Filter.Who = Projects->Filter.Who; Filter.Assign = Projects->Filter.Assign; Filter.Hidden = Projects->Filter.Hidden ^ (1 << HidVis); // Toggle @@ -706,7 +706,7 @@ static void Prj_ShowFormToFilterByWarning (const struct Prj_Projects *Projects) HTM_DIV_Begin ("class=\"%s\"", (Projects->Filter.Faulti & (1 << Faultiness)) ? "PREF_ON" : "PREF_OFF"); - Frm_StartForm (ActSeePrj); + Frm_BeginForm (ActSeePrj); Filter.Who = Projects->Filter.Who; Filter.Assign = Projects->Filter.Assign; Filter.Hidden = Projects->Filter.Hidden; @@ -735,7 +735,7 @@ static void Prj_ShowFormToFilterByDpt (const struct Prj_Projects *Projects) /***** Begin form *****/ HTM_DIV_Begin (NULL); - Frm_StartForm (ActSeePrj); + Frm_BeginForm (ActSeePrj); Filter.Who = Projects->Filter.Who; Filter.Assign = Projects->Filter.Assign; Filter.Hidden = Projects->Filter.Hidden; @@ -983,7 +983,7 @@ static void Prj_ShowProjectsHead (struct Prj_Projects *Projects, { case Prj_LIST_PROJECTS: case Prj_FILE_BROWSER_PROJECT: - Frm_StartForm (ActSeePrj); + Frm_BeginForm (ActSeePrj); Prj_PutParams (&Projects->Filter, Order, Projects->CurrentPage, @@ -1125,7 +1125,7 @@ static void Prj_PutButtonToCreateNewPrj (struct Prj_Projects *Projects) extern const char *Txt_New_project; Projects->PrjCod = -1L; - Frm_StartForm (ActFrmNewPrj); + Frm_BeginForm (ActFrmNewPrj); Prj_PutCurrentParams (Projects); Btn_PutConfirmButton (Txt_New_project); Frm_EndForm (); @@ -1357,7 +1357,7 @@ static void Prj_ShowOneProject (struct Prj_Projects *Projects, { if (ICanViewProjectFiles) { - Frm_StartForm (ActAdmDocPrj); + Frm_BeginForm (ActAdmDocPrj); Prj_PutCurrentParams (Projects); HTM_BUTTON_SUBMIT_Begin (Txt_Project_files,ClassLink,NULL); HTM_Txt (Prj->Title); @@ -2611,7 +2611,7 @@ static void Prj_ReqRemUsrFromPrj (struct Prj_Projects *Projects, ItsMe = Usr_ItsMe (Gbl.Usrs.Other.UsrDat.UsrCod); /***** Show question and button to remove user as a role from project *****/ - /* Start alert */ + /* Begin alert */ Ale_ShowAlertAndButton1 (Ale_QUESTION,ItsMe ? Txt_Do_you_really_want_to_be_removed_as_a_X_from_the_project_Y : Txt_Do_you_really_want_to_remove_the_following_user_as_a_X_from_the_project_Y, Txt_PROJECT_ROLES_SINGUL_abc[RoleInProject][Gbl.Usrs.Other.UsrDat.Sex], @@ -2621,7 +2621,7 @@ static void Prj_ReqRemUsrFromPrj (struct Prj_Projects *Projects, Rec_ShowSharedRecordUnmodifiable (&Gbl.Usrs.Other.UsrDat); /* Show form to request confirmation */ - Frm_StartForm (ActionRemUsr[RoleInProject]); + Frm_BeginForm (ActionRemUsr[RoleInProject]); Projects->PrjCod = Prj.PrjCod; Prj_PutCurrentParams (Projects); Btn_PutRemoveButton (Str_BuildStringStr (Txt_Remove_USER_from_this_project, @@ -3625,7 +3625,7 @@ static void Prj_PutFormProject (struct Prj_Projects *Projects, /***** 2. Project data *****/ /* Start data form */ - Frm_StartForm (ItsANewProject ? ActNewPrj : + Frm_BeginForm (ItsANewProject ? ActNewPrj : ActChgPrj); Prj_PutCurrentParams (Projects); @@ -4084,7 +4084,7 @@ void Prj_ShowFormConfig (void) Hlp_ASSESSMENT_Projects,Box_NOT_CLOSABLE); /***** Begin form *****/ - Frm_StartForm (ActRcvCfgPrj); + Frm_BeginForm (ActRcvCfgPrj); /***** Projects are editable by non-editing teachers? *****/ HTM_TABLE_BeginCenterPadding (2); @@ -4407,7 +4407,7 @@ static void Prj_FormLockUnlock (const struct Prj_Project *Prj) Gbl.Session.Id, Prj->PrjCod) < 0) Lay_NotEnoughMemoryExit (); - Frm_StartFormOnSubmit (ActUnk,OnSubmit); + Frm_BeginFormOnSubmit (ActUnk,OnSubmit); Ico_PutIconLink (Prj_LockIcons[Prj->Locked],Txt_LOCKED_UNLOCKED[Prj->Locked]); Frm_EndForm (); diff --git a/swad_record.c b/swad_record.c index 2e1c1020..007d4e7f 100644 --- a/swad_record.c +++ b/swad_record.c @@ -279,7 +279,7 @@ void Rec_ListFieldsRecordsForEdition (void) /* Name of the field */ HTM_TD_Begin ("class=\"LM\""); - Frm_StartForm (ActRenFie); + Frm_BeginForm (ActRenFie); Rec_PutParamFieldCod (&Gbl.Crs.Records.LstFields.Lst[NumField].FieldCod); HTM_INPUT_TEXT ("FieldName",Rec_MAX_CHARS_NAME_FIELD, Gbl.Crs.Records.LstFields.Lst[NumField].Name, @@ -290,7 +290,7 @@ void Rec_ListFieldsRecordsForEdition (void) /* Number of lines in the form */ HTM_TD_Begin ("class=\"CM\""); - Frm_StartForm (ActChgRowFie); + Frm_BeginForm (ActChgRowFie); Rec_PutParamFieldCod (&Gbl.Crs.Records.LstFields.Lst[NumField].FieldCod); snprintf (StrNumLines,sizeof (StrNumLines),"%u", Gbl.Crs.Records.LstFields.Lst[NumField].NumLines); @@ -302,7 +302,7 @@ void Rec_ListFieldsRecordsForEdition (void) /* Visibility of a field */ HTM_TD_Begin ("class=\"CM\""); - Frm_StartForm (ActChgVisFie); + Frm_BeginForm (ActChgVisFie); Rec_PutParamFieldCod (&Gbl.Crs.Records.LstFields.Lst[NumField].FieldCod); HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE, "name=\"Visibility\""); @@ -337,7 +337,7 @@ void Rec_ShowFormCreateRecordField (void) char StrNumLines[Cns_MAX_DECIMAL_DIGITS_UINT + 1]; /***** Begin form *****/ - Frm_StartForm (ActNewFie); + Frm_BeginForm (ActNewFie); /***** Begin box and table *****/ Box_BoxTableBegin (NULL,Txt_New_record_field, @@ -951,7 +951,7 @@ static void Rec_ListRecordsGsts (Rec_SharedRecordViewType_t TypeOfView) Mnu_ContextMenuBegin (); /* Print view */ - Frm_StartForm (ActPrnRecSevGst); + Frm_BeginForm (ActPrnRecSevGst); Usr_PutHiddenParSelectedUsrsCods (&Gbl.Usrs.Selected); Rec_ShowLinkToPrintPreviewOfRecords (); Frm_EndForm (); @@ -974,7 +974,7 @@ static void Rec_ListRecordsGsts (Rec_SharedRecordViewType_t TypeOfView) Usr_GetUsrCodFromEncryptedUsrCod (&UsrDat); if (Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&UsrDat,Usr_DONT_GET_PREFS)) // Get from the database the data of the student { - /* Start container for this user */ + /* Begin container for this user */ snprintf (RecordSectionId,sizeof (RecordSectionId),"record_%u",NumUsr); HTM_SECTION_Begin (RecordSectionId); @@ -1048,7 +1048,7 @@ static void Rec_ShowRecordOneStdCrs (void) Rec_PutLinkToEditRecordFields (); /* Print view */ - Frm_StartForm (ActPrnRecSevStd); + Frm_BeginForm (ActPrnRecSevStd); Usr_CreateListSelectedUsrsCodsAndFillWithOtherUsr (&Gbl.Usrs.Selected); Usr_PutHiddenParSelectedUsrsCods (&Gbl.Usrs.Selected); Usr_FreeListsSelectedEncryptedUsrsCods (&Gbl.Usrs.Selected); @@ -1060,7 +1060,7 @@ static void Rec_ShowRecordOneStdCrs (void) /***** Show optional alert (result of editing data in course record) *****/ Ale_ShowAlerts (NULL); - /***** Start container for this user *****/ + /***** Begin container for this user *****/ HTM_DIV_Begin ("class=\"REC_USR\""); /***** Shared record *****/ @@ -1152,7 +1152,7 @@ static void Rec_ListRecordsStds (Rec_SharedRecordViewType_t ShaTypeOfView, Rec_PutLinkToEditRecordFields (); /* Print view */ - Frm_StartForm (ActPrnRecSevStd); + Frm_BeginForm (ActPrnRecSevStd); Usr_PutHiddenParSelectedUsrsCods (&Gbl.Usrs.Selected); Rec_ShowLinkToPrintPreviewOfRecords (); Frm_EndForm (); @@ -1177,7 +1177,7 @@ static void Rec_ListRecordsStds (Rec_SharedRecordViewType_t ShaTypeOfView, his/her inscription in the current course */ UsrDat.Accepted = Usr_CheckIfUsrHasAcceptedInCurrentCrs (&UsrDat); - /* Start container for this user */ + /* Begin container for this user */ snprintf (RecordSectionId,sizeof (RecordSectionId),"record_%u",NumUsr); HTM_SECTION_Begin (RecordSectionId); @@ -1277,7 +1277,7 @@ static void Rec_ShowRecordOneTchCrs (void) Rec_WriteFormShowOfficeHoursOneTch (ShowOfficeHours); /* Print view */ - Frm_StartForm (ActPrnRecSevTch); + Frm_BeginForm (ActPrnRecSevTch); Usr_CreateListSelectedUsrsCodsAndFillWithOtherUsr (&Gbl.Usrs.Selected); Usr_PutHiddenParSelectedUsrsCods (&Gbl.Usrs.Selected); Usr_FreeListsSelectedEncryptedUsrsCods (&Gbl.Usrs.Selected); @@ -1289,7 +1289,7 @@ static void Rec_ShowRecordOneTchCrs (void) Mnu_ContextMenuEnd (); - /***** Start container for this user *****/ + /***** Begin container for this user *****/ HTM_DIV_Begin ("class=\"REC_USR\""); /***** Shared record *****/ @@ -1310,7 +1310,7 @@ static void Rec_ShowRecordOneTchCrs (void) HTM_DIV_End (); } - /***** Start container for this user *****/ + /***** Begin container for this user *****/ HTM_DIV_End (); } @@ -1367,7 +1367,7 @@ static void Rec_ListRecordsTchs (Rec_SharedRecordViewType_t TypeOfView) Rec_WriteFormShowOfficeHoursSeveralTchs (ShowOfficeHours); /* Print view */ - Frm_StartForm (ActPrnRecSevTch); + Frm_BeginForm (ActPrnRecSevTch); Usr_PutHiddenParSelectedUsrsCods (&Gbl.Usrs.Selected); Par_PutHiddenParamChar ("ParamOfficeHours",'Y'); Par_PutHiddenParamChar ("ShowOfficeHours", @@ -1396,7 +1396,7 @@ static void Rec_ListRecordsTchs (Rec_SharedRecordViewType_t TypeOfView) his/her inscription in the current course */ UsrDat.Accepted = Usr_CheckIfUsrHasAcceptedInCurrentCrs (&UsrDat); - /* Start container for this user */ + /* Begin container for this user */ snprintf (RecordSectionId,sizeof (RecordSectionId),"record_%u",NumUsr); HTM_SECTION_Begin (RecordSectionId); @@ -1677,7 +1677,7 @@ static void Rec_ShowCrsRecord (Rec_CourseRecordViewType_t TypeOfView, if (Gbl.Crs.Records.LstFields.Lst[NumField].Visibility == Rec_EDITABLE_FIELD) { ICanEdit = true; - Frm_StartForm (ActRcvRecCrs); + Frm_BeginForm (ActRcvRecCrs); break; } } @@ -2262,10 +2262,10 @@ void Rec_ShowSharedUsrRecord (Rec_SharedRecordViewType_t TypeOfView, switch (TypeOfView) { case Rec_SHA_SIGN_UP_IN_CRS_FORM: - Frm_StartForm (ActSignUp); + Frm_BeginForm (ActSignUp); break; case Rec_SHA_MY_RECORD_FORM: - Frm_StartForm (ActChgMyData); + Frm_BeginForm (ActChgMyData); break; case Rec_SHA_OTHER_EXISTING_USR_FORM: switch (Gbl.Action.Act) @@ -2283,7 +2283,7 @@ void Rec_ShowSharedUsrRecord (Rec_SharedRecordViewType_t TypeOfView, NextAction = ActUpdOth; break; } - Frm_StartForm (NextAction); + Frm_BeginForm (NextAction); Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod); // Existing user break; case Rec_SHA_OTHER_NEW_USR_FORM: @@ -2302,7 +2302,7 @@ void Rec_ShowSharedUsrRecord (Rec_SharedRecordViewType_t TypeOfView, NextAction = ActCreOth; break; } - Frm_StartForm (NextAction); + Frm_BeginForm (NextAction); ID_PutParamOtherUsrIDPlain (); // New user break; default: @@ -2428,7 +2428,7 @@ static void Rec_PutIconsCommands (__attribute__((unused)) void *Args) ICanViewUsrProfile = Pri_ShowingIsAllowed (Gbl.Record.UsrDat->BaPrfVisibility, Gbl.Record.UsrDat); - /***** Start container *****/ + /***** Begin container *****/ HTM_DIV_Begin ("class=\"FRAME_ICO\""); if (ItsMe) @@ -2669,7 +2669,7 @@ static void Rec_ShowInstitutionInHead (struct Ins_Instit *Ins,bool PutFormLinks) /* Form to go to the institution */ if (PutFormLinks) { - Frm_StartFormGoTo (ActSeeInsInf); + Frm_BeginFormGoTo (ActSeeInsInf); Ins_PutParamInsCod (Ins->InsCod); HTM_BUTTON_SUBMIT_Begin (Ins->FullName,"BT_LINK",NULL); } @@ -2690,7 +2690,7 @@ static void Rec_ShowInstitutionInHead (struct Ins_Instit *Ins,bool PutFormLinks) /* Form to go to the institution */ if (PutFormLinks) { - Frm_StartFormGoTo (ActSeeInsInf); + Frm_BeginFormGoTo (ActSeeInsInf); Ins_PutParamInsCod (Ins->InsCod); HTM_BUTTON_SUBMIT_Begin (Ins->FullName,"BT_LINK REC_HEAD LM",NULL); } @@ -2763,7 +2763,7 @@ static void Rec_ShowNickname (struct UsrData *UsrDat,bool PutFormLinks) { /* Put form to go to public profile */ ItsMe = Usr_ItsMe (UsrDat->UsrCod); - Frm_StartForm (ActSeeOthPubPrf); + Frm_BeginForm (ActSeeOthPubPrf); Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod); HTM_BUTTON_SUBMIT_Begin (ItsMe ? Txt_My_public_profile : Txt_Another_user_s_profile, @@ -3780,7 +3780,7 @@ void Rec_ShowMySharedRecordAndMore (void) Ale_ShowAlert (Ale_WARNING,Txt_Please_select_your_department); } - /***** Start container *****/ + /***** Begin container *****/ HTM_DIV_Begin ("class=\"REC_USR\""); /***** Left part *****/ @@ -3792,7 +3792,7 @@ void Rec_ShowMySharedRecordAndMore (void) HTM_DIV_End (); /***** Right part *****/ - /* Start container for right part */ + /* Begin container for right part */ HTM_DIV_Begin ("class=\"REC_RIGHT\""); /* My institution, centre and department */ @@ -3833,7 +3833,7 @@ static void Rec_ShowFormMyInsCtrDpt (bool IAmATeacher) unsigned NumCtr; char StrRecordWidth[Cns_MAX_DECIMAL_DIGITS_UINT + 1]; - /***** Start section *****/ + /***** Begin section *****/ HTM_SECTION_Begin (Rec_MY_INS_CTR_DPT_ID); /***** Begin box and table *****/ diff --git a/swad_report.c b/swad_report.c index 726cc45b..99f6a7bc 100644 --- a/swad_report.c +++ b/swad_report.c @@ -155,7 +155,7 @@ void Rep_ReqMyUsageReport (void) extern const char *Txt_Generate_report; /***** Form to show my usage report *****/ - Frm_StartForm (ActSeeMyUsgRep); + Frm_BeginForm (ActSeeMyUsgRep); /***** Begin box *****/ Box_BoxBegin (NULL,Str_BuildStringStr (Txt_Report_of_use_of_PLATFORM, @@ -495,7 +495,7 @@ static void Rep_WriteSectionPlatform (void) extern const char *Txt_TAGLINE; extern const char *Txt_URL; - /***** Start section *****/ + /***** Begin section *****/ fprintf (Gbl.F.Rep,"
" "

%s

", Txt_Teaching_platform); @@ -534,7 +534,7 @@ static void Rep_WriteSectionUsrInfo (void) char CtyName[Cns_HIERARCHY_MAX_BYTES_FULL_NAME + 1]; struct Ins_Instit Ins; - /***** Start section *****/ + /***** Begin section *****/ fprintf (Gbl.F.Rep,"
" "

%s

", Txt_Personal_information); @@ -596,7 +596,7 @@ static void Rep_WriteSectionUsrFigures (const struct Rep_Report *Report) unsigned NumFiles; unsigned NumPublicFiles; - /***** Start section *****/ + /***** Begin section *****/ fprintf (Gbl.F.Rep,"
" "

%s

", Txt_Figures); @@ -738,7 +738,7 @@ static void Rep_WriteSectionGlobalHits (struct Rep_Report *Report) { extern const char *Txt_Hits_per_year; - /***** Start section *****/ + /***** Begin section *****/ fprintf (Gbl.F.Rep,"
" "

%s

", Txt_Hits_per_year); @@ -772,7 +772,7 @@ static void Rep_WriteSectionHitsPerAction (struct Rep_Report *Report) Tab_Tab_t Tab; unsigned long NumClicks; - /***** Start section *****/ + /***** Begin section *****/ fprintf (Gbl.F.Rep,"
" "

%s

", Txt_Hits_per_action); @@ -853,7 +853,7 @@ static void Rep_WriteSectionCurrentCourses (struct Rep_Report *Report) extern const char *Txt_Courses; Rol_Role_t Role; - /***** Start section *****/ + /***** Begin section *****/ fprintf (Gbl.F.Rep,"
" "

%s", Txt_Courses); @@ -885,7 +885,7 @@ static void Rep_WriteSectionHistoricCourses (struct Rep_Report *Report) extern const char *Txt_Only_courses_with_more_than_X_clicks_are_shown; Rol_Role_t Role; - /***** Start section *****/ + /***** Begin section *****/ fprintf (Gbl.F.Rep,"
" "

%s (%s)

", Txt_Courses,Txt_historical_log); diff --git a/swad_role.c b/swad_role.c index cfe71278..32eaf356 100644 --- a/swad_role.c +++ b/swad_role.c @@ -474,7 +474,7 @@ void Rol_PutFormToChangeMyRole (const char *ClassSelect) unsigned RoleUnsigned; bool PutClassSelect; - Frm_StartForm (ActChgMyRol); + Frm_BeginForm (ActChgMyRol); PutClassSelect = false; if (ClassSelect) if (ClassSelect[0]) diff --git a/swad_room.c b/swad_room.c index fd25402e..72e25791 100644 --- a/swad_room.c +++ b/swad_room.c @@ -216,7 +216,7 @@ void Roo_SeeRooms (void) Order++) { HTM_TH_Begin (1,1,"LM"); - Frm_StartForm (ActSeeRoo); + Frm_BeginForm (ActSeeRoo); Par_PutHiddenParamUnsigned (NULL,"Order",(unsigned) Order); HTM_BUTTON_SUBMIT_Begin (Txt_ROOMS_HELP_ORDER[Order],"BT_LINK TIT_TBL",NULL); if (Order == Rooms.SelectedOrder) @@ -306,7 +306,7 @@ void Roo_SeeRooms (void) /***** Button to create room *****/ if (Roo_CheckIfICanCreateRooms ()) { - Frm_StartForm (ActEdiRoo); + Frm_BeginForm (ActEdiRoo); Btn_PutConfirmButton (Txt_New_room); Frm_EndForm (); } @@ -1404,7 +1404,7 @@ static void Roo_PutFormToCreateRoom (const struct Bld_Buildings *Buildings) char MACstr[MAC_LENGTH_MAC_ADDRESS + 1]; // MAC address in xx:xx:xx:xx:xx:xx format /***** Begin form *****/ - Frm_StartForm (ActNewRoo); + Frm_BeginForm (ActNewRoo); /***** Begin box and table *****/ Box_BoxTableBegin (NULL,Txt_New_room, diff --git a/swad_search.c b/swad_search.c index 9564d1db..b7a74b4d 100644 --- a/swad_search.c +++ b/swad_search.c @@ -140,7 +140,7 @@ static void Sch_PutFormToSearchWithWhatToSearchAndScope (Act_Action_t Action,Hie Hlp_START_Search,Box_NOT_CLOSABLE); /***** Begin form *****/ - Frm_StartForm (Action); + Frm_BeginForm (Action); /***** Scope (whole platform, current country, current institution, current centre, current degree or current course) *****/ @@ -230,7 +230,7 @@ void Sch_PutFormToSearchInPageTopHeading (void) HTM_DIV_Begin ("id=\"head_row_1_search\""); /***** Put form *****/ - Frm_StartForm (ActSch); + Frm_BeginForm (ActSch); Sco_PutParamScope ("ScopeSch",Hie_Lvl_SYS); Sch_PutInputStringToSearch ("head_search_text"); Sch_PutMagnifyingGlassButton ("search-white.svg"); diff --git a/swad_setting.c b/swad_setting.c index fd4530b7..c69231a2 100644 --- a/swad_setting.c +++ b/swad_setting.c @@ -260,7 +260,7 @@ static void Set_PutIconsToSelectSideCols (void) { HTM_DIV_Begin ("class=\"%s\"",SideCols == Gbl.Prefs.SideCols ? "PREF_ON" : "PREF_OFF"); - Frm_StartForm (ActChgCol); + Frm_BeginForm (ActChgCol); Par_PutHiddenParamUnsigned (NULL,"SideCols",SideCols); snprintf (Icon,sizeof (Icon),"layout%u%u_32x20.gif", SideCols >> 1,SideCols & 1); diff --git a/swad_statistic.c b/swad_statistic.c index 6af920f1..d3b9cfb9 100644 --- a/swad_statistic.c +++ b/swad_statistic.c @@ -288,7 +288,7 @@ static void Sta_PutFormCrsHits (struct Sta_Stats *Stats) Grp_ShowFormToSelectSeveralGroups (NULL,NULL, Grp_MY_GROUPS); - /***** Start section with user list *****/ + /***** Begin section with user list *****/ HTM_SECTION_Begin (Usr_USER_LIST_SECTION_ID); if (NumTotalUsrs) @@ -3726,7 +3726,7 @@ static void Sta_ShowNumHitsPerCourse (Sta_CountType_t CountType, HTM_TD_Begin ("class=\"LOG LT\""); if (CrsOK) { - Frm_StartFormGoTo (ActSeeCrsInf); + Frm_BeginFormGoTo (ActSeeCrsInf); Crs_PutParamCrsCod (Crs.CrsCod); HTM_BUTTON_SUBMIT_Begin (Hie_BuildGoToMsg (Crs.FullName),"BT_LINK LT LOG",NULL); Hie_FreeGoToMsg (); diff --git a/swad_survey.c b/swad_survey.c index 45a9953b..86b1e441 100644 --- a/swad_survey.c +++ b/swad_survey.c @@ -274,7 +274,7 @@ static void Svy_ListAllSurveys (struct Svy_Surveys *Surveys) HTM_TH_Begin (1,1,"LM"); /* Form to change order */ - Frm_StartForm (ActSeeAllSvy); + Frm_BeginForm (ActSeeAllSvy); WhichGroups = Grp_GetParamWhichGroups (); Grp_PutParamWhichGroups (&WhichGroups); Pag_PutHiddenParamPagNum (Pag_SURVEYS,Surveys->CurrentPage); @@ -379,7 +379,7 @@ static void Svy_PutButtonToCreateNewSvy (struct Svy_Surveys *Surveys) { extern const char *Txt_New_survey; - Frm_StartForm (ActFrmNewSvy); + Frm_BeginForm (ActFrmNewSvy); Svy_PutParamsToCreateNewSvy (Surveys); Btn_PutConfirmButton (Txt_New_survey); Frm_EndForm (); @@ -552,7 +552,7 @@ static void Svy_ShowOneSurvey (struct Svy_Surveys *Surveys, else HTM_TD_Begin ("class=\"LT COLOR%u\"",Gbl.RowEvenOdd); HTM_ARTICLE_Begin (Anchor); - Frm_StartForm (ActSeeSvy); + Frm_BeginForm (ActSeeSvy); Svy_PutParamSvyCod (SvyCod); Svy_PutHiddenParamSvyOrder (Surveys->SelectedOrder); WhichGroups = Grp_GetParamWhichGroups (); @@ -594,7 +594,7 @@ static void Svy_ShowOneSurvey (struct Svy_Surveys *Surveys, { HTM_DIV_Begin ("class=\"BUTTONS_AFTER_ALERT\""); - Frm_StartForm (ActSeeSvy); + Frm_BeginForm (ActSeeSvy); Svy_PutParamSvyCod (Svy.SvyCod); Svy_PutHiddenParamSvyOrder (Surveys->SelectedOrder); WhichGroups = Grp_GetParamWhichGroups (); @@ -610,7 +610,7 @@ static void Svy_ShowOneSurvey (struct Svy_Surveys *Surveys, { HTM_DIV_Begin ("class=\"BUTTONS_AFTER_ALERT\""); - Frm_StartForm (ActSeeSvy); + Frm_BeginForm (ActSeeSvy); Svy_PutParamSvyCod (Svy.SvyCod); Svy_PutHiddenParamSvyOrder (Surveys->SelectedOrder); WhichGroups = Grp_GetParamWhichGroups (); @@ -1717,7 +1717,7 @@ static void Svy_PutButtonToResetSurvey (struct Svy_Surveys *Surveys) { extern const char *Txt_Reset_survey; - Frm_StartForm (ActRstSvy); + Frm_BeginForm (ActRstSvy); Svy_PutParams (Surveys); Btn_PutRemoveButton (Txt_Reset_survey); Frm_EndForm (); @@ -1931,7 +1931,7 @@ void Svy_RequestCreatOrEditSvy (void) /***** Begin form *****/ Surveys.SvyCod = Svy.SvyCod; - Frm_StartForm (ItsANewSurvey ? ActNewSvy : + Frm_BeginForm (ItsANewSurvey ? ActNewSvy : ActChgSvy); Svy_PutParams (&Surveys); @@ -2751,7 +2751,7 @@ static void Svy_ShowFormEditOneQst (struct Svy_Surveys *Surveys, Hlp_ASSESSMENT_Surveys_questions,Box_NOT_CLOSABLE); /***** Begin form *****/ - Frm_StartForm (ActRcvSvyQst); + Frm_BeginForm (ActRcvSvyQst); Svy_PutParamSvyCod (SvyCod); if (SvyQst->QstCod > 0) // If the question already has assigned a code Svy_PutParamQstCod (SvyQst->QstCod); @@ -3277,7 +3277,7 @@ static void Svy_ListSvyQuestions (struct Svy_Surveys *Surveys, if (PutFormAnswerSurvey) { /***** Begin form to send answers to survey *****/ - Frm_StartForm (ActAnsSvy); + Frm_BeginForm (ActAnsSvy); Svy_PutParamSvyCod (Svy->SvyCod); } @@ -3414,7 +3414,7 @@ static void Svy_PutButtonToCreateNewQuestion (struct Svy_Surveys *Surveys) { extern const char *Txt_New_question; - Frm_StartForm (ActEdiOneSvyQst); + Frm_BeginForm (ActEdiOneSvyQst); Svy_PutParams (Surveys); Btn_PutConfirmButton (Txt_New_question); Frm_EndForm (); diff --git a/swad_syllabus.c b/swad_syllabus.c index 37b1d6b8..11b97df4 100644 --- a/swad_syllabus.c +++ b/swad_syllabus.c @@ -156,7 +156,7 @@ void Syl_PutFormWhichSyllabus (Syl_WhichSyllabus_t SyllabusSelected) Syl_WhichSyllabus_t WhichSyl; /***** Form to select which syllabus I want to see (lectures/practicals) *****/ - Frm_StartForm (ActSeeSyl); + Frm_BeginForm (ActSeeSyl); HTM_DIV_Begin ("class=\"CM\""); HTM_UL_Begin ("class=\"LIST_LEFT\""); @@ -260,7 +260,7 @@ bool Syl_CheckAndEditSyllabus (struct Syl_Syllabus *Syllabus) if (Syllabus->EditionIsActive) { /***** Button to view *****/ - Frm_StartForm (Inf_ActionsSeeInfo[Gbl.Crs.Info.Type]); + Frm_BeginForm (Inf_ActionsSeeInfo[Gbl.Crs.Info.Type]); Btn_PutConfirmButton (Txt_Done); Frm_EndForm (); } @@ -861,7 +861,7 @@ static void Syl_PutFormItemSyllabus (struct Syl_Syllabus *Syllabus, /***** Text of the item *****/ HTM_TD_Begin ("colspan=\"%d\" class=\"LM COLOR%u\"", Syl_LstItemsSyllabus.NumLevels - Level + 1,Gbl.RowEvenOdd); - Frm_StartForm (NewItem ? (Gbl.Crs.Info.Type == Inf_LECTURES ? ActInsIteSylLec : + Frm_BeginForm (NewItem ? (Gbl.Crs.Info.Type == Inf_LECTURES ? ActInsIteSylLec : ActInsIteSylPra) : (Gbl.Crs.Info.Type == Inf_LECTURES ? ActModIteSylLec : ActModIteSylPra)); diff --git a/swad_system_config.c b/swad_system_config.c index b57e193a..e0aa63ae 100644 --- a/swad_system_config.c +++ b/swad_system_config.c @@ -348,7 +348,7 @@ static void SysCfg_NumCtys (void) /* Data */ HTM_TD_Begin ("class=\"LB\""); - Frm_StartFormGoTo (ActSeeCty); + Frm_BeginFormGoTo (ActSeeCty); HTM_BUTTON_SUBMIT_Begin (Txt_Countries,"BT_LINK DAT",NULL); HTM_Unsigned (Cty_GetCachedNumCtysInSys ()); HTM_BUTTON_End (); diff --git a/swad_tab.c b/swad_tab.c index 0ee5ba86..c3fd4c02 100644 --- a/swad_tab.c +++ b/swad_tab.c @@ -113,7 +113,7 @@ void Tab_DrawTabs (void) else HTM_DIV_Begin ("class=\"ICO_HIGHLIGHT\""); - Frm_StartForm (ActMnu); + Frm_BeginForm (ActMnu); Par_PutHiddenParamUnsigned (NULL,"NxtTab",(unsigned) NumTab); HTM_BUTTON_SUBMIT_Begin (Txt_TABS_TXT[NumTab], NumTab == Gbl.Action.Tab ? "BT_LINK" : diff --git a/swad_tag.c b/swad_tag.c index 9f3b1473..42f430ba 100644 --- a/swad_tag.c +++ b/swad_tag.c @@ -584,7 +584,7 @@ void Tag_ShowFormEditTags (void) /* Form to rename this tag */ HTM_TD_Begin ("class=\"LM\""); - Frm_StartForm (ActRenTag); + Frm_BeginForm (ActRenTag); Par_PutHiddenParamString (NULL,"OldTagTxt",row[1]); HTM_INPUT_TEXT ("NewTagTxt",Tag_MAX_CHARS_TAG,row[1], HTM_SUBMIT_ON_CHANGE, @@ -614,7 +614,7 @@ static void Tag_PutIconEnable (long TagCod,const char *TagTxt) extern const char *Txt_Tag_X_not_allowed_Click_to_allow_it; HTM_TD_Begin ("class=\"BM\""); - Frm_StartForm (ActEnaTag); + Frm_BeginForm (ActEnaTag); Par_PutHiddenParamLong (NULL,"TagCod",TagCod); Ico_PutIconLink ("eye-slash-red.svg", Str_BuildStringStr (Txt_Tag_X_not_allowed_Click_to_allow_it, @@ -633,7 +633,7 @@ static void Tag_PutIconDisable (long TagCod,const char *TagTxt) extern const char *Txt_Tag_X_allowed_Click_to_disable_it; HTM_TD_Begin ("class=\"BM\""); - Frm_StartForm (ActDisTag); + Frm_BeginForm (ActDisTag); Par_PutHiddenParamLong (NULL,"TagCod",TagCod); Ico_PutIconLink ("eye-green.svg", Str_BuildStringStr (Txt_Tag_X_allowed_Click_to_disable_it, diff --git a/swad_test.c b/swad_test.c index 7d6a8b9a..2b834979 100644 --- a/swad_test.c +++ b/swad_test.c @@ -307,7 +307,7 @@ static void Tst_ShowFormRequestTest (struct Tst_Test *Test) /***** Check if minimum date-time of next access to test is older than now *****/ if (Tst_CheckIfNextTstAllowed ()) { - Frm_StartForm (ActSeeTst); + Frm_BeginForm (ActSeeTst); HTM_TABLE_BeginPadding (2); @@ -461,7 +461,7 @@ void Tst_ReceiveTestDraft (void) TstPrn_UpdatePrintInDB (&Print); /***** Show question and button to send the test *****/ - /* Start alert */ + /* Begin alert */ Ale_ShowAlert (Ale_WARNING,Txt_Please_review_your_answers_before_submitting_the_exam); /* Show the same test exam to be answered */ @@ -854,7 +854,7 @@ static void Tst_PutFormToEditQstMedia (const struct Med_Media *Media,int NumMedi /***** Set names of parameters depending on number of image in form *****/ Med_SetParamNames (&ParamUploadMedia,NumMedia); - /***** Start container *****/ + /***** Begin container *****/ HTM_DIV_Begin ("class=\"TEST_MED_EDIT_FORM\""); /***** Choice 1: No media *****/ @@ -1005,7 +1005,7 @@ static void Tst_ShowFormRequestEditTests (struct Tst_Test *Test) /***** Get tags already present in the table of questions *****/ if ((Test->Tags.Num = Tag_GetAllTagsFromCurrentCrs (&mysql_res))) { - Frm_StartForm (ActLstTstQst); + Frm_BeginForm (ActLstTstQst); Par_PutHiddenParamUnsigned (NULL,"Order",(unsigned) Tst_DEFAULT_ORDER); HTM_TABLE_BeginPadding (2); @@ -1103,7 +1103,7 @@ static void Tst_ShowFormRequestSelectTestsForSet (struct Exa_Exams *Exams, /***** Get tags already present in the table of questions *****/ if ((Test->Tags.Num = Tag_GetAllTagsFromCurrentCrs (&mysql_res))) { - Frm_StartForm (ActLstTstQstForSet); + Frm_BeginForm (ActLstTstQstForSet); ExaSet_PutParamsOneSet (Exams); HTM_TABLE_BeginPadding (2); @@ -1165,7 +1165,7 @@ static void Tst_ShowFormRequestSelectTestsForGame (struct Gam_Games *Games, /***** Get tags already present in the table of questions *****/ if ((Test->Tags.Num = Tag_GetAllTagsFromCurrentCrs (&mysql_res))) { - Frm_StartForm (ActGamLstTstQst); + Frm_BeginForm (ActGamLstTstQst); Gam_PutParams (Games); HTM_TABLE_BeginPadding (2); @@ -1315,7 +1315,7 @@ static void Tst_PutButtonToAddQuestion (void) { extern const char *Txt_New_question; - Frm_StartForm (ActEdiOneTstQst); + Frm_BeginForm (ActEdiOneTstQst); Btn_PutConfirmButton (Txt_New_question); Frm_EndForm (); } @@ -1419,7 +1419,7 @@ static void Tst_ShowFormConfigTst (void) Hlp_ASSESSMENT_Tests_configuring_tests,Box_NOT_CLOSABLE); /***** Begin form *****/ - Frm_StartForm (ActRcvCfgTst); + Frm_BeginForm (ActRcvCfgTst); /***** Tests are visible from plugins? *****/ HTM_TABLE_BeginCenterPadding (2); @@ -2216,7 +2216,7 @@ static void Tst_WriteHeadingRowQuestionsForEdition (struct Tst_Test *Test) if (Test->NumQsts > 1) { - Frm_StartForm (ActLstTstQst); + Frm_BeginForm (ActLstTstQst); Tst_PutParamsEditQst (Test); Par_PutHiddenParamUnsigned (NULL,"Order",(unsigned) Order); HTM_BUTTON_SUBMIT_Begin (Txt_TST_STR_ORDER_FULL[Order],"BT_LINK TIT_TBL",NULL); @@ -2299,7 +2299,7 @@ static void Tst_WriteQuestionListing (struct Tst_Test *Test,unsigned NumQst) if (Test->Question.Answer.Type == Tst_ANS_UNIQUE_CHOICE || Test->Question.Answer.Type == Tst_ANS_MULTIPLE_CHOICE) { - Frm_StartForm (ActChgShfTstQst); + Frm_BeginForm (ActChgShfTstQst); Tst_PutParamsEditQst (Test); Par_PutHiddenParamUnsigned (NULL,"Order",(unsigned) Test->SelectedOrder); HTM_INPUT_CHECKBOX ("Shuffle",HTM_SUBMIT_ON_CHANGE, @@ -2387,7 +2387,7 @@ static void Tst_ListOneOrMoreQuestionsForSelectionForSet (struct Exa_Exams *Exam Hlp_ASSESSMENT_Exams_questions,Box_NOT_CLOSABLE); /***** Begin form *****/ - Frm_StartForm (ActAddQstToExa); + Frm_BeginForm (ActAddQstToExa); ExaSet_PutParamsOneSet (Exams); /***** Select all questions *****/ @@ -2472,7 +2472,7 @@ static void Tst_ListOneOrMoreQuestionsForSelectionForGame (struct Gam_Games *Gam Hlp_ASSESSMENT_Games_questions,Box_NOT_CLOSABLE); /***** Begin form *****/ - Frm_StartForm (ActAddTstQstToGam); + Frm_BeginForm (ActAddTstQstToGam); Gam_PutParams (Games); /***** Select all questions *****/ @@ -3232,7 +3232,7 @@ static void Tst_PutFormEditOneQst (struct Tst_Question *Question) Hlp_ASSESSMENT_Questions_writing_a_question,Box_NOT_CLOSABLE); /***** Begin form *****/ - Frm_StartForm (ActRcvTstQst); + Frm_BeginForm (ActRcvTstQst); Tst_PutParamQstCod (&Question->QstCod); /***** Begin table *****/ diff --git a/swad_test_import.c b/swad_test_import.c index bc2c9fff..a24c12b5 100644 --- a/swad_test_import.c +++ b/swad_test_import.c @@ -164,7 +164,7 @@ void TsI_ShowFormImportQstsFromXML (void) Ale_ShowAlert (Ale_INFO,Txt_You_need_an_XML_file_containing_a_list_of_questions); /***** Write a form to import questions *****/ - Frm_StartForm (ActImpTstQst); + Frm_BeginForm (ActImpTstQst); HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]); HTM_TxtColonNBSP (Txt_XML_file); HTM_INPUT_FILE (Fil_NAME_OF_PARAM_FILENAME_ORG,".xml", diff --git a/swad_test_print.c b/swad_test_print.c index 6787dfac..6be2315b 100644 --- a/swad_test_print.c +++ b/swad_test_print.c @@ -284,7 +284,7 @@ void TstPrn_ShowTestPrintToFillIt (struct TstPrn_Print *Print, if (Print->NumQsts.All) { /***** Begin form *****/ - Frm_StartForm (Action[RequestOrConfirm]); + Frm_BeginForm (Action[RequestOrConfirm]); TstPrn_PutParamPrnCod (Print->PrnCod); Par_PutHiddenParamUnsigned (NULL,"NumTst",NumExamsGeneratedByMe); @@ -1885,7 +1885,7 @@ void TstPrn_SelDatesToSeeMyPrints (void) }; /***** Begin form *****/ - Frm_StartForm (ActSeeMyTstResCrs); + Frm_BeginForm (ActSeeMyTstResCrs); /***** Begin box and table *****/ Box_BoxTableBegin (NULL,Txt_Results, @@ -2202,7 +2202,7 @@ static void TstPrn_ShowUsrPrints (struct UsrData *UsrDat) HTM_TD_Begin ("class=\"RT LINE_LEFT COLOR%u\"",Gbl.RowEvenOdd); if (ICanView.Result) { - Frm_StartForm (Gbl.Action.Act == ActSeeMyTstResCrs ? ActSeeOneTstResMe : + Frm_BeginForm (Gbl.Action.Act == ActSeeMyTstResCrs ? ActSeeOneTstResMe : ActSeeOneTstResOth); TstPrn_PutParamPrnCod (Print.PrnCod); Ico_PutIconLink ("tasks.svg",Txt_View_test); diff --git a/swad_theme.c b/swad_theme.c index 3ca87b62..ef8c46ca 100644 --- a/swad_theme.c +++ b/swad_theme.c @@ -329,7 +329,7 @@ void The_PutIconsToSelectTheme (void) { HTM_DIV_Begin ("class=\"%s\"",Theme == Gbl.Prefs.Theme ? "PREF_ON" : "PREF_OFF"); - Frm_StartForm (ActChgThe); + Frm_BeginForm (ActChgThe); Par_PutHiddenParamString (NULL,"Theme",The_ThemeId[Theme]); snprintf (Icon,sizeof (Icon),"%s/%s/theme_32x20.gif", Cfg_ICON_FOLDER_THEMES,The_ThemeId[Theme]); diff --git a/swad_timeline.c b/swad_timeline.c index 1c29c62a..ba78949c 100644 --- a/swad_timeline.c +++ b/swad_timeline.c @@ -430,63 +430,68 @@ static void TL_ShowTimeline (struct TL_Timeline *Timeline, TL_PutIconsTimeline,NULL, Hlp_START_Timeline,Box_NOT_CLOSABLE); - /***** Put form to select users whom public activity is displayed *****/ - if (GlobalTimeline) - TL_Who_PutFormWho (Timeline); + /***** Put form to select users whom public activity is displayed *****/ + if (GlobalTimeline) + TL_Who_PutFormWho (Timeline); - /***** Form to write a new post *****/ - if (GlobalTimeline || - Usr_ItsMe (Gbl.Usrs.Other.UsrDat.UsrCod)) - TL_Pst_PutFormToWriteNewPost (Timeline); + /***** Form to write a new post *****/ + if (GlobalTimeline || + Usr_ItsMe (Gbl.Usrs.Other.UsrDat.UsrCod)) + TL_Pst_PutFormToWriteNewPost (Timeline); - /***** New publications refreshed dynamically via AJAX *****/ - if (GlobalTimeline) - { - /* Link to view new publications via AJAX */ - TL_Pub_PutLinkToViewNewPublications (); + /***** New publications refreshed dynamically via AJAX *****/ + if (GlobalTimeline) + { + /* Link to view new publications via AJAX */ + TL_Pub_PutLinkToViewNewPublications (); - /* Hidden list where insert - just received (not visible) publications via AJAX */ - HTM_UL_Begin ("id=\"just_now_timeline_list\" class=\"TL_LIST\""); + /* Hidden list where insert + just received (not visible) publications via AJAX */ + HTM_UL_Begin ("id=\"just_now_timeline_list\" class=\"TL_LIST\""); + HTM_UL_End (); + + /* Hidden list where insert + new (not visible) publications via AJAX */ + HTM_UL_Begin ("id=\"new_timeline_list\" class=\"TL_LIST\""); + HTM_UL_End (); + } + + /***** List recent publications in timeline *****/ + /* Begin list */ + HTM_UL_Begin ("id=\"timeline_list\" class=\"TL_LIST\""); + + /* For each publication in list... */ + for (Pub = Timeline->Pubs.Top, NumPubs = 0; + Pub; + Pub = Pub->Next, NumPubs++) + { + /* Get data of note */ + Not.NotCod = Pub->NotCod; + TL_Not_GetDataOfNoteByCod (&Not); + + /* Write note */ + HTM_LI_Begin ("class=\"%s\"",Not.NotCod == NotCodToHighlight ? "TL_WIDTH TL_SEP TL_NEW_PUB" : + "TL_WIDTH TL_SEP"); + TL_Not_CheckAndWriteNoteWithTopMsg (Timeline,&Not, + TL_Pub_GetTopMessage (Pub->PubType), + Pub->PublisherCod); + HTM_LI_End (); + } + + /* End list */ HTM_UL_End (); - /* Hidden list where insert - new (not visible) publications via AJAX */ - HTM_UL_Begin ("id=\"new_timeline_list\" class=\"TL_LIST\""); - HTM_UL_End (); - } + /***** If the number of publications shown is the maximum, + probably there will be more, so show link to get more *****/ + if (NumPubs == TL_Pub_MAX_REC_PUBS_TO_GET_AND_SHOW) + { + /* Link to view old publications via AJAX */ + TL_Pub_PutLinkToViewOldPublications (); - /***** List recent publications in timeline *****/ - HTM_UL_Begin ("id=\"timeline_list\" class=\"TL_LIST\""); - for (Pub = Timeline->Pubs.Top, NumPubs = 0; - Pub; - Pub = Pub->Next, NumPubs++) - { - /* Get data of note */ - Not.NotCod = Pub->NotCod; - TL_Not_GetDataOfNoteByCod (&Not); - - /* Write note */ - HTM_LI_Begin ("class=\"%s\"",Not.NotCod == NotCodToHighlight ? "TL_WIDTH TL_SEP TL_NEW_PUB" : - "TL_WIDTH TL_SEP"); - TL_Not_CheckAndWriteNoteWithTopMsg (Timeline,&Not, - TL_Pub_GetTopMessage (Pub->PubType), - Pub->PublisherCod); - HTM_LI_End (); - } - HTM_UL_End (); - - /***** If the number of publications shown is the maximum, - probably there will be more, so show link to get more *****/ - if (NumPubs == TL_Pub_MAX_REC_PUBS_TO_GET_AND_SHOW) - { - /* Link to view old publications via AJAX */ - TL_Pub_PutLinkToViewOldPublications (); - - /* Hidden list where insert old publications via AJAX */ - HTM_UL_Begin ("id=\"old_timeline_list\" class=\"TL_LIST\""); - HTM_UL_End (); - } + /* Hidden list where insert old publications via AJAX */ + HTM_UL_Begin ("id=\"old_timeline_list\" class=\"TL_LIST\""); + HTM_UL_End (); + } /***** End box *****/ Box_BoxEnd (); diff --git a/swad_timeline_comment.c b/swad_timeline_comment.c index e5c6a074..bce4f435 100644 --- a/swad_timeline_comment.c +++ b/swad_timeline_comment.c @@ -65,21 +65,21 @@ extern struct Globals Gbl; /***************************** Private prototypes ****************************/ /*****************************************************************************/ -static unsigned TL_Com_WriteHiddenComments (struct TL_Timeline *Timeline, - long NotCod, - char IdComments[Frm_MAX_BYTES_ID + 1], - unsigned NumInitialCommentsToGet); -static void TL_Com_WriteOneCommentInList (const struct TL_Timeline *Timeline, - MYSQL_RES *mysql_res); -static void TL_Com_LinkToShowOnlyLatestComments (const char IdComments[Frm_MAX_BYTES_ID + 1]); -static void TL_Com_LinkToShowPreviousComments (const char IdComments[Frm_MAX_BYTES_ID + 1], - unsigned NumInitialComments); -static void TL_Com_PutIconToToggleComments (const char *UniqueId, - const char *Icon,const char *Text); -static void TL_Com_CheckAndWriteComment (const struct TL_Timeline *Timeline, - struct TL_Com_Comment *Com); -static void TL_Com_WriteComment (const struct TL_Timeline *Timeline, - struct TL_Com_Comment *Com); +static unsigned TL_Com_WriteHiddenComms (struct TL_Timeline *Timeline, + long NotCod, + char IdComms[Frm_MAX_BYTES_ID + 1], + unsigned NumInitialCommsToGet); +static void TL_Com_WriteOneCommInList (const struct TL_Timeline *Timeline, + MYSQL_RES *mysql_res); +static void TL_Com_LinkToShowOnlyLatestComms (const char IdComms[Frm_MAX_BYTES_ID + 1]); +static void TL_Com_LinkToShowPreviousComms (const char IdComms[Frm_MAX_BYTES_ID + 1], + unsigned NumInitialComms); +static void TL_Com_PutIconToToggleComms (const char *UniqueId, + const char *Icon,const char *Text); +static void TL_Com_CheckAndWriteComm (const struct TL_Timeline *Timeline, + struct TL_Com_Comment *Com); +static void TL_Com_WriteComm (const struct TL_Timeline *Timeline, + struct TL_Com_Comment *Com); static void TL_Com_ShowAuthorPhoto (struct UsrData *UsrDat); static void TL_Com_WriteAuthorTimeAndContent (struct TL_Com_Comment *Com, const struct UsrData *UsrDat); @@ -89,34 +89,44 @@ static void TL_Com_WriteButtons (const struct TL_Timeline *Timeline, const struct TL_Com_Comment *Com, const struct UsrData *UsrDat); -static void TL_Com_PutFormToRemoveComment (const struct TL_Timeline *Timeline, - long PubCod); +static void TL_Com_PutFormToRemoveComm (const struct TL_Timeline *Timeline, + long PubCod); -static long TL_Com_ReceiveComment (void); +static long TL_Com_ReceiveComm (void); -static void TL_Com_RequestRemovalComment (struct TL_Timeline *Timeline); -static void TL_Com_PutParamsRemoveComment (void *Timeline); -static void TL_Com_RemoveComment (void); +static void TL_Com_RequestRemovalComm (struct TL_Timeline *Timeline); +static void TL_Com_PutParamsRemoveComm (void *Timeline); +static void TL_Com_RemoveComm (void); -static void TL_Com_GetDataOfCommentFromRow (MYSQL_ROW row, - struct TL_Com_Comment *Com); +static void TL_Com_GetDataOfCommFromRow (MYSQL_ROW row, + struct TL_Com_Comment *Com); -static void TL_Com_ResetComment (struct TL_Com_Comment *Com); +static void TL_Com_ResetComm (struct TL_Com_Comment *Com); /*****************************************************************************/ /********* Put an icon to toggle on/off the form to comment a note ***********/ /*****************************************************************************/ -void TL_Com_PutIconToToggleComment (const char UniqueId[Frm_MAX_BYTES_ID + 1]) +void TL_Com_PutIconToToggleComm (const char UniqueId[Frm_MAX_BYTES_ID + 1]) { extern const char *Txt_Comment; /***** Link to toggle on/off the form to comment a note *****/ + /* Begin container */ HTM_DIV_Begin ("id=\"%s_ico\" class=\"TL_ICO_COM_OFF\"",UniqueId); - HTM_A_Begin ("href=\"\" onclick=\"toggleNewComment ('%s');return false;\"", - UniqueId); - Ico_PutIcon ("comment-regular.svg",Txt_Comment,"CONTEXT_ICO_16x16"); - HTM_A_End (); + + /* Begin anchor */ + HTM_A_Begin ("href=\"\" onclick=\"toggleNewComment ('%s');" + "return false;\"", + UniqueId); + + /* Icon to toggle comment */ + Ico_PutIcon ("comment-regular.svg",Txt_Comment,"CONTEXT_ICO_16x16"); + + /* End anchor */ + HTM_A_End (); + + /* End container */ HTM_DIV_End (); } @@ -124,13 +134,18 @@ void TL_Com_PutIconToToggleComment (const char UniqueId[Frm_MAX_BYTES_ID + 1]) /********** Put an icon to toggle on/off the form to comment a note **********/ /*****************************************************************************/ -void TL_Com_PutIconCommentDisabled (void) +void TL_Com_PutIconCommDisabled (void) { extern const char *Txt_Comment; /***** Disabled icon to comment a note *****/ + /* Begin container */ HTM_DIV_Begin ("class=\"TL_ICO_COM_OFF TL_ICO_DISABLED\""); - Ico_PutIcon ("edit.svg",Txt_Comment,"ICO16x16"); + + /* Disabled icon */ + Ico_PutIcon ("edit.svg",Txt_Comment,"ICO16x16"); + + /* End container */ HTM_DIV_End (); } @@ -138,44 +153,44 @@ void TL_Com_PutIconCommentDisabled (void) /************************* Form to comment a note ****************************/ /*****************************************************************************/ -void TL_Com_PutHiddenFormToWriteNewComment (const struct TL_Timeline *Timeline, - long NotCod, - const char IdNewComment[Frm_MAX_BYTES_ID + 1]) +void TL_Com_PutHiddenFormToWriteNewComm (const struct TL_Timeline *Timeline, + long NotCod, + const char IdNewComm[Frm_MAX_BYTES_ID + 1]) { extern const char *Txt_New_TIMELINE_comment; bool ShowPhoto = false; char PhotoURL[PATH_MAX + 1]; - /***** Start container *****/ + /***** Begin container *****/ HTM_DIV_Begin ("id=\"%s\" class=\"TL_FORM_NEW_COM TL_RIGHT_WIDTH\"" " style=\"display:none;\"", - IdNewComment); + IdNewComm); - /***** Left: write author's photo (my photo) *****/ - HTM_DIV_Begin ("class=\"TL_COM_PHOTO\""); - ShowPhoto = Pho_ShowingUsrPhotoIsAllowed (&Gbl.Usrs.Me.UsrDat,PhotoURL); - Pho_ShowUsrPhoto (&Gbl.Usrs.Me.UsrDat,ShowPhoto ? PhotoURL : - NULL, - "PHOTO30x40",Pho_ZOOM,true); // Use unique id - HTM_DIV_End (); + /***** Left: write author's photo (my photo) *****/ + HTM_DIV_Begin ("class=\"TL_COM_PHOTO\""); + ShowPhoto = Pho_ShowingUsrPhotoIsAllowed (&Gbl.Usrs.Me.UsrDat,PhotoURL); + Pho_ShowUsrPhoto (&Gbl.Usrs.Me.UsrDat,ShowPhoto ? PhotoURL : + NULL, + "PHOTO30x40",Pho_ZOOM,true); // Use unique id + HTM_DIV_End (); - /***** Right: form to write the comment *****/ - /* Start right container */ - HTM_DIV_Begin ("class=\"TL_COM_CONT TL_COMM_WIDTH\""); + /***** Right: form to write the comment *****/ + /* Begin right container */ + HTM_DIV_Begin ("class=\"TL_COM_CONT TL_COMM_WIDTH\""); - /* Begin form to write the post */ - TL_Frm_FormStart (Timeline,TL_Frm_RECEIVE_COMM); - TL_Not_PutHiddenParamNotCod (NotCod); + /* Begin form to write the post */ + TL_Frm_BeginForm (Timeline,TL_Frm_RECEIVE_COMM); + TL_Not_PutHiddenParamNotCod (NotCod); - /* Textarea and button */ - TL_Pst_PutTextarea (Txt_New_TIMELINE_comment, - "TL_COM_TEXTAREA TL_COMM_WIDTH"); + /* Textarea and button */ + TL_Pst_PutTextarea (Txt_New_TIMELINE_comment, + "TL_COM_TEXTAREA TL_COMM_WIDTH"); - /* End form */ - Frm_EndForm (); + /* End form */ + TL_Frm_EndForm (); - /* End right container */ - HTM_DIV_End (); + /* End right container */ + HTM_DIV_End (); /***** End container *****/ HTM_DIV_End (); @@ -185,42 +200,42 @@ void TL_Com_PutHiddenFormToWriteNewComment (const struct TL_Timeline *Timeline, /*********************** Write comments in a note ****************************/ /*****************************************************************************/ -void TL_Com_WriteCommentsInNote (const struct TL_Timeline *Timeline, - const struct TL_Not_Note *Not) +void TL_Com_WriteCommsInNote (const struct TL_Timeline *Timeline, + const struct TL_Not_Note *Not) { MYSQL_RES *mysql_res; - unsigned NumComments; - unsigned NumInitialComments; - unsigned NumFinalCommentsToGet; - unsigned NumFinalCommentsGot; + unsigned NumComms; + unsigned NumInitialComms; + unsigned NumFinalCommsToGet; + unsigned NumFinalCommsGot; unsigned NumCom; - char IdComments[Frm_MAX_BYTES_ID + 1]; + char IdComms[Frm_MAX_BYTES_ID + 1]; /***** Get number of comments in note *****/ - NumComments = TL_DB_GetNumCommentsInNote (Not->NotCod); + NumComms = TL_DB_GetNumCommsInNote (Not->NotCod); /***** Trivial check: if no comments ==> nothing to do *****/ - if (!NumComments) + if (!NumComms) return; /***** Compute how many initial comments will be hidden and how many final comments will be visible *****/ // Never hide only one comment // So, the number of comments initially hidden must be 0 or >= 2 - if (NumComments <= TL_Com_NUM_VISIBLE_COMMENTS + 1) + if (NumComms <= TL_Com_NUM_VISIBLE_COMMENTS + 1) { - NumInitialComments = 0; - NumFinalCommentsToGet = NumComments; + NumInitialComms = 0; + NumFinalCommsToGet = NumComms; } else { - NumInitialComments = NumComments - TL_Com_NUM_VISIBLE_COMMENTS; - NumFinalCommentsToGet = TL_Com_NUM_VISIBLE_COMMENTS; + NumInitialComms = NumComms - TL_Com_NUM_VISIBLE_COMMENTS; + NumFinalCommsToGet = TL_Com_NUM_VISIBLE_COMMENTS; } /***** Get final comments of this note from database *****/ - NumFinalCommentsGot = TL_DB_GetFinalComments (Not->NotCod, - NumFinalCommentsToGet, + NumFinalCommsGot = TL_DB_GetFinalComms (Not->NotCod, + NumFinalCommsToGet, &mysql_res); /* Before clicking "See prev..." --> After clicking "See prev..." @@ -265,30 +280,28 @@ void TL_Com_WriteCommentsInNote (const struct TL_Timeline *Timeline, |_________________________________| |_________________________________| */ /***** Link to show initial hidden comments *****/ - if (NumInitialComments) + if (NumInitialComms) { /***** Create unique id for list of hidden comments *****/ - Frm_SetUniqueId (IdComments); + Frm_SetUniqueId (IdComms); /***** Link (initially hidden) to show only the latest comments *****/ - TL_Com_LinkToShowOnlyLatestComments (IdComments); + TL_Com_LinkToShowOnlyLatestComms (IdComms); /***** Div which content will be updated via AJAX *****/ - HTM_DIV_Begin ("id=\"%s\" class=\"TL_RIGHT_WIDTH\"",IdComments); - TL_Frm_FormToShowHiddenComments (Not->NotCod, - IdComments, - NumInitialComments); + HTM_DIV_Begin ("id=\"%s\" class=\"TL_RIGHT_WIDTH\"",IdComms); + TL_Frm_FormToShowHiddenComms (Not->NotCod,IdComms,NumInitialComms); HTM_DIV_End (); } /***** List final visible comments *****/ - if (NumFinalCommentsGot) + if (NumFinalCommsGot) { HTM_UL_Begin ("class=\"TL_LIST\""); - for (NumCom = 0; - NumCom < NumFinalCommentsGot; - NumCom++) - TL_Com_WriteOneCommentInList (Timeline,mysql_res); + for (NumCom = 0; + NumCom < NumFinalCommsGot; + NumCom++) + TL_Com_WriteOneCommInList (Timeline,mysql_res); HTM_UL_End (); } @@ -300,22 +313,22 @@ void TL_Com_WriteCommentsInNote (const struct TL_Timeline *Timeline, /********************** Write hidden comments via AJAX ***********************/ /*****************************************************************************/ -void TL_Com_ShowHiddenCommentsUsr (void) +void TL_Com_ShowHiddenCommsUsr (void) { /***** Get user whom profile is displayed *****/ Usr_GetParamOtherUsrCodEncryptedAndGetUsrData (); /***** Show hidden comments *****/ - TL_Com_ShowHiddenCommentsGbl (); + TL_Com_ShowHiddenCommsGbl (); } -void TL_Com_ShowHiddenCommentsGbl (void) +void TL_Com_ShowHiddenCommsGbl (void) { struct TL_Timeline Timeline; long NotCod; - char IdComments[Frm_MAX_BYTES_ID + 1]; - unsigned NumInitialCommentsToGet; - unsigned NumInitialCommentsGot; + char IdComms[Frm_MAX_BYTES_ID + 1]; + unsigned NumInitialCommsToGet; + unsigned NumInitialCommsGot; /***** Reset timeline context *****/ TL_ResetTimeline (&Timeline); @@ -325,17 +338,17 @@ void TL_Com_ShowHiddenCommentsGbl (void) NotCod = TL_Not_GetParamNotCod (); /* Get identifier */ - Par_GetParToText ("IdComments",IdComments,Frm_MAX_BYTES_ID); + Par_GetParToText ("IdComments",IdComms,Frm_MAX_BYTES_ID); /* Get number of comments to get */ - NumInitialCommentsToGet = (unsigned) Par_GetParToLong ("NumHidCom"); + NumInitialCommsToGet = (unsigned) Par_GetParToLong ("NumHidCom"); /***** Write HTML inside DIV with hidden comments *****/ - NumInitialCommentsGot = TL_Com_WriteHiddenComments (&Timeline, - NotCod,IdComments,NumInitialCommentsToGet); + NumInitialCommsGot = + TL_Com_WriteHiddenComms (&Timeline,NotCod,IdComms,NumInitialCommsToGet); /***** Link to show the first comments *****/ - TL_Com_LinkToShowPreviousComments (IdComments,NumInitialCommentsGot); + TL_Com_LinkToShowPreviousComms (IdComms,NumInitialCommsGot); } /*****************************************************************************/ @@ -343,40 +356,40 @@ void TL_Com_ShowHiddenCommentsGbl (void) /*****************************************************************************/ // Returns the number of comments got -static unsigned TL_Com_WriteHiddenComments (struct TL_Timeline *Timeline, - long NotCod, - char IdComments[Frm_MAX_BYTES_ID + 1], - unsigned NumInitialCommentsToGet) +static unsigned TL_Com_WriteHiddenComms (struct TL_Timeline *Timeline, + long NotCod, + char IdComms[Frm_MAX_BYTES_ID + 1], + unsigned NumInitialCommsToGet) { MYSQL_RES *mysql_res; - unsigned long NumInitialCommentsGot; + unsigned long NumInitialCommsGot; unsigned long NumCom; /***** Get comments of this note from database *****/ - NumInitialCommentsGot = TL_DB_GetInitialComments (NotCod, - NumInitialCommentsToGet, - &mysql_res); + NumInitialCommsGot = TL_DB_GetInitialComms (NotCod, + NumInitialCommsToGet, + &mysql_res); /***** List comments *****/ - HTM_UL_Begin ("id=\"com_%s\" class=\"TL_LIST\"",IdComments); - for (NumCom = 0; - NumCom < NumInitialCommentsGot; - NumCom++) - TL_Com_WriteOneCommentInList (Timeline,mysql_res); + HTM_UL_Begin ("id=\"com_%s\" class=\"TL_LIST\"",IdComms); + for (NumCom = 0; + NumCom < NumInitialCommsGot; + NumCom++) + TL_Com_WriteOneCommInList (Timeline,mysql_res); HTM_UL_End (); /***** Free structure that stores the query result *****/ DB_FreeMySQLResult (&mysql_res); - return NumInitialCommentsGot; + return NumInitialCommsGot; } /*****************************************************************************/ /************************* Write a comment in list ***************************/ /*****************************************************************************/ -static void TL_Com_WriteOneCommentInList (const struct TL_Timeline *Timeline, - MYSQL_RES *mysql_res) +static void TL_Com_WriteOneCommInList (const struct TL_Timeline *Timeline, + MYSQL_RES *mysql_res) { MYSQL_ROW row; struct TL_Com_Comment Com; @@ -386,11 +399,11 @@ static void TL_Com_WriteOneCommentInList (const struct TL_Timeline *Timeline, /***** Get data of comment *****/ row = mysql_fetch_row (mysql_res); - TL_Com_GetDataOfCommentFromRow (row,&Com); + TL_Com_GetDataOfCommFromRow (row,&Com); /***** Write comment *****/ HTM_LI_Begin ("class=\"TL_COM\""); - TL_Com_CheckAndWriteComment (Timeline,&Com); + TL_Com_CheckAndWriteComm (Timeline,&Com); HTM_LI_End (); /***** Free image *****/ @@ -401,16 +414,16 @@ static void TL_Com_WriteOneCommentInList (const struct TL_Timeline *Timeline, /****************** Link to show only the latest comments ********************/ /*****************************************************************************/ -static void TL_Com_LinkToShowOnlyLatestComments (const char IdComments[Frm_MAX_BYTES_ID + 1]) +static void TL_Com_LinkToShowOnlyLatestComms (const char IdComms[Frm_MAX_BYTES_ID + 1]) { extern const char *Txt_See_only_the_latest_COMMENTS; /***** Icon and text to show only the latest comments ****/ HTM_DIV_Begin ("id=\"con_%s\" class=\"TL_EXPAND_COM TL_RIGHT_WIDTH\"" " style=\"display:none;\"", // Hidden - IdComments); - TL_Com_PutIconToToggleComments (IdComments,"angle-down.svg", - Txt_See_only_the_latest_COMMENTS); + IdComms); + TL_Com_PutIconToToggleComms (IdComms,"angle-down.svg", + Txt_See_only_the_latest_COMMENTS); HTM_DIV_End (); } @@ -418,19 +431,19 @@ static void TL_Com_LinkToShowOnlyLatestComments (const char IdComments[Frm_MAX_B /********************* Link to show the first comments ***********************/ /*****************************************************************************/ -static void TL_Com_LinkToShowPreviousComments (const char IdComments[Frm_MAX_BYTES_ID + 1], - unsigned NumInitialComments) +static void TL_Com_LinkToShowPreviousComms (const char IdComms[Frm_MAX_BYTES_ID + 1], + unsigned NumInitialComms) { extern const char *Txt_See_the_previous_X_COMMENTS; /***** Icon and text to show only the latest comments ****/ HTM_DIV_Begin ("id=\"exp_%s\" class=\"TL_EXPAND_COM TL_RIGHT_WIDTH\"" " style=\"display:none;\"", // Hidden - IdComments); - TL_Com_PutIconToToggleComments (IdComments,"angle-up.svg", - Str_BuildStringLong (Txt_See_the_previous_X_COMMENTS, - (long) NumInitialComments)); - Str_FreeString (); + IdComms); + TL_Com_PutIconToToggleComms (IdComms,"angle-up.svg", + Str_BuildStringLong (Txt_See_the_previous_X_COMMENTS, + (long) NumInitialComms)); + Str_FreeString (); HTM_DIV_End (); } @@ -438,8 +451,8 @@ static void TL_Com_LinkToShowPreviousComments (const char IdComments[Frm_MAX_BYT /********** Put an icon to toggle on/off comments in a publication ***********/ /*****************************************************************************/ -static void TL_Com_PutIconToToggleComments (const char *UniqueId, - const char *Icon,const char *Text) +static void TL_Com_PutIconToToggleComms (const char *UniqueId, + const char *Icon,const char *Text) { extern const char *The_ClassFormLinkInBox[The_NUM_THEMES]; char *OnClick; @@ -449,7 +462,7 @@ static void TL_Com_PutIconToToggleComments (const char *UniqueId, /***** Link to toggle on/off some divs *****/ HTM_BUTTON_BUTTON_Begin (Text,The_ClassFormLinkInBox[Gbl.Prefs.Theme],OnClick); - Ico_PutIconTextLink (Icon,Text); + Ico_PutIconTextLink (Icon,Text); HTM_BUTTON_End (); free (OnClick); @@ -459,8 +472,8 @@ static void TL_Com_PutIconToToggleComments (const char *UniqueId, /************************** Check and write comment **************************/ /*****************************************************************************/ -static void TL_Com_CheckAndWriteComment (const struct TL_Timeline *Timeline, - struct TL_Com_Comment *Com) +static void TL_Com_CheckAndWriteComm (const struct TL_Timeline *Timeline, + struct TL_Com_Comment *Com) { /*__________________________________________ | _____ | | | \ \ @@ -487,15 +500,15 @@ static void TL_Com_CheckAndWriteComment (const struct TL_Timeline *Timeline, } /***** Write comment *****/ - TL_Com_WriteComment (Timeline,Com); + TL_Com_WriteComm (Timeline,Com); } /*****************************************************************************/ /******************************** Write comment ******************************/ /*****************************************************************************/ -static void TL_Com_WriteComment (const struct TL_Timeline *Timeline, - struct TL_Com_Comment *Com) +static void TL_Com_WriteComm (const struct TL_Timeline *Timeline, + struct TL_Com_Comment *Com) { struct UsrData UsrDat; // Author of the comment @@ -511,11 +524,11 @@ static void TL_Com_WriteComment (const struct TL_Timeline *Timeline, /* Begin container */ HTM_DIV_Begin ("class=\"TL_COM_CONT TL_COMM_WIDTH\""); - /* Right top: author's name, time, and content */ - TL_Com_WriteAuthorTimeAndContent (Com,&UsrDat); + /* Right top: author's name, time, and content */ + TL_Com_WriteAuthorTimeAndContent (Com,&UsrDat); - /* Right bottom: buttons */ - TL_Com_WriteButtons (Timeline,Com,&UsrDat); + /* Right bottom: buttons */ + TL_Com_WriteButtons (Timeline,Com,&UsrDat); /* End container */ HTM_DIV_End (); @@ -534,11 +547,16 @@ static void TL_Com_ShowAuthorPhoto (struct UsrData *UsrDat) char PhotoURL[PATH_MAX + 1]; /***** Show author's photo *****/ + /* Begin container */ HTM_DIV_Begin ("class=\"TL_COM_PHOTO\""); - ShowPhoto = Pho_ShowingUsrPhotoIsAllowed (UsrDat,PhotoURL); - Pho_ShowUsrPhoto (UsrDat,ShowPhoto ? PhotoURL : - NULL, - "PHOTO30x40",Pho_ZOOM,true); // Use unique id + + /* Author's photo */ + ShowPhoto = Pho_ShowingUsrPhotoIsAllowed (UsrDat,PhotoURL); + Pho_ShowUsrPhoto (UsrDat,ShowPhoto ? PhotoURL : + NULL, + "PHOTO30x40",Pho_ZOOM,true); // Use unique id + + /* End container */ HTM_DIV_End (); } @@ -569,13 +587,18 @@ static void TL_Com_WriteAuthorName (const struct UsrData *UsrDat) // Author extern const char *Txt_Another_user_s_profile; /***** Show user's name inside form to go to user's public profile *****/ - Frm_StartFormUnique (ActSeeOthPubPrf); + /* Begin form */ + Frm_BeginFormUnique (ActSeeOthPubPrf); Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod); - HTM_BUTTON_SUBMIT_Begin (Usr_ItsMe (UsrDat->UsrCod) ? Txt_My_public_profile : - Txt_Another_user_s_profile, - "BT_LINK TL_COM_AUTHOR TL_COMM_AUTHOR_WIDTH DAT_BOLD",NULL); - HTM_Txt (UsrDat->FullName); - HTM_BUTTON_End (); + + /* Author's name */ + HTM_BUTTON_SUBMIT_Begin (Usr_ItsMe (UsrDat->UsrCod) ? Txt_My_public_profile : + Txt_Another_user_s_profile, + "BT_LINK TL_COM_AUTHOR TL_COMM_AUTHOR_WIDTH DAT_BOLD",NULL); + HTM_Txt (UsrDat->FullName); + HTM_BUTTON_End (); + + /* End form */ Frm_EndForm (); } @@ -589,7 +612,7 @@ static void TL_Com_WriteContent (struct TL_Com_Comment *Com) if (Com->Content.Txt[0]) { HTM_DIV_Begin ("class=\"TL_TXT\""); - Msg_WriteMsgContent (Com->Content.Txt,Cns_MAX_BYTES_LONG_TEXT,true,false); + Msg_WriteMsgContent (Com->Content.Txt,Cns_MAX_BYTES_LONG_TEXT,true,false); HTM_DIV_End (); } @@ -613,17 +636,17 @@ static void TL_Com_WriteButtons (const struct TL_Timeline *Timeline, /***** Begin buttons container *****/ HTM_DIV_Begin ("class=\"TL_FOOT TL_COMM_WIDTH\""); - /***** Foot column 1: fav zone *****/ - HTM_DIV_Begin ("id=\"fav_com_%s_%u\" class=\"TL_FAV_COM TL_FAV_WIDTH\"", - Gbl.UniqueNameEncrypted,NumDiv); - TL_Fav_PutIconToFavUnfComment (Com,TL_Usr_SHOW_FEW_USRS); - HTM_DIV_End (); + /***** Foot column 1: fav zone *****/ + HTM_DIV_Begin ("id=\"fav_com_%s_%u\" class=\"TL_FAV_COM TL_FAV_WIDTH\"", + Gbl.UniqueNameEncrypted,NumDiv); + TL_Fav_PutIconToFavUnfComm (Com,TL_Usr_SHOW_FEW_USRS); + HTM_DIV_End (); - /***** Foot column 2: icon to remove this comment *****/ - HTM_DIV_Begin ("class=\"TL_REM\""); - if (Usr_ItsMe (UsrDat->UsrCod)) // I am the author - TL_Com_PutFormToRemoveComment (Timeline,Com->PubCod); - HTM_DIV_End (); + /***** Foot column 2: icon to remove this comment *****/ + HTM_DIV_Begin ("class=\"TL_REM\""); + if (Usr_ItsMe (UsrDat->UsrCod)) // I am the author + TL_Com_PutFormToRemoveComm (Timeline,Com->PubCod); + HTM_DIV_End (); /***** End buttons container *****/ HTM_DIV_End (); @@ -633,23 +656,28 @@ static void TL_Com_WriteButtons (const struct TL_Timeline *Timeline, /************************* Form to remove comment ****************************/ /*****************************************************************************/ -static void TL_Com_PutFormToRemoveComment (const struct TL_Timeline *Timeline, +static void TL_Com_PutFormToRemoveComm (const struct TL_Timeline *Timeline, long PubCod) { extern const char *Txt_Remove; /***** Form to remove publication *****/ - TL_Frm_FormStart (Timeline,TL_Frm_REQ_REM_COMM); + /* Begin form */ + TL_Frm_BeginForm (Timeline,TL_Frm_REQ_REM_COMM); TL_Pub_PutHiddenParamPubCod (PubCod); - Ico_PutIconLink ("trash.svg",Txt_Remove); - Frm_EndForm (); + + /* Icon to remove */ + Ico_PutIconLink ("trash.svg",Txt_Remove); + + /* End form */ + TL_Frm_EndForm (); } /*****************************************************************************/ /******************************* Comment a note ******************************/ /*****************************************************************************/ -void TL_Com_ReceiveCommentUsr (void) +void TL_Com_ReceiveCommUsr (void) { struct TL_Timeline Timeline; long NotCod; @@ -663,19 +691,19 @@ void TL_Com_ReceiveCommentUsr (void) /***** Show user's profile *****/ Prf_ShowUserProfile (&Gbl.Usrs.Other.UsrDat); - /***** Start section *****/ + /***** Begin section *****/ HTM_SECTION_Begin (TL_TIMELINE_SECTION_ID); - /***** Receive comment in a note - and write updated timeline after commenting (user) *****/ - NotCod = TL_Com_ReceiveComment (); - TL_ShowTimelineUsrHighlightingNot (&Timeline,NotCod); + /***** Receive comment in a note + and write updated timeline after commenting (user) *****/ + NotCod = TL_Com_ReceiveComm (); + TL_ShowTimelineUsrHighlightingNot (&Timeline,NotCod); /***** End section *****/ HTM_SECTION_End (); } -void TL_Com_ReceiveCommentGbl (void) +void TL_Com_ReceiveCommGbl (void) { struct TL_Timeline Timeline; long NotCod; @@ -684,13 +712,13 @@ void TL_Com_ReceiveCommentGbl (void) TL_InitTimelineGbl (&Timeline); /***** Receive comment in a note *****/ - NotCod = TL_Com_ReceiveComment (); + NotCod = TL_Com_ReceiveComm (); /***** Write updated timeline after commenting (global) *****/ TL_ShowTimelineGblHighlightingNot (&Timeline,NotCod); } -static long TL_Com_ReceiveComment (void) +static long TL_Com_ReceiveComm (void) { extern const char *Txt_The_original_post_no_longer_exists; struct TL_Pst_PostContent Content; @@ -736,7 +764,7 @@ static long TL_Com_ReceiveComment (void) TL_Pub_PublishPubInTimeline (&Pub); // Set Pub.PubCod /* Insert comment content in the database */ - TL_DB_InsertCommentContent (Pub.PubCod,&Content); + TL_DB_InsertCommContent (Pub.PubCod,&Content); /***** Store notifications about the new comment *****/ Ntf_StoreNotifyEventsToAllUsrs (Ntf_EVENT_TIMELINE_COMMENT,Pub.PubCod); @@ -768,14 +796,14 @@ void TL_Com_RequestRemComUsr (void) /***** Show user's profile *****/ Prf_ShowUserProfile (&Gbl.Usrs.Other.UsrDat); - /***** Start section *****/ + /***** Begin section *****/ HTM_SECTION_Begin (TL_TIMELINE_SECTION_ID); - /***** Request the removal of comment in note *****/ - TL_Com_RequestRemovalComment (&Timeline); + /***** Request the removal of comment in note *****/ + TL_Com_RequestRemovalComm (&Timeline); - /***** Write timeline again (user) *****/ - TL_ShowTimelineUsr (&Timeline); + /***** Write timeline again (user) *****/ + TL_ShowTimelineUsr (&Timeline); /***** End section *****/ HTM_SECTION_End (); @@ -789,13 +817,13 @@ void TL_Com_RequestRemComGbl (void) TL_InitTimelineGbl (&Timeline); /***** Request the removal of comment in note *****/ - TL_Com_RequestRemovalComment (&Timeline); + TL_Com_RequestRemovalComm (&Timeline); /***** Write timeline again (global) *****/ TL_ShowNoteAndTimelineGbl (&Timeline); } -static void TL_Com_RequestRemovalComment (struct TL_Timeline *Timeline) +static void TL_Com_RequestRemovalComm (struct TL_Timeline *Timeline) { extern const char *Txt_The_comment_no_longer_exists; extern const char *Txt_Do_you_really_want_to_remove_the_following_comment; @@ -828,24 +856,24 @@ static void TL_Com_RequestRemovalComment (struct TL_Timeline *Timeline) /* Begin alert */ TL_Frm_BeginAlertRemove (Txt_Do_you_really_want_to_remove_the_following_comment); - /* Show comment */ - Box_BoxBegin (NULL,NULL, - NULL,NULL, - NULL,Box_NOT_CLOSABLE); + /* Show comment */ + Box_BoxBegin (NULL,NULL, + NULL,NULL, + NULL,Box_NOT_CLOSABLE); - HTM_DIV_Begin ("class=\"TL_LEFT_PHOTO\""); - HTM_DIV_End (); + HTM_DIV_Begin ("class=\"TL_LEFT_PHOTO\""); + HTM_DIV_End (); - HTM_DIV_Begin ("class=\"TL_RIGHT_CONT TL_RIGHT_WIDTH\""); - TL_Com_CheckAndWriteComment (Timeline,&Com); - HTM_DIV_End (); + HTM_DIV_Begin ("class=\"TL_RIGHT_CONT TL_RIGHT_WIDTH\""); + TL_Com_CheckAndWriteComm (Timeline,&Com); + HTM_DIV_End (); - Box_BoxEnd (); + Box_BoxEnd (); /* End alert */ Timeline->PubCod = Com.PubCod; // Publication to be removed TL_Frm_EndAlertRemove (Timeline,TL_Frm_REM_COMM, - TL_Com_PutParamsRemoveComment); + TL_Com_PutParamsRemoveComm); /***** Free media *****/ Med_MediaDestructor (&Com.Content.Media); @@ -855,7 +883,7 @@ static void TL_Com_RequestRemovalComment (struct TL_Timeline *Timeline) /******************** Put parameters to remove a comment *********************/ /*****************************************************************************/ -static void TL_Com_PutParamsRemoveComment (void *Timeline) +static void TL_Com_PutParamsRemoveComm (void *Timeline) { if (Timeline) { @@ -884,14 +912,14 @@ void TL_Com_RemoveComUsr (void) /***** Show user's profile *****/ Prf_ShowUserProfile (&Gbl.Usrs.Other.UsrDat); - /***** Start section *****/ + /***** Begin section *****/ HTM_SECTION_Begin (TL_TIMELINE_SECTION_ID); - /***** Remove a comment *****/ - TL_Com_RemoveComment (); + /***** Remove a comment *****/ + TL_Com_RemoveComm (); - /***** Write updated timeline after removing (user) *****/ - TL_ShowTimelineUsr (&Timeline); + /***** Write updated timeline after removing (user) *****/ + TL_ShowTimelineUsr (&Timeline); /***** End section *****/ HTM_SECTION_End (); @@ -905,13 +933,13 @@ void TL_Com_RemoveComGbl (void) TL_InitTimelineGbl (&Timeline); /***** Remove a comment *****/ - TL_Com_RemoveComment (); + TL_Com_RemoveComm (); /***** Write updated timeline after removing (global) *****/ TL_ShowNoteAndTimelineGbl (&Timeline); } -static void TL_Com_RemoveComment (void) +static void TL_Com_RemoveComm (void) { extern const char *Txt_The_comment_no_longer_exists; extern const char *Txt_Comment_removed; @@ -942,13 +970,13 @@ static void TL_Com_RemoveComment (void) /***** Remove media associated to comment and delete comment from database *****/ - TL_Com_RemoveCommentMediaAndDBEntries (Com.PubCod); + TL_Com_RemoveCommMediaAndDBEntries (Com.PubCod); /***** Free media *****/ Med_MediaDestructor (&Com.Content.Media); /***** Reset fields of comment *****/ - TL_Com_ResetComment (&Com); + TL_Com_ResetComm (&Com); /***** Message of success *****/ Ale_ShowAlert (Ale_SUCCESS,Txt_Comment_removed); @@ -958,10 +986,10 @@ static void TL_Com_RemoveComment (void) /*************** Remove comment media and database entries *******************/ /*****************************************************************************/ -void TL_Com_RemoveCommentMediaAndDBEntries (long PubCod) +void TL_Com_RemoveCommMediaAndDBEntries (long PubCod) { /***** Remove media associated to comment *****/ - Med_RemoveMedia (TL_DB_GetMedCodFromComment (PubCod)); + Med_RemoveMedia (TL_DB_GetMedCodFromComm (PubCod)); /***** Mark possible notifications on this comment as removed *****/ Ntf_MarkNotifAsRemoved (Ntf_EVENT_TIMELINE_COMMENT,PubCod); @@ -969,13 +997,13 @@ void TL_Com_RemoveCommentMediaAndDBEntries (long PubCod) Ntf_MarkNotifAsRemoved (Ntf_EVENT_TIMELINE_MENTION,PubCod); /***** Remove favs for this comment *****/ - TL_DB_RemoveCommentFavs (PubCod); + TL_DB_RemoveCommFavs (PubCod); /***** Remove content of this comment *****/ - TL_DB_RemoveCommentContent (PubCod); + TL_DB_RemoveCommContent (PubCod); /***** Remove this comment publication *****/ - TL_DB_RemoveCommentPub (PubCod); + TL_DB_RemoveCommPub (PubCod); } /*****************************************************************************/ @@ -991,20 +1019,20 @@ void TL_Com_GetDataOfCommByCod (struct TL_Com_Comment *Com) if (Com->PubCod <= 0) { /***** Reset fields of comment *****/ - TL_Com_ResetComment (Com); + TL_Com_ResetComm (Com); return; } /***** Get data of comment from database *****/ if (TL_DB_GetDataOfCommByCod (Com->PubCod,&mysql_res)) { - /***** Get data of comment *****/ + /* Get data of comment */ row = mysql_fetch_row (mysql_res); - TL_Com_GetDataOfCommentFromRow (row,Com); + TL_Com_GetDataOfCommFromRow (row,Com); } else - /***** Reset fields of comment *****/ - TL_Com_ResetComment (Com); + /* Reset fields of comment */ + TL_Com_ResetComm (Com); /***** Free structure that stores the query result *****/ DB_FreeMySQLResult (&mysql_res); @@ -1014,8 +1042,8 @@ void TL_Com_GetDataOfCommByCod (struct TL_Com_Comment *Com) /********************** Get data of comment from row *************************/ /*****************************************************************************/ -static void TL_Com_GetDataOfCommentFromRow (MYSQL_ROW row, - struct TL_Com_Comment *Com) +static void TL_Com_GetDataOfCommFromRow (MYSQL_ROW row, + struct TL_Com_Comment *Com) { /* row[0]: PubCod @@ -1048,7 +1076,7 @@ static void TL_Com_GetDataOfCommentFromRow (MYSQL_ROW row, /************************** Reset fields of comment **************************/ /*****************************************************************************/ -static void TL_Com_ResetComment (struct TL_Com_Comment *Com) +static void TL_Com_ResetComm (struct TL_Com_Comment *Com) { Com->PubCod = Com->UsrCod = diff --git a/swad_timeline_comment.h b/swad_timeline_comment.h index d09a19a7..1d0419ae 100644 --- a/swad_timeline_comment.h +++ b/swad_timeline_comment.h @@ -52,28 +52,28 @@ struct TL_Com_Comment /****************************** Public prototypes ****************************/ /*****************************************************************************/ -void TL_Com_PutIconToToggleComment (const char UniqueId[Frm_MAX_BYTES_ID + 1]); -void TL_Com_PutIconCommentDisabled (void); +void TL_Com_PutIconToToggleComm (const char UniqueId[Frm_MAX_BYTES_ID + 1]); +void TL_Com_PutIconCommDisabled (void); -void TL_Com_PutHiddenFormToWriteNewComment (const struct TL_Timeline *Timeline, - long NotCod, - const char IdNewComment[Frm_MAX_BYTES_ID + 1]); +void TL_Com_PutHiddenFormToWriteNewComm (const struct TL_Timeline *Timeline, + long NotCod, + const char IdNewComm[Frm_MAX_BYTES_ID + 1]); -void TL_Com_WriteCommentsInNote (const struct TL_Timeline *Timeline, - const struct TL_Not_Note *Not); +void TL_Com_WriteCommsInNote (const struct TL_Timeline *Timeline, + const struct TL_Not_Note *Not); -void TL_Com_ShowHiddenCommentsUsr (void); -void TL_Com_ShowHiddenCommentsGbl (void); +void TL_Com_ShowHiddenCommsUsr (void); +void TL_Com_ShowHiddenCommsGbl (void); -void TL_Com_ReceiveCommentUsr (void); -void TL_Com_ReceiveCommentGbl (void); +void TL_Com_ReceiveCommUsr (void); +void TL_Com_ReceiveCommGbl (void); void TL_Com_RequestRemComUsr (void); void TL_Com_RequestRemComGbl (void); void TL_Com_RemoveComUsr (void); void TL_Com_RemoveComGbl (void); -void TL_Com_RemoveCommentMediaAndDBEntries (long PubCod); +void TL_Com_RemoveCommMediaAndDBEntries (long PubCod); void TL_Com_GetDataOfCommByCod (struct TL_Com_Comment *Com); diff --git a/swad_timeline_database.c b/swad_timeline_database.c index 9cf9ab87..d71a2e4d 100644 --- a/swad_timeline_database.c +++ b/swad_timeline_database.c @@ -464,7 +464,7 @@ void TL_DB_RemoveAllPostsUsr (long UsrCod) /********************* Get number of comments in a note **********************/ /*****************************************************************************/ -unsigned TL_DB_GetNumCommentsInNote (long NotCod) +unsigned TL_DB_GetNumCommsInNote (long NotCod) { return (unsigned) DB_QueryCOUNT ("can not get number of comments in a note", @@ -478,7 +478,7 @@ unsigned TL_DB_GetNumCommentsInNote (long NotCod) /*****************************************************************************/ // Returns the number of rows got -unsigned TL_DB_GetComments (long NotCod,MYSQL_RES **mysql_res) +unsigned TL_DB_GetComms (long NotCod,MYSQL_RES **mysql_res) { return (unsigned) DB_QuerySELECT (mysql_res,"can not get comments", @@ -493,9 +493,9 @@ unsigned TL_DB_GetComments (long NotCod,MYSQL_RES **mysql_res) /*****************************************************************************/ // Returns the number of rows got -unsigned TL_DB_GetInitialComments (long NotCod, - unsigned NumInitialCommentsToGet, - MYSQL_RES **mysql_res) +unsigned TL_DB_GetInitialComms (long NotCod, + unsigned NumInitialCommsToGet, + MYSQL_RES **mysql_res) { return (unsigned) DB_QuerySELECT (mysql_res,"can not get comments", @@ -512,7 +512,7 @@ unsigned TL_DB_GetInitialComments (long NotCod, " ORDER BY tl_pubs.PubCod" " LIMIT %lu", NotCod,(unsigned) TL_Pub_COMMENT_TO_NOTE, - NumInitialCommentsToGet); + NumInitialCommsToGet); } /*****************************************************************************/ @@ -520,9 +520,8 @@ unsigned TL_DB_GetInitialComments (long NotCod, /*****************************************************************************/ // Returns the number of rows got -unsigned TL_DB_GetFinalComments (long NotCod, - unsigned NumFinalCommentsToGet, - MYSQL_RES **mysql_res) +unsigned TL_DB_GetFinalComms (long NotCod,unsigned NumFinalCommsToGet, + MYSQL_RES **mysql_res) { /***** Get final comments of a note from database *****/ return (unsigned) @@ -543,7 +542,7 @@ unsigned TL_DB_GetFinalComments (long NotCod, ") AS comments" " ORDER BY PubCod", NotCod,(unsigned) TL_Pub_COMMENT_TO_NOTE, - NumFinalCommentsToGet); + NumFinalCommsToGet); } /*****************************************************************************/ @@ -577,8 +576,8 @@ unsigned TL_DB_GetDataOfCommByCod (long PubCod,MYSQL_RES **mysql_res) /******************* Insert comment content in database **********************/ /*****************************************************************************/ -void TL_DB_InsertCommentContent (long PubCod, - const struct TL_Pst_PostContent *Content) +void TL_DB_InsertCommContent (long PubCod, + const struct TL_Pst_PostContent *Content) { /***** Insert comment content in database *****/ DB_QueryINSERT ("can not store comment content", @@ -595,7 +594,7 @@ void TL_DB_InsertCommentContent (long PubCod, /**************** Get code of media associated to comment ********************/ /*****************************************************************************/ -long TL_DB_GetMedCodFromComment (long PubCod) +long TL_DB_GetMedCodFromComm (long PubCod) { return TL_DB_GetMedCod ("tl_comments","PubCod",PubCod); } @@ -604,7 +603,7 @@ long TL_DB_GetMedCodFromComment (long PubCod) /****************** Remove favs for comment from database ********************/ /*****************************************************************************/ -void TL_DB_RemoveCommentFavs (long PubCod) +void TL_DB_RemoveCommFavs (long PubCod) { /***** Remove favs for comment *****/ DB_QueryDELETE ("can not remove favs for comment", @@ -617,7 +616,7 @@ void TL_DB_RemoveCommentFavs (long PubCod) /***************** Remove content of comment from database *******************/ /*****************************************************************************/ -void TL_DB_RemoveCommentContent (long PubCod) +void TL_DB_RemoveCommContent (long PubCod) { /***** Remove content of comment *****/ DB_QueryDELETE ("can not remove comment content", @@ -630,7 +629,7 @@ void TL_DB_RemoveCommentContent (long PubCod) /***************** Remove comment publication from database ******************/ /*****************************************************************************/ -void TL_DB_RemoveCommentPub (long PubCod) +void TL_DB_RemoveCommPub (long PubCod) { /***** Remove comment publication *****/ DB_QueryDELETE ("can not remove comment", @@ -647,7 +646,7 @@ void TL_DB_RemoveCommentPub (long PubCod) /*********** Remove all comments in all the notes of a given user ************/ /*****************************************************************************/ -void TL_DB_RemoveAllCommentsInAllNotesOf (long UsrCod) +void TL_DB_RemoveAllCommsInAllNotesOf (long UsrCod) { /***** Remove all comments in all notes of the user *****/ DB_QueryDELETE ("can not remove comments", @@ -664,7 +663,7 @@ void TL_DB_RemoveAllCommentsInAllNotesOf (long UsrCod) /*********** Remove all comments made by a given user in any note ************/ /*****************************************************************************/ -void TL_DB_RemoveAllCommentsMadeBy (long UsrCod) +void TL_DB_RemoveAllCommsMadeBy (long UsrCod) { /***** Remove all comments made by this user in any note *****/ DB_QueryDELETE ("can not remove comments", @@ -1133,7 +1132,7 @@ void TL_DB_RemoveAllFavsToPubsBy (TL_Fav_WhatToFav_t WhatToFav,long UsrCod) /*** Remove all favs to all comments in all notes authored by a given user ***/ /*****************************************************************************/ -void TL_DB_RemoveAllFavsToAllCommentsInAllNotesBy (long UsrCod) +void TL_DB_RemoveAllFavsToAllCommsInAllNotesBy (long UsrCod) { /***** Remove all favs to all comments in all notes authored by this user *****/ diff --git a/swad_timeline_database.h b/swad_timeline_database.h index cc3fdda8..326c8383 100644 --- a/swad_timeline_database.h +++ b/swad_timeline_database.h @@ -83,23 +83,22 @@ void TL_DB_RemovePost (long PstCod); void TL_DB_RemoveAllPostsUsr (long UsrCod); /******************************** Comments ***********************************/ -unsigned TL_DB_GetNumCommentsInNote (long NotCod); -unsigned TL_DB_GetComments (long NotCod,MYSQL_RES **mysql_res); -unsigned TL_DB_GetInitialComments (long NotCod, - unsigned NumInitialCommentsToGet, - MYSQL_RES **mysql_res); -unsigned TL_DB_GetFinalComments (long NotCod, - unsigned NumFinalCommentsToGet, - MYSQL_RES **mysql_res); +unsigned TL_DB_GetNumCommsInNote (long NotCod); +unsigned TL_DB_GetComms (long NotCod,MYSQL_RES **mysql_res); +unsigned TL_DB_GetInitialComms (long NotCod, + unsigned NumInitialCommsToGet, + MYSQL_RES **mysql_res); +unsigned TL_DB_GetFinalComms (long NotCod,unsigned NumFinalCommsToGet, + MYSQL_RES **mysql_res); unsigned TL_DB_GetDataOfCommByCod (long PubCod,MYSQL_RES **mysql_res); -void TL_DB_InsertCommentContent (long PubCod, - const struct TL_Pst_PostContent *Content); -long TL_DB_GetMedCodFromComment (long PubCod); -void TL_DB_RemoveCommentFavs (long PubCod); -void TL_DB_RemoveCommentContent (long PubCod); -void TL_DB_RemoveCommentPub (long PubCod); -void TL_DB_RemoveAllCommentsInAllNotesOf (long UsrCod); -void TL_DB_RemoveAllCommentsMadeBy (long UsrCod); +void TL_DB_InsertCommContent (long PubCod, + const struct TL_Pst_PostContent *Content); +long TL_DB_GetMedCodFromComm (long PubCod); +void TL_DB_RemoveCommFavs (long PubCod); +void TL_DB_RemoveCommContent (long PubCod); +void TL_DB_RemoveCommPub (long PubCod); +void TL_DB_RemoveAllCommsInAllNotesOf (long UsrCod); +void TL_DB_RemoveAllCommsMadeBy (long UsrCod); /****************************** Publications *********************************/ void TL_DB_CreateSubQueryPublishers (const struct TL_Timeline *Timeline, @@ -136,7 +135,7 @@ void TL_DB_MarkAsFav (TL_Fav_WhatToFav_t WhatToFav,long Cod); void TL_DB_UnmarkAsFav (TL_Fav_WhatToFav_t WhatToFav,long Cod); void TL_DB_RemoveAllFavsMadeByUsr (TL_Fav_WhatToFav_t WhatToFav,long UsrCod); void TL_DB_RemoveAllFavsToPubsBy (TL_Fav_WhatToFav_t WhatToFav,long UsrCod); -void TL_DB_RemoveAllFavsToAllCommentsInAllNotesBy (long UsrCod); +void TL_DB_RemoveAllFavsToAllCommsInAllNotesBy (long UsrCod); /******************************** Shared *************************************/ bool TL_DB_CheckIfNoteIsSharedByUsr (long NotCod,long UsrCod); diff --git a/swad_timeline_favourite.c b/swad_timeline_favourite.c index 34276b35..1e1a8a40 100644 --- a/swad_timeline_favourite.c +++ b/swad_timeline_favourite.c @@ -62,8 +62,8 @@ extern struct Globals Gbl; static void TL_Fav_FavNote (struct TL_Not_Note *Not); static void TL_Fav_UnfNote (struct TL_Not_Note *Not); -static void TL_Fav_FavComment (struct TL_Com_Comment *Com); -static void TL_Fav_UnfComment (struct TL_Com_Comment *Com); +static void TL_Fav_FavComm (struct TL_Com_Comment *Com); +static void TL_Fav_UnfComm (struct TL_Com_Comment *Com); static void TL_Fav_PutDisabledIconFav (unsigned NumFavs); static void TL_Fav_PutFormToFavUnfNote (long NotCod); @@ -144,12 +144,12 @@ void TL_Fav_PutIconToFavUnfNote (const struct TL_Not_Note *Not, { /***** Put form to fav/unfav this note *****/ HTM_DIV_Begin ("class=\"TL_ICO\""); - if (Not->Unavailable || // Unavailable notes can not be favourited - Usr_ItsMe (Not->UsrCod)) // I am the author - /* Put disabled icon */ - TL_Fav_PutDisabledIconFav (Not->NumFavs); - else // Available and I am not the author - TL_Fav_PutFormToFavUnfNote (Not->NotCod); + if (Not->Unavailable || // Unavailable notes can not be favourited + Usr_ItsMe (Not->UsrCod)) // I am the author + /* Put disabled icon */ + TL_Fav_PutDisabledIconFav (Not->NumFavs); + else // Available and I am not the author + TL_Fav_PutFormToFavUnfNote (Not->NotCod); HTM_DIV_End (); /***** Show who have marked this note as favourite *****/ @@ -282,59 +282,59 @@ void TL_Fav_ShowAllFaversComGbl (void) Med_MediaDestructor (&Com.Content.Media); /***** Write HTML inside DIV with form to fav/unfav *****/ - TL_Fav_PutIconToFavUnfComment (&Com,TL_Usr_SHOW_ALL_USRS); + TL_Fav_PutIconToFavUnfComm (&Com,TL_Usr_SHOW_ALL_USRS); } -void TL_Fav_FavCommentUsr (void) +void TL_Fav_FavCommUsr (void) { /***** Get user whom profile is displayed *****/ Usr_GetParamOtherUsrCodEncryptedAndGetUsrData (); /***** Mark comment as favourite *****/ - TL_Fav_FavCommentGbl (); + TL_Fav_FavCommGbl (); } -void TL_Fav_FavCommentGbl (void) +void TL_Fav_FavCommGbl (void) { struct TL_Com_Comment Com; /***** Mark comment as favourite *****/ - TL_Fav_FavComment (&Com); + TL_Fav_FavComm (&Com); /***** Write HTML inside DIV with form to unfav *****/ - TL_Fav_PutIconToFavUnfComment (&Com,TL_Usr_SHOW_FEW_USRS); + TL_Fav_PutIconToFavUnfComm (&Com,TL_Usr_SHOW_FEW_USRS); } -void TL_Fav_UnfCommentUsr (void) +void TL_Fav_UnfCommUsr (void) { /***** Get user whom profile is displayed *****/ Usr_GetParamOtherUsrCodEncryptedAndGetUsrData (); /***** Unfav a comment previously marked as favourite *****/ - TL_Fav_UnfCommentGbl (); + TL_Fav_UnfCommGbl (); } -void TL_Fav_UnfCommentGbl (void) +void TL_Fav_UnfCommGbl (void) { struct TL_Com_Comment Com; /***** Stop marking as favourite a previously favourited comment *****/ - TL_Fav_UnfComment (&Com); + TL_Fav_UnfComm (&Com); /***** Write HTML inside DIV with form to fav *****/ - TL_Fav_PutIconToFavUnfComment (&Com,TL_Usr_SHOW_FEW_USRS); + TL_Fav_PutIconToFavUnfComm (&Com,TL_Usr_SHOW_FEW_USRS); } -void TL_Fav_PutIconToFavUnfComment (const struct TL_Com_Comment *Com, - TL_Usr_HowManyUsrs_t HowManyUsrs) +void TL_Fav_PutIconToFavUnfComm (const struct TL_Com_Comment *Com, + TL_Usr_HowManyUsrs_t HowManyUsrs) { /***** Put form to fav/unfav this comment *****/ HTM_DIV_Begin ("class=\"TL_ICO\""); - if (Usr_ItsMe (Com->UsrCod)) // I am the author - /* Put disabled icon */ - TL_Fav_PutDisabledIconFav (Com->NumFavs); - else // I am not the author - TL_Fav_PutFormToFavUnfComm (Com->PubCod); + if (Usr_ItsMe (Com->UsrCod)) // I am the author + /* Put disabled icon */ + TL_Fav_PutDisabledIconFav (Com->NumFavs); + else // I am not the author + TL_Fav_PutFormToFavUnfComm (Com->PubCod); HTM_DIV_End (); /***** Show who have marked this comment as favourite *****/ @@ -343,7 +343,7 @@ void TL_Fav_PutIconToFavUnfComment (const struct TL_Com_Comment *Com, HowManyUsrs); } -static void TL_Fav_FavComment (struct TL_Com_Comment *Com) +static void TL_Fav_FavComm (struct TL_Com_Comment *Com) { extern const char *Txt_The_comment_no_longer_exists; @@ -403,7 +403,7 @@ static void TL_Fav_FavComment (struct TL_Com_Comment *Com) Med_MediaDestructor (&Com->Content.Media); } -static void TL_Fav_UnfComment (struct TL_Com_Comment *Com) +static void TL_Fav_UnfComm (struct TL_Com_Comment *Com) { extern const char *Txt_The_comment_no_longer_exists; @@ -585,17 +585,17 @@ static void TL_Fav_ShowUsrsWhoHaveMarkedAsFav (TL_Fav_WhatToFav_t WhatToFav, /***** Show users *****/ /* Number of users */ HTM_DIV_Begin ("class=\"TL_NUM_USRS\""); - TL_Usr_ShowNumSharersOrFavers (NumFavs); + TL_Usr_ShowNumSharersOrFavers (NumFavs); HTM_DIV_End (); /* List users one by one */ HTM_DIV_Begin ("class=\"TL_USRS\""); - TL_Usr_ShowSharersOrFavers (&mysql_res,NumFavs,NumFirstUsrs); - if (NumFirstUsrs < NumFavs) // Not all are shown - /* Clickable ellipsis to show all users */ - TL_Frm_PutFormToSeeAllFaversSharers (Action[WhatToFav], - ParamFormat[WhatToFav],Cod, - HowManyUsrs); + TL_Usr_ShowSharersOrFavers (&mysql_res,NumFavs,NumFirstUsrs); + if (NumFirstUsrs < NumFavs) // Not all are shown + /* Clickable ellipsis to show all users */ + TL_Frm_PutFormToSeeAllFaversSharers (Action[WhatToFav], + ParamFormat[WhatToFav],Cod, + HowManyUsrs); HTM_DIV_End (); /***** Free structure that stores the query result *****/ diff --git a/swad_timeline_favourite.h b/swad_timeline_favourite.h index 605b8cb7..f4824c47 100644 --- a/swad_timeline_favourite.h +++ b/swad_timeline_favourite.h @@ -45,11 +45,6 @@ typedef enum /***************************** Public prototypes *****************************/ /*****************************************************************************/ -void TL_Fav_PutFormToSeeAllFaversNote (long NotCod, - TL_Usr_HowManyUsrs_t HowManyUsrs); -void TL_Fav_PutFormToSeeAllFaversComment (long PubCod, - TL_Usr_HowManyUsrs_t HowManyUsrs); - void TL_Fav_ShowAllFaversNoteUsr (void); void TL_Fav_ShowAllFaversNoteGbl (void); void TL_Fav_FavNoteUsr (void); @@ -61,11 +56,11 @@ void TL_Fav_PutIconToFavUnfNote (const struct TL_Not_Note *Not, void TL_Fav_ShowAllFaversComUsr (void); void TL_Fav_ShowAllFaversComGbl (void); -void TL_Fav_FavCommentUsr (void); -void TL_Fav_FavCommentGbl (void); -void TL_Fav_UnfCommentUsr (void); -void TL_Fav_UnfCommentGbl (void); -void TL_Fav_PutIconToFavUnfComment (const struct TL_Com_Comment *Com, - TL_Usr_HowManyUsrs_t HowManyUsrs); +void TL_Fav_FavCommUsr (void); +void TL_Fav_FavCommGbl (void); +void TL_Fav_UnfCommUsr (void); +void TL_Fav_UnfCommGbl (void); +void TL_Fav_PutIconToFavUnfComm (const struct TL_Com_Comment *Com, + TL_Usr_HowManyUsrs_t HowManyUsrs); #endif diff --git a/swad_timeline_form.c b/swad_timeline_form.c index a031147c..b9695ca0 100644 --- a/swad_timeline_form.c +++ b/swad_timeline_form.c @@ -98,25 +98,30 @@ extern struct Globals Gbl; /*****************************************************************************/ /*****************************************************************************/ -/***************** Start a form in global or user timeline *******************/ +/***************** Begin a form in global or user timeline *******************/ /*****************************************************************************/ -void TL_Frm_FormStart (const struct TL_Timeline *Timeline,TL_Frm_Action_t Action) +void TL_Frm_BeginForm (const struct TL_Timeline *Timeline,TL_Frm_Action_t Action) { if (Gbl.Usrs.Other.UsrDat.UsrCod > 0) { - /***** Start form in user timeline *****/ + /***** Begin form in user timeline *****/ Frm_StartFormAnchor (TL_Frm_ActionUsr[Action],"timeline"); Usr_PutParamOtherUsrCodEncrypted (Gbl.Usrs.Other.UsrDat.EnUsrCod); } else { - /***** Start form in global timeline *****/ - Frm_StartForm (TL_Frm_ActionGbl[Action]); + /***** Begin form in global timeline *****/ + Frm_BeginForm (TL_Frm_ActionGbl[Action]); Usr_PutHiddenParamWho (Timeline->Who); } } +void TL_Frm_EndForm (void) + { + Frm_EndForm (); + } + /*****************************************************************************/ /********************* Form to show all favers/sharers ***********************/ /*****************************************************************************/ @@ -187,7 +192,7 @@ void TL_Frm_FormFavSha (const struct TL_Form *Form) ParamStr, Gbl.Usrs.Other.UsrDat.EnUsrCod) < 0) Lay_NotEnoughMemoryExit (); - Frm_StartFormUniqueAnchorOnSubmit (ActUnk,"timeline",OnSubmit); + Frm_BeginFormUniqueAnchorOnSubmit (ActUnk,"timeline",OnSubmit); } else { @@ -198,7 +203,7 @@ void TL_Frm_FormFavSha (const struct TL_Form *Form) Gbl.Session.Id, ParamStr) < 0) Lay_NotEnoughMemoryExit (); - Frm_StartFormUniqueAnchorOnSubmit (ActUnk,NULL,OnSubmit); + Frm_BeginFormUniqueAnchorOnSubmit (ActUnk,NULL,OnSubmit); } Ico_PutIconLink (Form->Icon,Form->Title); Frm_EndForm (); @@ -211,65 +216,67 @@ void TL_Frm_FormFavSha (const struct TL_Form *Form) /********** Form to show hidden coments in global or user timeline ***********/ /*****************************************************************************/ -void TL_Frm_FormToShowHiddenComments (long NotCod, - char IdComments[Frm_MAX_BYTES_ID + 1], - unsigned NumInitialComments) +void TL_Frm_FormToShowHiddenComms (long NotCod, + char IdComms[Frm_MAX_BYTES_ID + 1], + unsigned NumInitialComms) { extern const char *The_ClassFormLinkInBox[The_NUM_THEMES]; extern const char *Txt_See_the_previous_X_COMMENTS; char *OnSubmit; + /***** Begin container *****/ HTM_DIV_Begin ("id=\"exp_%s\" class=\"TL_EXPAND_COM TL_RIGHT_WIDTH\"", - IdComments); + IdComms); - /***** Form and icon-text to show hidden comments *****/ - /* Begin form */ - if (Gbl.Usrs.Other.UsrDat.UsrCod > 0) - { - if (asprintf (&OnSubmit,"toggleComments('%s');" - "updateDivHiddenComments(this," - "'act=%ld&ses=%s&NotCod=%ld&IdComments=%s&NumHidCom=%u&OtherUsrCod=%s');" - " return false;", // return false is necessary to not submit form - IdComments, - Act_GetActCod (TL_Frm_ActionUsr[TL_Frm_SHO_HID_COMM]), - Gbl.Session.Id, - NotCod, - IdComments, - NumInitialComments, - Gbl.Usrs.Other.UsrDat.EnUsrCod) < 0) - Lay_NotEnoughMemoryExit (); - Frm_StartFormUniqueAnchorOnSubmit (ActUnk,"timeline",OnSubmit); - } - else - { - if (asprintf (&OnSubmit,"toggleComments('%s');" - "updateDivHiddenComments(this," - "'act=%ld&ses=%s&NotCod=%ld&IdComments=%s&NumHidCom=%u');" - " return false;", // return false is necessary to not submit form - IdComments, - Act_GetActCod (TL_Frm_ActionGbl[TL_Frm_SHO_HID_COMM]), - Gbl.Session.Id, - NotCod, - IdComments, - NumInitialComments) < 0) - Lay_NotEnoughMemoryExit (); - Frm_StartFormUniqueAnchorOnSubmit (ActUnk,NULL,OnSubmit); - } + /***** Form and icon-text to show hidden comments *****/ + /* Begin form */ + if (Gbl.Usrs.Other.UsrDat.UsrCod > 0) + { + if (asprintf (&OnSubmit,"toggleComments('%s');" + "updateDivHiddenComments(this," + "'act=%ld&ses=%s&NotCod=%ld&IdComments=%s&NumHidCom=%u&OtherUsrCod=%s');" + " return false;", // return false is necessary to not submit form + IdComms, + Act_GetActCod (TL_Frm_ActionUsr[TL_Frm_SHO_HID_COMM]), + Gbl.Session.Id, + NotCod, + IdComms, + NumInitialComms, + Gbl.Usrs.Other.UsrDat.EnUsrCod) < 0) + Lay_NotEnoughMemoryExit (); + Frm_BeginFormUniqueAnchorOnSubmit (ActUnk,"timeline",OnSubmit); + } + else + { + if (asprintf (&OnSubmit,"toggleComments('%s');" + "updateDivHiddenComments(this," + "'act=%ld&ses=%s&NotCod=%ld&IdComments=%s&NumHidCom=%u');" + " return false;", // return false is necessary to not submit form + IdComms, + Act_GetActCod (TL_Frm_ActionGbl[TL_Frm_SHO_HID_COMM]), + Gbl.Session.Id, + NotCod, + IdComms, + NumInitialComms) < 0) + Lay_NotEnoughMemoryExit (); + Frm_BeginFormUniqueAnchorOnSubmit (ActUnk,NULL,OnSubmit); + } - /* Put icon and text with link to show the first hidden comments */ - HTM_BUTTON_SUBMIT_Begin (NULL,The_ClassFormLinkInBox[Gbl.Prefs.Theme],NULL); - Ico_PutIconTextLink ("angle-up.svg", - Str_BuildStringLong (Txt_See_the_previous_X_COMMENTS, - (long) NumInitialComments)); - Str_FreeString (); - HTM_BUTTON_End (); + /* Put icon and text with link to show the first hidden comments */ + HTM_BUTTON_SUBMIT_Begin (NULL,The_ClassFormLinkInBox[Gbl.Prefs.Theme],NULL); + Ico_PutIconTextLink ("angle-up.svg", + Str_BuildStringLong (Txt_See_the_previous_X_COMMENTS, + (long) NumInitialComms)); + Str_FreeString (); + HTM_BUTTON_End (); - /* End form */ - Frm_EndForm (); + /* End form */ + Frm_EndForm (); - /* Free allocated memory */ - free (OnSubmit); + /* Free allocated memory */ + free (OnSubmit); + /***** End container *****/ HTM_DIV_End (); } diff --git a/swad_timeline_form.h b/swad_timeline_form.h index 144a0294..737328af 100644 --- a/swad_timeline_form.h +++ b/swad_timeline_form.h @@ -77,14 +77,15 @@ struct TL_Form /****************************** Public prototypes ****************************/ /*****************************************************************************/ -void TL_Frm_FormStart (const struct TL_Timeline *Timeline,TL_Frm_Action_t Action); +void TL_Frm_BeginForm (const struct TL_Timeline *Timeline,TL_Frm_Action_t Action); +void TL_Frm_EndForm (void); void TL_Frm_PutFormToSeeAllFaversSharers (TL_Frm_Action_t Action, const char *ParamFormat,long ParamCod, TL_Usr_HowManyUsrs_t HowManyUsrs); void TL_Frm_FormFavSha (const struct TL_Form *Form); -void TL_Frm_FormToShowHiddenComments (long NotCod, +void TL_Frm_FormToShowHiddenComms (long NotCod, char IdComments[Frm_MAX_BYTES_ID + 1], unsigned NumInitialComments); diff --git a/swad_timeline_note.c b/swad_timeline_note.c index 49743fed..117071a8 100644 --- a/swad_timeline_note.c +++ b/swad_timeline_note.c @@ -88,14 +88,14 @@ static void TL_Not_WriteLocationInHierarchy (const struct TL_Not_Note *Not, static void TL_Not_PutFormGoToAction (const struct TL_Not_Note *Not, const struct For_Forums *Forums); -static void TL_Not_WriteButtonsAndComments (const struct TL_Timeline *Timeline, - const struct TL_Not_Note *Not, - const struct UsrData *UsrDat); -static void TL_Not_WriteButtonToAddAComment (const struct TL_Not_Note *Not, - const char IdNewComment[Frm_MAX_BYTES_ID + 1]); -static void TL_Not_WriteFavShaRemAndComments (const struct TL_Timeline *Timeline, - const struct TL_Not_Note *Not, - const struct UsrData *UsrDat); +static void TL_Not_WriteButtonsAndComms (const struct TL_Timeline *Timeline, + const struct TL_Not_Note *Not, + const struct UsrData *UsrDat); +static void TL_Not_WriteButtonToAddAComm (const struct TL_Not_Note *Not, + const char IdNewComm[Frm_MAX_BYTES_ID + 1]); +static void TL_Not_WriteFavShaRemAndComms (const struct TL_Timeline *Timeline, + const struct TL_Not_Note *Not, + const struct UsrData *UsrDat); static void TL_Not_WriteFavShaRem (const struct TL_Timeline *Timeline, const struct TL_Not_Note *Not, const struct UsrData *UsrDat); @@ -176,11 +176,11 @@ void TL_Not_ShowHighlightedNote (struct TL_Timeline *Timeline, Box_BoxBegin (NULL,NULL, NULL,NULL, NULL,Box_CLOSABLE); - HTM_DIV_Begin ("class=\"TL_WIDTH TL_NEW_PUB\""); - TL_Not_CheckAndWriteNoteWithTopMsg (Timeline,Not, - TopMessages[NotifyEvent], - PublisherDat.UsrCod); - HTM_DIV_End (); + HTM_DIV_Begin ("class=\"TL_WIDTH TL_NEW_PUB\""); + TL_Not_CheckAndWriteNoteWithTopMsg (Timeline,Not, + TopMessages[NotifyEvent], + PublisherDat.UsrCod); + HTM_DIV_End (); Box_BoxEnd (); } @@ -253,21 +253,23 @@ static void TL_Not_WriteTopMessage (TL_TopMessage_t TopMessage,long PublisherCod PublisherDat.UsrCod = PublisherCod; if (Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&PublisherDat,Usr_DONT_GET_PREFS)) // Really we only need EncryptedUsrCod and FullName { + /***** Begin container *****/ HTM_DIV_Begin ("class=\"TL_TOP_CONT TL_TOP_PUBLISHER TL_WIDTH\""); - /***** Show user's name inside form to go to user's public profile *****/ - Frm_StartFormUnique (ActSeeOthPubPrf); - Usr_PutParamUsrCodEncrypted (PublisherDat.EnUsrCod); - HTM_BUTTON_SUBMIT_Begin (Usr_ItsMe (PublisherCod) ? Txt_My_public_profile : - Txt_Another_user_s_profile, - "BT_LINK TL_TOP_PUBLISHER",NULL); - HTM_Txt (PublisherDat.FullName); - HTM_BUTTON_End (); - Frm_EndForm (); + /***** Show user's name inside form to go to user's public profile *****/ + Frm_BeginFormUnique (ActSeeOthPubPrf); + Usr_PutParamUsrCodEncrypted (PublisherDat.EnUsrCod); + HTM_BUTTON_SUBMIT_Begin (Usr_ItsMe (PublisherCod) ? Txt_My_public_profile : + Txt_Another_user_s_profile, + "BT_LINK TL_TOP_PUBLISHER",NULL); + HTM_Txt (PublisherDat.FullName); + HTM_BUTTON_End (); + Frm_EndForm (); - /***** Show action made *****/ - HTM_TxtF (" %s:",Txt_TIMELINE_NOTE_TOP_MESSAGES[TopMessage]); + /***** Show action made *****/ + HTM_TxtF (" %s:",Txt_TIMELINE_NOTE_TOP_MESSAGES[TopMessage]); + /***** End container *****/ HTM_DIV_End (); } @@ -296,7 +298,7 @@ static void TL_Not_WriteNote (const struct TL_Timeline *Timeline, TL_Not_WriteAuthorTimeAndContent (Not,&UsrDat); /***** Bottom: buttons and comments *****/ - TL_Not_WriteButtonsAndComments (Timeline,Not,&UsrDat); + TL_Not_WriteButtonsAndComms (Timeline,Not,&UsrDat); /***** Free memory used for author's data *****/ Usr_UsrDataDestructor (&UsrDat); @@ -312,11 +314,16 @@ static void TL_Not_ShowAuthorPhoto (struct UsrData *UsrDat) char PhotoURL[PATH_MAX + 1]; /***** Show author's photo *****/ + /* Begin container */ HTM_DIV_Begin ("class=\"TL_LEFT_PHOTO\""); - ShowPhoto = Pho_ShowingUsrPhotoIsAllowed (UsrDat,PhotoURL); - Pho_ShowUsrPhoto (UsrDat,ShowPhoto ? PhotoURL : - NULL, - "PHOTO45x60",Pho_ZOOM,true); // Use unique id + + /* Photo */ + ShowPhoto = Pho_ShowingUsrPhotoIsAllowed (UsrDat,PhotoURL); + Pho_ShowUsrPhoto (UsrDat,ShowPhoto ? PhotoURL : + NULL, + "PHOTO45x60",Pho_ZOOM,true); // Use unique id + + /* End container */ HTM_DIV_End (); } @@ -330,14 +337,14 @@ static void TL_Not_WriteAuthorTimeAndContent (const struct TL_Not_Note *Not, /***** Begin top container *****/ HTM_DIV_Begin ("class=\"TL_RIGHT_CONT TL_RIGHT_WIDTH\""); - /***** Write author's full name *****/ - TL_Not_WriteAuthorName (UsrDat); + /***** Write author's full name *****/ + TL_Not_WriteAuthorName (UsrDat); - /***** Write date and time *****/ - TL_WriteDateTime (Not->DateTimeUTC); + /***** Write date and time *****/ + TL_WriteDateTime (Not->DateTimeUTC); - /***** Write content of the note *****/ - TL_Not_WriteContent (Not); + /***** Write content of the note *****/ + TL_Not_WriteContent (Not); /***** End top container *****/ HTM_DIV_End (); @@ -353,14 +360,19 @@ void TL_Not_WriteAuthorName (const struct UsrData *UsrDat) extern const char *Txt_Another_user_s_profile; /***** Show user's name inside form to go to user's public profile *****/ - Frm_StartFormUnique (ActSeeOthPubPrf); + /* Begin form */ + Frm_BeginFormUnique (ActSeeOthPubPrf); Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod); - HTM_BUTTON_SUBMIT_Begin (Usr_ItsMe (UsrDat->UsrCod) ? Txt_My_public_profile : - Txt_Another_user_s_profile, - "BT_LINK TL_RIGHT_AUTHOR TL_RIGHT_AUTHOR_WIDTH DAT_N_BOLD", - NULL); - HTM_Txt (UsrDat->FullName); - HTM_BUTTON_End (); + + /* Author's name */ + HTM_BUTTON_SUBMIT_Begin (Usr_ItsMe (UsrDat->UsrCod) ? Txt_My_public_profile : + Txt_Another_user_s_profile, + "BT_LINK TL_RIGHT_AUTHOR TL_RIGHT_AUTHOR_WIDTH DAT_N_BOLD", + NULL); + HTM_Txt (UsrDat->FullName); + HTM_BUTTON_End (); + + /* End form */ Frm_EndForm (); } @@ -402,9 +414,12 @@ static void TL_Not_GetAndWriteNoPost (const struct TL_Not_Note *Not) TL_Not_WriteLocationInHierarchy (Not,&Hie,ForumName); /***** Get and write note summary *****/ + /* Get note summary */ TL_Not_GetNoteSummary (Not,SummaryStr); + + /* Write note summary */ HTM_DIV_Begin ("class=\"TL_TXT\""); - HTM_Txt (SummaryStr); + HTM_Txt (SummaryStr); HTM_DIV_End (); } @@ -483,21 +498,21 @@ static void TL_Not_WriteLocationInHierarchy (const struct TL_Not_Note *Not, case TL_NOTE_INS_SHA_PUB_FILE: /* Write location (institution) in hierarchy */ HTM_DIV_Begin ("class=\"TL_LOC\""); - HTM_TxtF ("%s: %s",Txt_Institution,Hie->Ins.ShrtName); + HTM_TxtF ("%s: %s",Txt_Institution,Hie->Ins.ShrtName); HTM_DIV_End (); break; case TL_NOTE_CTR_DOC_PUB_FILE: case TL_NOTE_CTR_SHA_PUB_FILE: /* Write location (centre) in hierarchy */ HTM_DIV_Begin ("class=\"TL_LOC\""); - HTM_TxtF ("%s: %s",Txt_Centre,Hie->Ctr.ShrtName); + HTM_TxtF ("%s: %s",Txt_Centre,Hie->Ctr.ShrtName); HTM_DIV_End (); break; case TL_NOTE_DEG_DOC_PUB_FILE: case TL_NOTE_DEG_SHA_PUB_FILE: /* Write location (degree) in hierarchy */ HTM_DIV_Begin ("class=\"TL_LOC\""); - HTM_TxtF ("%s: %s",Txt_Degree,Hie->Deg.ShrtName); + HTM_TxtF ("%s: %s",Txt_Degree,Hie->Deg.ShrtName); HTM_DIV_End (); break; case TL_NOTE_CRS_DOC_PUB_FILE: @@ -506,13 +521,13 @@ static void TL_Not_WriteLocationInHierarchy (const struct TL_Not_Note *Not, case TL_NOTE_NOTICE: /* Write location (course) in hierarchy */ HTM_DIV_Begin ("class=\"TL_LOC\""); - HTM_TxtF ("%s: %s",Txt_Course,Hie->Crs.ShrtName); + HTM_TxtF ("%s: %s",Txt_Course,Hie->Crs.ShrtName); HTM_DIV_End (); break; case TL_NOTE_FORUM_POST: /* Write forum name */ HTM_DIV_Begin ("class=\"TL_LOC\""); - HTM_TxtF ("%s: %s",Txt_Forum,ForumName); + HTM_TxtF ("%s: %s",Txt_Forum,ForumName); HTM_DIV_End (); break; default: @@ -590,95 +605,103 @@ static void TL_Not_PutFormGoToAction (const struct TL_Not_Note *Not, { /***** Do not put form *****/ HTM_DIV_Begin ("class=\"TL_FORM_OFF\""); - HTM_Txt (Txt_TIMELINE_NOTE[Not->NoteType]); - if (Not->Unavailable) - HTM_TxtF (" (%s)",Txt_not_available); + HTM_Txt (Txt_TIMELINE_NOTE[Not->NoteType]); + if (Not->Unavailable) + HTM_TxtF (" (%s)",Txt_not_available); HTM_DIV_End (); } else // Not inside another form { + /***** Begin container *****/ HTM_DIV_Begin ("class=\"TL_FORM\""); - /***** Begin form with parameters depending on the type of note *****/ - switch (Not->NoteType) - { - case TL_NOTE_INS_DOC_PUB_FILE: - case TL_NOTE_INS_SHA_PUB_FILE: - Frm_StartFormUnique (TL_DefaultActions[Not->NoteType]); - Brw_PutHiddenParamFilCod (Not->Cod); - if (Not->HieCod != Gbl.Hierarchy.Ins.InsCod) // Not the current institution - Ins_PutParamInsCod (Not->HieCod); // Go to another institution - break; - case TL_NOTE_CTR_DOC_PUB_FILE: - case TL_NOTE_CTR_SHA_PUB_FILE: - Frm_StartFormUnique (TL_DefaultActions[Not->NoteType]); - Brw_PutHiddenParamFilCod (Not->Cod); - if (Not->HieCod != Gbl.Hierarchy.Ctr.CtrCod) // Not the current centre - Ctr_PutParamCtrCod (Not->HieCod); // Go to another centre - break; - case TL_NOTE_DEG_DOC_PUB_FILE: - case TL_NOTE_DEG_SHA_PUB_FILE: - Frm_StartFormUnique (TL_DefaultActions[Not->NoteType]); - Brw_PutHiddenParamFilCod (Not->Cod); - if (Not->HieCod != Gbl.Hierarchy.Deg.DegCod) // Not the current degree - Deg_PutParamDegCod (Not->HieCod); // Go to another degree - break; - case TL_NOTE_CRS_DOC_PUB_FILE: - case TL_NOTE_CRS_SHA_PUB_FILE: - Frm_StartFormUnique (TL_DefaultActions[Not->NoteType]); - Brw_PutHiddenParamFilCod (Not->Cod); - if (Not->HieCod != Gbl.Hierarchy.Crs.CrsCod) // Not the current course - Crs_PutParamCrsCod (Not->HieCod); // Go to another course - break; - case TL_NOTE_EXAM_ANNOUNCEMENT: - Frm_SetAnchorStr (Not->Cod,&Anchor); - Frm_StartFormUniqueAnchor (TL_DefaultActions[Not->NoteType], - Anchor); // Locate on this specific exam - Frm_FreeAnchorStr (Anchor); - ExaAnn_PutHiddenParamExaCod (Not->Cod); - if (Not->HieCod != Gbl.Hierarchy.Crs.CrsCod) // Not the current course - Crs_PutParamCrsCod (Not->HieCod); // Go to another course - break; - case TL_NOTE_POST: // Not applicable - return; - case TL_NOTE_FORUM_POST: - Frm_StartFormUnique (For_ActionsSeeFor[Forums->Forum.Type]); - For_PutAllHiddenParamsForum (1, // Page of threads = first - 1, // Page of posts = first - Forums->ForumSet, - Forums->ThreadsOrder, - Forums->Forum.Location, - Forums->Thread.Selected, - -1L); - if (Not->HieCod != Gbl.Hierarchy.Crs.CrsCod) // Not the current course - Crs_PutParamCrsCod (Not->HieCod); // Go to another course - break; - case TL_NOTE_NOTICE: - Frm_SetAnchorStr (Not->Cod,&Anchor); - Frm_StartFormUniqueAnchor (TL_DefaultActions[Not->NoteType], - Anchor); - Frm_FreeAnchorStr (Anchor); - Not_PutHiddenParamNotCod (Not->Cod); - if (Not->HieCod != Gbl.Hierarchy.Crs.CrsCod) // Not the current course - Crs_PutParamCrsCod (Not->HieCod); // Go to another course - break; - default: // Not applicable - return; - } + /***** Begin form with parameters depending on the type of note *****/ + switch (Not->NoteType) + { + case TL_NOTE_INS_DOC_PUB_FILE: + case TL_NOTE_INS_SHA_PUB_FILE: + Frm_BeginFormUnique (TL_DefaultActions[Not->NoteType]); + Brw_PutHiddenParamFilCod (Not->Cod); + if (Not->HieCod != Gbl.Hierarchy.Ins.InsCod) // Not the current institution + Ins_PutParamInsCod (Not->HieCod); // Go to another institution + break; + case TL_NOTE_CTR_DOC_PUB_FILE: + case TL_NOTE_CTR_SHA_PUB_FILE: + Frm_BeginFormUnique (TL_DefaultActions[Not->NoteType]); + Brw_PutHiddenParamFilCod (Not->Cod); + if (Not->HieCod != Gbl.Hierarchy.Ctr.CtrCod) // Not the current centre + Ctr_PutParamCtrCod (Not->HieCod); // Go to another centre + break; + case TL_NOTE_DEG_DOC_PUB_FILE: + case TL_NOTE_DEG_SHA_PUB_FILE: + Frm_BeginFormUnique (TL_DefaultActions[Not->NoteType]); + Brw_PutHiddenParamFilCod (Not->Cod); + if (Not->HieCod != Gbl.Hierarchy.Deg.DegCod) // Not the current degree + Deg_PutParamDegCod (Not->HieCod); // Go to another degree + break; + case TL_NOTE_CRS_DOC_PUB_FILE: + case TL_NOTE_CRS_SHA_PUB_FILE: + Frm_BeginFormUnique (TL_DefaultActions[Not->NoteType]); + Brw_PutHiddenParamFilCod (Not->Cod); + if (Not->HieCod != Gbl.Hierarchy.Crs.CrsCod) // Not the current course + Crs_PutParamCrsCod (Not->HieCod); // Go to another course + break; + case TL_NOTE_EXAM_ANNOUNCEMENT: + Frm_SetAnchorStr (Not->Cod,&Anchor); + Frm_BeginFormUniqueAnchor (TL_DefaultActions[Not->NoteType], + Anchor); // Locate on this specific exam + Frm_FreeAnchorStr (Anchor); + ExaAnn_PutHiddenParamExaCod (Not->Cod); + if (Not->HieCod != Gbl.Hierarchy.Crs.CrsCod) // Not the current course + Crs_PutParamCrsCod (Not->HieCod); // Go to another course + break; + case TL_NOTE_POST: // Not applicable + return; + case TL_NOTE_FORUM_POST: + Frm_BeginFormUnique (For_ActionsSeeFor[Forums->Forum.Type]); + For_PutAllHiddenParamsForum (1, // Page of threads = first + 1, // Page of posts = first + Forums->ForumSet, + Forums->ThreadsOrder, + Forums->Forum.Location, + Forums->Thread.Selected, + -1L); + if (Not->HieCod != Gbl.Hierarchy.Crs.CrsCod) // Not the current course + Crs_PutParamCrsCod (Not->HieCod); // Go to another course + break; + case TL_NOTE_NOTICE: + Frm_SetAnchorStr (Not->Cod,&Anchor); + Frm_BeginFormUniqueAnchor (TL_DefaultActions[Not->NoteType], + Anchor); + Frm_FreeAnchorStr (Anchor); + Not_PutHiddenParamNotCod (Not->Cod); + if (Not->HieCod != Gbl.Hierarchy.Crs.CrsCod) // Not the current course + Crs_PutParamCrsCod (Not->HieCod); // Go to another course + break; + default: // Not applicable + return; + } - /***** Icon and link to go to action *****/ - HTM_BUTTON_SUBMIT_Begin (Txt_TIMELINE_NOTE[Not->NoteType], - Str_BuildStringStr ("BT_LINK %s ICO_HIGHLIGHT", - The_ClassFormInBoxBold[Gbl.Prefs.Theme]), - NULL); - Ico_PutIcon (TL_Icons[Not->NoteType],Txt_TIMELINE_NOTE[Not->NoteType],"CONTEXT_ICO_x16"); - HTM_TxtF (" %s",Txt_TIMELINE_NOTE[Not->NoteType]); - HTM_BUTTON_End (); - Str_FreeString (); + /***** Icon and link to go to action *****/ + /* Begin button */ + HTM_BUTTON_SUBMIT_Begin (Txt_TIMELINE_NOTE[Not->NoteType], + Str_BuildStringStr ("BT_LINK %s ICO_HIGHLIGHT", + The_ClassFormInBoxBold[Gbl.Prefs.Theme]), + NULL); + Str_FreeString (); - /***** End form *****/ - Frm_EndForm (); + /* Icon and text */ + Ico_PutIcon (TL_Icons[Not->NoteType], + Txt_TIMELINE_NOTE[Not->NoteType],"CONTEXT_ICO_x16"); + HTM_TxtF (" %s",Txt_TIMELINE_NOTE[Not->NoteType]); + /* End button */ + HTM_BUTTON_End (); + + /***** End form *****/ + Frm_EndForm (); + + /***** End container *****/ HTM_DIV_End (); } } @@ -725,37 +748,42 @@ void TL_Not_GetNoteSummary (const struct TL_Not_Note *Not, /************************ Write bottom part of a note ************************/ /*****************************************************************************/ -static void TL_Not_WriteButtonsAndComments (const struct TL_Timeline *Timeline, - const struct TL_Not_Note *Not, - const struct UsrData *UsrDat) // Author +static void TL_Not_WriteButtonsAndComms (const struct TL_Timeline *Timeline, + const struct TL_Not_Note *Not, + const struct UsrData *UsrDat) // Author { - char IdNewComment[Frm_MAX_BYTES_ID + 1]; + char IdNewComm[Frm_MAX_BYTES_ID + 1]; /***** Create unique id for new comment *****/ - Frm_SetUniqueId (IdNewComment); + Frm_SetUniqueId (IdNewComm); /***** Left: button to add a comment *****/ - TL_Not_WriteButtonToAddAComment (Not,IdNewComment); + TL_Not_WriteButtonToAddAComm (Not,IdNewComm); /***** Right: write favs, shared and remove buttons, and comments *****/ - TL_Not_WriteFavShaRemAndComments (Timeline,Not,UsrDat); + TL_Not_WriteFavShaRemAndComms (Timeline,Not,UsrDat); /***** Put hidden form to write a new comment *****/ - TL_Com_PutHiddenFormToWriteNewComment (Timeline,Not->NotCod,IdNewComment); + TL_Com_PutHiddenFormToWriteNewComm (Timeline,Not->NotCod,IdNewComm); } /*****************************************************************************/ /********************** Write button to add a comment ************************/ /*****************************************************************************/ -static void TL_Not_WriteButtonToAddAComment (const struct TL_Not_Note *Not, - const char IdNewComment[Frm_MAX_BYTES_ID + 1]) +static void TL_Not_WriteButtonToAddAComm (const struct TL_Not_Note *Not, + const char IdNewComm[Frm_MAX_BYTES_ID + 1]) { + /***** Begin container *****/ HTM_DIV_Begin ("class=\"TL_BOTTOM_LEFT\""); - if (Not->Unavailable) // Unavailable notes can not be commented - TL_Com_PutIconCommentDisabled (); - else - TL_Com_PutIconToToggleComment (IdNewComment); + + /***** Button to add a comment *****/ + if (Not->Unavailable) // Unavailable notes can not be commented + TL_Com_PutIconCommDisabled (); + else + TL_Com_PutIconToToggleComm (IdNewComm); + + /***** End container *****/ HTM_DIV_End (); } @@ -763,18 +791,18 @@ static void TL_Not_WriteButtonToAddAComment (const struct TL_Not_Note *Not, /******* Write favs, shared and remove buttons, and comments of a note *******/ /*****************************************************************************/ -static void TL_Not_WriteFavShaRemAndComments (const struct TL_Timeline *Timeline, - const struct TL_Not_Note *Not, - const struct UsrData *UsrDat) // Author +static void TL_Not_WriteFavShaRemAndComms (const struct TL_Timeline *Timeline, + const struct TL_Not_Note *Not, + const struct UsrData *UsrDat) // Author { /***** Begin container *****/ HTM_DIV_Begin ("class=\"TL_BOTTOM_RIGHT TL_RIGHT_WIDTH\""); - /***** Write favs, shared and remove buttons int the foot of a note *****/ - TL_Not_WriteFavShaRem (Timeline,Not,UsrDat); + /***** Write favs, shared and remove buttons int the foot of a note *****/ + TL_Not_WriteFavShaRem (Timeline,Not,UsrDat); - /***** Comments *****/ - TL_Com_WriteCommentsInNote (Timeline,Not); + /***** Comments *****/ + TL_Com_WriteCommsInNote (Timeline,Not); /***** End container *****/ HTM_DIV_End (); @@ -795,23 +823,25 @@ static void TL_Not_WriteFavShaRem (const struct TL_Timeline *Timeline, /***** Begin foot container *****/ HTM_DIV_Begin ("class=\"TL_FOOT TL_RIGHT_WIDTH\""); - /***** Foot column 1: fav zone *****/ - HTM_DIV_Begin ("id=\"fav_not_%s_%u\" class=\"TL_FAV_NOT TL_FAV_NOT_WIDTH\"", - Gbl.UniqueNameEncrypted,NumDiv); - TL_Fav_PutIconToFavUnfNote (Not,TL_Usr_SHOW_FEW_USRS); - HTM_DIV_End (); + /***** Foot column 1: fav zone *****/ + HTM_DIV_Begin ("id=\"fav_not_%s_%u\"" + " class=\"TL_FAV_NOT TL_FAV_NOT_WIDTH\"", + Gbl.UniqueNameEncrypted,NumDiv); + TL_Fav_PutIconToFavUnfNote (Not,TL_Usr_SHOW_FEW_USRS); + HTM_DIV_End (); - /***** Foot column 2: share zone *****/ - HTM_DIV_Begin ("id=\"sha_not_%s_%u\" class=\"TL_SHA_NOT TL_SHA_NOT_WIDTH\"", - Gbl.UniqueNameEncrypted,NumDiv); - TL_Sha_PutIconToShaUnsNote (Not,TL_Usr_SHOW_FEW_USRS); - HTM_DIV_End (); + /***** Foot column 2: share zone *****/ + HTM_DIV_Begin ("id=\"sha_not_%s_%u\"" + " class=\"TL_SHA_NOT TL_SHA_NOT_WIDTH\"", + Gbl.UniqueNameEncrypted,NumDiv); + TL_Sha_PutIconToShaUnsNote (Not,TL_Usr_SHOW_FEW_USRS); + HTM_DIV_End (); - /***** Foot column 3: icon to remove this note *****/ - HTM_DIV_Begin ("class=\"TL_REM\""); - if (Usr_ItsMe (UsrDat->UsrCod)) // I am the author - TL_Not_PutFormToRemoveNote (Timeline,Not->NotCod); - HTM_DIV_End (); + /***** Foot column 3: icon to remove this note *****/ + HTM_DIV_Begin ("class=\"TL_REM\""); + if (Usr_ItsMe (UsrDat->UsrCod)) // I am the author + TL_Not_PutFormToRemoveNote (Timeline,Not->NotCod); + HTM_DIV_End (); /***** End foot container *****/ HTM_DIV_End (); @@ -827,10 +857,15 @@ static void TL_Not_PutFormToRemoveNote (const struct TL_Timeline *Timeline, extern const char *Txt_Remove; /***** Form to remove publication *****/ - TL_Frm_FormStart (Timeline,TL_Frm_REQ_REM_NOTE); + /* Begin form */ + TL_Frm_BeginForm (Timeline,TL_Frm_REQ_REM_NOTE); TL_Not_PutHiddenParamNotCod (NotCod); - Ico_PutIconLink ("trash.svg",Txt_Remove); - Frm_EndForm (); + + /* Icon to remove */ + Ico_PutIconLink ("trash.svg",Txt_Remove); + + /* End form */ + TL_Frm_EndForm (); } /*****************************************************************************/ @@ -1039,14 +1074,14 @@ void TL_Not_RequestRemNoteUsr (void) /***** Show user's profile *****/ Prf_ShowUserProfile (&Gbl.Usrs.Other.UsrDat); - /***** Start section *****/ + /***** Begin section *****/ HTM_SECTION_Begin (TL_TIMELINE_SECTION_ID); - /***** Request the removal of note *****/ - TL_Not_RequestRemovalNote (&Timeline); + /***** Request the removal of note *****/ + TL_Not_RequestRemovalNote (&Timeline); - /***** Write timeline again (user) *****/ - TL_ShowTimelineUsr (&Timeline); + /***** Write timeline again (user) *****/ + TL_ShowTimelineUsr (&Timeline); /***** End section *****/ HTM_SECTION_End (); @@ -1098,11 +1133,11 @@ static void TL_Not_RequestRemovalNote (struct TL_Timeline *Timeline) Box_BoxBegin (NULL,NULL, NULL,NULL, NULL,Box_CLOSABLE); - HTM_DIV_Begin ("class=\"TL_WIDTH\""); - TL_Not_CheckAndWriteNoteWithTopMsg (Timeline,&Not, - TL_TOP_MESSAGE_NONE, - -1L); - HTM_DIV_End (); + HTM_DIV_Begin ("class=\"TL_WIDTH\""); + TL_Not_CheckAndWriteNoteWithTopMsg (Timeline,&Not, + TL_TOP_MESSAGE_NONE, + -1L); + HTM_DIV_End (); Box_BoxEnd (); /* End alert */ @@ -1144,14 +1179,14 @@ void TL_Not_RemoveNoteUsr (void) /***** Show user's profile *****/ Prf_ShowUserProfile (&Gbl.Usrs.Other.UsrDat); - /***** Start section *****/ + /***** Begin section *****/ HTM_SECTION_Begin (TL_TIMELINE_SECTION_ID); - /***** Remove a note *****/ - TL_Not_RemoveNote (); + /***** Remove a note *****/ + TL_Not_RemoveNote (); - /***** Write updated timeline after removing (user) *****/ - TL_ShowTimelineUsr (&Timeline); + /***** Write updated timeline after removing (user) *****/ + TL_ShowTimelineUsr (&Timeline); /***** End section *****/ HTM_SECTION_End (); @@ -1214,18 +1249,18 @@ static void TL_Not_RemoveNoteMediaAndDBEntries (struct TL_Not_Note *Not) MYSQL_RES *mysql_res; MYSQL_ROW row; long PubCod; - unsigned long NumComments; - unsigned long NumCom; + unsigned long NumComms; + unsigned long NumComm; long MedCod; /***** Remove comments associated to this note *****/ /* Get comments of this note */ - NumComments = TL_DB_GetComments (Not->NotCod,&mysql_res); + NumComms = TL_DB_GetComms (Not->NotCod,&mysql_res); /* For each comment... */ - for (NumCom = 0; - NumCom < NumComments; - NumCom++) + for (NumComm = 0; + NumComm < NumComms; + NumComm++) { /* Get code of comment **/ row = mysql_fetch_row (mysql_res); @@ -1233,7 +1268,7 @@ static void TL_Not_RemoveNoteMediaAndDBEntries (struct TL_Not_Note *Not) /* Remove media associated to comment and delete comment from database */ - TL_Com_RemoveCommentMediaAndDBEntries (PubCod); + TL_Com_RemoveCommMediaAndDBEntries (PubCod); } /* Free structure that stores the query result */ diff --git a/swad_timeline_post.c b/swad_timeline_post.c index 670d8a73..ca1fdb5c 100644 --- a/swad_timeline_post.c +++ b/swad_timeline_post.c @@ -103,7 +103,7 @@ void TL_Pst_GetAndWritePost (long PstCod) if (Content.Txt[0]) { HTM_DIV_Begin ("class=\"TL_TXT\""); - Msg_WriteMsgContent (Content.Txt,Cns_MAX_BYTES_LONG_TEXT,true,false); + Msg_WriteMsgContent (Content.Txt,Cns_MAX_BYTES_LONG_TEXT,true,false); HTM_DIV_End (); } @@ -125,35 +125,47 @@ void TL_Pst_PutFormToWriteNewPost (struct TL_Timeline *Timeline) bool ShowPhoto; char PhotoURL[PATH_MAX + 1]; - /***** Start list *****/ + /***** Begin list *****/ HTM_UL_Begin ("class=\"TL_LIST\""); - HTM_LI_Begin ("class=\"TL_WIDTH\""); - /***** Left: write author's photo (my photo) *****/ - HTM_DIV_Begin ("class=\"TL_LEFT_PHOTO\""); - ShowPhoto = Pho_ShowingUsrPhotoIsAllowed (&Gbl.Usrs.Me.UsrDat,PhotoURL); - Pho_ShowUsrPhoto (&Gbl.Usrs.Me.UsrDat,ShowPhoto ? PhotoURL : - NULL, - "PHOTO45x60",Pho_ZOOM,false); - HTM_DIV_End (); + /***** Begin list item *****/ + HTM_LI_Begin ("class=\"TL_WIDTH\""); - /***** Right: author's name, time, textarea *****/ - HTM_DIV_Begin ("class=\"TL_RIGHT_CONT TL_RIGHT_WIDTH\""); + /***** Left: write author's photo (my photo) *****/ + /* Begin container */ + HTM_DIV_Begin ("class=\"TL_LEFT_PHOTO\""); - /* Author name */ - TL_Not_WriteAuthorName (&Gbl.Usrs.Me.UsrDat); + /* Author's photo */ + ShowPhoto = Pho_ShowingUsrPhotoIsAllowed (&Gbl.Usrs.Me.UsrDat,PhotoURL); + Pho_ShowUsrPhoto (&Gbl.Usrs.Me.UsrDat,ShowPhoto ? PhotoURL : + NULL, + "PHOTO45x60",Pho_ZOOM,false); - /* Form to write the post */ - HTM_DIV_Begin ("class=\"TL_FORM_NEW_PST TL_RIGHT_WIDTH\""); - TL_Frm_FormStart (Timeline,TL_Frm_RECEIVE_POST); - TL_Pst_PutTextarea (Txt_New_TIMELINE_post,"TL_PST_TEXTAREA TL_RIGHT_WIDTH"); - Frm_EndForm (); - HTM_DIV_End (); + /* End container */ + HTM_DIV_End (); - HTM_DIV_End (); + /***** Right: author's name, time, textarea *****/ + /* Begin container */ + HTM_DIV_Begin ("class=\"TL_RIGHT_CONT TL_RIGHT_WIDTH\""); + + /* Author name */ + TL_Not_WriteAuthorName (&Gbl.Usrs.Me.UsrDat); + + /* Form to write the post */ + HTM_DIV_Begin ("class=\"TL_FORM_NEW_PST TL_RIGHT_WIDTH\""); + TL_Frm_BeginForm (Timeline,TL_Frm_RECEIVE_POST); + TL_Pst_PutTextarea (Txt_New_TIMELINE_post, + "TL_PST_TEXTAREA TL_RIGHT_WIDTH"); + TL_Frm_EndForm (); + HTM_DIV_End (); + + /* End container */ + HTM_DIV_End (); + + /***** End list item *****/ + HTM_LI_End (); /***** End list *****/ - HTM_LI_End (); HTM_UL_End (); } @@ -178,19 +190,19 @@ void TL_Pst_PutTextarea (const char *Placeholder,const char *ClassTextArea) IdDivImgButton); HTM_TEXTAREA_End (); - /***** Start concealable div *****/ + /***** Begin hidden div *****/ HTM_DIV_Begin ("id=\"%s\" style=\"display:none;\"",IdDivImgButton); - /***** Help on editor *****/ - Lay_HelpPlainEditor (); + /***** Help on editor *****/ + Lay_HelpPlainEditor (); - /***** Attached image (optional) *****/ - Med_PutMediaUploader (-1,"TL_MED_INPUT_WIDTH"); + /***** Attached image (optional) *****/ + Med_PutMediaUploader (-1,"TL_MED_INPUT_WIDTH"); - /***** Submit button *****/ - HTM_BUTTON_SUBMIT_Begin (NULL,"BT_SUBMIT_INLINE BT_CREATE",NULL); - HTM_Txt (Txt_Post); - HTM_BUTTON_End (); + /***** Submit button *****/ + HTM_BUTTON_SUBMIT_Begin (NULL,"BT_SUBMIT_INLINE BT_CREATE",NULL); + HTM_Txt (Txt_Post); + HTM_BUTTON_End (); /***** End hidden div *****/ HTM_DIV_End (); @@ -214,13 +226,13 @@ void TL_Pst_ReceivePostUsr (void) /***** Show user's profile *****/ Prf_ShowUserProfile (&Gbl.Usrs.Other.UsrDat); - /***** Start section *****/ + /***** Begin section *****/ HTM_SECTION_Begin (TL_TIMELINE_SECTION_ID); - /***** Receive and store post, and - write updated timeline after publication (user) *****/ - NotCod = TL_Pst_ReceivePost (); - TL_ShowTimelineUsrHighlightingNot (&Timeline,NotCod); + /***** Receive and store post, and + write updated timeline after publication (user) *****/ + NotCod = TL_Pst_ReceivePost (); + TL_ShowTimelineUsrHighlightingNot (&Timeline,NotCod); /***** End section *****/ HTM_SECTION_End (); diff --git a/swad_timeline_publication.c b/swad_timeline_publication.c index 71019817..63bbe597 100644 --- a/swad_timeline_publication.c +++ b/swad_timeline_publication.c @@ -221,9 +221,9 @@ void TL_Pub_GetListPubsToShowInTimeline (struct TL_Timeline *Timeline) TL_DB_DropTmpTableVisibleTimeline (); /* Drop temporary table with me and users I follow */ - if (Timeline->UsrOrGbl == TL_Usr_TIMELINE_GBL) // Show the global timeline - if (Timeline->Who == Usr_WHO_FOLLOWED) // Show the timeline of the users I follow - Fol_DropTmpTableMeAndUsrsIFollow (); + if (Timeline->UsrOrGbl == TL_Usr_TIMELINE_GBL && // Show the global timeline + Timeline->Who == Usr_WHO_FOLLOWED) // Show the timeline of the users I follow + Fol_DropTmpTableMeAndUsrsIFollow (); } /*****************************************************************************/ @@ -346,9 +346,9 @@ void TL_Pub_InsertNewPubsInTimeline (struct TL_Timeline *Timeline) /* Write note */ HTM_LI_Begin ("class=\"TL_WIDTH TL_SEP TL_NEW_PUB\""); - TL_Not_CheckAndWriteNoteWithTopMsg (Timeline,&Not, - TL_Pub_GetTopMessage (Pub->PubType), - Pub->PublisherCod); + TL_Not_CheckAndWriteNoteWithTopMsg (Timeline,&Not, + TL_Pub_GetTopMessage (Pub->PubType), + Pub->PublisherCod); HTM_LI_End (); } } @@ -374,9 +374,9 @@ void TL_Pub_ShowOldPubsInTimeline (struct TL_Timeline *Timeline) /* Write note */ HTM_LI_Begin ("class=\"TL_WIDTH TL_SEP\""); - TL_Not_CheckAndWriteNoteWithTopMsg (Timeline,&Not, - TL_Pub_GetTopMessage (Pub->PubType), - Pub->PublisherCod); + TL_Not_CheckAndWriteNoteWithTopMsg (Timeline,&Not, + TL_Pub_GetTopMessage (Pub->PubType), + Pub->PublisherCod); HTM_LI_End (); } } @@ -408,19 +408,28 @@ void TL_Pub_PutLinkToViewNewPublications (void) extern const char *Txt_See_new_activity; /***** Link to view (show hidden) new publications *****/ + /* Begin container */ // div is hidden. When new posts arrive to the client via AJAX, div is shown HTM_DIV_Begin ("id=\"view_new_posts_container\"" " class=\"TL_WIDTH TL_SEP VERY_LIGHT_BLUE\"" " style=\"display:none;\""); - HTM_A_Begin ("href=\"\" class=\"%s\"" - " onclick=\"moveNewTimelineToTimeline();return false;\"", - The_ClassFormInBoxBold[Gbl.Prefs.Theme]); - HTM_TxtF ("%s (",Txt_See_new_activity); - HTM_SPAN_Begin ("id=\"view_new_posts_count\""); - HTM_Unsigned (0); - HTM_SPAN_End (); - HTM_Txt (")"); - HTM_A_End (); + + /* Begin anchor */ + HTM_A_Begin ("href=\"\" class=\"%s\"" + " onclick=\"moveNewTimelineToTimeline();return false;\"", + The_ClassFormInBoxBold[Gbl.Prefs.Theme]); + + /* Text */ + HTM_TxtF ("%s (",Txt_See_new_activity); + HTM_SPAN_Begin ("id=\"view_new_posts_count\""); + HTM_Unsigned (0); + HTM_SPAN_End (); + HTM_Txt (")"); + + /* End anchor */ + HTM_A_End (); + + /* End container */ HTM_DIV_End (); } @@ -434,22 +443,31 @@ void TL_Pub_PutLinkToViewOldPublications (void) extern const char *Txt_See_more; /***** Animated link to view old publications *****/ + /* Begin container */ HTM_DIV_Begin ("id=\"view_old_posts_container\"" " class=\"TL_WIDTH TL_SEP VERY_LIGHT_BLUE\""); - HTM_A_Begin ("href=\"\" class=\"%s\" onclick=\"" - "document.getElementById('get_old_timeline').style.display='none';" // Icon to be hidden on click - "document.getElementById('getting_old_timeline').style.display='';" // Icon to be shown on click - "refreshOldTimeline();" - "return false;\"", - The_ClassFormInBoxBold[Gbl.Prefs.Theme]); - HTM_IMG (Cfg_URL_ICON_PUBLIC,"recycle16x16.gif","Txt_See_more", - "class=\"ICO20x20\" id=\"get_old_timeline\""); - HTM_IMG (Cfg_URL_ICON_PUBLIC,"working16x16.gif",Txt_See_more, - "class=\"ICO20x20\" style=\"display:none;\" id=\"getting_old_timeline\""); // Animated icon hidden - HTM_IMG (Cfg_URL_ICON_PUBLIC,"recycle16x16.gif","Txt_See_more", - "class=\"ICO20x20\" style=\"display:none;\" id=\"get_old_timeline\""); - HTM_TxtF (" %s",Txt_See_more); - HTM_A_End (); + + /* Begin anchor */ + HTM_A_Begin ("href=\"\" class=\"%s\" onclick=\"" + "document.getElementById('get_old_timeline').style.display='none';" // Icon to be hidden on click + "document.getElementById('getting_old_timeline').style.display='';" // Icon to be shown on click + "refreshOldTimeline();" + "return false;\"", + The_ClassFormInBoxBold[Gbl.Prefs.Theme]); + + /* Icon and text */ + HTM_IMG (Cfg_URL_ICON_PUBLIC,"recycle16x16.gif","Txt_See_more", + "class=\"ICO20x20\" id=\"get_old_timeline\""); + HTM_IMG (Cfg_URL_ICON_PUBLIC,"working16x16.gif",Txt_See_more, + "class=\"ICO20x20\" style=\"display:none;\" id=\"getting_old_timeline\""); // Animated icon hidden + HTM_IMG (Cfg_URL_ICON_PUBLIC,"recycle16x16.gif","Txt_See_more", + "class=\"ICO20x20\" style=\"display:none;\" id=\"get_old_timeline\""); + HTM_TxtF (" %s",Txt_See_more); + + /* End anchor */ + HTM_A_End (); + + /* End container */ HTM_DIV_End (); } diff --git a/swad_timeline_share.c b/swad_timeline_share.c index d324c4d9..f4cbd905 100644 --- a/swad_timeline_share.c +++ b/swad_timeline_share.c @@ -241,14 +241,19 @@ void TL_Sha_PutIconToShaUnsNote (const struct TL_Not_Note *Not, TL_Usr_HowManyUsrs_t HowManyUsrs) { /***** Put form to share/unshare this note *****/ + /* Begin container */ HTM_DIV_Begin ("class=\"TL_ICO\""); - if (Not->Unavailable || // Unavailable notes can not be shared - Usr_ItsMe (Not->UsrCod)) // I am the author - /* Put disabled icon */ - TL_Sha_PutDisabledIconShare (Not->NumShared); - else // Available and I am not the author - /* Put icon to share/unshare */ - TL_Sha_PutFormToShaUnsNote (Not->NotCod); + + /* Icon to share */ + if (Not->Unavailable || // Unavailable notes can not be shared + Usr_ItsMe (Not->UsrCod)) // I am the author + /* Put disabled icon */ + TL_Sha_PutDisabledIconShare (Not->NumShared); + else // Available and I am not the author + /* Put icon to share/unshare */ + TL_Sha_PutFormToShaUnsNote (Not->NotCod); + + /* End container */ HTM_DIV_End (); /***** Show who have shared this note *****/ @@ -333,17 +338,17 @@ static void TL_Sha_ShowUsrsWhoHaveSharedNote (const struct TL_Not_Note *Not, /***** Show users *****/ /* Number of users */ HTM_DIV_Begin ("class=\"TL_NUM_USRS\""); - TL_Usr_ShowNumSharersOrFavers (Not->NumShared); + TL_Usr_ShowNumSharersOrFavers (Not->NumShared); HTM_DIV_End (); /* List users one by one */ HTM_DIV_Begin ("class=\"TL_USRS\""); - TL_Usr_ShowSharersOrFavers (&mysql_res,Not->NumShared,NumFirstUsrs); - if (NumFirstUsrs < Not->NumShared) - /* Clickable ellipsis to show all users */ - TL_Frm_PutFormToSeeAllFaversSharers (TL_Frm_ALL_SHA_NOTE, - "NotCod=%ld",Not->NotCod, - HowManyUsrs); + TL_Usr_ShowSharersOrFavers (&mysql_res,Not->NumShared,NumFirstUsrs); + if (NumFirstUsrs < Not->NumShared) + /* Clickable ellipsis to show all users */ + TL_Frm_PutFormToSeeAllFaversSharers (TL_Frm_ALL_SHA_NOTE, + "NotCod=%ld",Not->NotCod, + HowManyUsrs); HTM_DIV_End (); /***** Free structure that stores the query result *****/ diff --git a/swad_timeline_user.c b/swad_timeline_user.c index 8d2ee773..fa4b7aba 100644 --- a/swad_timeline_user.c +++ b/swad_timeline_user.c @@ -73,7 +73,7 @@ void TL_Usr_RemoveUsrContent (long UsrCod) TL_DB_RemoveAllFavsToPubsBy (TL_Fav_COMM,UsrCod); /* Remove all favs to all comments in all notes authored by this user */ - TL_DB_RemoveAllFavsToAllCommentsInAllNotesBy (UsrCod); + TL_DB_RemoveAllFavsToAllCommsInAllNotesBy (UsrCod); /***** Remove favs for notes *****/ /* Remove all favs made by this user to any note */ @@ -84,10 +84,10 @@ void TL_Usr_RemoveUsrContent (long UsrCod) /***** Remove comments *****/ /* Remove all comments in all the notes of this user */ - TL_DB_RemoveAllCommentsInAllNotesOf (UsrCod); + TL_DB_RemoveAllCommsInAllNotesOf (UsrCod); /* Remove all comments made by this user in any note */ - TL_DB_RemoveAllCommentsMadeBy (UsrCod); + TL_DB_RemoveAllCommsMadeBy (UsrCod); /***** Remove posts *****/ /* Remove all posts of the user */ @@ -142,6 +142,7 @@ void TL_Usr_ShowSharersOrFavers (MYSQL_RES **mysql_res, NumUsr++) { /***** Get user *****/ + /* Get row */ row = mysql_fetch_row (*mysql_res); /* Get user's code (row[0]) */ @@ -150,11 +151,16 @@ void TL_Usr_ShowSharersOrFavers (MYSQL_RES **mysql_res, /***** Get user's data and show user's photo *****/ if (Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&UsrDat,Usr_DONT_GET_PREFS)) { + /* Begin container */ HTM_DIV_Begin ("class=\"TL_SHARER\""); - ShowPhoto = Pho_ShowingUsrPhotoIsAllowed (&UsrDat,PhotoURL); - Pho_ShowUsrPhoto (&UsrDat,ShowPhoto ? PhotoURL : - NULL, - "PHOTO12x16",Pho_ZOOM,true); // Use unique id + + /* User's photo */ + ShowPhoto = Pho_ShowingUsrPhotoIsAllowed (&UsrDat,PhotoURL); + Pho_ShowUsrPhoto (&UsrDat,ShowPhoto ? PhotoURL : + NULL, + "PHOTO12x16",Pho_ZOOM,true); // Use unique id + + /* End container */ HTM_DIV_End (); NumUsrsShown++; diff --git a/swad_timeline_who.c b/swad_timeline_who.c index 8ac7aef2..9a1ee921 100644 --- a/swad_timeline_who.c +++ b/swad_timeline_who.c @@ -83,13 +83,22 @@ void TL_Who_PutFormWho (struct TL_Timeline *Timeline) Who++) if (Mask & (1 << Who)) { + /* Begin container */ HTM_DIV_Begin ("class=\"%s\"", Who == Timeline->Who ? "PREF_ON" : "PREF_OFF"); - Frm_StartForm (ActSeeGblTL); - Par_PutHiddenParamUnsigned (NULL,"Who",(unsigned) Who); - Usr_PutWhoIcon (Who); - Frm_EndForm (); + + /* Begin form */ + Frm_BeginForm (ActSeeGblTL); + Par_PutHiddenParamUnsigned (NULL,"Who",(unsigned) Who); + + /* Icon to select which users */ + Usr_PutWhoIcon (Who); + + /* End form */ + Frm_EndForm (); + + /* End container */ HTM_DIV_End (); } Set_EndOneSettingSelector (); diff --git a/swad_timetable.c b/swad_timetable.c index 5896e298..fa690904 100644 --- a/swad_timetable.c +++ b/swad_timetable.c @@ -1557,7 +1557,7 @@ static void TT_TimeTableDrawCell (const struct TT_Timetable *Timetable, Lay_NotEnoughMemoryExit (); } - /* Start cell */ + /* Begin cell */ HTM_TD_Begin ("%s%sclass=\"%s\"",RowSpanStr,ColSpanStr,ClassStr); /* Free allocated memory for rowspan, colspan and class strings */ @@ -1567,9 +1567,9 @@ static void TT_TimeTableDrawCell (const struct TT_Timetable *Timetable, /***** Form to modify this cell *****/ if (Timetable->View == TT_CRS_EDIT) - Frm_StartForm (ActChgCrsTT); + Frm_BeginForm (ActChgCrsTT); else if (Timetable->View == TT_TUT_EDIT) - Frm_StartForm (ActChgTut); + Frm_BeginForm (ActChgTut); /***** Draw cell depending on type of view *****/ switch (Timetable->View) @@ -1578,7 +1578,7 @@ static void TT_TimeTableDrawCell (const struct TT_Timetable *Timetable, case TT_TUT_VIEW: // View tutoring timetable if (IntervalType != TT_FREE_INTERVAL) // If cell is not empty... { - /***** Start cell *****/ + /***** Begin cell *****/ HTM_DIV_Begin ("class=\"TT_CELL TT_TXT\""); /***** Course name *****/ diff --git a/swad_user.c b/swad_user.c index 22272e27..e34134f6 100644 --- a/swad_user.c +++ b/swad_user.c @@ -2524,7 +2524,7 @@ void Usr_WriteFormLogin (Act_Action_t NextAction,void (*FuncParams) (void)) HTM_DIV_Begin ("class=\"CM\""); /***** Begin form *****/ - Frm_StartForm (NextAction); + Frm_BeginForm (NextAction); if (FuncParams) FuncParams (); @@ -2596,7 +2596,7 @@ void Usr_WelcomeUsr (void) /* Mark my birthday as already congratulated */ Usr_InsertMyBirthday (); - /* Start alert */ + /* Begin alert */ Ale_ShowAlertAndButton1 (Ale_INFO,Txt_Happy_birthday_X, Gbl.Usrs.Me.UsrDat.FrstName); @@ -2722,7 +2722,7 @@ void Usr_PutFormLogIn (void) extern const char *Txt_Log_in; /***** Link to log in form *****/ - Frm_StartForm (ActFrmLogIn); + Frm_BeginForm (ActFrmLogIn); Ico_PutIconLink ("sign-in-alt-white.svg",Txt_Log_in); Frm_EndForm (); } @@ -2745,7 +2745,7 @@ void Usr_WriteLoggedUsrHead (void) /***** User's role *****/ if (NumAvailableRoles == 1) { - Frm_StartForm (ActFrmRolSes); + Frm_BeginForm (ActFrmRolSes); HTM_BUTTON_SUBMIT_Begin (Txt_Role, Str_BuildStringStr ("BT_LINK %s", The_ClassUsr[Gbl.Prefs.Theme]), @@ -2783,7 +2783,7 @@ void Usr_PutFormLogOut (void) extern const char *Txt_Log_out; /***** Link to log out form *****/ - Frm_StartForm (ActLogOut); + Frm_BeginForm (ActLogOut); Ico_PutIconLink ("sign-out-alt-white.svg",Txt_Log_out); Frm_EndForm (); } @@ -6265,7 +6265,7 @@ void Usr_PutFormToSelectUsrsToGoToAct (struct SelectedUsrs *SelectedUsrs, Grp_ShowFormToSelectSeveralGroups (FuncParams,Args, Grp_MY_GROUPS); - /***** Start section with user list *****/ + /***** Begin section with user list *****/ HTM_SECTION_Begin (Usr_USER_LIST_SECTION_ID); if (NumTotalUsrs) @@ -6282,7 +6282,7 @@ void Usr_PutFormToSelectUsrsToGoToAct (struct SelectedUsrs *SelectedUsrs, /***** Form to select users and select date range ****/ /* Begin form */ - Frm_StartForm (NextAction); + Frm_BeginForm (NextAction); /* Hidden parameters */ Grp_PutParamsCodGrps (); @@ -7442,7 +7442,7 @@ void Usr_ListDataAdms (void) /***** Form to select scope *****/ HTM_DIV_Begin ("class=\"CM\""); - Frm_StartForm (ActLstOth); + Frm_BeginForm (ActLstOth); Usr_PutParamListWithPhotos (); HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]); HTM_TxtColonNBSP (Txt_Scope); @@ -7456,7 +7456,7 @@ void Usr_ListDataAdms (void) /****** Show photos? *****/ HTM_DIV_Begin ("class=\"PREF_CONT\""); HTM_DIV_Begin ("class=\"PREF_OFF\""); - Frm_StartForm (ActLstOth); + Frm_BeginForm (ActLstOth); Sco_PutParamCurrentScope (&Gbl.Scope.Current); Usr_PutCheckboxListWithPhotos (); Frm_EndForm (); @@ -7915,7 +7915,7 @@ void Usr_SeeGuests (void) if (Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM) { HTM_DIV_Begin ("class=\"CM\""); - Frm_StartForm (ActLstGst); + Frm_BeginForm (ActLstGst); Usr_PutParamsPrefsAboutUsrList (); HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]); HTM_TxtColonNBSP (Txt_Scope); @@ -7925,7 +7925,7 @@ void Usr_SeeGuests (void) HTM_DIV_End (); } - /***** Start section with user list *****/ + /***** Begin section with user list *****/ HTM_SECTION_Begin (Usr_USER_LIST_SECTION_ID); if (Gbl.Usrs.LstUsrs[Rol_GST].NumUsrs) @@ -7951,7 +7951,7 @@ void Usr_SeeGuests (void) /* Begin form */ if (PutForm) - Frm_StartForm (ActDoActOnSevGst); + Frm_BeginForm (ActDoActOnSevGst); /* Begin table */ HTM_TABLE_BeginWide (); @@ -8062,7 +8062,7 @@ void Usr_SeeStudents (void) case Rol_INS_ADM: case Rol_SYS_ADM: HTM_DIV_Begin ("class=\"CM\""); - Frm_StartForm (ActLstStd); + Frm_BeginForm (ActLstStd); Usr_PutParamsPrefsAboutUsrList (); HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]); HTM_TxtColonNBSP (Txt_Scope); @@ -8080,7 +8080,7 @@ void Usr_SeeStudents (void) Grp_ShowFormToSelectSeveralGroups (Sco_PutParamCurrentScope,&Gbl.Scope.Current, Grp_MY_GROUPS); - /***** Start section with user list *****/ + /***** Begin section with user list *****/ HTM_SECTION_Begin (Usr_USER_LIST_SECTION_ID); if (Gbl.Usrs.LstUsrs[Rol_STD].NumUsrs) @@ -8112,7 +8112,7 @@ void Usr_SeeStudents (void) /* Begin form */ if (PutForm) { - Frm_StartForm (ActDoActOnSevStd); + Frm_BeginForm (ActDoActOnSevStd); Grp_PutParamsCodGrps (); } @@ -8243,7 +8243,7 @@ void Usr_SeeTeachers (void) /***** Form to select scope *****/ HTM_DIV_Begin ("class=\"CM\""); - Frm_StartForm (ActLstTch); + Frm_BeginForm (ActLstTch); Usr_PutParamsPrefsAboutUsrList (); HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]); HTM_TxtColonNBSP (Txt_Scope); @@ -8257,7 +8257,7 @@ void Usr_SeeTeachers (void) Grp_ShowFormToSelectSeveralGroups (Sco_PutParamCurrentScope,&Gbl.Scope.Current, Grp_MY_GROUPS); - /***** Start section with user list *****/ + /***** Begin section with user list *****/ HTM_SECTION_Begin (Usr_USER_LIST_SECTION_ID); if (NumUsrs) @@ -8289,7 +8289,7 @@ void Usr_SeeTeachers (void) /* Begin form */ if (PutForm) { - Frm_StartForm (ActDoActOnSevTch); + Frm_BeginForm (ActDoActOnSevTch); Grp_PutParamsCodGrps (); } @@ -9951,7 +9951,7 @@ void Usr_ShowTableCellWithUsrData (struct UsrData *UsrDat,unsigned NumRows) else { /* Begin form to go to user's record card */ - Frm_StartForm (NextAction); + Frm_BeginForm (NextAction); Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod); HTM_BUTTON_SUBMIT_Begin (UsrDat->FullName,"BT_LINK LT AUTHOR_TXT",NULL); }