diff --git a/css/swad18.3.css b/css/swad18.4.css similarity index 99% rename from css/swad18.3.css rename to css/swad18.4.css index 79fc6d35..fa3bee1f 100644 --- a/css/swad18.3.css +++ b/css/swad18.4.css @@ -76,10 +76,6 @@ address { font-style: normal; } -hr.WHITE_SEPARA {height:0; border-top:0; border-bottom:#707070 dotted 1px;} -hr.GREY_SEPARA {height:0; border-top:0; border-bottom:#707070 dotted 1px;} -hr.BLUE_SEPARA {height:0; border-top:0; border-bottom:#4D88A1 dotted 1px;} -hr.YELLOW_SEPARA {height:0; border-top:0; border-bottom:#BD4815 dotted 1px;} /*********************** Text decoration of links ****************************/ a @@ -3275,14 +3271,6 @@ a.PAG:hover, .PAG_CUR max-width:500px; } -/********************* Used to align buttons in account forms ****************/ -.FORM_ACCOUNT - { - display:inline-block; - box-sizing:border-box; - min-width:312px; - } - /************* Forms to edit institution, centre, degree, course *************/ .CODE { diff --git a/swad_ID.c b/swad_ID.c index ca0701df..305232cc 100644 --- a/swad_ID.c +++ b/swad_ID.c @@ -52,6 +52,8 @@ extern struct Globals Gbl; #define ID_MAX_IDS_PER_USER 3 // Maximum number of IDs per user +#define ID_ID_SECTION_ID "id_section" + /*****************************************************************************/ /******************************* Private types *******************************/ /*****************************************************************************/ @@ -69,6 +71,9 @@ static bool ID_CheckIfUsrIDIsValidUsingMinDigits (const char *UsrID,unsigned Min static void ID_PutLinkToConfirmID (struct UsrData *UsrDat,unsigned NumID, const char *Anchor); +static void ID_ShowFormChangeUsrID (const struct UsrData *UsrDat, + bool ItsMe,bool IShouldFillID); + static void ID_RemoveUsrID (const struct UsrData *UsrDat,bool ItsMe); static bool ID_CheckIfConfirmed (long UsrCod,const char *UsrID); static void ID_RemoveUsrIDFromDB (long UsrCod,const char *UsrID); @@ -467,7 +472,7 @@ static void ID_PutLinkToConfirmID (struct UsrData *UsrDat,unsigned NumID, NextAction = ActCnfID_Oth; break; } - Act_FormStartAnchor (NextAction,Anchor); + Act_StartFormAnchor (NextAction,Anchor); if (Gbl.Action.Original != ActUnk) { Par_PutHiddenParamLong ("OriginalActCod", @@ -494,7 +499,7 @@ static void ID_PutLinkToConfirmID (struct UsrData *UsrDat,unsigned NumID, The_ClassFormBold[Gbl.Prefs.Theme],NULL); /***** End form *****/ - Act_FormEnd (); + Act_EndForm (); } /*****************************************************************************/ @@ -544,7 +549,6 @@ void ID_ShowFormOthIDs (void) { extern const char *Txt_ID; extern const char *Txt_User_not_found_or_you_do_not_have_permission_; - bool ItsMe; /***** Get user whose password must be changed *****/ if (Usr_GetParamOtherUsrCodEncryptedAndGetUsrData ()) @@ -560,37 +564,106 @@ void ID_ShowFormOthIDs (void) &Gbl.Usrs.Other.UsrDat,NULL); /***** Form with the user's ID *****/ - Tbl_StartTableWide (2); - ItsMe = Usr_ItsMe (Gbl.Usrs.Other.UsrDat.UsrCod); - ID_ShowFormChangeUsrID (&Gbl.Usrs.Other.UsrDat,ItsMe); - Tbl_EndTable (); + ID_ShowFormChangeOtherUsrID (); /***** End box *****/ Box_EndBox (); } else - Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_); + { + Gbl.Alert.Type = Ale_WARNING; + Gbl.Alert.Section = ID_ID_SECTION_ID; + sprintf (Gbl.Alert.Txt,"%s", + Txt_User_not_found_or_you_do_not_have_permission_); + } } else // User not found - Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_); + { + Gbl.Alert.Type = Ale_WARNING; + Gbl.Alert.Section = ID_ID_SECTION_ID; + sprintf (Gbl.Alert.Txt,"%s", + Txt_User_not_found_or_you_do_not_have_permission_); + } } /*****************************************************************************/ /*********************** Show form to change my user's ID ********************/ /*****************************************************************************/ -void ID_ShowFormChangeUsrID (const struct UsrData *UsrDat,bool ItsMe) +void ID_ShowFormChangeMyID (bool IShouldFillID) { - extern const char *The_ClassForm[The_NUM_THEMES]; + extern const char *Hlp_PROFILE_Account; extern const char *Txt_ID; + char StrRecordWidth[10 + 1]; + + /***** Start section *****/ + Lay_StartSection (ID_ID_SECTION_ID); + + /***** Start box *****/ + sprintf (StrRecordWidth,"%upx",Rec_RECORD_WIDTH); + Box_StartBox (StrRecordWidth,Txt_ID,Acc_PutLinkToRemoveMyAccount, + Hlp_PROFILE_Account,Box_NOT_CLOSABLE); + + /***** Show form to change ID *****/ + ID_ShowFormChangeUsrID (&Gbl.Usrs.Me.UsrDat, + true, // ItsMe + IShouldFillID); + + /***** End box *****/ + Box_EndBox (); + + /***** End section *****/ + Lay_EndSection (); + } + +/*****************************************************************************/ +/*********************** Show form to change my user's ID ********************/ +/*****************************************************************************/ + +void ID_ShowFormChangeOtherUsrID (void) + { + /***** Start section *****/ + Lay_StartSection (ID_ID_SECTION_ID); + + /***** Show form to change ID *****/ + ID_ShowFormChangeUsrID (&Gbl.Usrs.Other.UsrDat, + false, // ItsMe + false); // IShouldFillID + + /***** End section *****/ + Lay_EndSection (); + } + +/*****************************************************************************/ +/*********************** Show form to change my user's ID ********************/ +/*****************************************************************************/ + +static void ID_ShowFormChangeUsrID (const struct UsrData *UsrDat, + bool ItsMe,bool IShouldFillID) + { + extern const char *Hlp_PROFILE_Account; + extern const char *The_ClassForm[The_NUM_THEMES]; + extern const char *Txt_Please_fill_in_your_ID; extern const char *Txt_ID_X_confirmed; extern const char *Txt_ID_X_not_confirmed; + extern const char *Txt_ID; extern const char *Txt_Another_ID; extern const char *Txt_Add_this_ID; extern const char *Txt_The_ID_is_used_in_order_to_facilitate_; unsigned NumID; Act_Action_t NextAction; + /***** Show possible alert *****/ + if (Gbl.Alert.Section == (const char *) ID_ID_SECTION_ID) + Ale_ShowAlert (Gbl.Alert.Type,Gbl.Alert.Txt); + + /***** Help message *****/ + if (IShouldFillID) + Ale_ShowAlert (Ale_WARNING,Txt_Please_fill_in_your_ID); + + /***** Start table *****/ + Tbl_StartTableWide (2); + /***** List existing user's IDs *****/ for (NumID = 0; NumID < UsrDat->IDs.Num; @@ -598,10 +671,12 @@ void ID_ShowFormChangeUsrID (const struct UsrData *UsrDat,bool ItsMe) { if (NumID == 0) fprintf (Gbl.F.Out,"" - "" + "" + "" "" - "", + "", The_ClassForm[Gbl.Prefs.Theme],Txt_ID); else // NumID >= 1 fprintf (Gbl.F.Out,"
"); @@ -615,7 +690,7 @@ void ID_ShowFormChangeUsrID (const struct UsrData *UsrDat,bool ItsMe) { /* Form to remove user's ID */ if (ItsMe) - Act_FormStart (ActRemID_Me); + Act_StartFormAnchor (ActRemID_Me,ID_ID_SECTION_ID); else { switch (UsrDat->Roles.InCurrentCrs.Role) @@ -631,13 +706,14 @@ void ID_ShowFormChangeUsrID (const struct UsrData *UsrDat,bool ItsMe) NextAction = ActRemID_Oth; break; } - Act_FormStart (NextAction); + Act_StartFormAnchor (NextAction,ID_ID_SECTION_ID); Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod); } - fprintf (Gbl.F.Out,"", + fprintf (Gbl.F.Out,"", UsrDat->IDs.List[NumID].ID); Ico_PutIconRemove (); - Act_FormEnd (); + Act_EndForm (); } } @@ -646,7 +722,7 @@ void ID_ShowFormChangeUsrID (const struct UsrData *UsrDat,bool ItsMe) UsrDat->IDs.List[NumID].Confirmed ? Txt_ID_X_confirmed : Txt_ID_X_not_confirmed, UsrDat->IDs.List[NumID].ID); - fprintf (Gbl.F.Out,"%s", + fprintf (Gbl.F.Out,"%s", UsrDat->IDs.List[NumID].Confirmed ? "USR_ID_C" : "USR_ID_NC", Gbl.Title, @@ -679,15 +755,15 @@ void ID_ShowFormChangeUsrID (const struct UsrData *UsrDat,bool ItsMe) /***** Form to enter new user's ID *****/ fprintf (Gbl.F.Out,"" - "" + "" "" "" - "", + "", The_ClassForm[Gbl.Prefs.Theme], UsrDat->IDs.Num ? Txt_Another_ID : // A new user's ID Txt_ID); // The first user's ID if (ItsMe) - Act_FormStart (ActNewIDMe); + Act_StartFormAnchor (ActNewIDMe,ID_ID_SECTION_ID); else { switch (UsrDat->Roles.InCurrentCrs.Role) @@ -703,21 +779,23 @@ void ID_ShowFormChangeUsrID (const struct UsrData *UsrDat,bool ItsMe) NextAction = ActNewID_Oth; break; } - Act_FormStart (NextAction); + Act_StartFormAnchor (NextAction,ID_ID_SECTION_ID); Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod); } - fprintf (Gbl.F.Out,"
" - "" - "
", + "
", ID_MAX_BYTES_USR_ID, UsrDat->IDs.Num ? UsrDat->IDs.List[UsrDat->IDs.Num - 1].ID : ""); // Show the most recent ID Btn_PutCreateButtonInline (Txt_Add_this_ID); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,"" ""); } + + /***** End table *****/ + Tbl_EndTable (); } /*****************************************************************************/ @@ -734,7 +812,7 @@ void ID_RemoveMyUsrID (void) ID_GetListIDsFromUsrCod (&Gbl.Usrs.Me.UsrDat); /***** Show my account again *****/ - Acc_ShowFormChgMyAccountAndPwd (); + Acc_ShowFormChgMyAccount (); } /*****************************************************************************/ @@ -756,12 +834,16 @@ void ID_RemoveOtherUsrID (void) /***** Update list of IDs *****/ ID_GetListIDsFromUsrCod (&Gbl.Usrs.Other.UsrDat); - /***** Show user's record *****/ - Rec_ShowSharedUsrRecord (Rec_SHA_RECORD_LIST, - &Gbl.Usrs.Other.UsrDat,NULL); + /***** Show form again *****/ + ID_ShowFormOthIDs (); } else // User not found - Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_); + { + Gbl.Alert.Type = Ale_WARNING; + Gbl.Alert.Section = ID_ID_SECTION_ID; + sprintf (Gbl.Alert.Txt,"%s", + Txt_User_not_found_or_you_do_not_have_permission_); + } } /*****************************************************************************/ @@ -798,14 +880,24 @@ static void ID_RemoveUsrID (const struct UsrData *UsrDat,bool ItsMe) ID_RemoveUsrIDFromDB (UsrDat->UsrCod,UsrID); /***** Show message *****/ + Gbl.Alert.Type = Ale_SUCCESS; + Gbl.Alert.Section = ID_ID_SECTION_ID; sprintf (Gbl.Alert.Txt,Txt_ID_X_removed,UsrID); - Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); } else - Ale_ShowAlert (Ale_WARNING,Txt_You_can_not_delete_this_ID); + { + Gbl.Alert.Type = Ale_WARNING; + Gbl.Alert.Section = ID_ID_SECTION_ID; + sprintf (Gbl.Alert.Txt,"%s",Txt_You_can_not_delete_this_ID); + } } else - Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_); + { + Gbl.Alert.Type = Ale_WARNING; + Gbl.Alert.Section = ID_ID_SECTION_ID; + sprintf (Gbl.Alert.Txt,"%s", + Txt_User_not_found_or_you_do_not_have_permission_); + } } /*****************************************************************************/ @@ -852,7 +944,7 @@ void ID_NewMyUsrID (void) ID_GetListIDsFromUsrCod (&Gbl.Usrs.Me.UsrDat); /***** Show my account again *****/ - Acc_ShowFormChgMyAccountAndPwd (); + Acc_ShowFormChgMyAccount (); } /*****************************************************************************/ @@ -874,12 +966,16 @@ void ID_NewOtherUsrID (void) /***** Update list of IDs *****/ ID_GetListIDsFromUsrCod (&Gbl.Usrs.Other.UsrDat); - /***** Show user's record *****/ - Rec_ShowSharedUsrRecord (Rec_SHA_RECORD_LIST, - &Gbl.Usrs.Other.UsrDat,NULL); + /***** Show form again *****/ + ID_ShowFormOthIDs (); } else // User not found - Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_); + { + Gbl.Alert.Type = Ale_WARNING; + Gbl.Alert.Section = ID_ID_SECTION_ID; + sprintf (Gbl.Alert.Txt,"%s", + Txt_User_not_found_or_you_do_not_have_permission_); + } } /*****************************************************************************/ @@ -898,7 +994,6 @@ static void ID_NewUsrID (const struct UsrData *UsrDat,bool ItsMe) unsigned NumID; bool AlreadyExists; unsigned NumIDFound = 0; // Initialized to avoid warning - bool Error = false; if (Usr_ICanEditOtherUsr (UsrDat)) { @@ -924,7 +1019,8 @@ static void ID_NewUsrID (const struct UsrData *UsrDat,bool ItsMe) { if (ItsMe || UsrDat->IDs.List[NumIDFound].Confirmed) { - Error = true; + Gbl.Alert.Type = Ale_WARNING; + Gbl.Alert.Section = ID_ID_SECTION_ID; sprintf (Gbl.Alert.Txt,Txt_The_ID_X_matches_one_of_the_existing, NewID); } @@ -932,13 +1028,17 @@ static void ID_NewUsrID (const struct UsrData *UsrDat,bool ItsMe) { /***** Mark this ID as confirmed *****/ ID_ConfirmUsrID (UsrDat,NewID); + + Gbl.Alert.Type = Ale_SUCCESS; + Gbl.Alert.Section = ID_ID_SECTION_ID; sprintf (Gbl.Alert.Txt,Txt_The_ID_X_has_been_confirmed, NewID); } } else if (UsrDat->IDs.Num >= ID_MAX_IDS_PER_USER) { - Error = true; + Gbl.Alert.Type = Ale_WARNING; + Gbl.Alert.Section = ID_ID_SECTION_ID; sprintf (Gbl.Alert.Txt,Txt_A_user_can_not_have_more_than_X_IDs, ID_MAX_IDS_PER_USER); } @@ -949,23 +1049,26 @@ static void ID_NewUsrID (const struct UsrData *UsrDat,bool ItsMe) // Not me ==> ID confirmed ID_InsertANewUsrIDInDB (UsrDat->UsrCod,NewID,!ItsMe); + Gbl.Alert.Type = Ale_SUCCESS; + Gbl.Alert.Section = ID_ID_SECTION_ID; sprintf (Gbl.Alert.Txt,Txt_The_ID_X_has_been_registered_successfully, NewID); } } else // New ID is not valid { - Error = true; + Gbl.Alert.Type = Ale_WARNING; + Gbl.Alert.Section = ID_ID_SECTION_ID; sprintf (Gbl.Alert.Txt,Txt_The_ID_X_is_not_valid,NewID); } - - /***** Show message *****/ - Ale_ShowAlert (Error ? Ale_WARNING : - Ale_SUCCESS, - Gbl.Alert.Txt); } else - Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_); + { + Gbl.Alert.Type = Ale_WARNING; + Gbl.Alert.Section = ID_ID_SECTION_ID; + sprintf (Gbl.Alert.Txt,"%s", + Txt_User_not_found_or_you_do_not_have_permission_); + } } /*****************************************************************************/ @@ -1004,9 +1107,6 @@ void ID_ConfirmOtherUsrID (void) unsigned NumID; unsigned NumIDFound = 0; // Initialized to avoid warning - /***** Initialize alert type and message *****/ - Gbl.Alert.Type = Ale_NONE; // Do not show alert - /***** Get where we came from *****/ OriginalActCod = Par_GetParToLong ("OriginalActCod"); Gbl.Action.Original = Act_GetActionFromActCod (OriginalActCod); @@ -1044,6 +1144,7 @@ void ID_ConfirmOtherUsrID (void) { /***** ID found and already confirmed *****/ Gbl.Alert.Type = Ale_INFO; + Gbl.Alert.Section = ID_ID_SECTION_ID; sprintf (Gbl.Alert.Txt,Txt_ID_X_had_already_been_confirmed, Gbl.Usrs.Other.UsrDat.IDs.List[NumIDFound].ID); } @@ -1056,6 +1157,7 @@ void ID_ConfirmOtherUsrID (void) /***** Write success message *****/ Gbl.Alert.Type = Ale_SUCCESS; + Gbl.Alert.Section = ID_ID_SECTION_ID; sprintf (Gbl.Alert.Txt,Txt_The_ID_X_has_been_confirmed, Gbl.Usrs.Other.UsrDat.IDs.List[NumIDFound].ID); } @@ -1063,13 +1165,17 @@ void ID_ConfirmOtherUsrID (void) else // User's ID not found { Gbl.Alert.Type = Ale_WARNING; - sprintf (Gbl.Alert.Txt,"%s",Txt_User_not_found_or_you_do_not_have_permission_); + Gbl.Alert.Section = ID_ID_SECTION_ID; + sprintf (Gbl.Alert.Txt,"%s", + Txt_User_not_found_or_you_do_not_have_permission_); } } else // I can not confirm { Gbl.Alert.Type = Ale_WARNING; - sprintf (Gbl.Alert.Txt,"%s",Txt_User_not_found_or_you_do_not_have_permission_); + Gbl.Alert.Section = ID_ID_SECTION_ID; + sprintf (Gbl.Alert.Txt,"%s", + Txt_User_not_found_or_you_do_not_have_permission_); } /***** Show one or multiple records *****/ diff --git a/swad_ID.h b/swad_ID.h index 9bdc89ae..d1803a25 100644 --- a/swad_ID.h +++ b/swad_ID.h @@ -74,7 +74,9 @@ bool ID_ICanSeeOtherUsrIDs (const struct UsrData *UsrDat); void ID_PutLinkToChangeUsrIDs (void); void ID_ShowFormOthIDs (void); -void ID_ShowFormChangeUsrID (const struct UsrData *UsrDat,bool ItsMe); +void ID_ShowFormChangeMyID (bool IShouldFillID); +void ID_ShowFormChangeOtherUsrID (void); + void ID_RemoveMyUsrID (void); void ID_RemoveOtherUsrID (void); void ID_NewMyUsrID (void); diff --git a/swad_MFU.c b/swad_MFU.c index afe9ed63..b3479d0d 100644 --- a/swad_MFU.c +++ b/swad_MFU.c @@ -239,14 +239,14 @@ void MFU_WriteBigMFUActions (struct MFU_ListMFUActions *ListMFUActions) /* Icon and text */ fprintf (Gbl.F.Out,"
  • "); - Act_FormStart (Action); + Act_StartForm (Action); Act_LinkFormSubmit (TabMenuStr,The_ClassFormNoWrap[Gbl.Prefs.Theme],NULL); fprintf (Gbl.F.Out,"\"%s\"", Gbl.Prefs.PathIconSet,Cfg_ICON_ACTION, Act_GetIcon (Action), MenuStr); fprintf (Gbl.F.Out," %s",TabMenuStr); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,"
  • "); } } @@ -274,12 +274,12 @@ void MFU_WriteSmallMFUActions (struct MFU_ListMFUActions *ListMFUActions) /***** Start div and link *****/ fprintf (Gbl.F.Out,"
    "); - Act_FormStart (ActMFUAct); + Act_StartForm (ActMFUAct); Act_LinkFormSubmit (Txt_My_frequent_actions,NULL,NULL); fprintf (Gbl.F.Out," %s" "", Txt_Frequent_ACTIONS); - Act_FormEnd (); + Act_EndForm (); /***** Write list of frequently used actions *****/ fprintf (Gbl.F.Out,"
    "); @@ -230,7 +230,7 @@ static void Agd_ShowFormToSelPrivatPublicEvents (void) fprintf (Gbl.F.Out,"
    ", (Gbl.Agenda.PrivatPublicEvents & (1 << PrvPub)) ? "PREF_ON" : "PREF_OFF"); - Act_FormStart (ActSeeMyAgd); + Act_StartForm (ActSeeMyAgd); Agd_PutParamsMyAgenda (Gbl.Agenda.Past__FutureEvents, Gbl.Agenda.PrivatPublicEvents ^ (1 << PrvPub), // Toggle Gbl.Agenda.HiddenVisiblEvents, @@ -244,7 +244,7 @@ static void Agd_ShowFormToSelPrivatPublicEvents (void) Image[PrvPub], Txt_AGENDA_PRIVAT_PUBLIC_EVENTS[PrvPub], Txt_AGENDA_PRIVAT_PUBLIC_EVENTS[PrvPub]); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,"
    "); } fprintf (Gbl.F.Out,""); @@ -272,7 +272,7 @@ static void Agd_ShowFormToSelHiddenVisiblEvents (void) fprintf (Gbl.F.Out,"
    ", (Gbl.Agenda.HiddenVisiblEvents & (1 << HidVis)) ? "PREF_ON" : "PREF_OFF"); - Act_FormStart (ActSeeMyAgd); + Act_StartForm (ActSeeMyAgd); Agd_PutParamsMyAgenda (Gbl.Agenda.Past__FutureEvents, Gbl.Agenda.PrivatPublicEvents, Gbl.Agenda.HiddenVisiblEvents ^ (1 << HidVis), // Toggle @@ -286,7 +286,7 @@ static void Agd_ShowFormToSelHiddenVisiblEvents (void) Image[HidVis], Txt_AGENDA_HIDDEN_VISIBL_EVENTS[HidVis], Txt_AGENDA_HIDDEN_VISIBL_EVENTS[HidVis]); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,"
    "); } fprintf (Gbl.F.Out,""); @@ -584,12 +584,12 @@ static void Agd_WriteHeaderListEvents (Agd_AgendaType_t AgendaType) { case Agd_MY_AGENDA_TODAY: case Agd_MY_AGENDA: - Act_FormStart (ActSeeMyAgd); + Act_StartForm (ActSeeMyAgd); Pag_PutHiddenParamPagNum (Pag_MY_AGENDA,Gbl.Agenda.CurrentPage); break; case Agd_ANOTHER_AGENDA_TODAY: case Agd_ANOTHER_AGENDA: - Act_FormStart (ActSeeUsrAgd); + Act_StartForm (ActSeeUsrAgd); Usr_PutParamOtherUsrCodEncrypted (); Pag_PutHiddenParamPagNum (Pag_ANOTHER_AGENDA,Gbl.Agenda.CurrentPage); break; @@ -602,7 +602,7 @@ static void Agd_WriteHeaderListEvents (Agd_AgendaType_t AgendaType) if (Order == Gbl.Agenda.SelectedOrder) fprintf (Gbl.F.Out,""); fprintf (Gbl.F.Out,""); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,""); } fprintf (Gbl.F.Out,"" @@ -707,14 +707,14 @@ static void Agd_PutButtonToCreateNewEvent (void) { extern const char *Txt_New_event; - Act_FormStart (ActFrmNewEvtMyAgd); + Act_StartForm (ActFrmNewEvtMyAgd); Agd_PutParamsMyAgenda (Gbl.Agenda.Past__FutureEvents, Gbl.Agenda.PrivatPublicEvents, Gbl.Agenda.HiddenVisiblEvents, Gbl.Agenda.CurrentPage, -1L); Btn_PutConfirmButton (Txt_New_event); - Act_FormEnd (); + Act_EndForm (); } /*****************************************************************************/ @@ -1522,12 +1522,12 @@ void Agd_RequestCreatOrEditEvent (void) /***** Start form *****/ if (ItsANewEvent) { - Act_FormStart (ActNewEvtMyAgd); + Act_StartForm (ActNewEvtMyAgd); Gbl.Agenda.AgdCodToEdit = -1L; } else { - Act_FormStart (ActChgEvtMyAgd); + Act_StartForm (ActChgEvtMyAgd); Gbl.Agenda.AgdCodToEdit = AgdEvent.AgdCod; } Agd_PutCurrentParamsMyAgenda (); @@ -1597,7 +1597,7 @@ void Agd_RequestCreatOrEditEvent (void) Box_EndBoxTableWithButton (Btn_CONFIRM_BUTTON,Txt_Save); /***** End form *****/ - Act_FormEnd (); + Act_EndForm (); /***** Show current events, if any *****/ Agd_ShowMyAgenda (); diff --git a/swad_alert.c b/swad_alert.c index 7319d2e2..e5cba2aa 100644 --- a/swad_alert.c +++ b/swad_alert.c @@ -167,8 +167,8 @@ void Ale_ShowAlertAndButton2 (Act_Action_t NextAction,const char *Anchor,const c if (TxtButton[0]) { /* Start form */ - Act_FormStartAnchor (NextAction,Anchor); - Act_FormStartAnchorOnSubmit (NextAction,Anchor,OnSubmit); + Act_StartFormAnchor (NextAction,Anchor); + Act_StartFormAnchorOnSubmit (NextAction,Anchor,OnSubmit); if (FuncParams) FuncParams (); @@ -176,7 +176,7 @@ void Ale_ShowAlertAndButton2 (Act_Action_t NextAction,const char *Anchor,const c Btn_PutButton (Button,TxtButton); /* End form */ - Act_FormEnd (); + Act_EndForm (); } /***** End box *****/ diff --git a/swad_announcement.c b/swad_announcement.c index 47dcde11..13fa51aa 100644 --- a/swad_announcement.c +++ b/swad_announcement.c @@ -195,9 +195,9 @@ static void Ann_PutButtonToAddNewAnnouncement (void) { extern const char *Txt_New_announcement; - Act_FormStart (ActWriAnn); + Act_StartForm (ActWriAnn); Btn_PutConfirmButton (Txt_New_announcement); - Act_FormEnd (); + Act_EndForm (); } /*****************************************************************************/ @@ -407,7 +407,7 @@ void Ann_ShowFormAnnouncement (void) extern const char *Txt_Create_announcement; /***** Start form *****/ - Act_FormStart (ActRcvAnn); + Act_StartForm (ActRcvAnn); /***** Start box and table *****/ Box_StartBoxTable (NULL,Txt_New_announcement,NULL, @@ -443,7 +443,7 @@ void Ann_ShowFormAnnouncement (void) Box_EndBoxTableWithButton (Btn_CREATE_BUTTON,Txt_Create_announcement); /***** End form *****/ - Act_FormEnd (); + Act_EndForm (); } /*****************************************************************************/ diff --git a/swad_assignment.c b/swad_assignment.c index d4c34990..60758b68 100644 --- a/swad_assignment.c +++ b/swad_assignment.c @@ -203,7 +203,7 @@ static void Asg_PutHeadForSeeing (bool PrintView) if (!PrintView) { - Act_FormStart (ActSeeAsg); + Act_StartForm (ActSeeAsg); Grp_PutParamWhichGrps (); Pag_PutHiddenParamPagNum (Pag_ASSIGNMENTS,Gbl.Asgs.CurrentPage); Par_PutHiddenParamUnsigned ("Order",(unsigned) Order); @@ -217,7 +217,7 @@ static void Asg_PutHeadForSeeing (bool PrintView) if (Order == Gbl.Asgs.SelectedOrder) fprintf (Gbl.F.Out,""); fprintf (Gbl.F.Out,""); - Act_FormEnd (); + Act_EndForm (); } fprintf (Gbl.F.Out,""); @@ -287,10 +287,10 @@ static void Asg_PutButtonToCreateNewAsg (void) extern const char *Txt_New_assignment; Gbl.Asgs.AsgCodToEdit = -1L; - Act_FormStart (ActFrmNewAsg); + Act_StartForm (ActFrmNewAsg); Asg_PutParams (); Btn_PutConfirmButton (Txt_New_assignment); - Act_FormEnd (); + Act_EndForm (); } /*****************************************************************************/ @@ -515,7 +515,7 @@ static void Asg_WriteAssignmentFolder (struct Assignment *Asg,bool PrintView) ICanSendFiles) // I can send files to this assignment folder { /* Form to create a new file or folder */ - Act_FormStart (ActFrmCreAsgUsr); + Act_StartForm (ActFrmCreAsgUsr); Brw_PutParamsFileBrowser (ActUnk, Brw_INTERNAL_NAME_ROOT_FOLDER_ASSIGNMENTS, Asg->Folder, @@ -528,7 +528,7 @@ static void Asg_WriteAssignmentFolder (struct Assignment *Asg,bool PrintView) Gbl.Prefs.IconsURL, Gbl.Title, Gbl.Title); - Act_FormEnd (); + Act_EndForm (); } else // I can't send files to this assignment folder fprintf (Gbl.F.Out,"\"%s\""); - Act_FormStart (ActSeeAtt); + Act_StartForm (ActSeeAtt); Grp_PutParamWhichGrps (); Pag_PutHiddenParamPagNum (Pag_ATT_EVENTS,Gbl.AttEvents.CurrentPage); Par_PutHiddenParamUnsigned ("Order",(unsigned) Order); @@ -254,7 +254,7 @@ static void Att_ShowAllAttEvents (void) if (Order == Gbl.AttEvents.SelectedOrder) fprintf (Gbl.F.Out,""); fprintf (Gbl.F.Out,""); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,""); } fprintf (Gbl.F.Out,"" @@ -336,10 +336,10 @@ static void Att_PutButtonToCreateNewAttEvent (void) { extern const char *Txt_New_event; - Act_FormStart (ActFrmNewAtt); + Act_StartForm (ActFrmNewAtt); Att_PutParamsToCreateNewAttEvent (); Btn_PutConfirmButton (Txt_New_event); - Act_FormEnd (); + Act_EndForm (); } /*****************************************************************************/ @@ -431,13 +431,13 @@ static void Att_ShowOneAttEvent (struct AttendanceEvent *Att,bool ShowOnlyThisAt fprintf (Gbl.F.Out,"\">"); /* Put form to view attendance event */ - Act_FormStart (ActSeeOneAtt); + Act_StartForm (ActSeeOneAtt); Att_PutParamAttCod (Att->AttCod); Att_PutParamsCodGrps (Att->AttCod); Act_LinkFormSubmit (Txt_View_event,Att->Hidden ? "ASG_TITLE_LIGHT" : "ASG_TITLE",NULL); fprintf (Gbl.F.Out,"%s",Att->Title); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,""); /* Number of students in this event */ @@ -880,7 +880,7 @@ void Att_AskRemAttEvent (void) Att_GetDataOfAttEventByCodAndCheckCrs (&Att); /***** Button of confirmation of removing *****/ - Act_FormStart (ActRemAtt); + Act_StartForm (ActRemAtt); Att_PutParamAttCod (Att.AttCod); Att_PutHiddenParamAttOrder (); Grp_PutParamWhichGrps (); @@ -891,7 +891,7 @@ void Att_AskRemAttEvent (void) Att.Title); Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); Btn_PutRemoveButton (Txt_Remove_event); - Act_FormEnd (); + Act_EndForm (); /***** Show attendance events again *****/ Att_SeeAttEvents (); @@ -1076,10 +1076,10 @@ void Att_RequestCreatOrEditAttEvent (void) /***** Start form *****/ if (ItsANewAttEvent) - Act_FormStart (ActNewAtt); + Act_StartForm (ActNewAtt); else { - Act_FormStart (ActChgAtt); + Act_StartForm (ActChgAtt); Att_PutParamAttCod (Att.AttCod); } Att_PutHiddenParamAttOrder (); @@ -1164,7 +1164,7 @@ void Att_RequestCreatOrEditAttEvent (void) Box_EndBoxTableWithButton (Btn_CONFIRM_BUTTON,Txt_Save); /***** End form *****/ - Act_FormEnd (); + Act_EndForm (); /***** Show current attendance events *****/ Att_GetListAttEvents (Att_NEWEST_FIRST); @@ -1870,7 +1870,7 @@ static void Att_ListAttOnlyMeAsStudent (struct AttendanceEvent *Att) /***** Start form *****/ if (Att->Open) { - Act_FormStart (ActRecAttMe); + Act_StartForm (ActRecAttMe); Att_PutParamAttCod (Att->AttCod); } @@ -1908,7 +1908,7 @@ static void Att_ListAttOnlyMeAsStudent (struct AttendanceEvent *Att) { /***** Send button *****/ Btn_PutConfirmButton (Txt_Save); - Act_FormEnd (); + Act_EndForm (); } } @@ -1953,7 +1953,7 @@ static void Att_ListAttStudents (struct AttendanceEvent *Att) Usr_UsrDataConstructor (&UsrDat); /***** Start form *****/ - Act_FormStart (ActRecAttStd); + Act_StartForm (ActRecAttStd); Att_PutParamAttCod (Att->AttCod); Grp_PutParamsCodGrps (); @@ -2000,7 +2000,7 @@ static void Att_ListAttStudents (struct AttendanceEvent *Att) Btn_PutConfirmButton (Txt_Save); /***** End form *****/ - Act_FormEnd (); + Act_EndForm (); /***** Free memory used for user's data *****/ Usr_UsrDataDestructor (&UsrDat); @@ -2696,7 +2696,7 @@ void Usr_ReqListStdsAttendanceCrs (void) Usr_ShowFormsToSelectUsrListType (ActReqLstStdAtt); /* Start form */ - Act_FormStart (ActSeeLstStdAtt); + Act_StartForm (ActSeeLstStdAtt); Grp_PutParamsCodGrps (); /* Write list of students to select some of them */ @@ -2708,7 +2708,7 @@ void Usr_ReqListStdsAttendanceCrs (void) Btn_PutConfirmButton (Txt_Show_list); /* End form */ - Act_FormEnd (); + Act_EndForm (); /***** Free memory used by list of selected users' codes *****/ Usr_FreeListsSelectedUsrsCods (); @@ -3067,14 +3067,14 @@ static void Att_PutButtonToShowDetails (void) extern const char *Txt_Show_more_details; /***** Button to show more details *****/ - Act_FormStart (Gbl.Action.Act); + Act_StartForm (Gbl.Action.Act); Par_PutHiddenParamChar ("ShowDetails",'Y'); Grp_PutParamsCodGrps (); Usr_PutHiddenParUsrCodAll (Gbl.Action.Act,Gbl.Usrs.Select[Rol_UNK]); if (Gbl.AttEvents.StrAttCodsSelected[0]) Par_PutHiddenParamString ("AttCods",Gbl.AttEvents.StrAttCodsSelected); Btn_PutConfirmButton (Txt_Show_more_details); - Act_FormEnd (); + Act_EndForm (); } /*****************************************************************************/ @@ -3099,7 +3099,7 @@ static void Att_ListEventsToSelect (Att_TypeOfView_t TypeOfView) if (TypeOfView == Att_NORMAL_VIEW_ONLY_ME || TypeOfView == Att_NORMAL_VIEW_STUDENTS) { - Act_FormStart (Gbl.Action.Act); + Act_StartForm (Gbl.Action.Act); Grp_PutParamsCodGrps (); Usr_PutHiddenParUsrCodAll (Gbl.Action.Act,Gbl.Usrs.Select[Rol_UNK]); } @@ -3190,7 +3190,7 @@ static void Att_ListEventsToSelect (Att_TypeOfView_t TypeOfView) /***** End form *****/ if (TypeOfView == Att_NORMAL_VIEW_ONLY_ME || TypeOfView == Att_NORMAL_VIEW_STUDENTS) - Act_FormEnd (); + Act_EndForm (); } /*****************************************************************************/ diff --git a/swad_banner.c b/swad_banner.c index 4f1ddb2f..c0bc8da3 100644 --- a/swad_banner.c +++ b/swad_banner.c @@ -129,9 +129,9 @@ void Ban_SeeBanners (void) /***** Button to create banner *****/ if (Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM) { - Act_FormStart (ActEdiBan); + Act_StartForm (ActEdiBan); Btn_PutConfirmButton (Txt_New_banner); - Act_FormEnd (); + Act_EndForm (); } /***** End box *****/ @@ -396,15 +396,15 @@ static void Ban_ListBannersForEdition (void) /* Put icon to remove banner */ fprintf (Gbl.F.Out,"" ""); - Act_FormStart (ActRemBan); + Act_StartForm (ActRemBan); Ban_PutParamBanCod (Ban->BanCod); Ico_PutIconRemove (); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,""); /* Put icon to hide/show banner */ fprintf (Gbl.F.Out,""); - Act_FormStart (Ban->Hidden ? ActShoBan : + Act_StartForm (Ban->Hidden ? ActShoBan : ActHidBan); Ban_PutParamBanCod (Ban->BanCod); fprintf (Gbl.F.Out,"Hidden ? Txt_Show : Txt_Hide); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,""); /* Banner code */ @@ -429,49 +429,49 @@ static void Ban_ListBannersForEdition (void) /* Banner short name */ fprintf (Gbl.F.Out,""); - Act_FormStart (ActRenBanSho); + Act_StartForm (ActRenBanSho); Ban_PutParamBanCod (Ban->BanCod); fprintf (Gbl.F.Out,"", Ban_MAX_CHARS_SHRT_NAME,Ban->ShrtName,Gbl.Form.Id); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,""); /* Banner full name */ fprintf (Gbl.F.Out,""); - Act_FormStart (ActRenBanFul); + Act_StartForm (ActRenBanFul); Ban_PutParamBanCod (Ban->BanCod); fprintf (Gbl.F.Out,"", Ban_MAX_CHARS_FULL_NAME,Ban->FullName,Gbl.Form.Id); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,""); /* Banner image */ fprintf (Gbl.F.Out,""); - Act_FormStart (ActChgBanImg); + Act_StartForm (ActChgBanImg); Ban_PutParamBanCod (Ban->BanCod); fprintf (Gbl.F.Out,"", Ban_MAX_CHARS_IMAGE,Ban->Img,Gbl.Form.Id); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,""); /* Banner WWW */ fprintf (Gbl.F.Out,""); - Act_FormStart (ActChgBanWWW); + Act_StartForm (ActChgBanWWW); Ban_PutParamBanCod (Ban->BanCod); fprintf (Gbl.F.Out,"", Cns_MAX_CHARS_WWW,Ban->WWW,Gbl.Form.Id); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,"" ""); } @@ -828,7 +828,7 @@ static void Ban_PutFormToCreateBanner (void) Ban = &Gbl.Banners.EditingBan; /***** Start form *****/ - Act_FormStart (ActNewBan); + Act_StartForm (ActNewBan); /***** Start box and table *****/ Box_StartBoxTable (NULL,Txt_New_banner,NULL, @@ -883,7 +883,7 @@ static void Ban_PutFormToCreateBanner (void) Box_EndBoxTableWithButton (Btn_CREATE_BUTTON,Txt_Create_banner); /***** End form *****/ - Act_FormEnd (); + Act_EndForm (); } /*****************************************************************************/ @@ -1018,7 +1018,7 @@ void Ban_WriteMenuWithBanners (void) { /* Write data of this banner */ fprintf (Gbl.F.Out,"
    "); - Act_FormStart (ActClkBan); + Act_StartForm (ActClkBan); Ban_PutParamBanCod (Gbl.Banners.Lst[NumBan].BanCod); Par_PutHiddenParamString ("URL",Gbl.Banners.Lst[NumBan].WWW); Act_LinkFormSubmit (Gbl.Banners.Lst[NumBan].FullName,"BANNER",NULL); @@ -1030,7 +1030,7 @@ void Ban_WriteMenuWithBanners (void) Gbl.Banners.Lst[NumBan].Img, Gbl.Banners.Lst[NumBan].ShrtName, Gbl.Banners.Lst[NumBan].FullName); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,"
    "); } diff --git a/swad_calendar.c b/swad_calendar.c index 6bef4b53..e5e612d7 100644 --- a/swad_calendar.c +++ b/swad_calendar.c @@ -121,7 +121,7 @@ void Cal_ShowFormToSelFirstDayOfWeek (Act_Action_t Action,void (*FuncParams) (), fprintf (Gbl.F.Out,"
    ", FirstDayOfWeek == Gbl.Prefs.FirstDayOfWeek ? "PREF_ON" : "PREF_OFF"); - Act_FormStart (Action); + Act_StartForm (Action); Par_PutHiddenParamUnsigned ("FirstDayOfWeek",FirstDayOfWeek); if (FuncParams) // Extra parameters depending on the action FuncParams (); @@ -132,7 +132,7 @@ void Cal_ShowFormToSelFirstDayOfWeek (Act_Action_t Action,void (*FuncParams) (), Txt_DAYS_SMALL[FirstDayOfWeek], Txt_First_day_of_the_week,Txt_DAYS_SMALL[FirstDayOfWeek], ClassIcon); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,"
    "); } fprintf (Gbl.F.Out,""); diff --git a/swad_centre.c b/swad_centre.c index 16acf476..e228e81d 100644 --- a/swad_centre.c +++ b/swad_centre.c @@ -237,7 +237,7 @@ void Ctr_DrawCentreLogoAndNameWithLink (struct Centre *Ctr,Act_Action_t Action, extern const char *Txt_Go_to_X; /***** Start form *****/ - Act_FormGoToStart (Action); + Act_StartFormGoTo (Action); Ctr_PutParamCtrCod (Ctr->CtrCod); /***** Link to action *****/ @@ -251,7 +251,7 @@ void Ctr_DrawCentreLogoAndNameWithLink (struct Centre *Ctr,Act_Action_t Action, fprintf (Gbl.F.Out," %s",Ctr->FullName); /***** End form *****/ - Act_FormEnd (); + Act_EndForm (); } /*****************************************************************************/ @@ -369,7 +369,7 @@ static void Ctr_Configuration (bool PrintView) // have permission to edit photo attribution { fprintf (Gbl.F.Out,"
    "); - Act_FormStart (ActChgCtrPhoAtt); + Act_StartForm (ActChgCtrPhoAtt); fprintf (Gbl.F.Out,""); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,"
    "); } else if (PhotoAttribution) @@ -410,7 +410,7 @@ static void Ctr_Configuration (bool PrintView) Ins_GetListInstitutions (Gbl.CurrentCty.Cty.CtyCod,Ins_GET_BASIC_DATA); /* Put form to select institution */ - Act_FormStart (ActChgCtrInsCfg); + Act_StartForm (ActChgCtrInsCfg); fprintf (Gbl.F.Out,""); - Act_FormEnd (); + Act_EndForm (); /* Free list of institutions */ Ins_FreeListInstitutions (); @@ -448,7 +448,7 @@ static void Ctr_Configuration (bool PrintView) // Only institution admins and system admins can edit centre full name { /* Form to change centre full name */ - Act_FormStart (ActRenCtrFulCfg); + Act_StartForm (ActRenCtrFulCfg); fprintf (Gbl.F.Out,"", Gbl.Form.Id); @@ -530,7 +530,7 @@ static void Ctr_Configuration (bool PrintView) "", Gbl.Plcs.Lst[NumPlc].ShrtName); fprintf (Gbl.F.Out,""); - Act_FormEnd (); + Act_EndForm (); /* Free list of places */ Plc_FreeListPlaces (); @@ -554,7 +554,7 @@ static void Ctr_Configuration (bool PrintView) // can change centre WWW { /* Form to change centre WWW */ - Act_FormStart (ActChgCtrWWWCfg); + Act_StartForm (ActChgCtrWWWCfg); fprintf (Gbl.F.Out,"" @@ -634,14 +634,14 @@ static void Ctr_Configuration (bool PrintView) Txt_Degrees); /* Form to go to see degrees of this centre */ - Act_FormGoToStart (ActSeeDeg); + Act_StartFormGoTo (ActSeeDeg); Ctr_PutParamCtrCod (Gbl.CurrentCtr.Ctr.CtrCod); sprintf (Gbl.Title,Txt_Degrees_of_CENTRE_X, Gbl.CurrentCtr.Ctr.ShrtName); Act_LinkFormSubmit (Gbl.Title,"DAT",NULL); fprintf (Gbl.F.Out,"%u", Deg_GetNumDegsInCtr (Gbl.CurrentCtr.Ctr.CtrCod)); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,"" ""); @@ -808,10 +808,10 @@ static void Ctr_ListCentres (void) /***** Button to create centre *****/ if (Ctr_CheckIfICanCreateCentres ()) { - Act_FormStart (ActEdiCtr); + Act_StartForm (ActEdiCtr); Btn_PutConfirmButton (Gbl.Ctrs.Num ? Txt_Create_another_centre : Txt_Create_centre); - Act_FormEnd (); + Act_EndForm (); } /***** End box *****/ @@ -1375,7 +1375,7 @@ void Ctr_WriteSelectorOfCentre (void) long CtrCod; /***** Start form *****/ - Act_FormGoToStart (ActSeeDeg); + Act_StartFormGoTo (ActSeeDeg); fprintf (Gbl.F.Out,""); - Act_FormEnd (); + Act_EndForm (); } /*****************************************************************************/ @@ -1469,10 +1469,10 @@ static void Ctr_ListCentresForEdition (void) Ico_PutIconRemovalNotAllowed (); else { - Act_FormStart (ActRemCtr); + Act_StartForm (ActRemCtr); Ctr_PutParamOtherCtrCod (Ctr->CtrCod); Ico_PutIconRemove (); - Act_FormEnd (); + Act_EndForm (); } fprintf (Gbl.F.Out,""); @@ -1493,7 +1493,7 @@ static void Ctr_ListCentresForEdition (void) fprintf (Gbl.F.Out,""); if (ICanEdit) { - Act_FormStart (ActChgCtrPlc); + Act_StartForm (ActChgCtrPlc); Ctr_PutParamOtherCtrCod (Ctr->CtrCod); fprintf (Gbl.F.Out,""); - Act_FormEnd (); + Act_EndForm (); } else for (NumPlc = 0; @@ -1525,14 +1525,14 @@ static void Ctr_ListCentresForEdition (void) fprintf (Gbl.F.Out,""); if (ICanEdit) { - Act_FormStart (ActRenCtrSho); + Act_StartForm (ActRenCtrSho); Ctr_PutParamOtherCtrCod (Ctr->CtrCod); fprintf (Gbl.F.Out,"", Hie_MAX_CHARS_SHRT_NAME,Ctr->ShrtName,Gbl.Form.Id); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,""); } else @@ -1543,14 +1543,14 @@ static void Ctr_ListCentresForEdition (void) fprintf (Gbl.F.Out,""); if (ICanEdit) { - Act_FormStart (ActRenCtrFul); + Act_StartForm (ActRenCtrFul); Ctr_PutParamOtherCtrCod (Ctr->CtrCod); fprintf (Gbl.F.Out,"", Hie_MAX_CHARS_FULL_NAME,Ctr->FullName,Gbl.Form.Id); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,""); } else @@ -1561,14 +1561,14 @@ static void Ctr_ListCentresForEdition (void) fprintf (Gbl.F.Out,""); if (ICanEdit) { - Act_FormStart (ActChgCtrWWW); + Act_StartForm (ActChgCtrWWW); Ctr_PutParamOtherCtrCod (Ctr->CtrCod); fprintf (Gbl.F.Out,"", Cns_MAX_CHARS_WWW,Ctr->WWW,Gbl.Form.Id); - Act_FormEnd (); + Act_EndForm (); } else { @@ -1615,7 +1615,7 @@ static void Ctr_ListCentresForEdition (void) if (Gbl.Usrs.Me.Role.Logged >= Rol_INS_ADM && StatusTxt == Ctr_STATUS_PENDING) { - Act_FormStart (ActChgCtrSta); + Act_StartForm (ActChgCtrSta); Ctr_PutParamOtherCtrCod (Ctr->CtrCod); fprintf (Gbl.F.Out,""); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,""); } else if (MapAttribution) @@ -383,14 +383,14 @@ static void Cty_Configuration (bool PrintView) Txt_Institutions); /* Form to go to see institutions of this country */ - Act_FormGoToStart (ActSeeIns); + Act_StartFormGoTo (ActSeeIns); Cty_PutParamCtyCod (Gbl.CurrentCty.Cty.CtyCod); sprintf (Gbl.Title,Txt_Institutions_of_COUNTRY_X, Gbl.CurrentCty.Cty.Name[Gbl.Prefs.Language]); Act_LinkFormSubmit (Gbl.Title,"DAT",NULL); fprintf (Gbl.F.Out,"%u", Ins_GetNumInssInCty (Gbl.CurrentCty.Cty.CtyCod)); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,"" ""); @@ -641,7 +641,7 @@ static void Cty_PutHeadCountriesForSeeing (bool OrderSelectable) "RIGHT_MIDDLE"); if (OrderSelectable) { - Act_FormStart (ActSeeCty); + Act_StartForm (ActSeeCty); Par_PutHiddenParamUnsigned ("Order",(unsigned) Order); Act_LinkFormSubmit (Txt_COUNTRIES_HELP_ORDER[Order],"TIT_TBL",NULL); if (Order == Gbl.Ctys.SelectedOrder) @@ -653,7 +653,7 @@ static void Cty_PutHeadCountriesForSeeing (bool OrderSelectable) if (Order == Gbl.Ctys.SelectedOrder) fprintf (Gbl.F.Out,""); fprintf (Gbl.F.Out,""); - Act_FormEnd (); + Act_EndForm (); } fprintf (Gbl.F.Out,""); } @@ -798,7 +798,7 @@ void Cty_DrawCountryMapAndNameWithLink (struct Country *Cty,Act_Action_t Action, char CountryName[Cty_MAX_BYTES_NAME + 1]; /***** Start form *****/ - Act_FormGoToStart (Action); + Act_StartFormGoTo (Action); Cty_PutParamCtyCod (Cty->CtyCod); fprintf (Gbl.F.Out,"
    ",ClassContainer); @@ -819,7 +819,7 @@ void Cty_DrawCountryMapAndNameWithLink (struct Country *Cty,Act_Action_t Action, Cty->Alpha2); /***** End form *****/ - Act_FormEnd (); + Act_EndForm (); } /*****************************************************************************/ @@ -1164,7 +1164,7 @@ void Cty_WriteSelectorOfCountry (void) long CtyCod; /***** Start form *****/ - Act_FormGoToStart (ActSeeIns); + Act_StartFormGoTo (ActSeeIns); fprintf (Gbl.F.Out,"", Cty_MAX_CHARS_NAME, Cty->Name[Lan],Gbl.Form.Id); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,""); /* WWW */ fprintf (Gbl.F.Out,""); - Act_FormStart (ActChgCtyWWW); + Act_StartForm (ActChgCtyWWW); Cty_PutParamOtherCtyCod (Cty->CtyCod); Par_PutHiddenParamUnsigned ("Lan",(unsigned) Lan); fprintf (Gbl.F.Out,"", Cns_MAX_CHARS_WWW, Cty->WWW[Lan],Gbl.Form.Id); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,"" ""); } @@ -1939,7 +1939,7 @@ static void Cty_PutFormToCreateCountry (void) Cty = &Gbl.Ctys.EditingCty; /***** Start form *****/ - Act_FormStart (ActNewCty); + Act_StartForm (ActNewCty); /***** Start box and table *****/ Box_StartBoxTable (NULL,Txt_New_country,NULL, @@ -2026,7 +2026,7 @@ static void Cty_PutFormToCreateCountry (void) Box_EndBoxTableWithButton (Btn_CREATE_BUTTON,Txt_Create_country); /***** End form *****/ - Act_FormEnd (); + Act_EndForm (); } /*****************************************************************************/ diff --git a/swad_course.c b/swad_course.c index b091796c..f920e296 100644 --- a/swad_course.c +++ b/swad_course.c @@ -239,7 +239,7 @@ static void Crs_Configuration (bool PrintView) Deg_GetListDegsOfCurrentCtr (); /* Put form to select degree */ - Act_FormStart (ActChgCrsDegCfg); + Act_StartForm (ActChgCrsDegCfg); fprintf (Gbl.F.Out,""); - Act_FormEnd (); + Act_EndForm (); /* Free list of degrees of the current centre */ Deg_FreeListDegs (&Gbl.CurrentCtr.Ctr.Degs); @@ -277,7 +277,7 @@ static void Crs_Configuration (bool PrintView) // Only degree admins, centre admins, institution admins and system admins can edit course full name { /* Form to change course full name */ - Act_FormStart (ActRenCrsFulCfg); + Act_StartForm (ActRenCrsFulCfg); fprintf (Gbl.F.Out,"", Gbl.Form.Id); @@ -345,7 +345,7 @@ static void Crs_Configuration (bool PrintView) "", Txt_YEAR_OF_DEGREE[Year]); fprintf (Gbl.F.Out,""); - Act_FormEnd (); + Act_EndForm (); } else fprintf (Gbl.F.Out,"%s", @@ -366,7 +366,7 @@ static void Crs_Configuration (bool PrintView) Txt_Institutional_code); if (IsForm) { - Act_FormStart (ActChgInsCrsCodCfg); + Act_StartForm (ActChgInsCrsCodCfg); fprintf (Gbl.F.Out,"", The_ClassForm[Gbl.Prefs.Theme], Txt_Indicators); - Act_FormStart (ActReqStaCrs); + Act_StartForm (ActReqStaCrs); sprintf (Gbl.Title,"%u %s %u", Indicators.NumIndicators,Txt_of_PART_OF_A_TOTAL,Ind_NUM_INDICATORS); Act_LinkFormSubmit (Gbl.Title,"DAT",NULL); @@ -459,7 +459,7 @@ static void Crs_Configuration (bool PrintView) (Indicators.NumIndicators == Ind_NUM_INDICATORS) ? "ok_green16x16.gif" : "warning64x64.png", Gbl.Title); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,"" ""); } @@ -556,7 +556,7 @@ static void Crs_WriteListMyCoursesToSelectOne (void) fprintf (Gbl.F.Out,"
  • ", Highlight ? ClassHighlight : ClassNormal); - Act_FormStart (ActMyCrs); + Act_StartForm (ActMyCrs); Cty_PutParamCtyCod (-1L); Act_LinkFormSubmit (Txt_System, Highlight ? ClassHighlight : @@ -568,7 +568,7 @@ static void Crs_WriteListMyCoursesToSelectOne (void) Txt_System, Txt_System, Txt_System); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,"
  • "); /***** Get my countries *****/ @@ -593,7 +593,7 @@ static void Crs_WriteListMyCoursesToSelectOne (void) ClassNormal); IsLastItemInLevel[1] = (NumCty == NumCtys - 1); Lay_IndentDependingOnLevel (1,IsLastItemInLevel); - Act_FormStart (ActMyCrs); + Act_StartForm (ActMyCrs); Cty_PutParamCtyCod (Cty.CtyCod); Act_LinkFormSubmit (Act_GetActionTextFromDB (Act_GetActCod (ActSeeCtyInf),ActTxt), Highlight ? ClassHighlight : @@ -608,7 +608,7 @@ static void Crs_WriteListMyCoursesToSelectOne (void) Cty.Alpha2, Cty.Name[Gbl.Prefs.Language], Cty.Name[Gbl.Prefs.Language]); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,""); /***** Get my institutions in this country *****/ @@ -634,14 +634,14 @@ static void Crs_WriteListMyCoursesToSelectOne (void) ClassNormal); IsLastItemInLevel[2] = (NumIns == NumInss - 1); Lay_IndentDependingOnLevel (2,IsLastItemInLevel); - Act_FormStart (ActMyCrs); + Act_StartForm (ActMyCrs); Ins_PutParamInsCod (Ins.InsCod); Act_LinkFormSubmit (Act_GetActionTextFromDB (Act_GetActCod (ActSeeInsInf),ActTxt), Highlight ? ClassHighlight : ClassNormal,NULL); Log_DrawLogo (Sco_SCOPE_INS,Ins.InsCod,Ins.ShrtName,20,NULL,true); fprintf (Gbl.F.Out," %s",Ins.FullName); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,""); /***** Get my centres in this institution *****/ @@ -667,14 +667,14 @@ static void Crs_WriteListMyCoursesToSelectOne (void) ClassNormal); IsLastItemInLevel[3] = (NumCtr == NumCtrs - 1); Lay_IndentDependingOnLevel (3,IsLastItemInLevel); - Act_FormStart (ActMyCrs); + Act_StartForm (ActMyCrs); Ctr_PutParamCtrCod (Ctr.CtrCod); Act_LinkFormSubmit (Act_GetActionTextFromDB (Act_GetActCod (ActSeeCtrInf),ActTxt), Highlight ? ClassHighlight : ClassNormal,NULL); Log_DrawLogo (Sco_SCOPE_CTR,Ctr.CtrCod,Ctr.ShrtName,20,NULL,true); fprintf (Gbl.F.Out," %s",Ctr.FullName); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,""); /***** Get my degrees in this centre *****/ @@ -700,14 +700,14 @@ static void Crs_WriteListMyCoursesToSelectOne (void) ClassNormal); IsLastItemInLevel[4] = (NumDeg == NumDegs - 1); Lay_IndentDependingOnLevel (4,IsLastItemInLevel); - Act_FormStart (ActMyCrs); + Act_StartForm (ActMyCrs); Deg_PutParamDegCod (Deg.DegCod); Act_LinkFormSubmit (Act_GetActionTextFromDB (Act_GetActCod (ActSeeDegInf),ActTxt), Highlight ? ClassHighlight : ClassNormal,NULL); Log_DrawLogo (Sco_SCOPE_DEG,Deg.DegCod,Deg.ShrtName,20,NULL,true); fprintf (Gbl.F.Out," %s",Deg.FullName); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,""); /***** Get my courses in this degree *****/ @@ -732,7 +732,7 @@ static void Crs_WriteListMyCoursesToSelectOne (void) ClassNormal); IsLastItemInLevel[5] = (NumCrs == NumCrss - 1); Lay_IndentDependingOnLevel (5,IsLastItemInLevel); - Act_FormStart (ActMyCrs); + Act_StartForm (ActMyCrs); Crs_PutParamCrsCod (Crs.CrsCod); sprintf (Gbl.Title,Txt_Go_to_X,Crs.ShrtName); Act_LinkFormSubmit (Gbl.Title, @@ -747,7 +747,7 @@ static void Crs_WriteListMyCoursesToSelectOne (void) Crs.ShrtName, Crs.FullName, Crs.FullName); - Act_FormEnd (); + Act_EndForm (); /***** Put link to register students *****/ Enr_PutButtonInlineToRegisterStds (Crs.CrsCod); @@ -893,7 +893,7 @@ void Crs_WriteSelectorOfCourse (void) long CrsCod; /***** Start form *****/ - Act_FormGoToStart (ActSeeCrsInf); + Act_StartFormGoTo (ActSeeCrsInf); fprintf (Gbl.F.Out,""); - Act_FormEnd (); + Act_EndForm (); } /*****************************************************************************/ @@ -1058,7 +1058,7 @@ void Crs_WriteSelectorMyCoursesInBreadcrumb (void) Usr_GetMyCourses (); /***** Start form *****/ - Act_FormGoToStart (Gbl.Usrs.Me.MyCrss.Num ? ActSeeCrsInf : + Act_StartFormGoTo (Gbl.Usrs.Me.MyCrss.Num ? ActSeeCrsInf : ActSysReqSch); /***** Start selector of courses *****/ @@ -1118,7 +1118,7 @@ void Crs_WriteSelectorMyCoursesInBreadcrumb (void) /***** End form *****/ fprintf (Gbl.F.Out,""); - Act_FormEnd (); + Act_EndForm (); } /*****************************************************************************/ @@ -1162,10 +1162,10 @@ static void Crs_ListCourses (void) /***** Button to create course *****/ if (Crs_CheckIfICanCreateCourses ()) { - Act_FormStart (ActEdiCrs); + Act_StartForm (ActEdiCrs); Btn_PutConfirmButton (Gbl.CurrentDeg.NumCrss ? Txt_Create_another_course : Txt_Create_course); - Act_FormEnd (); + Act_EndForm (); } /***** End box *****/ @@ -1282,13 +1282,13 @@ static bool Crs_ListCoursesOfAYearForSeeing (unsigned Year) /* Course full name */ fprintf (Gbl.F.Out,"", TxtClassStrong,BgColor); - Act_FormGoToStart (ActSeeCrsInf); + Act_StartFormGoTo (ActSeeCrsInf); Crs_PutParamCrsCod (Crs->CrsCod); sprintf (Gbl.Title,Txt_Go_to_X,Crs->FullName); Act_LinkFormSubmit (Gbl.Title,TxtClassStrong,NULL); fprintf (Gbl.F.Out,"%s", Crs->FullName); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,""); /* Current number of teachers in this course */ @@ -1425,10 +1425,10 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year) Ico_PutIconRemovalNotAllowed (); else // Crs->NumUsrs == 0 && ICanEdit { - Act_FormStart (ActRemCrs); + Act_StartForm (ActRemCrs); Crs_PutParamOtherCrsCod (Crs->CrsCod); Ico_PutIconRemove (); - Act_FormEnd (); + Act_EndForm (); } fprintf (Gbl.F.Out,""); @@ -1442,7 +1442,7 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year) fprintf (Gbl.F.Out,""); if (ICanEdit) { - Act_FormStart (ActChgInsCrsCod); + Act_StartForm (ActChgInsCrsCod); Crs_PutParamOtherCrsCod (Crs->CrsCod); fprintf (Gbl.F.Out,"InstitutionalCrsCod, Gbl.Form.Id); - Act_FormEnd (); + Act_EndForm (); } else fprintf (Gbl.F.Out,"%s",Crs->InstitutionalCrsCod); @@ -1461,7 +1461,7 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year) fprintf (Gbl.F.Out,""); if (ICanEdit) { - Act_FormStart (ActChgCrsYea); + Act_StartForm (ActChgCrsYea); Crs_PutParamOtherCrsCod (Crs->CrsCod); fprintf (Gbl.F.Out,"", Hie_MAX_CHARS_SHRT_NAME,Crs->ShrtName, Gbl.Form.Id); - Act_FormEnd (); + Act_EndForm (); } else fprintf (Gbl.F.Out,"%s",Crs->ShrtName); @@ -1504,7 +1504,7 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year) fprintf (Gbl.F.Out,""); if (ICanEdit) { - Act_FormStart (ActRenCrsFul); + Act_StartForm (ActRenCrsFul); Crs_PutParamOtherCrsCod (Crs->CrsCod); fprintf (Gbl.F.Out,"", Hie_MAX_CHARS_FULL_NAME,Crs->FullName, Gbl.Form.Id); - Act_FormEnd (); + Act_EndForm (); } else fprintf (Gbl.F.Out,"%s",Crs->FullName); @@ -1544,7 +1544,7 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year) if (Gbl.Usrs.Me.Role.Logged >= Rol_DEG_ADM && StatusTxt == Crs_STATUS_PENDING) { - Act_FormStart (ActChgCrsSta); + Act_StartForm (ActChgCrsSta); Crs_PutParamOtherCrsCod (Crs->CrsCod); fprintf (Gbl.F.Out,"", @@ -356,7 +356,7 @@ static void Deg_Configuration (bool PrintView) "", Gbl.Ctrs.Lst[NumCtr].ShrtName); fprintf (Gbl.F.Out,""); - Act_FormEnd (); + Act_EndForm (); /* Free list of centres */ Ctr_FreeListCentres (); @@ -381,7 +381,7 @@ static void Deg_Configuration (bool PrintView) // can edit degree full name { /* Form to change degree full name */ - Act_FormStart (ActRenDegFulCfg); + Act_StartForm (ActRenDegFulCfg); fprintf (Gbl.F.Out,"" @@ -508,14 +508,14 @@ static void Deg_Configuration (bool PrintView) Txt_Courses); /* Form to go to see courses of this degree */ - Act_FormGoToStart (ActSeeCrs); + Act_StartFormGoTo (ActSeeCrs); Deg_PutParamDegCod (Gbl.CurrentDeg.Deg.DegCod); sprintf (Gbl.Title,Txt_Courses_of_DEGREE_X, Gbl.CurrentDeg.Deg.ShrtName); Act_LinkFormSubmit (Gbl.Title,"DAT",NULL); fprintf (Gbl.F.Out,"%u", Crs_GetNumCrssInDeg (Gbl.CurrentDeg.Deg.DegCod)); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,"" ""); @@ -590,7 +590,7 @@ void Deg_WriteSelectorOfDegree (void) long DegCod; /***** Start form *****/ - Act_FormGoToStart (ActSeeCrs); + Act_StartFormGoTo (ActSeeCrs); fprintf (Gbl.F.Out,""); - Act_FormEnd (); + Act_EndForm (); } /*****************************************************************************/ @@ -708,10 +708,10 @@ static void Deg_ListDegreesForEdition (void) Ico_PutIconRemovalNotAllowed (); else { - Act_FormStart (ActRemDeg); + Act_StartForm (ActRemDeg); Deg_PutParamOtherDegCod (Deg->DegCod); Ico_PutIconRemove (); - Act_FormEnd (); + Act_EndForm (); } fprintf (Gbl.F.Out,""); @@ -731,14 +731,14 @@ static void Deg_ListDegreesForEdition (void) fprintf (Gbl.F.Out,""); if (ICanEdit) { - Act_FormStart (ActRenDegSho); + Act_StartForm (ActRenDegSho); Deg_PutParamOtherDegCod (Deg->DegCod); fprintf (Gbl.F.Out,"", Hie_MAX_CHARS_SHRT_NAME,Deg->ShrtName,Gbl.Form.Id); - Act_FormEnd (); + Act_EndForm (); } else fprintf (Gbl.F.Out,"%s",Deg->ShrtName); @@ -748,14 +748,14 @@ static void Deg_ListDegreesForEdition (void) fprintf (Gbl.F.Out,""); if (ICanEdit) { - Act_FormStart (ActRenDegFul); + Act_StartForm (ActRenDegFul); Deg_PutParamOtherDegCod (Deg->DegCod); fprintf (Gbl.F.Out,"", Hie_MAX_CHARS_FULL_NAME,Deg->FullName,Gbl.Form.Id); - Act_FormEnd (); + Act_EndForm (); } else fprintf (Gbl.F.Out,"%s",Deg->FullName); @@ -765,7 +765,7 @@ static void Deg_ListDegreesForEdition (void) fprintf (Gbl.F.Out,""); if (ICanEdit) { - Act_FormStart (ActChgDegTyp); + Act_StartForm (ActChgDegTyp); Deg_PutParamOtherDegCod (Deg->DegCod); fprintf (Gbl.F.Out,""); - Act_FormEnd (); + Act_EndForm (); } else for (NumDegTyp = 0; @@ -797,14 +797,14 @@ static void Deg_ListDegreesForEdition (void) fprintf (Gbl.F.Out,""); if (ICanEdit) { - Act_FormStart (ActChgDegWWW); + Act_StartForm (ActChgDegWWW); Deg_PutParamOtherDegCod (Deg->DegCod); fprintf (Gbl.F.Out,"", Cns_MAX_CHARS_WWW,Deg->WWW,Gbl.Form.Id); - Act_FormEnd (); + Act_EndForm (); } else { @@ -839,7 +839,7 @@ static void Deg_ListDegreesForEdition (void) if (Gbl.Usrs.Me.Role.Logged >= Rol_CTR_ADM && StatusTxt == Deg_STATUS_PENDING) { - Act_FormStart (ActChgDegSta); + Act_StartForm (ActChgDegSta); Deg_PutParamOtherDegCod (Deg->DegCod); fprintf (Gbl.F.Out,""); /* Number of degrees of this type */ @@ -430,7 +430,7 @@ void DT_PutFormToCreateDegreeType (void) extern const char *Txt_Create_type_of_degree; /***** Start form *****/ - Act_FormStart (ActNewDegTyp); + Act_StartForm (ActNewDegTyp); /***** Start box and table *****/ Box_StartBoxTable (NULL,Txt_New_type_of_degree,NULL, @@ -464,7 +464,7 @@ void DT_PutFormToCreateDegreeType (void) Box_EndBoxTableWithButton (Btn_CREATE_BUTTON,Txt_Create_type_of_degree); /***** End form *****/ - Act_FormEnd (); + Act_EndForm (); } /*****************************************************************************/ @@ -488,7 +488,7 @@ static void DT_PutHeadDegreeTypesForSeeing (Act_Action_t NextAction,DT_Order_t S "RIGHT_MIDDLE"); /* Start form to change order */ - Act_FormStart (NextAction); + Act_StartForm (NextAction); if (NextAction == ActSeeUseGbl) Sta_PutHiddenParamFigures (); Par_PutHiddenParamUnsigned ("Order",(unsigned) Order); @@ -503,7 +503,7 @@ static void DT_PutHeadDegreeTypesForSeeing (Act_Action_t NextAction,DT_Order_t S fprintf (Gbl.F.Out,""); /* End form */ - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,""); } diff --git a/swad_department.c b/swad_department.c index a2bffb02..b6e81f9c 100644 --- a/swad_department.c +++ b/swad_department.c @@ -113,7 +113,7 @@ void Dpt_SeeDepts (void) Order++) { fprintf (Gbl.F.Out,""); - Act_FormStart (ActSeeDpt); + Act_StartForm (ActSeeDpt); Par_PutHiddenParamUnsigned ("Order",(unsigned) Order); Act_LinkFormSubmit (Txt_DEPARTMENTS_HELP_ORDER[Order],"TIT_TBL",NULL); if (Order == Gbl.Dpts.SelectedOrder) @@ -122,7 +122,7 @@ void Dpt_SeeDepts (void) if (Order == Gbl.Dpts.SelectedOrder) fprintf (Gbl.F.Out,""); fprintf (Gbl.F.Out,""); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,""); } fprintf (Gbl.F.Out,""); @@ -492,10 +492,10 @@ static void Dpt_ListDepartmentsForEdition (void) Ico_PutIconRemovalNotAllowed (); else { - Act_FormStart (ActRemDpt); + Act_StartForm (ActRemDpt); Dpt_PutParamDptCod (Dpt->DptCod); Ico_PutIconRemove (); - Act_FormEnd (); + Act_EndForm (); } fprintf (Gbl.F.Out,""); @@ -507,7 +507,7 @@ static void Dpt_ListDepartmentsForEdition (void) /* Institution */ fprintf (Gbl.F.Out,""); - Act_FormStart (ActChgDptIns); + Act_StartForm (ActChgDptIns); Dpt_PutParamDptCod (Dpt->DptCod); fprintf (Gbl.F.Out,""); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,""); /* Department short name */ fprintf (Gbl.F.Out,""); - Act_FormStart (ActRenDptSho); + Act_StartForm (ActRenDptSho); Dpt_PutParamDptCod (Dpt->DptCod); fprintf (Gbl.F.Out,"", Hie_MAX_CHARS_SHRT_NAME,Dpt->ShrtName,Gbl.Form.Id); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,""); /* Department full name */ fprintf (Gbl.F.Out,""); - Act_FormStart (ActRenDptFul); + Act_StartForm (ActRenDptFul); Dpt_PutParamDptCod (Dpt->DptCod); fprintf (Gbl.F.Out,"", Hie_MAX_CHARS_FULL_NAME,Dpt->FullName,Gbl.Form.Id); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,""); /* Department WWW */ fprintf (Gbl.F.Out,""); - Act_FormStart (ActChgDptWWW); + Act_StartForm (ActChgDptWWW); Dpt_PutParamDptCod (Dpt->DptCod); fprintf (Gbl.F.Out,"", Cns_MAX_CHARS_WWW,Dpt->WWW,Gbl.Form.Id); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,""); /* Number of teachers */ @@ -868,7 +868,7 @@ static void Dpt_PutFormToCreateDepartment (void) Dpt = &Gbl.Dpts.EditingDpt; /***** Start form *****/ - Act_FormStart (ActNewDpt); + Act_StartForm (ActNewDpt); /***** Start box and table *****/ Box_StartBoxTable (NULL,Txt_New_department,NULL, @@ -945,7 +945,7 @@ static void Dpt_PutFormToCreateDepartment (void) Box_EndBoxTableWithButton (Btn_CREATE_BUTTON,Txt_Create_department); /***** End form *****/ - Act_FormEnd (); + Act_EndForm (); } /*****************************************************************************/ diff --git a/swad_duplicate.c b/swad_duplicate.c index d9c5bf30..00eeb229 100644 --- a/swad_duplicate.c +++ b/swad_duplicate.c @@ -395,10 +395,10 @@ static void Dup_PutButtonToViewSimilarUsrs (const struct UsrData *UsrDat) { extern const char *Txt_Similar_users; - Act_FormStart (ActLstSimUsr); + Act_StartForm (ActLstSimUsr); Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod); Btn_PutConfirmButtonInline (Txt_Similar_users); - Act_FormEnd (); + Act_EndForm (); } /*****************************************************************************/ @@ -409,11 +409,11 @@ static void Dup_PutButtonToEliminateUsrAccount (const struct UsrData *UsrDat) { extern const char *Txt_Eliminate_user_account; - Act_FormStart (ActUpdOth); + Act_StartForm (ActUpdOth); Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod); Par_PutHiddenParamUnsigned ("RegRemAction",(unsigned) Enr_ELIMINATE_ONE_USR_FROM_PLATFORM); Btn_PutRemoveButtonInline (Txt_Eliminate_user_account); - Act_FormEnd (); + Act_EndForm (); } /*****************************************************************************/ @@ -424,10 +424,10 @@ static void Dup_PutButtonToRemoveFromListOfDupUsrs (const struct UsrData *UsrDat { extern const char *Txt_Not_duplicated; - Act_FormStart (ActRemDupUsr); + Act_StartForm (ActRemDupUsr); Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod); Btn_PutConfirmButtonInline (Txt_Not_duplicated); - Act_FormEnd (); + Act_EndForm (); } /*****************************************************************************/ diff --git a/swad_enrolment.c b/swad_enrolment.c index 3449ffca..d0ff467f 100644 --- a/swad_enrolment.c +++ b/swad_enrolment.c @@ -179,10 +179,10 @@ void Enr_PutButtonInlineToRegisterStds (long CrsCod) if (Rol_GetRoleUsrInCrs (Gbl.Usrs.Me.UsrDat.UsrCod,CrsCod) == Rol_TCH) // I am a teacher in course if (!Usr_GetNumUsrsInCrs (Rol_STD,CrsCod)) // No students in course { - Act_FormStart (ActReqEnrSevStd); + Act_StartForm (ActReqEnrSevStd); Crs_PutParamCrsCod (CrsCod); Btn_PutCreateButtonInline (Txt_Register_students); - Act_FormEnd (); + Act_EndForm (); } } @@ -357,7 +357,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 *****/ - Act_FormStart (NextAction); + Act_StartForm (NextAction); if (FuncParams) FuncParams (); fprintf (Gbl.F.Out,"
    "); @@ -4082,19 +4082,19 @@ static void Brw_PutButtonToShowEdit (void) case Brw_ICON_VIEW: if (Brw_ActFromAdmToSee[Gbl.FileBrowser.Type] != ActUnk) { - Act_FormStart (Brw_ActFromAdmToSee[Gbl.FileBrowser.Type]); + Act_StartForm (Brw_ActFromAdmToSee[Gbl.FileBrowser.Type]); Brw_PutHiddenParamFullTreeIfSelected (); Btn_PutConfirmButton (Txt_View); - Act_FormEnd (); + Act_EndForm (); } break; case Brw_ICON_EDIT: if (Brw_ActFromSeeToAdm[Gbl.FileBrowser.Type] != ActUnk) { - Act_FormStart (Brw_ActFromSeeToAdm[Gbl.FileBrowser.Type]); + Act_StartForm (Brw_ActFromSeeToAdm[Gbl.FileBrowser.Type]); Brw_PutHiddenParamFullTreeIfSelected (); Btn_PutConfirmButton (Txt_Edit); - Act_FormEnd (); + Act_EndForm (); } break; } @@ -6104,7 +6104,7 @@ static void Brw_PutIconRemoveFile (const char PathInTree[PATH_MAX + 1], if (Gbl.FileBrowser.ICanEditFileOrFolder) // Can I remove this file? { /***** Form to remove a file *****/ - Act_FormStart (Brw_ActAskRemoveFile[Gbl.FileBrowser.Type]); + Act_StartForm (Brw_ActAskRemoveFile[Gbl.FileBrowser.Type]); Brw_PutParamsFileBrowser (Brw_ActAskRemoveFile[Gbl.FileBrowser.Type], PathInTree,FileName, Gbl.FileBrowser.FileType,-1L); @@ -6115,7 +6115,7 @@ static void Brw_PutIconRemoveFile (const char PathInTree[PATH_MAX + 1], Gbl.Prefs.IconsURL, Gbl.Title, Gbl.Title); - Act_FormEnd (); + Act_EndForm (); } else // Ico_PutIconBRemovalNotAllowed (); @@ -6137,7 +6137,7 @@ static void Brw_PutIconRemoveDir (const char PathInTree[PATH_MAX + 1], if (Gbl.FileBrowser.ICanEditFileOrFolder) // Can I remove this folder? { /***** Form to remove a folder *****/ - Act_FormStart (Brw_ActRemoveFolder[Gbl.FileBrowser.Type]); + Act_StartForm (Brw_ActRemoveFolder[Gbl.FileBrowser.Type]); Brw_PutParamsFileBrowser (Brw_ActRemoveFolder[Gbl.FileBrowser.Type], PathInTree,FileName, Brw_IS_FOLDER,-1L); @@ -6148,7 +6148,7 @@ static void Brw_PutIconRemoveDir (const char PathInTree[PATH_MAX + 1], Gbl.Prefs.IconsURL, Gbl.Title, Gbl.Title); - Act_FormEnd (); + Act_EndForm (); } else // Ico_PutIconBRemovalNotAllowed (); @@ -6168,7 +6168,7 @@ static void Brw_PutIconCopy (const char PathInTree[PATH_MAX + 1], fprintf (Gbl.F.Out,"",Gbl.RowEvenOdd); /***** Form to copy into the clipboard *****/ - Act_FormStart (Brw_ActCopy[Gbl.FileBrowser.Type]); + Act_StartForm (Brw_ActCopy[Gbl.FileBrowser.Type]); Brw_PutParamsFileBrowser (Brw_ActCopy[Gbl.FileBrowser.Type], PathInTree,FileName, Gbl.FileBrowser.FileType,-1L); @@ -6179,7 +6179,7 @@ static void Brw_PutIconCopy (const char PathInTree[PATH_MAX + 1], Gbl.Prefs.IconsURL, Gbl.Title, Gbl.Title); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,""); } @@ -6196,7 +6196,7 @@ static void Brw_PutIconPasteOn (const char PathInTree[PATH_MAX + 1], fprintf (Gbl.F.Out,"",Gbl.RowEvenOdd); /***** Form to paste the content of the clipboard *****/ - Act_FormStart (Brw_ActPaste[Gbl.FileBrowser.Type]); + Act_StartForm (Brw_ActPaste[Gbl.FileBrowser.Type]); Brw_PutParamsFileBrowser (Brw_ActPaste[Gbl.FileBrowser.Type], PathInTree,FileName, Brw_IS_FOLDER,-1L); @@ -6207,7 +6207,7 @@ static void Brw_PutIconPasteOn (const char PathInTree[PATH_MAX + 1], Gbl.Prefs.IconsURL, Gbl.Title, Gbl.Title); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,""); } @@ -6327,7 +6327,7 @@ static void Brw_PutIconToExpandFolder (const char *FileBrowserId,const char *Row /***** Form and icon *****/ sprintf (JavaScriptFunctionToExpandFolder,"ExpandFolder('%s_%s')", FileBrowserId,RowId); - Act_FormStartAnchorOnSubmit (Brw_ActExpandFolder[Gbl.FileBrowser.Type], + Act_StartFormAnchorOnSubmit (Brw_ActExpandFolder[Gbl.FileBrowser.Type], FileBrowserId, JavaScriptFunctionToExpandFolder); // JavaScript function to unhide rows Brw_PutParamsFileBrowser (Brw_ActExpandFolder[Gbl.FileBrowser.Type], @@ -6340,7 +6340,7 @@ static void Brw_PutIconToExpandFolder (const char *FileBrowserId,const char *Row Gbl.Prefs.IconsURL, Gbl.Title, Gbl.Title); - Act_FormEnd (); + Act_EndForm (); /***** End container *****/ fprintf (Gbl.F.Out,""); @@ -6369,7 +6369,7 @@ static void Brw_PutIconToContractFolder (const char *FileBrowserId,const char *R /***** Form and icon *****/ sprintf (JavaScriptFunctionToContractFolder,"ContractFolder('%s_%s')", FileBrowserId,RowId); - Act_FormStartAnchorOnSubmit (Brw_ActContractFolder[Gbl.FileBrowser.Type], + Act_StartFormAnchorOnSubmit (Brw_ActContractFolder[Gbl.FileBrowser.Type], FileBrowserId, JavaScriptFunctionToContractFolder); // JavaScript function to hide rows Brw_PutParamsFileBrowser (Brw_ActContractFolder[Gbl.FileBrowser.Type], @@ -6382,7 +6382,7 @@ static void Brw_PutIconToContractFolder (const char *FileBrowserId,const char *R Gbl.Prefs.IconsURL, Gbl.Title, Gbl.Title); - Act_FormEnd (); + Act_EndForm (); /***** End container *****/ fprintf (Gbl.F.Out,""); @@ -6397,7 +6397,7 @@ static void Brw_PutIconShow (unsigned Level,const char *PathInTree,const char *F extern const char *Txt_Show_FOLDER_FILE_OR_LINK_X; fprintf (Gbl.F.Out,"",Gbl.RowEvenOdd); - Act_FormStart (Brw_ActShow[Gbl.FileBrowser.Type]); + Act_StartForm (Brw_ActShow[Gbl.FileBrowser.Type]); Brw_PutParamsFileBrowser (ActUnk, PathInTree,FileName, Gbl.FileBrowser.FileType,-1L); @@ -6410,7 +6410,7 @@ static void Brw_PutIconShow (unsigned Level,const char *PathInTree,const char *F "on", Gbl.Title, Gbl.Title); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,""); } @@ -6423,7 +6423,7 @@ static void Brw_PutIconHide (unsigned Level,const char *PathInTree,const char *F extern const char *Txt_Hide_FOLDER_FILE_OR_LINK_X; fprintf (Gbl.F.Out,"",Gbl.RowEvenOdd); - Act_FormStart (Brw_ActHide[Gbl.FileBrowser.Type]); + Act_StartForm (Brw_ActHide[Gbl.FileBrowser.Type]); Brw_PutParamsFileBrowser (ActUnk, PathInTree,FileName, Gbl.FileBrowser.FileType,-1L); @@ -6436,7 +6436,7 @@ static void Brw_PutIconHide (unsigned Level,const char *PathInTree,const char *F "on", Gbl.Title, Gbl.Title); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,""); } @@ -6592,7 +6592,7 @@ static void Brw_PutIconFolderWithPlus (const char *FileBrowserId,const char *Row fprintf (Gbl.F.Out,">"); /***** Form and icon *****/ - Act_FormStart (Brw_ActFormCreate[Gbl.FileBrowser.Type]); + Act_StartForm (Brw_ActFormCreate[Gbl.FileBrowser.Type]); Brw_PutParamsFileBrowser (Brw_ActFormCreate[Gbl.FileBrowser.Type], PathInTree,FileName, Brw_IS_FOLDER,-1L); @@ -6606,7 +6606,7 @@ static void Brw_PutIconFolderWithPlus (const char *FileBrowserId,const char *Row "closed", Gbl.Title, Gbl.Title); - Act_FormEnd (); + Act_EndForm (); /***** End container *****/ fprintf (Gbl.F.Out,""); @@ -6642,7 +6642,7 @@ static void Brw_PutIconFileWithLinkToViewMetadata (unsigned Size, { extern const char *Txt_View_data_of_FILE_OR_LINK_X; - Act_FormStart (Brw_ActReqDatFile[Gbl.FileBrowser.Type]); + Act_StartForm (Brw_ActReqDatFile[Gbl.FileBrowser.Type]); Brw_PutParamsFileBrowser (Brw_ActReqDatFile[Gbl.FileBrowser.Type], NULL,NULL, Brw_IS_UNKNOWN, // Not used @@ -6660,7 +6660,7 @@ static void Brw_PutIconFileWithLinkToViewMetadata (unsigned Size, /* End link and form */ fprintf (Gbl.F.Out,""); - Act_FormEnd (); + Act_EndForm (); } /*****************************************************************************/ @@ -6730,7 +6730,7 @@ static void Brw_WriteFileName (unsigned Level,bool IsPublic, /***** Form to rename folder *****/ if (Gbl.FileBrowser.ICanEditFileOrFolder) // Can I rename this folder? { - Act_FormStart (Brw_ActRenameFolder[Gbl.FileBrowser.Type]); + Act_StartForm (Brw_ActRenameFolder[Gbl.FileBrowser.Type]); Brw_PutParamsFileBrowser (Brw_ActRenameFolder[Gbl.FileBrowser.Type], PathInTree,FileName, Brw_IS_FOLDER,-1L); @@ -6749,7 +6749,7 @@ static void Brw_WriteFileName (unsigned Level,bool IsPublic, Gbl.FileBrowser.Clipboard.IsThisFile ? "LIGHT_GREEN" : Gbl.ColorRows[Gbl.RowEvenOdd], Gbl.Form.Id); - Act_FormEnd (); + Act_EndForm (); } else { @@ -6780,7 +6780,7 @@ static void Brw_WriteFileName (unsigned Level,bool IsPublic, fprintf (Gbl.F.Out,"
    "); - Act_FormStart (Brw_ActDowFile[Gbl.FileBrowser.Type]); + Act_StartForm (Brw_ActDowFile[Gbl.FileBrowser.Type]); Brw_PutParamsFileBrowser (Brw_ActDowFile[Gbl.FileBrowser.Type], PathInTree,FileName, Gbl.FileBrowser.FileType,-1L); @@ -6793,7 +6793,7 @@ static void Brw_WriteFileName (unsigned Level,bool IsPublic, Act_LinkFormSubmit (Gbl.Title,Gbl.FileBrowser.TxtStyle,NULL); fprintf (Gbl.F.Out,"%s", FileNameToShow); - Act_FormEnd (); + Act_EndForm (); /* Put icon to make public/private file */ if (IsPublic) @@ -8802,7 +8802,7 @@ static void Brw_PutFormToCreateAFolder (const char FileNameToShow[NAME_MAX + 1]) extern const char *Txt_Folder; /***** Start form *****/ - Act_FormStart (Brw_ActCreateFolder[Gbl.FileBrowser.Type]); + Act_StartForm (Brw_ActCreateFolder[Gbl.FileBrowser.Type]); Brw_PutParamsFileBrowser (Brw_ActCreateFolder[Gbl.FileBrowser.Type], Gbl.FileBrowser.Priv.PathInTreeUntilFilFolLnk, Gbl.FileBrowser.FilFolLnkName, @@ -8829,7 +8829,7 @@ static void Brw_PutFormToCreateAFolder (const char FileNameToShow[NAME_MAX + 1]) Box_EndBoxWithButton (Btn_CREATE_BUTTON,Txt_Create_folder); /***** End form *****/ - Act_FormEnd (); + Act_EndForm (); } /*****************************************************************************/ @@ -8880,7 +8880,7 @@ static void Brw_PutFormToUploadFilesUsingDropzone (const char *FileNameToShow) Txt_Select_one_or_more_files_from_your_computer_or_drag_and_drop_here); /***** Put button to refresh file browser after upload *****/ - Act_FormStart (Brw_ActRefreshAfterUploadFiles[Gbl.FileBrowser.Type]); + Act_StartForm (Brw_ActRefreshAfterUploadFiles[Gbl.FileBrowser.Type]); Brw_PutParamsFileBrowser (Brw_ActRefreshAfterUploadFiles[Gbl.FileBrowser.Type], NULL,NULL, Brw_IS_UNKNOWN, // Not used @@ -8890,7 +8890,7 @@ static void Brw_PutFormToUploadFilesUsingDropzone (const char *FileNameToShow) Btn_PutConfirmButton (Txt_Done); /***** End form *****/ - Act_FormEnd (); + Act_EndForm (); /***** End box *****/ Box_EndBox (); @@ -8917,7 +8917,7 @@ static void Brw_PutFormToUploadOneFileClassic (const char *FileNameToShow) Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt); /***** Form to upload one files using the classic way *****/ - Act_FormStart (Brw_ActUploadFileClassic[Gbl.FileBrowser.Type]); + Act_StartForm (Brw_ActUploadFileClassic[Gbl.FileBrowser.Type]); Brw_PutParamsFileBrowser (Brw_ActUploadFileClassic[Gbl.FileBrowser.Type], Gbl.FileBrowser.Priv.PathInTreeUntilFilFolLnk, Gbl.FileBrowser.FilFolLnkName, @@ -8927,7 +8927,7 @@ static void Brw_PutFormToUploadOneFileClassic (const char *FileNameToShow) /* Button to send */ Btn_PutCreateButton (Txt_Upload_file); - Act_FormEnd (); + Act_EndForm (); /***** End box *****/ Box_EndBox (); @@ -8944,7 +8944,7 @@ static void Brw_PutFormToPasteAFileOrFolder (const char *FileNameToShow) extern const char *Txt_or_you_can_make_a_file_copy_to_the_folder_X; /***** Start form *****/ - Act_FormStart (Brw_ActPaste[Gbl.FileBrowser.Type]); + Act_StartForm (Brw_ActPaste[Gbl.FileBrowser.Type]); Brw_PutParamsFileBrowser (Brw_ActPaste[Gbl.FileBrowser.Type], Gbl.FileBrowser.Priv.PathInTreeUntilFilFolLnk, Gbl.FileBrowser.FilFolLnkName, @@ -8963,7 +8963,7 @@ static void Brw_PutFormToPasteAFileOrFolder (const char *FileNameToShow) Box_EndBoxWithButton (Btn_CREATE_BUTTON,Txt_Paste); /***** End form *****/ - Act_FormEnd (); + Act_EndForm (); } /*****************************************************************************/ @@ -8980,7 +8980,7 @@ static void Brw_PutFormToCreateALink (const char *FileNameToShow) extern const char *Txt_optional; /***** Start form *****/ - Act_FormStart (Brw_ActCreateLink[Gbl.FileBrowser.Type]); + Act_StartForm (Brw_ActCreateLink[Gbl.FileBrowser.Type]); Brw_PutParamsFileBrowser (Brw_ActCreateLink[Gbl.FileBrowser.Type], Gbl.FileBrowser.Priv.PathInTreeUntilFilFolLnk, Gbl.FileBrowser.FilFolLnkName, @@ -9034,7 +9034,7 @@ static void Brw_PutFormToCreateALink (const char *FileNameToShow) Box_EndBoxWithButton (Btn_CREATE_BUTTON,Txt_Create_link); /***** End form *****/ - Act_FormEnd (); + Act_EndForm (); } /*****************************************************************************/ @@ -10014,7 +10014,7 @@ void Brw_ShowFileMetadata (void) break; } - Act_FormStart (Brw_ActRecDatFile[Gbl.FileBrowser.Type]); + Act_StartForm (Brw_ActRecDatFile[Gbl.FileBrowser.Type]); Brw_PutParamsFileBrowser (Brw_ActRecDatFile[Gbl.FileBrowser.Type], FileMetadata.PathInTreeUntilFilFolLnk, FileMetadata.FilFolLnkName, @@ -10209,7 +10209,7 @@ void Brw_ShowFileMetadata (void) Box_EndBoxTableWithButton (Btn_CONFIRM_BUTTON,Txt_Save_file_properties); /* End form */ - Act_FormEnd (); + Act_EndForm (); } else /* End table and box */ @@ -10531,7 +10531,7 @@ static void Brw_WriteBigLinkToDownloadFile (const char *URL, Gbl.FileBrowser.Type == Brw_SHOW_MRK_GRP) { /* Form to see marks */ - Act_FormStart (Gbl.FileBrowser.Type == Brw_SHOW_MRK_CRS ? ActSeeMyMrkCrs : + Act_StartForm (Gbl.FileBrowser.Type == Brw_SHOW_MRK_CRS ? ActSeeMyMrkCrs : ActSeeMyMrkGrp); Brw_PutParamsFileBrowser (ActUnk, FileMetadata->PathInTreeUntilFilFolLnk, @@ -10551,7 +10551,7 @@ static void Brw_WriteBigLinkToDownloadFile (const char *URL, "", FileNameToShow,Gbl.Prefs.IconsURL, Gbl.Title,Gbl.Title); - Act_FormEnd (); + Act_EndForm (); } else { @@ -10587,7 +10587,7 @@ static void Brw_WriteSmallLinkToDownloadFile (const char *URL,Brw_FileType_t Fil Gbl.FileBrowser.Type == Brw_SHOW_MRK_GRP) { /* Form to see marks */ - Act_FormStart (Gbl.FileBrowser.Type == Brw_SHOW_MRK_CRS ? ActSeeMyMrkCrs : + Act_StartForm (Gbl.FileBrowser.Type == Brw_SHOW_MRK_CRS ? ActSeeMyMrkCrs : ActSeeMyMrkGrp); Brw_PutParamsFileBrowser (ActUnk, Gbl.FileBrowser.Priv.PathInTreeUntilFilFolLnk, @@ -10600,7 +10600,7 @@ static void Brw_WriteSmallLinkToDownloadFile (const char *URL,Brw_FileType_t Fil /* Name of the file of marks, link end and form end */ fprintf (Gbl.F.Out,"%s",FileNameToShow); - Act_FormEnd (); + Act_EndForm (); } else /* Put anchor and filename */ @@ -12508,13 +12508,13 @@ static void Brw_WriteRowDocData (unsigned *NumDocsNotHidden,MYSQL_ROW row) BgColor); if (InsCod > 0) { - Act_FormGoToStart (ActSeeInsInf); + Act_StartFormGoTo (ActSeeInsInf); Deg_PutParamDegCod (InsCod); sprintf (Gbl.Title,Txt_Go_to_X,InsShortName); Act_LinkFormSubmit (Gbl.Title,"DAT",NULL); Log_DrawLogo (Sco_SCOPE_INS,InsCod,InsShortName,20,"CENTER_TOP",true); fprintf (Gbl.F.Out," %s",InsShortName); - Act_FormEnd (); + Act_EndForm (); } fprintf (Gbl.F.Out,""); @@ -12523,13 +12523,13 @@ static void Brw_WriteRowDocData (unsigned *NumDocsNotHidden,MYSQL_ROW row) BgColor); if (CtrCod > 0) { - Act_FormGoToStart (ActSeeCtrInf); + Act_StartFormGoTo (ActSeeCtrInf); Deg_PutParamDegCod (CtrCod); sprintf (Gbl.Title,Txt_Go_to_X,CtrShortName); Act_LinkFormSubmit (Gbl.Title,"DAT",NULL); Log_DrawLogo (Sco_SCOPE_CTR,CtrCod,CtrShortName,20,"CENTER_TOP",true); fprintf (Gbl.F.Out," %s",CtrShortName); - Act_FormEnd (); + Act_EndForm (); } fprintf (Gbl.F.Out,""); @@ -12538,13 +12538,13 @@ static void Brw_WriteRowDocData (unsigned *NumDocsNotHidden,MYSQL_ROW row) BgColor); if (DegCod > 0) { - Act_FormGoToStart (ActSeeDegInf); + Act_StartFormGoTo (ActSeeDegInf); Deg_PutParamDegCod (DegCod); sprintf (Gbl.Title,Txt_Go_to_X,DegShortName); Act_LinkFormSubmit (Gbl.Title,"DAT",NULL); Log_DrawLogo (Sco_SCOPE_DEG,DegCod,DegShortName,20,"CENTER_TOP",true); fprintf (Gbl.F.Out," %s",DegShortName); - Act_FormEnd (); + Act_EndForm (); } fprintf (Gbl.F.Out,""); @@ -12553,12 +12553,12 @@ static void Brw_WriteRowDocData (unsigned *NumDocsNotHidden,MYSQL_ROW row) BgColor); if (CrsCod > 0) { - Act_FormGoToStart (ActSeeCrsInf); + Act_StartFormGoTo (ActSeeCrsInf); Crs_PutParamCrsCod (CrsCod); sprintf (Gbl.Title,Txt_Go_to_X,CrsShortName); Act_LinkFormSubmit (Gbl.Title,"DAT",NULL); fprintf (Gbl.F.Out,"%s",CrsShortName); - Act_FormEnd (); + Act_EndForm (); } fprintf (Gbl.F.Out,""); @@ -12625,26 +12625,26 @@ static void Brw_WriteRowDocData (unsigned *NumDocsNotHidden,MYSQL_ROW row) if (CrsCod > 0 && CrsCod != Gbl.CurrentCrs.Crs.CrsCod) // Not the current course { - Act_FormGoToStart (Action); + Act_StartFormGoTo (Action); Crs_PutParamCrsCod (CrsCod); // Go to another course } else if (DegCod > 0 && DegCod != Gbl.CurrentDeg.Deg.DegCod) // Not the current degree { - Act_FormGoToStart (Action); + Act_StartFormGoTo (Action); Deg_PutParamDegCod (DegCod); // Go to another degree } else if (CtrCod > 0 && CtrCod != Gbl.CurrentCtr.Ctr.CtrCod) // Not the current centre { - Act_FormGoToStart (Action); + Act_StartFormGoTo (Action); Ctr_PutParamCtrCod (CtrCod); // Go to another centre } else if (InsCod > 0 && InsCod != Gbl.CurrentIns.Ins.InsCod) // Not the current institution { - Act_FormGoToStart (Action); + Act_StartFormGoTo (Action); Ins_PutParamInsCod (InsCod); // Go to another institution } else - Act_FormStart (Action); + Act_StartForm (Action); if (GrpCod > 0) Grp_PutParamGrpCod (GrpCod); @@ -12675,7 +12675,7 @@ static void Brw_WriteRowDocData (unsigned *NumDocsNotHidden,MYSQL_ROW row) FileNameToShow); /* End form */ - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,"" ""); @@ -12716,7 +12716,7 @@ void Brw_AskRemoveOldFiles (void) Brw_GetParAndInitFileBrowser (); /***** Start form *****/ - Act_FormStart (ActRemOldBrf); + Act_StartForm (ActRemOldBrf); Brw_PutHiddenParamFullTreeIfSelected (); /***** Start box *****/ @@ -12746,7 +12746,7 @@ void Brw_AskRemoveOldFiles (void) Box_EndBoxWithButton (Btn_REMOVE_BUTTON,Txt_Remove); /***** End form *****/ - Act_FormEnd (); + Act_EndForm (); /***** Show again the file browser *****/ Brw_ShowAgainFileBrowserOrWorks (); diff --git a/swad_follow.c b/swad_follow.c index 3fdabccc..53502192 100644 --- a/swad_follow.c +++ b/swad_follow.c @@ -197,10 +197,10 @@ void Fol_SuggestUsrsToFollowMainZoneOnRightColumn (void) fprintf (Gbl.F.Out,"
    "); /***** Title with link to suggest more users to follow *****/ - Act_FormStart (ActSeeSocPrf); + Act_StartForm (ActSeeSocPrf); Act_LinkFormSubmit (Txt_Who_to_follow,"CONNECTED_TXT",NULL); fprintf (Gbl.F.Out,"%s",Txt_Who_to_follow); - Act_FormEnd (); + Act_EndForm (); /***** Start table *****/ fprintf (Gbl.F.Out,""); @@ -429,11 +429,11 @@ static void Fol_PutIconToUpdateWhoToFollow (void) extern const char *The_ClassFormBold[The_NUM_THEMES]; extern const char *Txt_Update; - Act_FormStart (ActSeeSocPrf); + Act_StartForm (ActSeeSocPrf); Act_LinkFormSubmitAnimated (Txt_Update,The_ClassFormBold[Gbl.Prefs.Theme], NULL); Ico_PutCalculateIcon (Txt_Update); - Act_FormEnd (); + Act_EndForm (); } /*****************************************************************************/ @@ -535,7 +535,7 @@ void Fol_ShowFollowingAndFollowers (const struct UsrData *UsrDat, { if (IFollowUsr) // I follow this user { - Act_FormStart (ActUnfUsr); + Act_StartForm (ActUnfUsr); Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod); Act_LinkFormSubmit (Txt_Following_unfollow,"REC_DAT_BOLD",NULL); fprintf (Gbl.F.Out,"
    ", Gbl.Prefs.IconsURL, Txt_Unfollow,Txt_Following_unfollow); - Act_FormEnd (); + Act_EndForm (); } else // I do not follow this user { - Act_FormStart (ActFolUsr); + Act_StartForm (ActFolUsr); Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod); Act_LinkFormSubmit (Txt_Follow,"REC_DAT_BOLD",NULL); fprintf (Gbl.F.Out,"
    ", Gbl.Prefs.IconsURL, Txt_Follow,Txt_Follow); - Act_FormEnd (); + Act_EndForm (); } } fprintf (Gbl.F.Out,"
    "); @@ -595,7 +595,7 @@ static void Fol_ShowNumberOfFollowingOrFollowers (const struct UsrData *UsrDat, if (NumUsrs) { /* Form to list users */ - Act_FormStartAnchor (Action,Fol_FOLLOW_SECTION_ID); + Act_StartFormAnchor (Action,Fol_FOLLOW_SECTION_ID); Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod); Act_LinkFormSubmit (Title, (Gbl.Action.Act == Action) ? "FOLLOW_NUM_B" : @@ -609,7 +609,7 @@ static void Fol_ShowNumberOfFollowingOrFollowers (const struct UsrData *UsrDat, if (NumUsrs) { fprintf (Gbl.F.Out,""); - Act_FormEnd (); + Act_EndForm (); } else fprintf (Gbl.F.Out,""); @@ -621,7 +621,7 @@ static void Fol_ShowNumberOfFollowingOrFollowers (const struct UsrData *UsrDat, if (NumUsrs) { /* Form to list users */ - Act_FormStartAnchor (Action,Fol_FOLLOW_SECTION_ID); + Act_StartFormAnchor (Action,Fol_FOLLOW_SECTION_ID); Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod); Act_LinkFormSubmit (Title, (Gbl.Action.Act == Action) ? The_ClassFormBold[Gbl.Prefs.Theme] : @@ -631,7 +631,7 @@ static void Fol_ShowNumberOfFollowingOrFollowers (const struct UsrData *UsrDat, if (NumUsrs) { fprintf (Gbl.F.Out,""); - Act_FormEnd (); + Act_EndForm (); } fprintf (Gbl.F.Out,"
    "); @@ -843,14 +843,14 @@ static void Fol_ShowFollowedOrFollower (struct UsrData *UsrDat) if (Visible) { /* Put form to go to public profile */ - Act_FormStart (ActSeeOthPubPrf); + Act_StartForm (ActSeeOthPubPrf); Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod); fprintf (Gbl.F.Out,"
    "); // Limited width Act_LinkFormSubmit (Txt_Another_user_s_profile,"DAT",NULL); Usr_WriteFirstNameBRSurnames (UsrDat); fprintf (Gbl.F.Out,"" "
    "); - Act_FormEnd (); + Act_EndForm (); } ItsMe = Usr_ItsMe (UsrDat->UsrCod); @@ -903,14 +903,14 @@ static void Fol_WriteRowUsrToFollowOnRightColumn (struct UsrData *UsrDat) if (Visible) { /* Put form to go to public profile */ - Act_FormStart (ActSeeOthPubPrf); + Act_StartForm (ActSeeOthPubPrf); Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod); fprintf (Gbl.F.Out,"
    "); // Limited width Act_LinkFormSubmit (Txt_Another_user_s_profile,"CON_CRS",NULL); Usr_WriteFirstNameBRSurnames (UsrDat); fprintf (Gbl.F.Out,"" "
    "); - Act_FormEnd (); + Act_EndForm (); } fprintf (Gbl.F.Out,""); @@ -962,7 +962,7 @@ static void Fol_PutIconToFollow (struct UsrData *UsrDat) extern const char *Txt_Follow; /***** Form to unfollow *****/ - Act_FormStart (ActFolUsr); + Act_StartForm (ActFolUsr); Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod); Act_LinkFormSubmit (Txt_Follow,NULL,NULL); fprintf (Gbl.F.Out,"
    " @@ -973,7 +973,7 @@ static void Fol_PutIconToFollow (struct UsrData *UsrDat) "", Gbl.Prefs.IconsURL, Txt_Follow,Txt_Follow); - Act_FormEnd (); + Act_EndForm (); } /*****************************************************************************/ @@ -985,7 +985,7 @@ static void Fol_PutIconToUnfollow (struct UsrData *UsrDat) extern const char *Txt_Unfollow; /* Form to follow */ - Act_FormStart (ActUnfUsr); + Act_StartForm (ActUnfUsr); Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod); Act_LinkFormSubmit (Txt_Unfollow,NULL,NULL); fprintf (Gbl.F.Out,"
    " @@ -996,7 +996,7 @@ static void Fol_PutIconToUnfollow (struct UsrData *UsrDat) "", Gbl.Prefs.IconsURL, Txt_Unfollow,Txt_Unfollow); - Act_FormEnd (); + Act_EndForm (); } /*****************************************************************************/ diff --git a/swad_forum.c b/swad_forum.c index fbd0c878..cdad051c 100644 --- a/swad_forum.c +++ b/swad_forum.c @@ -1256,7 +1256,7 @@ static void For_ShowAForumPost (unsigned PstNum,long PstCod, "
    "); @@ -1790,7 +1790,7 @@ static void For_PutFormWhichForums (void) /***** Form to select which forums I want to see: - all my forums - only the forums of current institution/degree/course *****/ - Act_FormStart (ActSeeFor); + Act_StartForm (ActSeeFor); For_PutParamForumOrder (Gbl.Forum.ThreadsOrder); fprintf (Gbl.F.Out,"
    " "
      "); @@ -1814,7 +1814,7 @@ static void For_PutFormWhichForums (void) } fprintf (Gbl.F.Out,"
    " "
    "); - Act_FormEnd (); + Act_EndForm (); } /*****************************************************************************/ @@ -2102,7 +2102,7 @@ static void For_WriteLinkToForum (struct Forum *Forum, Txt_Copy_not_allowed,Txt_Copy_not_allowed); else { - Act_FormStartAnchor (For_ActionsPasThrFor[Forum->Type], + Act_StartFormAnchor (For_ActionsPasThrFor[Forum->Type], For_FORUM_THREADS_SECTION_ID); For_PutAllHiddenParamsForum (1, // Page of threads = first 1, // Page of posts = first @@ -2117,12 +2117,12 @@ static void For_WriteLinkToForum (struct Forum *Forum, Gbl.Prefs.IconsURL, Txt_Paste_thread, Txt_Paste_thread); - Act_FormEnd (); + Act_EndForm (); } } /***** Write link to forum *****/ - Act_FormStartAnchor (For_ActionsSeeFor[Forum->Type], + Act_StartFormAnchor (For_ActionsSeeFor[Forum->Type], For_FORUM_THREADS_SECTION_ID); For_PutAllHiddenParamsForum (1, // Page of threads = first 1, // Page of posts = first @@ -2186,7 +2186,7 @@ static void For_WriteLinkToForum (struct Forum *Forum, /***** End row *****/ fprintf (Gbl.F.Out,""); - Act_FormEnd (); + Act_EndForm (); /***** Put link to register students *****/ if (Forum->Type == For_FORUM_COURSE_USRS) @@ -2600,7 +2600,7 @@ static void For_ShowForumThreadsHighlightingOneThread (long ThrCodHighlighted, Order++) { fprintf (Gbl.F.Out,""); } fprintf (Gbl.F.Out,""); } @@ -354,10 +354,10 @@ static void Gam_PutButtonToCreateNewGame (void) { extern const char *Txt_New_game; - Act_FormStart (ActFrmNewGam); + Act_StartForm (ActFrmNewGam); Gam_PutParamsToCreateNewGame (); Btn_PutConfirmButton (Txt_New_game); - Act_FormEnd (); + Act_EndForm (); } /*****************************************************************************/ @@ -509,7 +509,7 @@ static void Gam_ShowOneGame (long GamCod, fprintf (Gbl.F.Out,"\">"); /* Put form to view game */ - Act_FormStart (ActSeeOneGam); + Act_StartForm (ActSeeOneGam); Gam_PutParamGameCod (GamCod); Gam_PutHiddenParamGameOrder (); Grp_PutParamWhichGrps (); @@ -519,7 +519,7 @@ static void Gam_ShowOneGame (long GamCod, "ASG_TITLE_LIGHT",NULL); fprintf (Gbl.F.Out,"%s", Game.Title); - Act_FormEnd (); + Act_EndForm (); /* Number of questions and number of distinct users who have already answered this game */ fprintf (Gbl.F.Out,"
    %s: %u; %s: %u
    " @@ -542,13 +542,13 @@ static void Gam_ShowOneGame (long GamCod, { fprintf (Gbl.F.Out,"
    "); - Act_FormStart (ActPlyGam); + Act_StartForm (ActPlyGam); Gam_PutParamGameCod (Game.GamCod); Gam_PutHiddenParamGameOrder (); Grp_PutParamWhichGrps (); Pag_PutHiddenParamPagNum (Pag_GAMES,Gbl.Games.CurrentPage); Btn_PutCreateButtonInline (Txt_Play); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,"
    "); } @@ -559,13 +559,13 @@ static void Gam_ShowOneGame (long GamCod, { fprintf (Gbl.F.Out,"
    "); - Act_FormStart (ActSeeOneGam); + Act_StartForm (ActSeeOneGam); Gam_PutParamGameCod (Game.GamCod); Gam_PutHiddenParamGameOrder (); Grp_PutParamWhichGrps (); Pag_PutHiddenParamPagNum (Pag_GAMES,Gbl.Games.CurrentPage); Btn_PutCreateButtonInline (Txt_Play); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,"
    "); } @@ -574,13 +574,13 @@ static void Gam_ShowOneGame (long GamCod, { fprintf (Gbl.F.Out,"
    "); - Act_FormStart (ActSeeOneGam); + Act_StartForm (ActSeeOneGam); Gam_PutParamGameCod (Game.GamCod); Gam_PutHiddenParamGameOrder (); Grp_PutParamWhichGrps (); Pag_PutHiddenParamPagNum (Pag_GAMES,Gbl.Games.CurrentPage); Btn_PutConfirmButtonInline (Txt_View_game_results); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,"
    "); } @@ -1596,10 +1596,10 @@ static void Gam_PutButtonToResetGame (void) { extern const char *Txt_Reset_game; - Act_FormStart (ActRstGam); + Act_StartForm (ActRstGam); Gam_PutParams (); Btn_PutRemoveButton (Txt_Reset_game); - Act_FormEnd (); + Act_EndForm (); } /*****************************************************************************/ @@ -1793,7 +1793,7 @@ void Gam_RequestCreatOrEditGame (void) /***** Start form *****/ Gbl.Games.CurrentGamCod = Game.GamCod; - Act_FormStart (ItsANewGame ? ActNewGam : + Act_StartForm (ItsANewGame ? ActNewGam : ActChgGam); Gam_PutParams (); @@ -1881,7 +1881,7 @@ void Gam_RequestCreatOrEditGame (void) Box_EndBoxTableWithButton (Btn_CONFIRM_BUTTON,Txt_Save); /***** End form *****/ - Act_FormEnd (); + Act_EndForm (); /***** Show questions of the game ready to be edited *****/ if (!ItsANewGame) @@ -2810,7 +2810,7 @@ static void Gam_ListGameQuestions (struct Game *Game) Btn_PutConfirmButton (Txt_Done); /***** End form *****/ - Act_FormEnd (); + Act_EndForm (); } } else // This game has no questions @@ -2907,11 +2907,11 @@ static void Gam_ListOneOrMoreQuestionsForEdition (struct Game *Game, "" ""); /* Name of group type */ fprintf (Gbl.F.Out,""); /* Is it possible to register in multiple groups? */ fprintf (Gbl.F.Out,""); /* Open time */ fprintf (Gbl.F.Out,"" @@ -1380,7 +1380,7 @@ static void Grp_ListGroupTypesForEdition (void) fprintf (Gbl.F.Out,"" ""); Tbl_EndTable (); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,""); /* Number of groups of this type */ @@ -1499,15 +1499,15 @@ static void Grp_ListGroupsForEdition (void) /* Write icon to remove group */ fprintf (Gbl.F.Out,"" ""); /* Write icon to open/close group */ fprintf (Gbl.F.Out,""); /* Write icon to activate file zones for this group */ fprintf (Gbl.F.Out,""); /* Group type */ fprintf (Gbl.F.Out,""); /* Group name */ fprintf (Gbl.F.Out,""); /* Current number of users in this group */ @@ -1590,14 +1590,14 @@ static void Grp_ListGroupsForEdition (void) /* Maximum number of students of the group (row[3]) */ fprintf (Gbl.F.Out,"" ""); } @@ -1771,7 +1771,7 @@ void Grp_ShowLstGrpsToChgMyGrps (void) { /***** Start form *****/ if (PutFormToChangeGrps) - Act_FormStart (ActChgGrp); + Act_StartForm (ActChgGrp); /***** List the groups the user belongs to for change *****/ Tbl_StartTableWide (2); @@ -1792,7 +1792,7 @@ void Grp_ShowLstGrpsToChgMyGrps (void) if (ICanChangeMyGrps) Btn_PutConfirmButton (NumGrpsIBelong ? Txt_Change_my_groups : Txt_Enrol_in_groups); - Act_FormEnd (); + Act_EndForm (); } } else // This course has no groups @@ -1804,9 +1804,9 @@ void Grp_ShowLstGrpsToChgMyGrps (void) /***** Button to create group *****/ if (ICanEdit) { - Act_FormStart (ActReqEdiGrp); + Act_StartForm (ActReqEdiGrp); Btn_PutConfirmButton (Txt_Create_group); - Act_FormEnd (); + Act_EndForm (); } } @@ -2452,7 +2452,7 @@ static void Grp_PutFormToCreateGroupType (void) /***** Start form *****/ Lay_StartSection (Grp_NEW_GROUP_TYPE_SECTION_ID); - Act_FormStartAnchor (ActNewGrpTyp,Grp_GROUP_TYPES_SECTION_ID); + Act_StartFormAnchor (ActNewGrpTyp,Grp_GROUP_TYPES_SECTION_ID); /***** Start box *****/ Box_StartBoxTable (NULL,Txt_New_type_of_group,NULL, @@ -2547,7 +2547,7 @@ static void Grp_PutFormToCreateGroupType (void) Box_EndBoxTableWithButton (Btn_CREATE_BUTTON,Txt_Create_type_of_group); /***** End form *****/ - Act_FormEnd (); + Act_EndForm (); Lay_EndSection (); } @@ -2566,7 +2566,7 @@ static void Grp_PutFormToCreateGroup (void) /***** Start form *****/ Lay_StartSection (Grp_NEW_GROUP_SECTION_ID); - Act_FormStartAnchor (ActNewGrp,Grp_GROUPS_SECTION_ID); + Act_StartFormAnchor (ActNewGrp,Grp_GROUPS_SECTION_ID); /***** Start box and table *****/ Box_StartBoxTable (NULL,Txt_New_group,NULL, @@ -2641,7 +2641,7 @@ static void Grp_PutFormToCreateGroup (void) Box_EndBoxTableWithButton (Btn_CREATE_BUTTON,Txt_Create_group); /***** End form *****/ - Act_FormEnd (); + Act_EndForm (); Lay_EndSection (); } @@ -4841,7 +4841,7 @@ void Grp_ShowFormToSelWhichGrps (Act_Action_t Action,void (*FuncParams) ()) fprintf (Gbl.F.Out,"
    ", WhichGrps == Gbl.CurrentCrs.Grps.WhichGrps ? "PREF_ON" : "PREF_OFF"); - Act_FormStart (Action); + Act_StartForm (Action); Par_PutHiddenParamUnsigned ("WhichGrps",(unsigned) WhichGrps); if (FuncParams) // Extra parameters depending on the action FuncParams (); @@ -4853,7 +4853,7 @@ void Grp_ShowFormToSelWhichGrps (Act_Action_t Action,void (*FuncParams) ()) "hierarchy64x64.png", Txt_GROUP_WHICH_GROUPS[WhichGrps], Txt_GROUP_WHICH_GROUPS[WhichGrps]); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,"
    "); } fprintf (Gbl.F.Out,""); diff --git a/swad_help.c b/swad_help.c index eea977f1..f773693d 100644 --- a/swad_help.c +++ b/swad_help.c @@ -272,9 +272,9 @@ static void Hlp_ShowRowHelpWhatWouldYouLikeToDo (const char *Description, /***** Button *****/ fprintf (Gbl.F.Out,"" ""); } diff --git a/swad_hierarchy.c b/swad_hierarchy.c index 494be060..a1f6e29b 100644 --- a/swad_hierarchy.c +++ b/swad_hierarchy.c @@ -193,11 +193,11 @@ void Hie_WriteHierarchyInBreadcrumb (void) /***** Form to go to the system *****/ fprintf (Gbl.F.Out,"
     ",ClassTxt); - Act_FormGoToStart (ActMnu); + Act_StartFormGoTo (ActMnu); Par_PutHiddenParamUnsigned ("NxtTab",(unsigned) TabSys); Act_LinkFormSubmit (Txt_System,ClassTxt,NULL); fprintf (Gbl.F.Out,"%s",Txt_System); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,"
    "); @@ -209,11 +209,11 @@ void Hie_WriteHierarchyInBreadcrumb (void) fprintf (Gbl.F.Out," > "); /***** Form to go to see institutions of this country *****/ - Act_FormGoToStart (ActSeeIns); + Act_StartFormGoTo (ActSeeIns); Cty_PutParamCtyCod (Gbl.CurrentCty.Cty.CtyCod); Act_LinkFormSubmit (Gbl.CurrentCty.Cty.Name[Gbl.Prefs.Language],ClassTxt,NULL); fprintf (Gbl.F.Out,"%s",Gbl.CurrentCty.Cty.Name[Gbl.Prefs.Language]); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,""); } @@ -225,10 +225,10 @@ void Hie_WriteHierarchyInBreadcrumb (void) fprintf (Gbl.F.Out," > "); /***** Form to go to select countries *****/ - Act_FormGoToStart (ActSeeCty); + Act_StartFormGoTo (ActSeeCty); Act_LinkFormSubmit (Txt_Country,ClassTxt,NULL); fprintf (Gbl.F.Out,"%s",Txt_Country); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,""); } @@ -241,11 +241,11 @@ void Hie_WriteHierarchyInBreadcrumb (void) fprintf (Gbl.F.Out," > "); /***** Form to see centres of this institution *****/ - Act_FormGoToStart (ActSeeCtr); + Act_StartFormGoTo (ActSeeCtr); Ins_PutParamInsCod (Gbl.CurrentIns.Ins.InsCod); Act_LinkFormSubmit (Gbl.CurrentIns.Ins.FullName,ClassTxt,NULL); fprintf (Gbl.F.Out,"%s",Gbl.CurrentIns.Ins.ShrtName); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,""); } @@ -257,10 +257,10 @@ void Hie_WriteHierarchyInBreadcrumb (void) fprintf (Gbl.F.Out," > "); /***** Form to go to select institutions *****/ - Act_FormGoToStart (ActSeeIns); + Act_StartFormGoTo (ActSeeIns); Act_LinkFormSubmit (Txt_Institution,ClassTxt,NULL); fprintf (Gbl.F.Out,"%s",Txt_Institution); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,""); } @@ -285,11 +285,11 @@ void Hie_WriteHierarchyInBreadcrumb (void) fprintf (Gbl.F.Out," > "); /***** Form to see degrees of this centre *****/ - Act_FormGoToStart (ActSeeDeg); + Act_StartFormGoTo (ActSeeDeg); Ctr_PutParamCtrCod (Gbl.CurrentCtr.Ctr.CtrCod); Act_LinkFormSubmit (Gbl.CurrentCtr.Ctr.FullName,ClassTxt,NULL); fprintf (Gbl.F.Out,"%s",Gbl.CurrentCtr.Ctr.ShrtName); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,""); } @@ -301,10 +301,10 @@ void Hie_WriteHierarchyInBreadcrumb (void) fprintf (Gbl.F.Out," > "); /***** Form to go to select centres *****/ - Act_FormGoToStart (ActSeeCtr); + Act_StartFormGoTo (ActSeeCtr); Act_LinkFormSubmit (Txt_Centre,ClassTxt,NULL); fprintf (Gbl.F.Out,"%s",Txt_Centre); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,""); } @@ -329,11 +329,11 @@ void Hie_WriteHierarchyInBreadcrumb (void) fprintf (Gbl.F.Out," > "); /***** Form to go to see courses of this degree *****/ - Act_FormGoToStart (ActSeeCrs); + Act_StartFormGoTo (ActSeeCrs); Deg_PutParamDegCod (Gbl.CurrentDeg.Deg.DegCod); Act_LinkFormSubmit (Gbl.CurrentDeg.Deg.FullName,ClassTxt,NULL); fprintf (Gbl.F.Out,"%s",Gbl.CurrentDeg.Deg.ShrtName); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,""); } @@ -345,10 +345,10 @@ void Hie_WriteHierarchyInBreadcrumb (void) fprintf (Gbl.F.Out," > "); /***** Form to go to select degrees *****/ - Act_FormGoToStart (ActSeeDeg); + Act_StartFormGoTo (ActSeeDeg); Act_LinkFormSubmit (Txt_Degree,ClassTxt,NULL); fprintf (Gbl.F.Out,"%s",Txt_Degree); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,""); } diff --git a/swad_holiday.c b/swad_holiday.c index 0797ef6f..72d16edf 100644 --- a/swad_holiday.c +++ b/swad_holiday.c @@ -114,7 +114,7 @@ void Hld_SeeHolidays (void) Order++) { fprintf (Gbl.F.Out,""); } fprintf (Gbl.F.Out,"" ""); /* Holiday code */ @@ -532,7 +532,7 @@ static void Hld_ListHolidaysForEdition (void) /* Holiday place */ fprintf (Gbl.F.Out,""); /* Holiday type */ fprintf (Gbl.F.Out,""); /* Holiday date / Non school period start date */ fprintf (Gbl.F.Out,""); /* Non school period end date */ fprintf (Gbl.F.Out,""); /* Holiday name */ fprintf (Gbl.F.Out,"" ""); } @@ -958,7 +958,7 @@ static void Hld_PutFormToCreateHoliday (void) Hld = &Gbl.Hlds.EditingHld; /***** Start form *****/ - Act_FormStart (ActNewHld); + Act_StartForm (ActNewHld); /***** Start box and table *****/ Box_StartBoxTable (NULL,Txt_New_holiday,NULL, @@ -1053,7 +1053,7 @@ static void Hld_PutFormToCreateHoliday (void) Box_EndBoxTableWithButton (Btn_CREATE_BUTTON,Txt_Create_holiday); /***** End form *****/ - Act_FormEnd (); + Act_EndForm (); } /*****************************************************************************/ diff --git a/swad_icon.c b/swad_icon.c index ec402512..7e48ebd2 100644 --- a/swad_icon.c +++ b/swad_icon.c @@ -87,7 +87,7 @@ void Ico_PutIconsToSelectIconSet (void) fprintf (Gbl.F.Out,"
    ", IconSet == Gbl.Prefs.IconSet ? "PREF_ON" : "PREF_OFF"); - Act_FormStart (ActChgIco); + Act_StartForm (ActChgIco); Par_PutHiddenParamString ("IconSet",Ico_IconSetId[IconSet]); fprintf (Gbl.F.Out,"", @@ -97,7 +97,7 @@ void Ico_PutIconsToSelectIconSet (void) Cfg_ICON_ACTION, Ico_IconSetNames[IconSet], Ico_IconSetNames[IconSet]); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,"
    "); } fprintf (Gbl.F.Out,""); diff --git a/swad_indicator.c b/swad_indicator.c index dc6f1db4..189ca04d 100644 --- a/swad_indicator.c +++ b/swad_indicator.c @@ -113,7 +113,7 @@ void Ind_ReqIndicatorsCourses (void) /***** Form to update indicators *****/ /* Start form and table */ - Act_FormStart (ActReqStaCrs); + Act_StartForm (ActReqStaCrs); Tbl_StartTableWide (2); /* Scope */ @@ -183,7 +183,7 @@ void Ind_ReqIndicatorsCourses (void) /* End table and form */ Tbl_EndTable (); - Act_FormEnd (); + Act_EndForm (); /***** Show the stats of courses *****/ for (Ind = 0, NumCrssToList = 0; @@ -197,14 +197,14 @@ void Ind_ReqIndicatorsCourses (void) Ind_ShowTableOfCoursesWithIndicators (Ind_INDICATORS_BRIEF,NumCrss,mysql_res); /* Button to show more details */ - Act_FormStart (ActSeeAllStaCrs); + Act_StartForm (ActSeeAllStaCrs); Sco_PutParamScope ("ScopeInd",Gbl.Scope.Current); Par_PutHiddenParamLong ("OthDegTypCod",Gbl.Stat.DegTypCod); Par_PutHiddenParamLong (Dpt_PARAM_DPT_COD_NAME,Gbl.Stat.DptCod); if (Gbl.Stat.StrIndicatorsSelected[0]) Par_PutHiddenParamString ("Indicators",Gbl.Stat.StrIndicatorsSelected); Btn_PutConfirmButton (Txt_Show_more_details); - Act_FormEnd (); + Act_EndForm (); } /***** End box *****/ diff --git a/swad_info.c b/swad_info.c index c901988b..35af6ad0 100644 --- a/swad_info.c +++ b/swad_info.c @@ -461,9 +461,9 @@ static void Inf_PutButtonToEditInfo (void) { extern const char *Txt_Edit; - Act_FormStart (Inf_ActionsEditInfo[Gbl.CurrentCrs.Info.Type]); + Act_StartForm (Inf_ActionsEditInfo[Gbl.CurrentCrs.Info.Type]); Btn_PutConfirmButton (Txt_Edit); - Act_FormEnd (); + Act_EndForm (); } /*****************************************************************************/ @@ -605,13 +605,13 @@ void Inf_WriteMsgYouMustReadInfo (void) if (Gbl.CurrentCrs.Info.MustBeRead[InfoType]) { fprintf (Gbl.F.Out,"
  • "); - Act_FormStart (Inf_ActionsSeeInfo[InfoType]); + Act_StartForm (Inf_ActionsSeeInfo[InfoType]); Act_LinkFormSubmit (Act_GetTitleAction (Inf_ActionsSeeInfo[InfoType]), The_ClassForm[Gbl.Prefs.Theme],NULL); fprintf (Gbl.F.Out,"%s" "", Act_GetTitleAction (Inf_ActionsSeeInfo[InfoType])); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,"
  • "); } fprintf (Gbl.F.Out,"" @@ -1130,7 +1130,7 @@ void Inf_FormsToSelSendInfo (void) if (InfoSrc == InfoSrcSelected) fprintf (Gbl.F.Out," LIGHT_BLUE"); fprintf (Gbl.F.Out,"\">"); - Act_FormStart (Inf_ActionsSelecInfoSrc[Gbl.CurrentCrs.Info.Type]); + Act_StartForm (Inf_ActionsSelecInfoSrc[Gbl.CurrentCrs.Info.Type]); fprintf (Gbl.F.Out,""); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,""); /* Form for this info source */ @@ -1215,9 +1215,9 @@ void Inf_FormToEnterIntegratedEditor (Inf_InfoSrc_t InfoSrc) { extern const char *Txt_Edit; - Act_FormStart (Inf_ActionsInfo[InfoSrc][Gbl.CurrentCrs.Info.Type]); + Act_StartForm (Inf_ActionsInfo[InfoSrc][Gbl.CurrentCrs.Info.Type]); Btn_PutConfirmButton (Txt_Edit); - Act_FormEnd (); + Act_EndForm (); } /*****************************************************************************/ @@ -1228,9 +1228,9 @@ void Inf_FormToEnterPlainTextEditor (Inf_InfoSrc_t InfoSrc) { extern const char *Txt_Edit_plain_text; - Act_FormStart (Inf_ActionsInfo[InfoSrc][Gbl.CurrentCrs.Info.Type]); + Act_StartForm (Inf_ActionsInfo[InfoSrc][Gbl.CurrentCrs.Info.Type]); Btn_PutConfirmButton (Txt_Edit_plain_text); - Act_FormEnd (); + Act_EndForm (); } /*****************************************************************************/ @@ -1241,9 +1241,9 @@ void Inf_FormToEnterRichTextEditor (Inf_InfoSrc_t InfoSrc) { extern const char *Txt_Edit_rich_text; - Act_FormStart (Inf_ActionsInfo[InfoSrc][Gbl.CurrentCrs.Info.Type]); + Act_StartForm (Inf_ActionsInfo[InfoSrc][Gbl.CurrentCrs.Info.Type]); Btn_PutConfirmButton (Txt_Edit_rich_text); - Act_FormEnd (); + Act_EndForm (); } /*****************************************************************************/ @@ -1257,7 +1257,7 @@ void Inf_FormToSendPage (Inf_InfoSrc_t InfoSrc) extern const char *Txt_Upload_file; /***** Start form *****/ - Act_FormStart (Inf_ActionsInfo[InfoSrc][Gbl.CurrentCrs.Info.Type]); + Act_StartForm (Inf_ActionsInfo[InfoSrc][Gbl.CurrentCrs.Info.Type]); /***** File *****/ fprintf (Gbl.F.Out,"
    " @@ -1273,7 +1273,7 @@ void Inf_FormToSendPage (Inf_InfoSrc_t InfoSrc) Btn_PutCreateButton (Txt_Upload_file); /***** End form *****/ - Act_FormEnd (); + Act_EndForm (); } /*****************************************************************************/ @@ -1292,7 +1292,7 @@ void Inf_FormToSendURL (Inf_InfoSrc_t InfoSrc) Inf_BuildPathURL (Gbl.CurrentCrs.Crs.CrsCod,Gbl.CurrentCrs.Info.Type,PathFile); /***** Start form *****/ - Act_FormStart (Inf_ActionsInfo[InfoSrc][Gbl.CurrentCrs.Info.Type]); + Act_StartForm (Inf_ActionsInfo[InfoSrc][Gbl.CurrentCrs.Info.Type]); /***** Link *****/ fprintf (Gbl.F.Out,"
    " @@ -1319,7 +1319,7 @@ void Inf_FormToSendURL (Inf_InfoSrc_t InfoSrc) Btn_PutCreateButton (Txt_Send_URL); /***** End form *****/ - Act_FormEnd (); + Act_EndForm (); } /*****************************************************************************/ @@ -2055,7 +2055,7 @@ void Inf_EditPlainTxtInfo (void) Gbl.CurrentCrs.Info.Type = Inf_AsignInfoType (); /***** Start form and box *****/ - Act_FormStart (Inf_ActionsRcvPlaTxtInfo[Gbl.CurrentCrs.Info.Type]); + Act_StartForm (Inf_ActionsRcvPlaTxtInfo[Gbl.CurrentCrs.Info.Type]); Box_StartBox (NULL,Txt_INFO_TITLE[Gbl.CurrentCrs.Info.Type],NULL, HelpEdit[Gbl.CurrentCrs.Info.Type],Box_NOT_CLOSABLE); @@ -2078,7 +2078,7 @@ void Inf_EditPlainTxtInfo (void) /***** Send button and end box *****/ Box_EndBoxWithButton (Btn_CONFIRM_BUTTON,Txt_Save); - Act_FormEnd (); + Act_EndForm (); } /*****************************************************************************/ @@ -2106,7 +2106,7 @@ void Inf_EditRichTxtInfo (void) Gbl.CurrentCrs.Info.Type = Inf_AsignInfoType (); /***** Start form and box *****/ - Act_FormStart (Inf_ActionsRcvRchTxtInfo[Gbl.CurrentCrs.Info.Type]); + Act_StartForm (Inf_ActionsRcvRchTxtInfo[Gbl.CurrentCrs.Info.Type]); Box_StartBox (NULL,Txt_INFO_TITLE[Gbl.CurrentCrs.Info.Type],NULL, HelpEdit[Gbl.CurrentCrs.Info.Type],Box_NOT_CLOSABLE); @@ -2129,7 +2129,7 @@ void Inf_EditRichTxtInfo (void) /***** Send button and end box *****/ Box_EndBoxWithButton (Btn_CONFIRM_BUTTON,Txt_Save); - Act_FormEnd (); + Act_EndForm (); } /*****************************************************************************/ diff --git a/swad_institution.c b/swad_institution.c index 02ecd0be..71f6a122 100644 --- a/swad_institution.c +++ b/swad_institution.c @@ -221,7 +221,7 @@ void Ins_DrawInstitutionLogoWithLink (struct Instit *Ins,unsigned Size) if (PutLink) { - Act_FormStart (ActSeeInsInf); + Act_StartForm (ActSeeInsInf); Ins_PutParamInsCod (Ins->InsCod); Act_LinkFormSubmit (Ins->FullName,NULL,NULL); } @@ -230,7 +230,7 @@ void Ins_DrawInstitutionLogoWithLink (struct Instit *Ins,unsigned Size) if (PutLink) { fprintf (Gbl.F.Out,""); - Act_FormEnd (); + Act_EndForm (); } } @@ -244,7 +244,7 @@ void Ins_DrawInstitutionLogoAndNameWithLink (struct Instit *Ins,Act_Action_t Act extern const char *Txt_Go_to_X; /***** Start form *****/ - Act_FormGoToStart (Action); + Act_StartFormGoTo (Action); Ins_PutParamInsCod (Ins->InsCod); /***** Link to action *****/ @@ -258,7 +258,7 @@ void Ins_DrawInstitutionLogoAndNameWithLink (struct Instit *Ins,Act_Action_t Act fprintf (Gbl.F.Out," %s",Ins->FullName); /***** End form *****/ - Act_FormEnd (); + Act_EndForm (); } /*****************************************************************************/ @@ -350,7 +350,7 @@ static void Ins_Configuration (bool PrintView) Cty_GetListCountries (Cty_GET_BASIC_DATA); /* Put form to select country */ - Act_FormStart (ActChgInsCtyCfg); + Act_StartForm (ActChgInsCtyCfg); fprintf (Gbl.F.Out,""); - Act_FormEnd (); + Act_EndForm (); /* Free list of countries */ Cty_FreeListCountries (); @@ -388,7 +388,7 @@ static void Ins_Configuration (bool PrintView) // Only system admins can edit institution full name { /* Form to change institution full name */ - Act_FormStart (ActRenInsFulCfg); + Act_StartForm (ActRenInsFulCfg); fprintf (Gbl.F.Out,"" @@ -527,14 +527,14 @@ static void Ins_Configuration (bool PrintView) Txt_Centres); /* Form to go to see centres of this institution */ - Act_FormGoToStart (ActSeeCtr); + Act_StartFormGoTo (ActSeeCtr); Ins_PutParamInsCod (Gbl.CurrentIns.Ins.InsCod); sprintf (Gbl.Title,Txt_Centres_of_INSTITUTION_X, Gbl.CurrentIns.Ins.ShrtName); Act_LinkFormSubmit (Gbl.Title,"DAT",NULL); fprintf (Gbl.F.Out,"%u", Ctr_GetNumCtrsInIns (Gbl.CurrentIns.Ins.InsCod)); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,"" ""); @@ -695,10 +695,10 @@ static void Ins_ListInstitutions (void) /***** Button to create institution *****/ if (Ins_CheckIfICanCreateInstitutions ()) { - Act_FormStart (ActEdiIns); + Act_StartForm (ActEdiIns); Btn_PutConfirmButton (Gbl.Inss.Num ? Txt_Create_another_institution : Txt_Create_institution); - Act_FormEnd (); + Act_EndForm (); } Box_EndBox (); @@ -851,7 +851,7 @@ static void Ins_PutHeadInstitutionsForSeeing (bool OrderSelectable) "RIGHT_MIDDLE"); if (OrderSelectable) { - Act_FormStart (ActSeeIns); + Act_StartForm (ActSeeIns); Par_PutHiddenParamUnsigned ("Order",(unsigned) Order); Act_LinkFormSubmit (Txt_INSTITUTIONS_HELP_ORDER[Order],"TIT_TBL",NULL); if (Order == Gbl.Inss.SelectedOrder) @@ -863,7 +863,7 @@ static void Ins_PutHeadInstitutionsForSeeing (bool OrderSelectable) if (Order == Gbl.Inss.SelectedOrder) fprintf (Gbl.F.Out,""); fprintf (Gbl.F.Out,""); - Act_FormEnd (); + Act_EndForm (); } fprintf (Gbl.F.Out,""); } @@ -1347,7 +1347,7 @@ void Ins_WriteSelectorOfInstitution (void) long InsCod; /***** Start form *****/ - Act_FormGoToStart (ActSeeCtr); + Act_StartFormGoTo (ActSeeCtr); fprintf (Gbl.F.Out,""); - Act_FormEnd (); + Act_EndForm (); } /*****************************************************************************/ @@ -1437,10 +1437,10 @@ static void Ins_ListInstitutionsForEdition (void) Ico_PutIconRemovalNotAllowed (); else { - Act_FormStart (ActRemIns); + Act_StartForm (ActRemIns); Ins_PutParamOtherInsCod (Ins->InsCod); Ico_PutIconRemove (); - Act_FormEnd (); + Act_EndForm (); } fprintf (Gbl.F.Out,""); @@ -1461,7 +1461,7 @@ static void Ins_ListInstitutionsForEdition (void) fprintf (Gbl.F.Out,"
    "); } else @@ -1555,7 +1555,7 @@ static void Ins_ListInstitutionsForEdition (void) if (Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM && StatusTxt == Ins_STATUS_PENDING) { - Act_FormStart (ActChgInsSta); + Act_StartForm (ActChgInsSta); Ins_PutParamOtherInsCod (Ins->InsCod); fprintf (Gbl.F.Out,"", @@ -111,7 +111,7 @@ void Lan_PutSelectorToSelectLanguage (void) fprintf (Gbl.F.Out,">%s",Txt_STR_LANG_NAME[Lan]); } fprintf (Gbl.F.Out,""); - Act_FormEnd (); + Act_EndForm (); } /*****************************************************************************/ diff --git a/swad_layout.c b/swad_layout.c index f6e162c0..8e48bd4e 100644 --- a/swad_layout.c +++ b/swad_layout.c @@ -862,7 +862,7 @@ static void Lay_WritePageTopHeading (void) fprintf (Gbl.F.Out,"
    "); /* Start form to go to home page */ - Act_FormGoToStart (ActMnu); + Act_StartFormGoTo (ActMnu); Par_PutHiddenParamUnsigned ("NxtTab",(unsigned) TabSys); fprintf (Gbl.F.Out,"
    "); @@ -893,7 +893,7 @@ static void Lay_WritePageTopHeading (void) Txt_TAGLINE_BR); /* End form to go to home page */ - Act_FormEnd (); + Act_EndForm (); Sch_PutFormToSearchInPageTopHeading (); @@ -1102,7 +1102,7 @@ void Lay_PutContextualLink (Act_Action_t NextAction,const char *Anchor, // jumping to the next line on narrow screens /***** Start form *****/ - Act_FormStartAnchor (NextAction,Anchor); + Act_StartFormAnchor (NextAction,Anchor); if (FuncParams) FuncParams (); @@ -1113,7 +1113,7 @@ void Lay_PutContextualLink (Act_Action_t NextAction,const char *Anchor, OnSubmit); /***** End form *****/ - Act_FormEnd (); + Act_EndForm (); /***** Separator *****/ if (Text) @@ -1139,7 +1139,7 @@ void Lay_PutContextualCheckbox (Act_Action_t NextAction, // jumping to the next line on narrow screens /***** Start form *****/ - Act_FormStart (NextAction); + Act_StartForm (NextAction); if (FuncParams) FuncParams (); @@ -1172,7 +1172,7 @@ void Lay_PutContextualCheckbox (Act_Action_t NextAction, "
    "); /***** End form *****/ - Act_FormEnd (); + Act_EndForm (); /***** Separator *****/ if (Text) diff --git a/swad_link.c b/swad_link.c index 161cfcee..4586941a 100644 --- a/swad_link.c +++ b/swad_link.c @@ -126,9 +126,9 @@ void Lnk_SeeLinks (void) /***** Button to create link *****/ if (Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM) { - Act_FormStart (ActEdiLnk); + Act_StartForm (ActEdiLnk); Btn_PutConfirmButton (Txt_New_link); - Act_FormEnd (); + Act_EndForm (); } /***** End box *****/ @@ -163,12 +163,12 @@ void Lnk_WriteMenuWithInstitutionalLinks (void) { fprintf (Gbl.F.Out,"
    "); - Act_FormStart (ActSeeLnk); + Act_StartForm (ActSeeLnk); Act_LinkFormSubmit (Txt_Links,NULL,NULL); fprintf (Gbl.F.Out," %s" "", Txt_Links); - Act_FormEnd (); + Act_EndForm (); Lnk_WriteListOfLinks (); fprintf (Gbl.F.Out,"
    "); @@ -404,10 +404,10 @@ static void Lnk_ListLinksForEdition (void) /* Put icon to remove link */ fprintf (Gbl.F.Out,"
    " ""); /* Link code */ @@ -418,7 +418,7 @@ static void Lnk_ListLinksForEdition (void) /* Link short name */ fprintf (Gbl.F.Out,""); /* Link full name */ fprintf (Gbl.F.Out,""); /* Link WWW */ fprintf (Gbl.F.Out,"" ""); } @@ -704,7 +704,7 @@ static void Lnk_PutFormToCreateLink (void) Lnk = &Gbl.Links.EditingLnk; /***** Start form *****/ - Act_FormStart (ActNewLnk); + Act_StartForm (ActNewLnk); /***** Start box and table *****/ Box_StartBoxTable (NULL,Txt_New_link,NULL, @@ -750,7 +750,7 @@ static void Lnk_PutFormToCreateLink (void) Box_EndBoxTableWithButton (Btn_CREATE_BUTTON,Txt_Create_link); /***** End form *****/ - Act_FormEnd (); + Act_EndForm (); } /*****************************************************************************/ diff --git a/swad_logo.c b/swad_logo.c index db94a0c8..87aaa22d 100644 --- a/swad_logo.c +++ b/swad_logo.c @@ -281,7 +281,7 @@ void Log_RequestLogo (Sco_Scope_t Scope) } /***** Start form to upload logo *****/ - Act_FormStart (ActionRec); + Act_StartForm (ActionRec); /***** Start box *****/ Box_StartBox (NULL,Txt_Logo,NULL, @@ -307,7 +307,7 @@ void Log_RequestLogo (Sco_Scope_t Scope) Box_EndBox (); /***** End form *****/ - Act_FormEnd (); + Act_EndForm (); } /*****************************************************************************/ diff --git a/swad_mail.c b/swad_mail.c index 8b796f16..c77998df 100644 --- a/swad_mail.c +++ b/swad_mail.c @@ -54,6 +54,8 @@ extern struct Globals Gbl; #define Mai_LENGTH_EMAIL_CONFIRM_KEY Cry_BYTES_ENCRYPTED_STR_SHA256_BASE64 +#define Mai_EMAIL_SECTION_ID "email_section" + /*****************************************************************************/ /******************************* Private types *******************************/ /*****************************************************************************/ @@ -83,6 +85,9 @@ static void Mai_PutFormToCreateMailDomain (void); static void Mai_PutHeadMailDomains (void); static void Mai_CreateMailDomain (struct Mail *Mai); +static void Mai_ShowFormChangeUsrEmail (const struct UsrData *UsrDat,bool ItsMe, + bool IMustFillEmail,bool IShouldConfirmEmail); + static void Mai_RemoveEmail (struct UsrData *UsrDat); static void Mai_RemoveEmailFromDB (long UsrCod,const char Email[Cns_MAX_BYTES_EMAIL_ADDRESS + 1]); static void Mai_NewUsrEmail (struct UsrData *UsrDat,bool ItsMe); @@ -121,7 +126,7 @@ void Mai_SeeMailDomains (void) Order++) { fprintf (Gbl.F.Out,""); } fprintf (Gbl.F.Out,""); @@ -464,10 +469,10 @@ static void Mai_ListMailDomainsForEdition (void) /* Put icon to remove mail */ fprintf (Gbl.F.Out,"" ""); /* Mail code */ @@ -478,26 +483,26 @@ static void Mai_ListMailDomainsForEdition (void) /* Mail domain */ fprintf (Gbl.F.Out,""); /* Mail domain info */ fprintf (Gbl.F.Out,""); /* Number of users */ @@ -628,9 +633,10 @@ static void Mai_RenameMailDomain (Cns_ShrtOrFullName_t ShrtOrFullName) /***** Check if new name is empty *****/ if (!NewMaiName[0]) { + Gbl.Alert.Type = Ale_WARNING; + Gbl.Alert.Section = Mai_EMAIL_SECTION_ID; sprintf (Gbl.Alert.Txt,Txt_You_can_not_leave_the_name_of_the_email_domain_X_empty, CurrentMaiName); - Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); } else { @@ -640,9 +646,10 @@ static void Mai_RenameMailDomain (Cns_ShrtOrFullName_t ShrtOrFullName) /***** If mail was in database... *****/ if (Mai_CheckIfMailDomainNameExists (ParamName,NewMaiName,Mai->MaiCod)) { + Gbl.Alert.Type = Ale_WARNING; + Gbl.Alert.Section = Mai_EMAIL_SECTION_ID; sprintf (Gbl.Alert.Txt,Txt_The_email_domain_X_already_exists, NewMaiName); - Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); } else { @@ -650,16 +657,18 @@ static void Mai_RenameMailDomain (Cns_ShrtOrFullName_t ShrtOrFullName) Mai_UpdateMailDomainNameDB (Mai->MaiCod,FieldName,NewMaiName); /* Write message to show the change made */ + Gbl.Alert.Type = Ale_SUCCESS; + Gbl.Alert.Section = Mai_EMAIL_SECTION_ID; sprintf (Gbl.Alert.Txt,Txt_The_email_domain_X_has_been_renamed_as_Y, CurrentMaiName,NewMaiName); - Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); } } else // The same name { + Gbl.Alert.Type = Ale_INFO; + Gbl.Alert.Section = Mai_EMAIL_SECTION_ID; sprintf (Gbl.Alert.Txt,Txt_The_email_domain_X_has_not_changed, CurrentMaiName); - Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt); } } @@ -713,7 +722,7 @@ static void Mai_PutFormToCreateMailDomain (void) Mai = &Gbl.Mails.EditingMai; /***** Start form *****/ - Act_FormStart (ActNewMai); + Act_StartForm (ActNewMai); /***** Start box and table *****/ Box_StartBoxTable (NULL,Txt_New_email_domain,NULL, @@ -755,7 +764,7 @@ static void Mai_PutFormToCreateMailDomain (void) Box_EndBoxTableWithButton (Btn_CREATE_BUTTON,Txt_Create_email_domain); /***** End form *****/ - Act_FormEnd (); + Act_EndForm (); } /*****************************************************************************/ @@ -1176,7 +1185,6 @@ void Mai_ShowFormOthEmail (void) { extern const char *Txt_Email; extern const char *Txt_User_not_found_or_you_do_not_have_permission_; - bool ItsMe; /***** Get user whose password must be changed *****/ if (Usr_GetParamOtherUsrCodEncryptedAndGetUsrData ()) @@ -1184,21 +1192,18 @@ void Mai_ShowFormOthEmail (void) if (Usr_ICanEditOtherUsr (&Gbl.Usrs.Other.UsrDat)) { /***** Start box *****/ - Box_StartBox (NULL,Txt_Email,NULL, - NULL,Box_NOT_CLOSABLE); + Box_StartBox (NULL,Txt_Email,NULL, + NULL,Box_NOT_CLOSABLE); /***** Show user's record *****/ Rec_ShowSharedUsrRecord (Rec_SHA_RECORD_LIST, - &Gbl.Usrs.Other.UsrDat,NULL); + &Gbl.Usrs.Other.UsrDat,NULL); /***** Form with the user's email *****/ - Tbl_StartTableCenter (2); - ItsMe = Usr_ItsMe (Gbl.Usrs.Other.UsrDat.UsrCod); - Mai_ShowFormChangeUsrEmail (&Gbl.Usrs.Other.UsrDat,ItsMe); - Tbl_EndTable (); + Mai_ShowFormChangeOtherUsrEmail (); - /***** End box *****/ - Box_EndBox (); + /***** End box *****/ + Box_EndBox (); } else Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_); @@ -1211,9 +1216,61 @@ void Mai_ShowFormOthEmail (void) /*********************** Show form to change my email ************************/ /*****************************************************************************/ -void Mai_ShowFormChangeUsrEmail (const struct UsrData *UsrDat,bool ItsMe) +void Mai_ShowFormChangeMyEmail (bool IMustFillEmail,bool IShouldConfirmEmail) + { + extern const char *Hlp_PROFILE_Account; + extern const char *Txt_Email; + char StrRecordWidth[10 + 1]; + + /***** Start section *****/ + Lay_StartSection (Mai_EMAIL_SECTION_ID); + + /***** Start box *****/ + sprintf (StrRecordWidth,"%upx",Rec_RECORD_WIDTH); + Box_StartBox (StrRecordWidth,Txt_Email,Acc_PutLinkToRemoveMyAccount, + Hlp_PROFILE_Account,Box_NOT_CLOSABLE); + + /***** Show form to change email *****/ + Mai_ShowFormChangeUsrEmail (&Gbl.Usrs.Me.UsrDat, + true, // ItsMe + IMustFillEmail,IShouldConfirmEmail); + + /***** End box *****/ + Box_EndBox (); + + /***** End section *****/ + Lay_EndSection (); + } + +/*****************************************************************************/ +/****************** Show form to change another user's email *****************/ +/*****************************************************************************/ + +void Mai_ShowFormChangeOtherUsrEmail (void) + { + /***** Start section *****/ + Lay_StartSection (Mai_EMAIL_SECTION_ID); + + /***** Show form to change email *****/ + Mai_ShowFormChangeUsrEmail (&Gbl.Usrs.Other.UsrDat, + false, // ItsMe + false, // IMustFillEmail + false); // IShouldConfirmEmail + + /***** End section *****/ + Lay_EndSection (); + } + +/*****************************************************************************/ +/********************** Show form to change user's email *********************/ +/*****************************************************************************/ + +static void Mai_ShowFormChangeUsrEmail (const struct UsrData *UsrDat,bool ItsMe, + bool IMustFillEmail,bool IShouldConfirmEmail) { extern const char *The_ClassForm[The_NUM_THEMES]; + extern const char *Txt_Please_fill_in_your_email_address; + extern const char *Txt_Please_check_and_confirm_your_email_address; extern const char *Txt_Current_email; extern const char *Txt_Other_emails; extern const char *Txt_Email_X_confirmed; @@ -1231,6 +1288,16 @@ void Mai_ShowFormChangeUsrEmail (const struct UsrData *UsrDat,bool ItsMe) bool Confirmed; Act_Action_t NextAction; + /***** Show possible alert *****/ + if (Gbl.Alert.Section == (const char *) Mai_EMAIL_SECTION_ID) + Ale_ShowAlert (Gbl.Alert.Type,Gbl.Alert.Txt); + + /***** Help message *****/ + if (IMustFillEmail) + Ale_ShowAlert (Ale_WARNING,Txt_Please_fill_in_your_email_address); + else if (IShouldConfirmEmail) + Ale_ShowAlert (Ale_WARNING,Txt_Please_check_and_confirm_your_email_address); + /***** Get my emails *****/ sprintf (Query,"SELECT E_mail,Confirmed FROM usr_emails" " WHERE UsrCod=%ld" @@ -1238,7 +1305,10 @@ void Mai_ShowFormChangeUsrEmail (const struct UsrData *UsrDat,bool ItsMe) UsrDat->UsrCod); NumEmails = (unsigned) DB_QuerySELECT (Query,&mysql_res,"can not get old email addresses of a user"); - /***** List my emails *****/ + /***** Start table *****/ + Tbl_StartTableWide (2); + + /***** List emails *****/ for (NumEmail = 1; NumEmail <= NumEmails; NumEmail++) @@ -1250,29 +1320,32 @@ void Mai_ShowFormChangeUsrEmail (const struct UsrData *UsrDat,bool ItsMe) if (NumEmail == 1) /* The first mail is the current one */ fprintf (Gbl.F.Out,"" - "" - ""); if (NumEmail == 2) - fprintf (Gbl.F.Out,"" - ""); } @@ -1352,15 +1421,15 @@ void Mai_ShowFormChangeUsrEmail (const struct UsrData *UsrDat,bool ItsMe) /***** Form to enter new email *****/ fprintf (Gbl.F.Out,"" - "" - "" ""); + + /***** End table *****/ + Tbl_EndTable (); } /*****************************************************************************/ @@ -1402,7 +1473,7 @@ void Mai_RemoveMyUsrEmail (void) Mai_RemoveEmail (&Gbl.Usrs.Me.UsrDat); /***** Show my account again *****/ - Acc_ShowFormChgMyAccountAndPwd (); + Acc_ShowFormChgMyAccount (); } /*****************************************************************************/ @@ -1419,9 +1490,8 @@ void Mai_RemoveOtherUsrEmail (void) /***** Remove user's email *****/ Mai_RemoveEmail (&Gbl.Usrs.Other.UsrDat); - /***** Show user's record *****/ - Rec_ShowSharedUsrRecord (Rec_SHA_RECORD_LIST, - &Gbl.Usrs.Other.UsrDat,NULL); + /***** Show form again *****/ + Mai_ShowFormOthEmail (); } else // User not found Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_); @@ -1446,14 +1516,19 @@ static void Mai_RemoveEmail (struct UsrData *UsrDat) Mai_RemoveEmailFromDB (UsrDat->UsrCod,Email); /***** Show message *****/ + Gbl.Alert.Type = Ale_SUCCESS; + Gbl.Alert.Section = Mai_EMAIL_SECTION_ID; sprintf (Gbl.Alert.Txt,Txt_Email_X_removed,Email); - Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); /***** Update list of emails *****/ Mai_GetEmailFromUsrCod (UsrDat); } else + { + Gbl.Alert.Type = Ale_WARNING; + Gbl.Alert.Section = Mai_EMAIL_SECTION_ID; Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_); + } } /*****************************************************************************/ @@ -1482,7 +1557,7 @@ void May_NewMyUsrEmail (void) true); // It's me /***** Show my account again *****/ - Acc_ShowFormChgMyAccountAndPwd (); + Acc_ShowFormChgMyAccount (); } /*****************************************************************************/ @@ -1501,9 +1576,8 @@ void Mai_NewOtherUsrEmail (void) ItsMe = Usr_ItsMe (Gbl.Usrs.Other.UsrDat.UsrCod); Mai_NewUsrEmail (&Gbl.Usrs.Other.UsrDat,ItsMe); - /***** Show user's record *****/ - Rec_ShowSharedUsrRecord (Rec_SHA_RECORD_LIST, - &Gbl.Usrs.Other.UsrDat,NULL); + /***** Show form again *****/ + Mai_ShowFormOthEmail (); } else // User not found Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_); @@ -1533,18 +1607,20 @@ static void Mai_NewUsrEmail (struct UsrData *UsrDat,bool ItsMe) if (UsrDat->EmailConfirmed && !strcmp (UsrDat->Email,NewEmail)) // User's current confirmed email match exactly the new email { + Gbl.Alert.Type = Ale_WARNING; + Gbl.Alert.Section = Mai_EMAIL_SECTION_ID; sprintf (Gbl.Alert.Txt,Txt_The_email_address_X_matches_one_previously_registered, NewEmail); - Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); } else { if (Mai_UpdateEmailInDB (UsrDat,NewEmail)) { /***** Email updated sucessfully *****/ + Gbl.Alert.Type = Ale_SUCCESS; + Gbl.Alert.Section = Mai_EMAIL_SECTION_ID; sprintf (Gbl.Alert.Txt,Txt_The_email_address_X_has_been_registered_successfully, NewEmail); - Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); /***** Update list of emails *****/ Mai_GetEmailFromUsrCod (UsrDat); @@ -1556,21 +1632,28 @@ static void Mai_NewUsrEmail (struct UsrData *UsrDat,bool ItsMe) } else { + Gbl.Alert.Type = Ale_WARNING; + Gbl.Alert.Section = Mai_EMAIL_SECTION_ID; sprintf (Gbl.Alert.Txt,Txt_The_email_address_X_had_been_registered_by_another_user, NewEmail); - Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); } } } else // New email is not valid { + Gbl.Alert.Type = Ale_WARNING; + Gbl.Alert.Section = Mai_EMAIL_SECTION_ID; sprintf (Gbl.Alert.Txt,Txt_The_email_address_entered_X_is_not_valid, NewEmail); - Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); } } else - Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_); + { + Gbl.Alert.Type = Ale_WARNING; + Gbl.Alert.Section = Mai_EMAIL_SECTION_ID; + sprintf (Gbl.Alert.Txt,"%s", + Txt_User_not_found_or_you_do_not_have_permission_); + } } /*****************************************************************************/ @@ -1644,6 +1727,7 @@ bool Mai_SendMailMsgToConfirmEmail (void) { extern const char *Txt_If_you_just_request_from_X_the_confirmation_of_your_email_Y_NO_HTML; extern const char *Txt_Confirmation_of_your_email_NO_HTML; + extern const char *Txt_A_message_has_been_sent_to_email_address_X_to_confirm_that_address; extern const char *Txt_There_was_a_problem_sending_an_email_automatically; char Command[2048 + Cfg_MAX_BYTES_SMTP_PASSWORD + @@ -1696,32 +1780,27 @@ bool Mai_SendMailMsgToConfirmEmail (void) { case 0: // Message sent successfully Gbl.Usrs.Me.ConfirmEmailJustSent = true; + Gbl.Alert.Type = Ale_SUCCESS; + Gbl.Alert.Section = Mai_EMAIL_SECTION_ID; + sprintf (Gbl.Alert.Txt,Txt_A_message_has_been_sent_to_email_address_X_to_confirm_that_address, + Gbl.Usrs.Me.UsrDat.Email); return true; case 1: - Ale_ShowAlert (Ale_WARNING,Txt_There_was_a_problem_sending_an_email_automatically); + Gbl.Alert.Type = Ale_ERROR; + Gbl.Alert.Section = Mai_EMAIL_SECTION_ID; + sprintf (Gbl.Alert.Txt,"%s", + Txt_There_was_a_problem_sending_an_email_automatically); return false; default: + Gbl.Alert.Type = Ale_ERROR; + Gbl.Alert.Section = Mai_EMAIL_SECTION_ID; sprintf (Gbl.Alert.Txt,"Internal error: an email message has not been sent successfully." - " Error code returned by the script: %d", + " Error code returned by the script: %d", ReturnCode); - Ale_ShowAlert (Ale_ERROR,Gbl.Alert.Txt); return false; } } -/*****************************************************************************/ -/******* Show alert to report that confirmation email has been sent **********/ -/*****************************************************************************/ - -void Mai_ShowMsgConfirmEmailHasBeenSent (void) - { - extern const char *Txt_A_message_has_been_sent_to_email_address_X_to_confirm_that_address; - - sprintf (Gbl.Alert.Txt,Txt_A_message_has_been_sent_to_email_address_X_to_confirm_that_address, - Gbl.Usrs.Me.UsrDat.Email); - Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt); - } - /*****************************************************************************/ /************************* Insert mail hey in database ***********************/ /*****************************************************************************/ diff --git a/swad_mail.h b/swad_mail.h index 6577f6f3..a434009d 100644 --- a/swad_mail.h +++ b/swad_mail.h @@ -79,7 +79,9 @@ long Mai_GetUsrCodFromEmail (const char Email[Cns_MAX_BYTES_EMAIL_ADDRESS + 1]); void Mai_PutLinkToChangeOtherUsrEmails (void); void Mai_ShowFormOthEmail (void); -void Mai_ShowFormChangeUsrEmail (const struct UsrData *UsrDat,bool ItsMe); +void Mai_ShowFormChangeMyEmail (bool IMustFillEmail,bool IShouldConfirmEmail); +void Mai_ShowFormChangeOtherUsrEmail (void); + void Mai_RemoveMyUsrEmail (void); void Mai_RemoveOtherUsrEmail (void); void May_NewMyUsrEmail (void); @@ -88,7 +90,6 @@ bool Mai_UpdateEmailInDB (const struct UsrData *UsrDat,const char NewEmail[Cns_M void Mai_PutButtonToCheckEmailAddress (void); bool Mai_SendMailMsgToConfirmEmail (void); -void Mai_ShowMsgConfirmEmailHasBeenSent (void); void Mai_ConfirmEmail (void); void Mai_CreateFileNameMail (void); diff --git a/swad_mark.c b/swad_mark.c index 549a475b..73cafd8e 100644 --- a/swad_mark.c +++ b/swad_mark.c @@ -129,11 +129,11 @@ void Mrk_GetAndWriteNumRowsHeaderAndFooter (Brw_FileType_t FileType, Gbl.RowEvenOdd); if (Gbl.CurrentCrs.Grps.GrpCod > 0) // Group zone { - Act_FormStart (ActChgNumRowHeaGrp); + Act_StartForm (ActChgNumRowHeaGrp); Grp_PutParamGrpCod (Gbl.CurrentCrs.Grps.GrpCod); } else // Course zone - Act_FormStart (ActChgNumRowHeaCrs); + Act_StartForm (ActChgNumRowHeaCrs); fprintf (Gbl.F.Out,"" "" ""); } @@ -3584,7 +3584,7 @@ static void Msg_PutFormToBanSender (struct UsrData *UsrDat) { extern const char *Txt_Sender_permitted_click_to_ban_him; - Act_FormStart (ActBanUsrMsg); + Act_StartForm (ActBanUsrMsg); Pag_PutHiddenParamPagNum (Msg_WhatPaginate[Gbl.Msg.TypeOfMessages], Gbl.Msg.CurrentPage); Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod); @@ -3595,7 +3595,7 @@ static void Msg_PutFormToBanSender (struct UsrData *UsrDat) Gbl.Prefs.IconsURL, Txt_Sender_permitted_click_to_ban_him, Txt_Sender_permitted_click_to_ban_him); - Act_FormEnd (); + Act_EndForm (); } /*****************************************************************************/ @@ -3606,7 +3606,7 @@ static void Msg_PutFormToUnbanSender (struct UsrData *UsrDat) { extern const char *Txt_Sender_banned_click_to_unban_him; - Act_FormStart (ActUnbUsrMsg); + Act_StartForm (ActUnbUsrMsg); Pag_PutHiddenParamPagNum (Msg_WhatPaginate[Gbl.Msg.TypeOfMessages], Gbl.Msg.CurrentPage); Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod); @@ -3617,7 +3617,7 @@ static void Msg_PutFormToUnbanSender (struct UsrData *UsrDat) Gbl.Prefs.IconsURL, Txt_Sender_banned_click_to_unban_him, Txt_Sender_banned_click_to_unban_him); - Act_FormEnd (); + Act_EndForm (); } /*****************************************************************************/ @@ -3790,7 +3790,7 @@ void Msg_ListBannedUsrs (void) /* Put form to unban user */ fprintf (Gbl.F.Out,"" ""); } diff --git a/swad_nickname.c b/swad_nickname.c index 7e2fe0df..29b281ad 100644 --- a/swad_nickname.c +++ b/swad_nickname.c @@ -28,10 +28,12 @@ #include // For string functions #include "swad_account.h" +#include "swad_box.h" #include "swad_database.h" #include "swad_global.h" #include "swad_parameter.h" #include "swad_QR.h" +#include "swad_table.h" #include "swad_user.h" /*****************************************************************************/ @@ -44,6 +46,8 @@ extern struct Globals Gbl; /***************************** Private constants *****************************/ /*****************************************************************************/ +#define Nck_NICKNAME_SECTION_ID "nickname_section" + /*****************************************************************************/ /******************************* Private types *******************************/ /*****************************************************************************/ @@ -56,6 +60,8 @@ extern struct Globals Gbl; /***************************** Private prototypes ****************************/ /*****************************************************************************/ +static void Nck_ShowFormChangeUsrNickname (bool IMustFillNickname); + static void Nck_RemoveNicknameFromDB (const char *Nickname); /*****************************************************************************/ @@ -182,23 +188,49 @@ long Nck_GetUsrCodFromNickname (const char *Nickname) /*********************** Show form to change my nickname *********************/ /*****************************************************************************/ -void Nck_ShowFormChangeUsrNickname (void) +void Nck_ShowFormChangeMyNickname (bool IMustFillNickname) { + Nck_ShowFormChangeUsrNickname (IMustFillNickname); + } + +/*****************************************************************************/ +/*********************** Show form to change my nickname *********************/ +/*****************************************************************************/ + +// Not yet used + +void Nck_ShowFormChangeOtherUsrNickname (void) + { + Nck_ShowFormChangeUsrNickname (false); // IMustFillNickname + } + +/*****************************************************************************/ +/*********************** Show form to change my nickname *********************/ +/*****************************************************************************/ + +static void Nck_ShowFormChangeUsrNickname (bool IMustFillNickname) + { + extern const char *Hlp_PROFILE_Account; extern const char *The_ClassForm[The_NUM_THEMES]; + extern const char *Txt_Nickname; + extern const char *Txt_Before_going_to_any_other_option_you_must_fill_your_nickname; extern const char *Txt_Current_nickname; extern const char *Txt_Other_nicknames; extern const char *Txt_QR_code; extern const char *Txt_Use_this_nickname; extern const char *Txt_New_nickname; - extern const char *Txt_Nickname; extern const char *Txt_Change_nickname; extern const char *Txt_Save; char Query[256]; MYSQL_RES *mysql_res; MYSQL_ROW row; + char StrRecordWidth[10 + 1]; unsigned NumNicks; unsigned NumNick; + /***** Start section *****/ + Lay_StartSection (Nck_NICKNAME_SECTION_ID); + /***** Get my nicknames *****/ sprintf (Query,"SELECT Nickname FROM usr_nicknames" " WHERE UsrCod=%ld" @@ -206,6 +238,23 @@ void Nck_ShowFormChangeUsrNickname (void) Gbl.Usrs.Me.UsrDat.UsrCod); NumNicks = (unsigned) DB_QuerySELECT (Query,&mysql_res,"can not get nicknames of a user"); + /***** Start box *****/ + sprintf (StrRecordWidth,"%upx",Rec_RECORD_WIDTH); + Box_StartBox (StrRecordWidth,Txt_Nickname,Acc_PutLinkToRemoveMyAccount, + Hlp_PROFILE_Account,Box_NOT_CLOSABLE); + + /***** Show possible alert *****/ + if (Gbl.Alert.Section == (const char *) Nck_NICKNAME_SECTION_ID) + Ale_ShowAlert (Gbl.Alert.Type,Gbl.Alert.Txt); + + /***** Help message *****/ + if (IMustFillNickname) + Ale_ShowAlert (Ale_WARNING, + Txt_Before_going_to_any_other_option_you_must_fill_your_nickname); + + /***** Start table *****/ + Tbl_StartTableWide (2); + /***** List my nicknames *****/ for (NumNick = 1; NumNick <= NumNicks; @@ -217,39 +266,40 @@ void Nck_ShowFormChangeUsrNickname (void) if (NumNick == 1) /* The first nickname is the current one */ fprintf (Gbl.F.Out,"" - "" - ""); if (NumNick == 2) - fprintf (Gbl.F.Out,"", NumNicks - 1, The_ClassForm[Gbl.Prefs.Theme], Txt_Other_nicknames); - fprintf (Gbl.F.Out,"" - "" @@ -277,25 +327,32 @@ void Nck_ShowFormChangeUsrNickname (void) /***** Form to enter new nickname *****/ fprintf (Gbl.F.Out,"" - "" - "" ""); + + /***** End table and box *****/ + Box_EndBoxTable (); + + /***** End section *****/ + Lay_EndSection (); } /*****************************************************************************/ @@ -317,14 +374,19 @@ void Nck_RemoveNick (void) Nck_RemoveNicknameFromDB (NicknameWithoutArroba); /***** Show message *****/ + Gbl.Alert.Type = Ale_SUCCESS; + Gbl.Alert.Section = Nck_NICKNAME_SECTION_ID; sprintf (Gbl.Alert.Txt,Txt_Nickname_X_removed,NicknameWithoutArroba); - Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); } else - Ale_ShowAlert (Ale_WARNING,Txt_You_can_not_delete_your_current_nickname); + { + Gbl.Alert.Type = Ale_WARNING; + Gbl.Alert.Section = Nck_NICKNAME_SECTION_ID; + sprintf (Gbl.Alert.Txt,"%s",Txt_You_can_not_delete_your_current_nickname); + } /***** Show my account again *****/ - Acc_ShowFormChgMyAccountAndPwd (); + Acc_ShowFormChgMyAccount (); } /*****************************************************************************/ @@ -355,7 +417,6 @@ void Nck_UpdateNick (void) char Query[1024]; char NewNicknameWithArroba[Nck_MAX_BYTES_NICKNAME_FROM_FORM + 1]; char NewNicknameWithoutArroba[Nck_MAX_BYTES_NICKNAME_FROM_FORM + 1]; - bool Error = false; /***** Get new nickname from form *****/ Par_GetParToText ("NewNick",NewNicknameWithArroba,Nck_MAX_BYTES_NICKNAME_FROM_FORM); @@ -369,7 +430,8 @@ void Nck_UpdateNick (void) /***** Check if new nickname exists in database *****/ if (!strcmp (Gbl.Usrs.Me.UsrDat.Nickname,NewNicknameWithoutArroba)) // My nickname match exactly the new nickname { - Error = true; + Gbl.Alert.Type = Ale_WARNING; + Gbl.Alert.Section = Nck_NICKNAME_SECTION_ID; sprintf (Gbl.Alert.Txt,Txt_The_nickname_X_matches_the_one_you_had_previously_registered, NewNicknameWithoutArroba); } @@ -387,39 +449,38 @@ void Nck_UpdateNick (void) NewNicknameWithoutArroba,Gbl.Usrs.Me.UsrDat.UsrCod); if (DB_QueryCOUNT (Query,"can not check if nickname already existed")) // A nickname of another user is the same that my nickname { - Error = true; + Gbl.Alert.Type = Ale_WARNING; + Gbl.Alert.Section = Nck_NICKNAME_SECTION_ID; sprintf (Gbl.Alert.Txt,Txt_The_nickname_X_had_been_registered_by_another_user, NewNicknameWithoutArroba); } } } - if (!Error) + if (Gbl.Alert.Type == Ale_NONE) { // Now we know the new nickname is not already in database and is diffent to the current one Nck_UpdateMyNick (NewNicknameWithoutArroba); Str_Copy (Gbl.Usrs.Me.UsrDat.Nickname,NewNicknameWithoutArroba, Nck_MAX_BYTES_NICKNAME_WITHOUT_ARROBA); + Gbl.Alert.Type = Ale_SUCCESS; + Gbl.Alert.Section = Nck_NICKNAME_SECTION_ID; sprintf (Gbl.Alert.Txt,Txt_Your_nickname_X_has_been_registered_successfully, NewNicknameWithoutArroba); } } else // New nickname is not valid { - Error = true; + Gbl.Alert.Type = Ale_WARNING; + Gbl.Alert.Section = Nck_NICKNAME_SECTION_ID; sprintf (Gbl.Alert.Txt,Txt_The_nickname_entered_X_is_not_valid_, NewNicknameWithArroba, Nck_MIN_CHARS_NICKNAME_WITHOUT_ARROBA, Nck_MAX_CHARS_NICKNAME_WITHOUT_ARROBA); } - /***** Show message *****/ - Ale_ShowAlert (Error ? Ale_WARNING : - Ale_SUCCESS, - Gbl.Alert.Txt); - /***** Show my account again *****/ - Acc_ShowFormChgMyAccountAndPwd (); + Acc_ShowFormChgMyAccount (); } /*****************************************************************************/ diff --git a/swad_nickname.h b/swad_nickname.h index 49f91abb..b9dd2d04 100644 --- a/swad_nickname.h +++ b/swad_nickname.h @@ -51,7 +51,9 @@ bool Nck_CheckIfNickWithArrobaIsValid (const char *NicknameWithArroba); bool Nck_GetNicknameFromUsrCod (long UsrCod, char Nickname[Nck_MAX_BYTES_NICKNAME_WITHOUT_ARROBA + 1]); long Nck_GetUsrCodFromNickname (const char *Nickname); -void Nck_ShowFormChangeUsrNickname (void); + +void Nck_ShowFormChangeMyNickname (bool IMustFillNickname); +void Nck_ShowFormChangeOtherUsrNickname (void); void Nck_RemoveNick (void); void Nck_UpdateNick (void); diff --git a/swad_notice.c b/swad_notice.c index 0e921a99..d6109c70 100644 --- a/swad_notice.c +++ b/swad_notice.c @@ -100,7 +100,7 @@ void Not_ShowFormNotice (void) Ale_ShowAlert (Ale_INFO,Gbl.Alert.Txt); /***** Start form *****/ - Act_FormStart (ActRcvNot); + Act_StartForm (ActRcvNot); /***** Start box *****/ Box_StartBox (NULL,Txt_New_notice,NULL, @@ -115,7 +115,7 @@ void Not_ShowFormNotice (void) Box_EndBoxWithButton (Btn_CREATE_BUTTON,Txt_Create_notice); /***** End form *****/ - Act_FormEnd (); + Act_EndForm (); /***** Show all notices *****/ Not_ShowNotices (Not_LIST_FULL_NOTICES); @@ -525,9 +525,9 @@ static void Not_PutButtonToAddNewNotice (void) { extern const char *Txt_New_notice; - Act_FormStart (ActWriNot); + Act_StartForm (ActWriNot); Btn_PutConfirmButton (Txt_New_notice); - Act_FormEnd (); + Act_EndForm (); } /*****************************************************************************/ @@ -655,7 +655,7 @@ static void Not_DrawANotice (Not_Listing_t TypeNoticesListing, NULL); break; } - Act_FormEnd (); + Act_EndForm (); } else // Don't put forms /* Status of the notice */ @@ -693,7 +693,7 @@ static void Not_DrawANotice (Not_Listing_t TypeNoticesListing, if (TypeNoticesListing == Not_LIST_BRIEF_NOTICES) { /* Form to view full notice */ - Act_FormStart (ActSeeOneNot); + Act_StartForm (ActSeeOneNot); Not_PutHiddenParamNotCod (NotCod); Act_LinkFormSubmit (Txt_See_full_notice,DateClass[Status],NULL); } @@ -702,7 +702,7 @@ static void Not_DrawANotice (Not_Listing_t TypeNoticesListing, if (TypeNoticesListing == Not_LIST_BRIEF_NOTICES) { fprintf (Gbl.F.Out,""); - Act_FormEnd (); + Act_EndForm (); } fprintf (Gbl.F.Out,"
    "); if (ICanModerateForum) { - Act_FormStartAnchor (Enabled ? For_ActionsDisPstFor[Gbl.Forum.ForumSelected.Type] : + Act_StartFormAnchor (Enabled ? For_ActionsDisPstFor[Gbl.Forum.ForumSelected.Type] : For_ActionsEnbPstFor[Gbl.Forum.ForumSelected.Type], For_FORUM_POSTS_SECTION_ID); For_PutAllHiddenParamsForum (Gbl.Forum.CurrentPageThrs, // Page of threads = current @@ -1278,7 +1278,7 @@ static void For_ShowAForumPost (unsigned PstNum,long PstCod, "eye-slash", Gbl.Title, Gbl.Title); - Act_FormEnd (); + Act_EndForm (); } else { @@ -1306,10 +1306,10 @@ static void For_ShowAForumPost (unsigned PstNum,long PstCod, { // Post can be removed if post is the last (without answers) and it's mine if (PstNum == 1) // First and unique post in thread - Act_FormStartAnchor (For_ActionsDelPstFor[Gbl.Forum.ForumSelected.Type], + Act_StartFormAnchor (For_ActionsDelPstFor[Gbl.Forum.ForumSelected.Type], For_FORUM_THREADS_SECTION_ID); else // Last of several posts in thread - Act_FormStartAnchor (For_ActionsDelPstFor[Gbl.Forum.ForumSelected.Type], + Act_StartFormAnchor (For_ActionsDelPstFor[Gbl.Forum.ForumSelected.Type], For_FORUM_POSTS_SECTION_ID); For_PutAllHiddenParamsForum (Gbl.Forum.CurrentPageThrs, // Page of threads = current Gbl.Forum.CurrentPagePsts, // Page of posts = current @@ -1319,7 +1319,7 @@ static void For_ShowAForumPost (unsigned PstNum,long PstCod, Gbl.Forum.ForumSelected.ThrCod, PstCod); Ico_PutIconRemove (); - Act_FormEnd (); + Act_EndForm (); } } fprintf (Gbl.F.Out,""); - Act_FormStartAnchor (For_ActionsSeeFor[Gbl.Forum.ForumSelected.Type], + Act_StartFormAnchor (For_ActionsSeeFor[Gbl.Forum.ForumSelected.Type], For_FORUM_THREADS_SECTION_ID); For_PutAllHiddenParamsForum (Gbl.Forum.CurrentPageThrs, // Page of threads = current 1, // Page of posts = first @@ -2616,7 +2616,7 @@ static void For_ShowForumThreadsHighlightingOneThread (long ThrCodHighlighted, if (Order == Gbl.Forum.ThreadsOrder) fprintf (Gbl.F.Out,""); fprintf (Gbl.F.Out,""); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,"" @@ -3365,7 +3365,7 @@ static void For_ListForumThrs (long ThrCods[Pag_ITEMS_PER_PAGE], (1 << Gbl.Usrs.Me.Role.Logged)) // If I have permission to remove thread in this forum... { fprintf (Gbl.F.Out,"
    "); - Act_FormStartAnchor (For_ActionsReqDelThr[Gbl.Forum.ForumSelected.Type], + Act_StartFormAnchor (For_ActionsReqDelThr[Gbl.Forum.ForumSelected.Type], For_REMOVE_THREAD_SECTION_ID); For_PutAllHiddenParamsForum (Gbl.Forum.CurrentPageThrs, // Page of threads = current 1, // Page of posts = first @@ -3375,14 +3375,14 @@ static void For_ListForumThrs (long ThrCods[Pag_ITEMS_PER_PAGE], Thr.ThrCod, -1L); Ico_PutIconRemove (); - Act_FormEnd (); + Act_EndForm (); } /***** Put button to cut the thread for moving it to another forum *****/ if (ICanMoveThreads) { fprintf (Gbl.F.Out,"
    "); - Act_FormStartAnchor (For_ActionsCutThrFor[Gbl.Forum.ForumSelected.Type], + Act_StartFormAnchor (For_ActionsCutThrFor[Gbl.Forum.ForumSelected.Type], For_FORUM_THREADS_SECTION_ID); For_PutAllHiddenParamsForum (Gbl.Forum.CurrentPageThrs, // Page of threads = current 1, // Page of posts = first @@ -3397,7 +3397,7 @@ static void For_ListForumThrs (long ThrCods[Pag_ITEMS_PER_PAGE], Gbl.Prefs.IconsURL, Txt_Move_thread, Txt_Move_thread); - Act_FormEnd (); + Act_EndForm (); } fprintf (Gbl.F.Out,""); @@ -3870,13 +3870,13 @@ static void For_WriteFormForumPst (bool IsReply,const char *Subject) /***** Start form *****/ if (IsReply) // Form to write a reply to a post of an existing thread { - Act_FormStartAnchor (For_ActionsRecRepFor[Gbl.Forum.ForumSelected.Type], + Act_StartFormAnchor (For_ActionsRecRepFor[Gbl.Forum.ForumSelected.Type], For_FORUM_POSTS_SECTION_ID); For_PutAllHiddenParamsNewPost (); } else // Form to write the first post of a new thread { - Act_FormStartAnchor (For_ActionsRecThrFor[Gbl.Forum.ForumSelected.Type], + Act_StartFormAnchor (For_ActionsRecThrFor[Gbl.Forum.ForumSelected.Type], For_FORUM_POSTS_SECTION_ID); For_PutAllHiddenParamsNewThread (); } @@ -3928,7 +3928,7 @@ static void For_WriteFormForumPst (bool IsReply,const char *Subject) Btn_PutCreateButton (Txt_Send); /***** End form *****/ - Act_FormEnd (); + Act_EndForm (); /***** End box *****/ Box_EndBox (); diff --git a/swad_game.c b/swad_game.c index c9e15a20..8e493069 100644 --- a/swad_game.c +++ b/swad_game.c @@ -236,7 +236,7 @@ static void Gam_ListAllGames (void) fprintf (Gbl.F.Out,"
    "); /* Form to change order */ - Act_FormStart (ActSeeAllGam); + Act_StartForm (ActSeeAllGam); Grp_PutParamWhichGrps (); Pag_PutHiddenParamPagNum (Pag_GAMES,Gbl.Games.CurrentPage); Par_PutHiddenParamUnsigned ("Order",(unsigned) Order); @@ -247,7 +247,7 @@ static void Gam_ListAllGames (void) if (Order == Gbl.Games.SelectedOrder) fprintf (Gbl.F.Out,""); fprintf (Gbl.F.Out,""); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,"",Gbl.RowEvenOdd); /* Put icon to remove the question */ - Act_FormStart (ActReqRemGamQst); + Act_StartForm (ActReqRemGamQst); Gam_PutParamGameCod (Game->GamCod); Gam_PutParamQstCod (QstCod); Ico_PutIconRemove (); - Act_FormEnd (); + Act_EndForm (); /* Put icon to move up the question */ if (NumQst) @@ -3020,10 +3020,10 @@ static void Gam_PutButtonToAddNewQuestions (void) { extern const char *Txt_Add_questions; - Act_FormStart (ActAddOneGamQst); + Act_StartForm (ActAddOneGamQst); Gam_PutParams (); Btn_PutConfirmButton (Txt_Add_questions); - Act_FormEnd (); + Act_EndForm (); } /*****************************************************************************/ @@ -3520,7 +3520,7 @@ static void Gam_PutBigButtonToStartGame (long GamCod) extern const char *Txt_Play; /***** Start form *****/ - Act_FormStart (ActPlyGam1stQst); + Act_StartForm (ActPlyGam1stQst); Gam_PutParamGameCod (GamCod); Gam_PutParamQstInd (0); // Start by first question in game @@ -3532,7 +3532,7 @@ static void Gam_PutBigButtonToStartGame (long GamCod) fprintf (Gbl.F.Out,""); /***** End form *****/ - Act_FormEnd (); + Act_EndForm (); } /*****************************************************************************/ @@ -3668,7 +3668,7 @@ static void Gam_PutBigButtonToContinue (Act_Action_t NextAction, fprintf (Gbl.F.Out,"
    "); /***** Start form *****/ - Act_FormStart (NextAction); + Act_StartForm (NextAction); Gam_PutParamGameCod (GamCod); Gam_PutParamQstInd (QstInd); @@ -3683,7 +3683,7 @@ static void Gam_PutBigButtonToContinue (Act_Action_t NextAction, fprintf (Gbl.F.Out,""); /***** End form *****/ - Act_FormEnd (); + Act_EndForm (); /***** End container *****/ fprintf (Gbl.F.Out,"
    "); diff --git a/swad_global.c b/swad_global.c index e7c960b2..ebe002eb 100644 --- a/swad_global.c +++ b/swad_global.c @@ -123,6 +123,7 @@ void Gbl_InitializeGlobals (void) Gbl.Form.Inside = false; // Set to true inside a form to avoid nested forms Gbl.Alert.Type = Ale_NONE; // Used to show alert in a posteriori function + Gbl.Alert.Section = NULL; // Where to display the alert Gbl.DB.DatabaseIsOpen = false; Gbl.DB.LockedTables = false; diff --git a/swad_global.h b/swad_global.h index 6bc73031..66a5d7aa 100644 --- a/swad_global.h +++ b/swad_global.h @@ -107,6 +107,7 @@ struct Globals { Ale_AlertType_t Type; char Txt[Ale_MAX_BYTES_ALERT + 1]; + const char *Section; // Where to display the alert } Alert; // Used in a posteriori function to write success / warning message struct { diff --git a/swad_group.c b/swad_group.c index b96cc8aa..366b6e30 100644 --- a/swad_group.c +++ b/swad_group.c @@ -373,7 +373,7 @@ void Grp_ShowFormToSelectSeveralGroups (Act_Action_t NextAction, /***** Start form to update the students listed depending on the groups selected *****/ - Act_FormStartAnchor (NextAction,Usr_USER_LIST_SECTION_ID); + Act_StartFormAnchor (NextAction,Usr_USER_LIST_SECTION_ID); Usr_PutParamsPrefsAboutUsrList (); /***** Put parameters needed depending on the action *****/ @@ -409,7 +409,7 @@ void Grp_ShowFormToSelectSeveralGroups (Act_Action_t NextAction, fprintf (Gbl.F.Out,""); /***** End form *****/ - Act_FormEnd (); + Act_EndForm (); /***** End box *****/ Box_EndBox (); @@ -1286,15 +1286,15 @@ static void Grp_ListGroupTypesForEdition (void) /* Put icon to remove group type */ fprintf (Gbl.F.Out,"
    "); - Act_FormStartAnchor (ActReqRemGrpTyp,Grp_GROUP_TYPES_SECTION_ID); + Act_StartFormAnchor (ActReqRemGrpTyp,Grp_GROUP_TYPES_SECTION_ID); Grp_PutParamGrpTypCod (Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypCod); Ico_PutIconRemove (); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,""); - Act_FormStartAnchor (ActRenGrpTyp,Grp_GROUP_TYPES_SECTION_ID); + Act_StartFormAnchor (ActRenGrpTyp,Grp_GROUP_TYPES_SECTION_ID); Grp_PutParamGrpTypCod (Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypCod); fprintf (Gbl.F.Out,""); /* Is it mandatory to register in any group? */ fprintf (Gbl.F.Out,""); - Act_FormStartAnchor (ActChgMdtGrpTyp,Grp_GROUP_TYPES_SECTION_ID); + Act_StartFormAnchor (ActChgMdtGrpTyp,Grp_GROUP_TYPES_SECTION_ID); Grp_PutParamGrpTypCod (Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypCod); fprintf (Gbl.F.Out,"", Txt_It_is_mandatory_to_choose_a_group); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,""); - Act_FormStartAnchor (ActChgMulGrpTyp,Grp_GROUP_TYPES_SECTION_ID); + Act_StartFormAnchor (ActChgMulGrpTyp,Grp_GROUP_TYPES_SECTION_ID); Grp_PutParamGrpTypCod (Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypCod); fprintf (Gbl.F.Out,"", Txt_A_student_can_belong_to_several_groups); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,""); - Act_FormStartAnchor (ActChgTimGrpTyp,Grp_GROUP_TYPES_SECTION_ID); + Act_StartFormAnchor (ActChgTimGrpTyp,Grp_GROUP_TYPES_SECTION_ID); Grp_PutParamGrpTypCod (Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypCod); Tbl_StartTableCenter (2); fprintf (Gbl.F.Out,"
    "); - Act_FormStartAnchor (ActReqRemGrp,Grp_GROUPS_SECTION_ID); + Act_StartFormAnchor (ActReqRemGrp,Grp_GROUPS_SECTION_ID); Grp_PutParamGrpCod (Grp->GrpCod); Ico_PutIconRemove (); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,""); - Act_FormStartAnchor (Grp->Open ? ActCloGrp : + Act_StartFormAnchor (Grp->Open ? ActCloGrp : ActOpeGrp, Grp_GROUPS_SECTION_ID); Grp_PutParamGrpCod (Grp->GrpCod); @@ -1523,12 +1523,12 @@ static void Grp_ListGroupsForEdition (void) "lock", Gbl.Title, Gbl.Title); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,""); - Act_FormStartAnchor (Grp->FileZones ? ActDisFilZonGrp : + Act_StartFormAnchor (Grp->FileZones ? ActDisFilZonGrp : ActEnaFilZonGrp, Grp_GROUPS_SECTION_ID); Grp_PutParamGrpCod (Grp->GrpCod); @@ -1544,12 +1544,12 @@ static void Grp_ListGroupsForEdition (void) "folder-no", Gbl.Title, Gbl.Title); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,""); - Act_FormStartAnchor (ActChgGrpTyp,Grp_GROUPS_SECTION_ID); + Act_StartFormAnchor (ActChgGrpTyp,Grp_GROUPS_SECTION_ID); Grp_PutParamGrpCod (Grp->GrpCod); fprintf (Gbl.F.Out,""); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,""); - Act_FormStartAnchor (ActRenGrp,Grp_GROUPS_SECTION_ID); + Act_StartFormAnchor (ActRenGrp,Grp_GROUPS_SECTION_ID); Grp_PutParamGrpCod (Grp->GrpCod); fprintf (Gbl.F.Out,"", Grp_MAX_CHARS_GROUP_NAME,Grp->GrpName,Gbl.Form.Id); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,""); - Act_FormStartAnchor (ActChgMaxStdGrp,Grp_GROUPS_SECTION_ID); + Act_StartFormAnchor (ActChgMaxStdGrp,Grp_GROUPS_SECTION_ID); Grp_PutParamGrpCod (Grp->GrpCod); fprintf (Gbl.F.Out,"MaxStudents); fprintf (Gbl.F.Out,"\" onchange=\"document.getElementById('%s').submit();\" />", Gbl.Form.Id); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,"
    "); - Act_FormStart (Action); + Act_StartForm (Action); Btn_PutButtonInline (Button,TxtButton); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,"
    "); - Act_FormStart (ActSeeHld); + Act_StartForm (ActSeeHld); Par_PutHiddenParamUnsigned ("Order",(unsigned) Order); Act_LinkFormSubmit (Txt_HOLIDAYS_HELP_ORDER[Order],"TIT_TBL",NULL); if (Order == Gbl.Hlds.SelectedOrder) @@ -123,7 +123,7 @@ void Hld_SeeHolidays (void) if (Order == Gbl.Hlds.SelectedOrder) fprintf (Gbl.F.Out,""); fprintf (Gbl.F.Out,""); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,"" @@ -179,9 +179,9 @@ void Hld_SeeHolidays (void) /***** Button to create centre *****/ if (Gbl.Usrs.Me.Role.Logged >= Rol_INS_ADM) // Institution admin or system admin { - Act_FormStart (ActEdiHld); + Act_StartForm (ActEdiHld); Btn_PutConfirmButton (Txt_New_holiday); - Act_FormEnd (); + Act_EndForm (); } /***** End table and box *****/ @@ -518,10 +518,10 @@ static void Hld_ListHolidaysForEdition (void) /* Put icon to remove holiday */ fprintf (Gbl.F.Out,"
    "); - Act_FormStart (ActRemHld); + Act_StartForm (ActRemHld); Hld_PutParamHldCod (Hld->HldCod); Ico_PutIconRemove (); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,""); - Act_FormStart (ActChgHldPlc); + Act_StartForm (ActChgHldPlc); Hld_PutParamHldCod (Hld->HldCod); fprintf (Gbl.F.Out,""); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,""); - Act_FormStart (ActChgHldTyp); + Act_StartForm (ActChgHldTyp); Hld_PutParamHldCod (Hld->HldCod); fprintf (Gbl.F.Out,""); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,""); - Act_FormStart (ActChgHldStrDat); + Act_StartForm (ActChgHldStrDat); Hld_PutParamHldCod (Hld->HldCod); Dat_WriteFormDate (Gbl.Now.Date.Year - 1, Gbl.Now.Date.Year + 1, "Start", &(Gbl.Hlds.Lst[NumHld].StartDate), true,false); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,""); - Act_FormStart (ActChgHldEndDat); + Act_StartForm (ActChgHldEndDat); Hld_PutParamHldCod (Hld->HldCod); Dat_WriteFormDate (Gbl.Now.Date.Year - 1, Gbl.Now.Date.Year + 1, "End", &(Gbl.Hlds.Lst[NumHld].EndDate), true,(Hld->HldTyp == Hld_HOLIDAY)); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,""); - Act_FormStart (ActRenHld); + Act_StartForm (ActRenHld); Hld_PutParamHldCod (Hld->HldCod); fprintf (Gbl.F.Out,"", Hld_MAX_CHARS_HOLIDAY_NAME,Hld->Name,Gbl.Form.Id); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,"
    "); if (ICanEdit) { - Act_FormStart (ActRenInsSho); + Act_StartForm (ActRenInsSho); Ins_PutParamOtherInsCod (Ins->InsCod); fprintf (Gbl.F.Out,"", Hie_MAX_CHARS_SHRT_NAME,Ins->ShrtName, Gbl.Form.Id); - Act_FormEnd (); + Act_EndForm (); } else fprintf (Gbl.F.Out,"%s",Ins->ShrtName); @@ -1479,7 +1479,7 @@ static void Ins_ListInstitutionsForEdition (void) fprintf (Gbl.F.Out,""); if (ICanEdit) { - Act_FormStart (ActRenInsFul); + Act_StartForm (ActRenInsFul); Ins_PutParamOtherInsCod (Ins->InsCod); fprintf (Gbl.F.Out,"FullName, Gbl.Form.Id); - Act_FormEnd (); + Act_EndForm (); } else fprintf (Gbl.F.Out,"%s",Ins->FullName); @@ -1498,7 +1498,7 @@ static void Ins_ListInstitutionsForEdition (void) fprintf (Gbl.F.Out,""); if (ICanEdit) { - Act_FormStart (ActChgInsWWW); + Act_StartForm (ActChgInsWWW); Ins_PutParamOtherInsCod (Ins->InsCod); fprintf (Gbl.F.Out,"WWW, Gbl.Form.Id); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,"
    "); - Act_FormStart (ActRemLnk); + Act_StartForm (ActRemLnk); Lnk_PutParamLnkCod (Lnk->LnkCod); Ico_PutIconRemove (); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,""); - Act_FormStart (ActRenLnkSho); + Act_StartForm (ActRenLnkSho); Lnk_PutParamLnkCod (Lnk->LnkCod); fprintf (Gbl.F.Out,"", Lnk_MAX_CHARS_LINK_SHRT_NAME,Lnk->ShrtName, Gbl.Form.Id); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,""); - Act_FormStart (ActRenLnkFul); + Act_StartForm (ActRenLnkFul); Lnk_PutParamLnkCod (Lnk->LnkCod); fprintf (Gbl.F.Out,"", Lnk_MAX_CHARS_LINK_FULL_NAME,Lnk->FullName, Gbl.Form.Id); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,""); - Act_FormStart (ActChgLnkWWW); + Act_StartForm (ActChgLnkWWW); Lnk_PutParamLnkCod (Lnk->LnkCod); fprintf (Gbl.F.Out,"", Cns_MAX_CHARS_WWW,Lnk->WWW, Gbl.Form.Id); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,"
    "); - Act_FormStart (ActSeeMai); + Act_StartForm (ActSeeMai); Par_PutHiddenParamUnsigned ("Order",(unsigned) Order); Act_LinkFormSubmit (Txt_EMAIL_DOMAIN_HELP_ORDER[Order],"TIT_TBL",NULL); if (Order == Gbl.Mails.SelectedOrder) @@ -130,7 +135,7 @@ void Mai_SeeMailDomains (void) if (Order == Gbl.Mails.SelectedOrder) fprintf (Gbl.F.Out,""); fprintf (Gbl.F.Out,""); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,"
    "); - Act_FormStart (ActRemMai); + Act_StartForm (ActRemMai); Mai_PutParamMaiCod (Mai->MaiCod); Ico_PutIconRemove (); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,""); - Act_FormStart (ActRenMaiSho); + Act_StartForm (ActRenMaiSho); Mai_PutParamMaiCod (Mai->MaiCod); fprintf (Gbl.F.Out,"", Cns_MAX_CHARS_EMAIL_ADDRESS,Mai->Domain, Gbl.Form.Id); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,""); - Act_FormStart (ActRenMaiFul); + Act_StartForm (ActRenMaiFul); Mai_PutParamMaiCod (Mai->MaiCod); fprintf (Gbl.F.Out,"", Mai_MAX_CHARS_MAIL_INFO,Mai->Info, Gbl.Form.Id); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,"
    " + "" + "" "" - "
    ", - The_ClassForm[Gbl.Prefs.Theme],Txt_Current_email); + "
    ", + The_ClassForm[Gbl.Prefs.Theme], + Txt_Current_email); else // NumEmail >= 2 { fprintf (Gbl.F.Out,"
    " - "%s:", + fprintf (Gbl.F.Out,"" + "", NumEmails - 1, The_ClassForm[Gbl.Prefs.Theme], Txt_Other_emails); fprintf (Gbl.F.Out,"" - "
    "); + "
    "); } /* Form to remove email */ if (ItsMe) - Act_FormStart (ActRemMaiMe); + Act_StartFormAnchor (ActRemMaiMe,Mai_EMAIL_SECTION_ID); else { switch (UsrDat->Roles.InCurrentCrs.Role) @@ -1288,19 +1361,16 @@ void Mai_ShowFormChangeUsrEmail (const struct UsrData *UsrDat,bool ItsMe) NextAction = ActRemMaiOth; break; } - Act_FormStart (NextAction); + Act_StartFormAnchor (NextAction,Mai_EMAIL_SECTION_ID); Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod); } fprintf (Gbl.F.Out,"", row[0]); Ico_PutIconRemove (); - Act_FormEnd (); + Act_EndForm (); /* Email */ - fprintf (Gbl.F.Out,"%s", - NumEmail == 1 ? "USR_ID" : - "DAT", - row[0]); + fprintf (Gbl.F.Out,"%s",row[0]); /* Email confirmed? */ if (Confirmed) @@ -1313,13 +1383,12 @@ void Mai_ShowFormChangeUsrEmail (const struct UsrData *UsrDat,bool ItsMe) Gbl.Title,Gbl.Title); } - fprintf (Gbl.F.Out,""); - /* Form to change user's email */ if (NumEmail > 1 || (ItsMe && !Confirmed)) { + fprintf (Gbl.F.Out,"
    "); if (ItsMe) - Act_FormStart (ActNewMaiMe); + Act_StartFormAnchor (ActNewMaiMe,Mai_EMAIL_SECTION_ID); else { switch (UsrDat->Roles.InCurrentCrs.Role) @@ -1335,14 +1404,14 @@ void Mai_ShowFormChangeUsrEmail (const struct UsrData *UsrDat,bool ItsMe) NextAction = ActNewMaiOth; break; } - Act_FormStart (NextAction); + Act_StartFormAnchor (NextAction,Mai_EMAIL_SECTION_ID); Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod); } fprintf (Gbl.F.Out,"", row[0]); // Email Btn_PutConfirmButtonInline ((ItsMe && NumEmail == 1) ? Txt_Confirm_email : Txt_Use_this_email); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,"
    " + "" "" "", + "", The_ClassForm[Gbl.Prefs.Theme], NumEmails ? Txt_New_email : // A new email Txt_Email); // The first email if (ItsMe) - Act_FormStart (ActNewMaiMe); + Act_StartFormAnchor (ActNewMaiMe,Mai_EMAIL_SECTION_ID); else { switch (UsrDat->Roles.InCurrentCrs.Role) @@ -1376,20 +1445,22 @@ void Mai_ShowFormChangeUsrEmail (const struct UsrData *UsrDat,bool ItsMe) NextAction = ActNewMaiOth; break; } - Act_FormStart (NextAction); + Act_StartFormAnchor (NextAction,Mai_EMAIL_SECTION_ID); Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod); } - fprintf (Gbl.F.Out,"
    " - "" - "
    ", + "
    ", Cns_MAX_CHARS_EMAIL_ADDRESS, Gbl.Usrs.Me.UsrDat.Email); Btn_PutCreateButtonInline (NumEmails ? Txt_Change_email : // User already has an email address Txt_Save); // User has no email address yet - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,"
    "); - Act_FormStart (ActionSee[Gbl.Msg.TypeOfMessages]); + Act_StartForm (ActionSee[Gbl.Msg.TypeOfMessages]); Gbl.Msg.MsgCod = MsgCod; // Message to be expanded with all recipients visible Msg_PutHiddenParamsOneMsg (); Par_PutHiddenParamChar ("SeeAllRcpts",'Y'); @@ -3495,7 +3495,7 @@ static void Msg_WriteMsgTo (long MsgCod) fprintf (Gbl.F.Out,Txt_and_X_other_recipients, NumRecipientsKnown - NumRecipientsToShow); fprintf (Gbl.F.Out,""); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,"
    "); - Act_FormStart (ActUnbUsrLst); + Act_StartForm (ActUnbUsrLst); Usr_PutParamUsrCodEncrypted (UsrDat.EncryptedUsrCod); fprintf (Gbl.F.Out,""); /* Show photo */ diff --git a/swad_network.c b/swad_network.c index f9eb4d91..298a0b75 100644 --- a/swad_network.c +++ b/swad_network.c @@ -337,7 +337,7 @@ void Net_ShowFormMyWebsAndSocialNets (void) Net_WebsAndSocialNetworksTitle[NumURL], Net_WebsAndSocialNetworksTitle[NumURL], Net_WebsAndSocialNetworksTitle[NumURL]); - Act_FormStartAnchor (ActChgMyNet,Net_MY_WEBS_ID); + Act_StartFormAnchor (ActChgMyNet,Net_MY_WEBS_ID); Par_PutHiddenParamUnsigned ("Web",(unsigned) NumURL); fprintf (Gbl.F.Out,"" "
    " + "" + "" "" - "
    ", - The_ClassForm[Gbl.Prefs.Theme],Txt_Current_nickname); + "
    ", + The_ClassForm[Gbl.Prefs.Theme], + Txt_Current_nickname); else // NumNick >= 2 { fprintf (Gbl.F.Out,"
    " - "%s:", + fprintf (Gbl.F.Out,"" + "" + "" - "
    "); + fprintf (Gbl.F.Out,"
    "); /* Form to remove old nickname */ - Act_FormStart (ActRemOldNic); + Act_StartFormAnchor (ActRemOldNic,Nck_NICKNAME_SECTION_ID); fprintf (Gbl.F.Out,"", row[0]); Ico_PutIconRemove (); - Act_FormEnd (); + Act_EndForm (); } /* Nickname */ - fprintf (Gbl.F.Out,"@%s", - NumNick == 1 ? "USR_ID" : - "DAT", - row[0]); + fprintf (Gbl.F.Out,"@%s",row[0]); /* Link to QR code */ if (NumNick == 1 && Gbl.Usrs.Me.UsrDat.Nickname[0]) @@ -258,17 +308,17 @@ void Nck_ShowFormChangeUsrNickname (void) Txt_QR_code,NULL, NULL); - fprintf (Gbl.F.Out,""); /* Form to change the nickname */ if (NumNick > 1) { - Act_FormStart (ActChgNic); + fprintf (Gbl.F.Out,"
    "); + Act_StartFormAnchor (ActChgNic,Nck_NICKNAME_SECTION_ID); fprintf (Gbl.F.Out,"", row[0]); // Nickname Btn_PutConfirmButtonInline (Txt_Use_this_nickname); - Act_FormEnd (); + Act_EndForm (); } fprintf (Gbl.F.Out,"
    " - "" + "" + "" "", + "", The_ClassForm[Gbl.Prefs.Theme], NumNicks ? Txt_New_nickname : // A new nickname Txt_Nickname); // The first nickname - Act_FormStart (ActChgNic); - fprintf (Gbl.F.Out,"
    " - "" - "
    ", + "
    ", 1 + Nck_MAX_CHARS_NICKNAME_WITHOUT_ARROBA, Gbl.Usrs.Me.UsrDat.Nickname); Btn_PutCreateButtonInline (NumNicks ? Txt_Change_nickname : // I already have a nickname Txt_Save); // I have no nickname yet); - Act_FormEnd (); + Act_EndForm (); fprintf (Gbl.F.Out,"