From fcd431ab40241480d54f12b69a25655381072ab2 Mon Sep 17 00:00:00 2001 From: acanas Date: Thu, 30 Jun 2022 13:39:57 +0200 Subject: [PATCH] Version 21.103.5: Jun 30, 2022 Code refactoring in icons. --- swad_assignment.c | 3 +- swad_browser.c | 6 +- swad_changelog.h | 3 +- swad_exam_result.c | 6 +- swad_forum.c | 4 +- swad_group.c | 8 +- swad_icon.c | 10 +- swad_icon.h | 2 +- swad_layout.c | 2 +- swad_match_result.c | 6 +- swad_message.c | 33 ++---- swad_notification.c | 65 +++++++----- swad_project.c | 3 +- swad_search.c | 15 ++- swad_tag.c | 28 ++--- swad_test_print.c | 5 +- swad_text.c | 230 ---------------------------------------- swad_text_action.c | 74 ++++++------- swad_timeline_comment.c | 4 +- swad_timeline_form.c | 4 +- swad_timeline_note.c | 4 +- swad_user.c | 10 +- 22 files changed, 133 insertions(+), 392 deletions(-) diff --git a/swad_assignment.c b/swad_assignment.c index 95cf6270..0432e17d 100644 --- a/swad_assignment.c +++ b/swad_assignment.c @@ -578,8 +578,7 @@ static void Asg_WriteAssignmentFolder (struct Asg_Assignment *Asg,bool PrintView sizeof (Gbl.FileBrowser.FilFolLnk.Name) - 1); Gbl.FileBrowser.FilFolLnk.Type = Brw_IS_FOLDER; Brw_PutImplicitParamsFileBrowser (&Gbl.FileBrowser.FilFolLnk); - Ico_PutIconLink ("folder-open-yellow-plus.png",Ico_UNCHANGED, - Act_GetActionText (NextAction)); + Ico_PutIconLink ("folder-open-yellow-plus.png",Ico_UNCHANGED,NextAction); Frm_EndForm (); diff --git a/swad_browser.c b/swad_browser.c index 89239ad1..0d6706a5 100644 --- a/swad_browser.c +++ b/swad_browser.c @@ -4909,8 +4909,7 @@ static void Brw_PutIconToExpandFolder (const char *FileBrowserId,const char *Row FileBrowserId, JavaScriptFuncToExpandFolder); // JavaScript function to unhide rows Brw_PutImplicitParamsFileBrowser (&Gbl.FileBrowser.FilFolLnk); - Ico_PutIconLink ("caret-right.svg",Ico_BLACK, - Act_GetActionText (Brw_ActExpandFolder[Gbl.FileBrowser.Type])); + Ico_PutIconLink ("caret-right.svg",Ico_BLACK,Brw_ActExpandFolder[Gbl.FileBrowser.Type]); Frm_EndForm (); /***** End container *****/ @@ -4943,8 +4942,7 @@ static void Brw_PutIconToContractFolder (const char *FileBrowserId,const char *R FileBrowserId, JavaScriptFuncToContractFolder); // JavaScript function to hide rows Brw_PutImplicitParamsFileBrowser (&Gbl.FileBrowser.FilFolLnk); - Ico_PutIconLink ("caret-down.svg",Ico_BLACK, - Act_GetActionText (Brw_ActContractFolder[Gbl.FileBrowser.Type])); + Ico_PutIconLink ("caret-down.svg",Ico_BLACK,Brw_ActContractFolder[Gbl.FileBrowser.Type]); Frm_EndForm (); /***** End container *****/ diff --git a/swad_changelog.h b/swad_changelog.h index c11e6a31..9a9065d8 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -606,10 +606,11 @@ TODO: Fix bug: error al enviar un mensaje a dos recipientes, error on duplicate TODO: Attach pdf files in multimedia. */ -#define Log_PLATFORM_VERSION "SWAD 21.103.4 (2022-06-30)" +#define Log_PLATFORM_VERSION "SWAD 21.103.5 (2022-06-30)" #define CSS_FILE "swad21.100.css" #define JS_FILE "swad21.100.js" /* + Version 21.103.5: Jun 30, 2022 Code refactoring in icons. (327727 lines) Version 21.103.4: Jun 30, 2022 Code refactoring in icons. (327968 lines) Version 21.103.3: Jun 30, 2022 Code refactoring in icons. (328131 lines) Version 21.103.2: Jun 30, 2022 Preparation for Turkish translation. (328306 lines) diff --git a/swad_exam_result.c b/swad_exam_result.c index 821631e3..1afe7c77 100644 --- a/swad_exam_result.c +++ b/swad_exam_result.c @@ -1048,15 +1048,13 @@ static void ExaRes_ShowResults (struct Exa_Exams *Exams, case Usr_ME: Frm_BeginForm (ActSeeOneExaResMe); ExaSes_PutParamsEdit (Exams); - Ico_PutIconLink ("tasks.svg",Ico_BLACK, - Act_GetActionText (ActSeeOneExaResMe)); + Ico_PutIconLink ("tasks.svg",Ico_BLACK,ActSeeOneExaResMe); break; case Usr_OTHER: Frm_BeginForm (ActSeeOneExaResOth); ExaSes_PutParamsEdit (Exams); Usr_PutParamOtherUsrCodEncrypted (Gbl.Usrs.Other.UsrDat.EnUsrCod); - Ico_PutIconLink ("tasks.svg",Ico_BLACK, - Act_GetActionText (ActSeeOneExaResOth)); + Ico_PutIconLink ("tasks.svg",Ico_BLACK,ActSeeOneExaResOth); break; } Frm_EndForm (); diff --git a/swad_forum.c b/swad_forum.c index e36019c9..e1d3b89f 100644 --- a/swad_forum.c +++ b/swad_forum.c @@ -952,8 +952,8 @@ static void For_ShowAForumPost (struct For_Forums *Forums, "eye-slash.svg", Enabled ? Ico_GREEN : Ico_RED, - Act_GetActionText (Enabled ? For_ActionsDisPstFor[Forums->Forum.Type] : - For_ActionsEnbPstFor[Forums->Forum.Type])); + Enabled ? For_ActionsDisPstFor[Forums->Forum.Type] : + For_ActionsEnbPstFor[Forums->Forum.Type]); Frm_EndForm (); } else diff --git a/swad_group.c b/swad_group.c index ecb40c01..a78f9fd2 100644 --- a/swad_group.c +++ b/swad_group.c @@ -1452,8 +1452,8 @@ static void Grp_ListGroupsForEdition (const struct Roo_Rooms *Rooms) "lock.svg", Grp->Open ? Ico_GREEN : Ico_RED, - Act_GetActionText (Grp->Open ? ActCloGrp : - ActOpeGrp)); + Grp->Open ? ActCloGrp : + ActOpeGrp); Frm_EndForm (); HTM_TD_End (); @@ -1467,8 +1467,8 @@ static void Grp_ListGroupsForEdition (const struct Roo_Rooms *Rooms) "folder.svg", Grp->FileZones ? Ico_GREEN : Ico_RED, - Act_GetActionText (Grp->FileZones ? ActDisFilZonGrp : - ActEnaFilZonGrp)); + Grp->FileZones ? ActDisFilZonGrp : + ActEnaFilZonGrp); Frm_EndForm (); HTM_TD_End (); diff --git a/swad_icon.c b/swad_icon.c index 1297f4b4..73c0f165 100644 --- a/swad_icon.c +++ b/swad_icon.c @@ -370,13 +370,13 @@ void Ico_PutDivIcon (const char *DivClass, /****************** Show an icon with a link (without text) ******************/ /*****************************************************************************/ -void Ico_PutIconLink (const char *Icon,Ico_Color_t Color,const char *Title) +void Ico_PutIconLink (const char *Icon,Ico_Color_t Color,Act_Action_t NextAction) { if (Color == Ico_UNCHANGED) - HTM_INPUT_IMAGE (Cfg_URL_ICON_PUBLIC,Icon,Title, + HTM_INPUT_IMAGE (Cfg_URL_ICON_PUBLIC,Icon,Act_GetActionText (NextAction), "class=\"CONTEXT_OPT ICO_HIGHLIGHT CONTEXT_ICO16x16\""); else - HTM_INPUT_IMAGE (Cfg_URL_ICON_PUBLIC,Icon,Title, + HTM_INPUT_IMAGE (Cfg_URL_ICON_PUBLIC,Icon,Act_GetActionText (NextAction), "class=\"CONTEXT_OPT ICO_HIGHLIGHT CONTEXT_ICO16x16 ICO_%s_%s\"", Ico_GetPreffix (Color),The_GetSuffix ()); } @@ -456,7 +456,7 @@ void Ico_PutIconRemovalNotAllowed (void) void Ico_PutIconCut (Act_Action_t NextAction) { - Ico_PutIconLink ("cut.svg",Ico_BLACK,Act_GetActionText (NextAction)); + Ico_PutIconLink ("cut.svg",Ico_BLACK,NextAction); } /*****************************************************************************/ @@ -465,7 +465,7 @@ void Ico_PutIconCut (Act_Action_t NextAction) void Ico_PutIconPaste (Act_Action_t NextAction) { - Ico_PutIconLink ("paste.svg",Ico_BLACK,Act_GetActionText (NextAction)); + Ico_PutIconLink ("paste.svg",Ico_BLACK,NextAction); } /*****************************************************************************/ diff --git a/swad_icon.h b/swad_icon.h index 492d71a7..22cd5883 100644 --- a/swad_icon.h +++ b/swad_icon.h @@ -98,7 +98,7 @@ void Ico_PutContextualIconToZIP (Act_Action_t NextAction, void Ico_PutDivIcon (const char *DivClass, const char *Icon,Ico_Color_t Color,const char *Title); -void Ico_PutIconLink (const char *Icon,Ico_Color_t Color,const char *Title); +void Ico_PutIconLink (const char *Icon,Ico_Color_t Color,Act_Action_t NextAction); void Ico_PutIconTextLink (const char *Icon,Ico_Color_t Color,const char *Text); void Ico_PutSettingIconLink (const char *Icon,Ico_Color_t Color,const char *Title); void Ico_PutIconOn (const char *Icon,Ico_Color_t Color,const char *Title); diff --git a/swad_layout.c b/swad_layout.c index 80fcf241..cef6593b 100644 --- a/swad_layout.c +++ b/swad_layout.c @@ -1186,7 +1186,7 @@ void Lay_PutContextualLinkOnlyIcon (Act_Action_t NextAction,const char *Anchor, FuncParams (Args); /***** Put icon with link *****/ - Ico_PutIconLink (Icon,Color,Act_GetActionText (NextAction)); + Ico_PutIconLink (Icon,Color,NextAction); /***** End form *****/ Frm_EndForm (); diff --git a/swad_match_result.c b/swad_match_result.c index d83157e1..96647cf5 100644 --- a/swad_match_result.c +++ b/swad_match_result.c @@ -905,15 +905,13 @@ static void MchRes_ShowMchResults (struct Gam_Games *Games, case Usr_ME: Frm_BeginForm (ActSeeOneMchResMe); Mch_PutParamsEdit (Games); - Ico_PutIconLink ("tasks.svg",Ico_BLACK, - Act_GetActionText (ActSeeOneMchResMe)); + Ico_PutIconLink ("tasks.svg",Ico_BLACK,ActSeeOneMchResMe); break; case Usr_OTHER: Frm_BeginForm (ActSeeOneMchResOth); Mch_PutParamsEdit (Games); Usr_PutParamOtherUsrCodEncrypted (Gbl.Usrs.Other.UsrDat.EnUsrCod); - Ico_PutIconLink ("tasks.svg",Ico_BLACK, - Act_GetActionText (ActSeeOneMchResOth)); + Ico_PutIconLink ("tasks.svg",Ico_BLACK,ActSeeOneMchResOth); break; } Frm_EndForm (); diff --git a/swad_message.c b/swad_message.c index 61b88e66..8c787aa0 100644 --- a/swad_message.c +++ b/swad_message.c @@ -155,8 +155,7 @@ static void Msg_WriteSentOrReceivedMsgSubject (struct Msg_Messages *Messages, static bool Msg_WriteCrsOrgMsg (long CrsCod); -static void Msg_WriteFormToReply (long MsgCod,long CrsCod, - bool ThisCrs,bool Replied, +static void Msg_WriteFormToReply (long MsgCod,long CrsCod,bool FromThisCrs, const struct UsrData *UsrDat); static void Msg_WriteMsgFrom (struct Msg_Messages *Messages, struct UsrData *UsrDat,bool Deleted); @@ -2130,7 +2129,7 @@ static void Msg_ShowASentOrReceivedMessage (struct Msg_Messages *Messages, if (Messages->TypeOfMessages == Msg_RECEIVED && Gbl.Usrs.Me.Role.Logged >= Rol_USR) // Guests (users without courses) can read messages but not reply them - Msg_WriteFormToReply (MsgCod,CrsCod,FromThisCrs,Replied,&UsrDat); + Msg_WriteFormToReply (MsgCod,CrsCod,FromThisCrs,&UsrDat); HTM_TD_End (); HTM_TR_End (); @@ -2415,15 +2414,9 @@ static bool Msg_WriteCrsOrgMsg (long CrsCod) /************************* Write form to reply a message *********************/ /*****************************************************************************/ -static void Msg_WriteFormToReply (long MsgCod,long CrsCod, - bool FromThisCrs,bool Replied, +static void Msg_WriteFormToReply (long MsgCod,long CrsCod,bool FromThisCrs, const struct UsrData *UsrDat) { - extern const char *Txt_Reply; - extern const char *Txt_Reply_again; - extern const char *Txt_Go_to_course_and_reply; - extern const char *Txt_Go_to_course_and_reply_again; - /***** Begin form and parameters *****/ if (FromThisCrs) Frm_BeginForm (ActReqMsgUsr); @@ -2439,11 +2432,7 @@ static void Msg_WriteFormToReply (long MsgCod,long CrsCod, Par_PutHiddenParamChar ("ShowOnlyOneRecipient",'Y'); /****** Link *****/ - Ico_PutIconLink ("reply.svg",Ico_BLACK, - FromThisCrs ? (Replied ? Txt_Reply_again : - Txt_Reply) : - (Replied ? Txt_Go_to_course_and_reply_again : - Txt_Go_to_course_and_reply)); + Ico_PutIconLink ("reply.svg",Ico_BLACK,ActReqMsgUsr); /****** End form *****/ Frm_EndForm (); @@ -2769,15 +2758,12 @@ static long Msg_GetParamMsgCod (void) static void Msg_PutFormToBanSender (struct Msg_Messages *Messages, struct UsrData *UsrDat) { - extern const char *Txt_Sender_permitted_click_to_ban_him; - Frm_BeginForm (ActBanUsrMsg); Pag_PutHiddenParamPagNum (Msg_WhatPaginate[Messages->TypeOfMessages], Messages->CurrentPage); Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod); Msg_PutHiddenParamsMsgsFilters (Messages); - Ico_PutIconLink ("unlock.svg",Ico_GREEN, - Txt_Sender_permitted_click_to_ban_him); + Ico_PutIconLink ("unlock.svg",Ico_GREEN,ActBanUsrMsg); Frm_EndForm (); } @@ -2788,15 +2774,12 @@ static void Msg_PutFormToBanSender (struct Msg_Messages *Messages, static void Msg_PutFormToUnbanSender (struct Msg_Messages *Messages, struct UsrData *UsrDat) { - extern const char *Txt_Sender_banned_click_to_unban_him; - Frm_BeginForm (ActUnbUsrMsg); Pag_PutHiddenParamPagNum (Msg_WhatPaginate[Messages->TypeOfMessages], Messages->CurrentPage); Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod); Msg_PutHiddenParamsMsgsFilters (Messages); - Ico_PutIconLink ("lock.svg",Ico_RED, - Txt_Sender_banned_click_to_unban_him); + Ico_PutIconLink ("lock.svg",Ico_RED,ActUnbUsrMsg); Frm_EndForm (); } @@ -2889,7 +2872,6 @@ void Msg_ListBannedUsrs (void) { extern const char *Txt_You_have_not_banned_any_sender; extern const char *Txt_Banned_users; - extern const char *Txt_Sender_banned_click_to_unban_him; static const char *ClassPhoto[PhoSha_NUM_SHAPES] = { [PhoSha_SHAPE_CIRCLE ] = "PHOTOC21x28", @@ -2932,8 +2914,7 @@ void Msg_ListBannedUsrs (void) HTM_TD_Begin ("class=\"BM\""); Frm_BeginForm (ActUnbUsrLst); Usr_PutParamUsrCodEncrypted (UsrDat.EnUsrCod); - Ico_PutIconLink ("lock.svg",Ico_RED, - Txt_Sender_banned_click_to_unban_him); + Ico_PutIconLink ("lock.svg",Ico_RED,ActUnbUsrLst); Frm_EndForm (); HTM_TD_End (); diff --git a/swad_notification.c b/swad_notification.c index d0ee18f4..7574d92f 100644 --- a/swad_notification.c +++ b/swad_notification.c @@ -290,9 +290,9 @@ static void Ntf_PutIconsNotif (__attribute__((unused)) void *Args); static void Ntf_WriteFormAllNotifications (bool AllNotifications); static bool Ntf_GetAllNotificationsFromForm (void); -static bool Ntf_StartFormGoToAction (Ntf_NotifyEvent_t NotifyEvent, - long CrsCod,struct UsrData *UsrDat,long Cod, - const struct For_Forums *Forums); +static Act_Action_t Ntf_StartFormGoToAction (Ntf_NotifyEvent_t NotifyEvent, + long CrsCod,struct UsrData *UsrDat,long Cod, + const struct For_Forums *Forums); static void Ntf_PutHiddenParamNotifyEvent (Ntf_NotifyEvent_t NotifyEvent); static void Ntf_SendPendingNotifByEMailToOneUsr (struct UsrData *ToUsrDat,unsigned *NumNotif,unsigned *NumMails); @@ -351,6 +351,7 @@ void Ntf_ShowMyNotifications (void) const char *ClassAuthor; const char *ClassBg; bool PutLink; + Act_Action_t Action = ActUnk; /***** Get my notifications from database *****/ AllNotifications = Ntf_GetAllNotificationsFromForm (); @@ -483,12 +484,14 @@ void Ntf_ShowMyNotifications (void) HTM_TD_Begin ("class=\"LT %s_%s\" style=\"width:25px;\"", ClassBg,The_GetSuffix ()); if (PutLink) - PutLink = Ntf_StartFormGoToAction (NotifyEvent,Hie.Crs.CrsCod,&UsrDat,Cod,&Forums); + { + Action = Ntf_StartFormGoToAction (NotifyEvent,Hie.Crs.CrsCod,&UsrDat,Cod,&Forums); + PutLink = Gbl.Form.Inside; + } if (PutLink) { - Ico_PutIconLink (Ntf_Icons[NotifyEvent],Ico_BLACK, - Txt_NOTIFY_EVENTS_SINGULAR[NotifyEvent]); + Ico_PutIconLink (Ntf_Icons[NotifyEvent],Ico_BLACK,Action); Frm_EndForm (); } else @@ -500,7 +503,9 @@ void Ntf_ShowMyNotifications (void) HTM_TD_Begin ("class=\"LT %s_%s\"",ClassBg,The_GetSuffix ()); if (PutLink) { - PutLink = Ntf_StartFormGoToAction (NotifyEvent,Hie.Crs.CrsCod,&UsrDat,Cod,&Forums); + Action = Ntf_StartFormGoToAction (NotifyEvent,Hie.Crs.CrsCod,&UsrDat,Cod,&Forums); + PutLink = Gbl.Form.Inside; + HTM_BUTTON_Submit_Begin (Txt_NOTIFY_EVENTS_SINGULAR[NotifyEvent], "class=\"%s_%s\"", ClassLink,The_GetSuffix ()); @@ -530,7 +535,10 @@ void Ntf_ShowMyNotifications (void) NotifyEvent == Ntf_EVENT_FORUM_REPLY) { if (PutLink) - PutLink = Ntf_StartFormGoToAction (NotifyEvent,Hie.Crs.CrsCod,&UsrDat,Cod,&Forums); + { + Action = Ntf_StartFormGoToAction (NotifyEvent,Hie.Crs.CrsCod,&UsrDat,Cod,&Forums); + PutLink = Gbl.Form.Inside; + } if (PutLink) HTM_BUTTON_Submit_Begin (Txt_NOTIFY_EVENTS_SINGULAR[NotifyEvent], @@ -551,7 +559,10 @@ void Ntf_ShowMyNotifications (void) else { if (PutLink) - PutLink = Ntf_StartFormGoToAction (NotifyEvent,Hie.Crs.CrsCod,&UsrDat,Cod,&Forums); + { + Action = Ntf_StartFormGoToAction (NotifyEvent,Hie.Crs.CrsCod,&UsrDat,Cod,&Forums); + PutLink = Gbl.Form.Inside; + } if (PutLink) HTM_BUTTON_Submit_Begin (Txt_NOTIFY_EVENTS_SINGULAR[NotifyEvent], @@ -676,11 +687,10 @@ static bool Ntf_GetAllNotificationsFromForm (void) /*****************************************************************************/ /*********** Put form to go to an action depending on the event **************/ /*****************************************************************************/ -// Return the value of Gbl.Form.Inside (true if form is started) -static bool Ntf_StartFormGoToAction (Ntf_NotifyEvent_t NotifyEvent, - long CrsCod,struct UsrData *UsrDat,long Cod, - const struct For_Forums *Forums) +static Act_Action_t Ntf_StartFormGoToAction (Ntf_NotifyEvent_t NotifyEvent, + long CrsCod,struct UsrData *UsrDat,long Cod, + const struct For_Forums *Forums) { extern const Act_Action_t For_ActionsSeeFor[For_NUM_TYPES_FORUM]; struct FileMetadata FileMetadata; @@ -688,7 +698,7 @@ static bool Ntf_StartFormGoToAction (Ntf_NotifyEvent_t NotifyEvent, long CtrCod = -1L; long DegCod = -1L; long GrpCod = -1L; - Act_Action_t Action = ActUnk; // Initialized to avoid warning + Act_Action_t Action = ActUnk; /***** Parameters depending on the type of event *****/ switch (NotifyEvent) @@ -697,7 +707,6 @@ static bool Ntf_StartFormGoToAction (Ntf_NotifyEvent_t NotifyEvent, case Ntf_EVENT_TEACHERS_FILE: case Ntf_EVENT_SHARED_FILE: case Ntf_EVENT_MARKS_FILE: - Action = ActUnk; FileMetadata.FilCod = Cod; if (FileMetadata.FilCod > 0) Brw_GetFileMetadataByCod (&FileMetadata); @@ -743,7 +752,8 @@ static bool Ntf_StartFormGoToAction (Ntf_NotifyEvent_t NotifyEvent, case Ntf_EVENT_TML_SHARE: case Ntf_EVENT_TML_MENTION: // Cod is the code of the social publishing - Frm_BeginForm (ActSeeGblTL); + Action = ActSeeGblTL; + Frm_BeginForm (Action); TmlPub_PutHiddenParamPubCod (Cod); Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod); Ntf_PutHiddenParamNotifyEvent (NotifyEvent); @@ -752,16 +762,21 @@ static bool Ntf_StartFormGoToAction (Ntf_NotifyEvent_t NotifyEvent, if (UsrDat->EnUsrCod[0]) // User's code found ==> // go to user's public profile { - Frm_BeginForm (ActSeeOthPubPrf); + Action = ActSeeOthPubPrf; + Frm_BeginForm (Action); /* Put param to go to follower's profile */ Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod); } else // No user's code found ==> go to see my followers - Frm_BeginForm (ActSeeFlr); + { + Action = ActSeeFlr; + Frm_BeginForm (Action); + } break; case Ntf_EVENT_FORUM_POST_COURSE: case Ntf_EVENT_FORUM_REPLY: - Frm_BeginForm (For_ActionsSeeFor[Forums->Forum.Type]); + Action = For_ActionsSeeFor[Forums->Forum.Type]; + Frm_BeginForm (Action); For_PutAllHiddenParamsForum (1, // Page of threads = first 1, // Page of posts = first Forums->ForumSet, @@ -771,15 +786,18 @@ static bool Ntf_StartFormGoToAction (Ntf_NotifyEvent_t NotifyEvent, -1L); break; case Ntf_EVENT_NOTICE: - Frm_BeginForm (ActSeeOneNot); + Action = ActSeeOneNot; + Frm_BeginForm (Action); Not_PutHiddenParamNotCod (Cod); break; case Ntf_EVENT_MESSAGE: - Frm_BeginForm (ActExpRcvMsg); + Action = ActExpRcvMsg; + Frm_BeginForm (Action); Msg_PutHiddenParamMsgCod (Cod); break; default: - Frm_BeginForm (Ntf_DefaultActions[NotifyEvent]); + Action = Ntf_DefaultActions[NotifyEvent]; + Frm_BeginForm (Action); break; } @@ -808,10 +826,9 @@ static bool Ntf_StartFormGoToAction (Ntf_NotifyEvent_t NotifyEvent, } } - return Gbl.Form.Inside; + return Action; } - /*****************************************************************************/ /******************* Get parameter with notify event type ********************/ /*****************************************************************************/ diff --git a/swad_project.c b/swad_project.c index 6626688a..b7eded0f 100644 --- a/swad_project.c +++ b/swad_project.c @@ -4010,7 +4010,6 @@ void Prj_UnloSelectedPrjsEdition (void) static void Prj_FormLockUnlock (const struct Prj_Project *Prj) { - extern const char *Txt_LOCKED_UNLOCKED[Prj_NUM_LOCKED_UNLOCKED]; char *OnSubmit; /* +---------------------+ @@ -4036,7 +4035,7 @@ static void Prj_FormLockUnlock (const struct Prj_Project *Prj) Frm_BeginFormOnSubmit (ActUnk,OnSubmit); Ico_PutIconLink (Prj_LockUnlock[Prj->Locked].Icon, Prj_LockUnlock[Prj->Locked].Color, - Txt_LOCKED_UNLOCKED[Prj->Locked]); + Prj_LockUnlock[Prj->Locked].Action); Frm_EndForm (); /* Free allocated memory for subquery */ diff --git a/swad_search.c b/swad_search.c index 72455c75..5d1f7bbf 100644 --- a/swad_search.c +++ b/swad_search.c @@ -62,7 +62,7 @@ extern struct Globals Gbl; /***************************** Private prototypes ****************************/ /*****************************************************************************/ -static void Sch_PutFormToSearchWithWhatToSearchAndScope (Act_Action_t Action,HieLvl_Level_t DefaultScope); +static void Sch_PutFormToSearchWithWhatToSearchAndScope (HieLvl_Level_t DefaultScope); static bool Sch_CheckIfIHavePermissionToSearch (Sch_WhatToSearch_t WhatToSearch); static void Sch_GetParamSearch (void); static void Sch_SearchInDB (void); @@ -89,14 +89,14 @@ void Sch_ReqSysSearch (void) { /***** Search courses, teachers, documents... *****/ Sch_GetParamWhatToSearch (); - Sch_PutFormToSearchWithWhatToSearchAndScope (ActSch,HieLvl_SYS); + Sch_PutFormToSearchWithWhatToSearchAndScope (HieLvl_SYS); } /*****************************************************************************/ /****************** Put a form to search, including scope ********************/ /*****************************************************************************/ -static void Sch_PutFormToSearchWithWhatToSearchAndScope (Act_Action_t Action,HieLvl_Level_t DefaultScope) +static void Sch_PutFormToSearchWithWhatToSearchAndScope (HieLvl_Level_t DefaultScope) { extern const char *Hlp_START_Search; extern const char *Txt_Scope; @@ -142,7 +142,7 @@ static void Sch_PutFormToSearchWithWhatToSearchAndScope (Act_Action_t Action,Hie Hlp_START_Search,Box_NOT_CLOSABLE); /***** Begin form *****/ - Frm_BeginForm (Action); + Frm_BeginForm (ActSch); /***** Scope (whole platform, current country, current institution, current center, current degree or current course) *****/ @@ -269,10 +269,7 @@ void Sch_PutInputStringToSearch (const char *IdInputText) void Sch_PutMagnifyingGlassButton (Ico_Color_t Color) { - extern const char *Txt_Search; - - /***** Send button *****/ - Ico_PutIconLink ("search.svg",Color,Txt_Search); + Ico_PutIconLink ("search.svg",Color,ActSch); } /*****************************************************************************/ @@ -332,7 +329,7 @@ void Sch_SysSearch (void) if (Gbl.Search.Str[0]) { /***** Show search form again *****/ - Sch_PutFormToSearchWithWhatToSearchAndScope (ActSch,HieLvl_SYS); + Sch_PutFormToSearchWithWhatToSearchAndScope (HieLvl_SYS); /***** Show results of search *****/ Sch_SearchInDB (); diff --git a/swad_tag.c b/swad_tag.c index 6c21fd68..0ba4ab2c 100644 --- a/swad_tag.c +++ b/swad_tag.c @@ -53,8 +53,8 @@ extern struct Globals Gbl; static long Tag_GetParamTagCode (void); -static void Tag_PutIconEnable (long TagCod,const char *TagTxt); -static void Tag_PutIconDisable (long TagCod,const char *TagTxt); +static void Tag_PutIconEnable (long TagCod); +static void Tag_PutIconDisable (long TagCod); /*****************************************************************************/ /********************************* Reset tags ********************************/ @@ -429,9 +429,9 @@ void Tag_ShowFormEditTags (void) /* Form to enable / disable this tag */ if (row[2][0] == 'Y') // Tag disabled - Tag_PutIconEnable (TagCod,row[1]); + Tag_PutIconEnable (TagCod); else - Tag_PutIconDisable (TagCod,row[1]); + Tag_PutIconDisable (TagCod); /* Form to rename this tag */ HTM_TD_Begin ("class=\"LM\""); @@ -462,18 +462,12 @@ void Tag_ShowFormEditTags (void) /******************* Put a link and an icon to enable a tag ******************/ /*****************************************************************************/ -static void Tag_PutIconEnable (long TagCod,const char *TagTxt) +static void Tag_PutIconEnable (long TagCod) { - extern const char *Txt_Tag_X_not_allowed_Click_to_allow_it; - char *Title; - HTM_TD_Begin ("class=\"BM\""); Frm_BeginForm (ActEnaTag); Par_PutHiddenParamLong (NULL,"TagCod",TagCod); - if (asprintf (&Title,Txt_Tag_X_not_allowed_Click_to_allow_it,TagTxt) < 0) - Err_NotEnoughMemoryExit (); - Ico_PutIconLink ("eye-slash.svg",Ico_RED,Title); - free (Title); + Ico_PutIconLink ("eye-slash.svg",Ico_RED,ActEnaTag); Frm_EndForm (); HTM_TD_End (); } @@ -482,18 +476,12 @@ static void Tag_PutIconEnable (long TagCod,const char *TagTxt) /****************** Put a link and an icon to disable a tag ******************/ /*****************************************************************************/ -static void Tag_PutIconDisable (long TagCod,const char *TagTxt) +static void Tag_PutIconDisable (long TagCod) { - extern const char *Txt_Tag_X_allowed_Click_to_disable_it; - char *Title; - HTM_TD_Begin ("class=\"BM\""); Frm_BeginForm (ActDisTag); Par_PutHiddenParamLong (NULL,"TagCod",TagCod); - if (asprintf (&Title,Txt_Tag_X_allowed_Click_to_disable_it,TagTxt) < 0) - Err_NotEnoughMemoryExit (); - Ico_PutIconLink ("eye.svg",Ico_GREEN,Title); - free (Title); + Ico_PutIconLink ("eye.svg",Ico_GREEN,ActDisTag); Frm_EndForm (); HTM_TD_End (); } diff --git a/swad_test_print.c b/swad_test_print.c index 5a0cc070..44e5479b 100644 --- a/swad_test_print.c +++ b/swad_test_print.c @@ -1843,7 +1843,6 @@ static void TstPrn_ShowHeaderPrints (Usr_MeOrOther_t MeOrOther) static void TstPrn_ShowUsrPrints (struct UsrData *UsrDat) { - extern const char *Txt_View_test; MYSQL_RES *mysql_res; unsigned NumPrints; unsigned NumPrint; @@ -2004,7 +2003,9 @@ static void TstPrn_ShowUsrPrints (struct UsrData *UsrDat) Frm_BeginForm (Gbl.Action.Act == ActSeeMyTstResCrs ? ActSeeOneTstResMe : ActSeeOneTstResOth); TstPrn_PutParamPrnCod (Print.PrnCod); - Ico_PutIconLink ("tasks.svg",Ico_BLACK,Txt_View_test); + Ico_PutIconLink ("tasks.svg",Ico_BLACK, + Gbl.Action.Act == ActSeeMyTstResCrs ? ActSeeOneTstResMe : + ActSeeOneTstResOth); Frm_EndForm (); } else diff --git a/swad_text.c b/swad_text.c index ca5e38a1..152461de 100644 --- a/swad_text.c +++ b/swad_text.c @@ -15996,52 +15996,6 @@ const char *Txt_Go_to_X = // Warning: it is very important to include %s in the "Go to %s"; // Çeviri lazim! #endif -const char *Txt_Go_to_course_and_reply = -#if L==1 // ca - "Anar a assignatura i respondre"; -#elif L==2 // de - "Kurs einblenden und antworten"; -#elif L==3 // en - "Go to course and reply"; -#elif L==4 // es - "Ir a asignatura y responder"; -#elif L==5 // fr - "Aller à la matière et répondre"; -#elif L==6 // gn - "Ir a asignatura y responder"; // Okoteve traducción -#elif L==7 // it - "Vai a corso e rispondere"; -#elif L==8 // pl - "Idz do kursu i odpowiedz"; -#elif L==9 // pt - "Ir para a disciplina e responder"; -#elif L==10 // tr - "Go to course and reply"; // Çeviri lazim! -#endif - -const char *Txt_Go_to_course_and_reply_again = -#if L==1 // ca - "Anar a assignatura i respondre una altra vegada"; -#elif L==2 // de - "Kurs einblenden und erneut antworten"; -#elif L==3 // en - "Go to course and reply again"; -#elif L==4 // es - "Ir a asignatura y responder otra vez"; -#elif L==5 // fr - "Aller à la matière et répondre à nouveau"; -#elif L==6 // gn - "Ir a asignatura y responder otra vez"; // Okoteve traducción -#elif L==7 // it - "Vai a corso e rispondere nuovamente"; -#elif L==8 // pl - "Idz do kursu i odpowiedz ponownie"; -#elif L==9 // pt - "Ir para a disciplina e responder novamente"; -#elif L==10 // tr - "Go to course and reply again"; // Çeviri lazim! -#endif - const char *Txt_Go_to_one_of_my_courses = #if L==1 // ca "Anar a una de les meves assignatures"; @@ -20100,29 +20054,6 @@ const char *Txt_Log_in = "Giriş yapmak"; #endif -const char *Txt_Log_out = -#if L==1 // ca - "Tancar sessió"; -#elif L==2 // de - "Abmelden"; -#elif L==3 // en - "Log out"; -#elif L==4 // es - "Cerrar sesión"; -#elif L==5 // fr - "Fermer session"; -#elif L==6 // gn - "Sẽ"; -#elif L==7 // it - "Chiudi sessione"; -#elif L==8 // pl - "Wyloguj się"; -#elif L==9 // pt - "Fechar sessão"; -#elif L==10 // tr - "Log out"; // Çeviri lazim! -#endif - const char *Txt_logged[Usr_NUM_SEXS] = { [Usr_SEX_UNKNOWN] = @@ -35441,52 +35372,6 @@ const char *Txt_Remove_USER_from_THE_COURSE_X = // Warning: it is very important "Remove from %s"; // Çeviri lazim! #endif -const char *Txt_Reply = -#if L==1 // ca - "Respondre"; -#elif L==2 // de - "Antworten"; -#elif L==3 // en - "Reply"; -#elif L==4 // es - "Responder"; -#elif L==5 // fr - "Répondre"; -#elif L==6 // gn - "Responder"; // Okoteve traducción -#elif L==7 // it - "Rispondere"; -#elif L==8 // pl - "Odpowiedz"; -#elif L==9 // pt - "Responder"; -#elif L==10 // tr - "Reply"; // Çeviri lazim! -#endif - -const char *Txt_Reply_again = -#if L==1 // ca - "Respondre de nou"; -#elif L==2 // de - "Antworten wieder"; -#elif L==3 // en - "Reply again"; -#elif L==4 // es - "Responder otra vez"; -#elif L==5 // fr - "Répondre à nouveau"; -#elif L==6 // gn - "Responder otra vez"; // Okoteve traducción -#elif L==7 // it - "Rispondere nuovamente"; -#elif L==8 // pl - "Odpowiedz ponownie"; -#elif L==9 // pt - "Responder novamente"; -#elif L==10 // tr - "Reply again"; // Çeviri lazim! -#endif - const char *Txt_Reply_message = // "Reply" as a noun, not as a verb #if L==1 // ca "Missatge de resposta"; @@ -42603,52 +42488,6 @@ const char *Txt_Send_URL = "Send URL"; // Çeviri lazim! #endif -const char *Txt_Sender_banned_click_to_unban_him = -#if L==1 // ca - "Remitent prohibit; feu clic per desbanbar-lo"; -#elif L==2 // de - "Absender gesperrt; klicken, um sie/ihn zu entsperren"; -#elif L==3 // en - "Sender banned; click to unban her/him"; -#elif L==4 // es - "Remitente bloqueado/a; pulse para desbloquearlo/a"; -#elif L==5 // fr - "Expéditeur banni; cliquez pour le débannir"; -#elif L==6 // gn - "Remitente bloqueado/a; pulse para desbloquearlo/a"; // Okoteve traducción -#elif L==7 // it - "Mittente vietato; fare clic per riattivarlo"; -#elif L==8 // pl - "Nadawca zbanowany; kliknij, aby odblokować ją/jego"; -#elif L==9 // pt - "Remetente banido; clique para desbanir ela/ele"; -#elif L==10 // tr - "Sender banned; click to unban her/him"; // Çeviri lazim! -#endif - -const char *Txt_Sender_permitted_click_to_ban_him = -#if L==1 // ca - "Remitent permès; feu clic per prohibir-lo"; -#elif L==2 // de - "Absender erlaubt; klicken, um sie/ihn zu sperren"; -#elif L==3 // en - "Sender permitted; click to ban her/him"; -#elif L==4 // es - "Remitente permitido/a; pulse para bloquearlo/a"; -#elif L==5 // fr - "Expéditeur autorisé; cliquez pour l'exclure"; -#elif L==6 // gn - "Remitente permitido/a; pulse para bloquearlo/a"; // Okoteve traducción -#elif L==7 // it - "Mittente consentito; clicca per bannarla"; -#elif L==8 // pl - "Nadawca dozwolony; kliknij, aby zbanować ją/jego"; -#elif L==9 // pt - "Remetente permitido; clique para banir ela/ele"; -#elif L==10 // tr - "Sender permitted; click to ban her/him"; // Çeviri lazim! -#endif - const char *Txt_Session = #if L==1 // ca "Sessió"; @@ -47225,29 +47064,6 @@ const char *Txt_Tag_allowed = "Tag allowed"; // Çeviri lazim! #endif -const char *Txt_Tag_X_allowed_Click_to_disable_it = // Warning: it is very important to include %s in the following sentences -#if L==1 // ca - "Descriptor %s permès. Premeu per prohibir-ho."; -#elif L==2 // de - "Tag %s erlaubt. Klicken Sie, um es zu deaktivieren."; -#elif L==3 // en - "Tag %s allowed. Click to disable it."; -#elif L==4 // es - "Descriptor %s permitido. Pulse para prohibirlo."; -#elif L==5 // fr - "Balise %s autorisée. Cliquez pour le désactiver."; -#elif L==6 // gn - "Descriptor %s permitido. Pulse para prohibirlo."; // Okoteve traducción -#elif L==7 // it - "Etichetta %s autorizzata. Clicca per censurarla."; -#elif L==8 // pl - "Tag %s dozwolony. Kliknij, aby go wyłączyć."; -#elif L==9 // pt - "Descritor %s permitido. Clique para proibir."; -#elif L==10 // tr - "Tag %s allowed. Click to disable it."; // Çeviri lazim! -#endif - const char *Txt_Tag_not_allowed = #if L==1 // ca "Descriptor no permès"; @@ -47271,29 +47087,6 @@ const char *Txt_Tag_not_allowed = "Tag not allowed"; // Çeviri lazim! #endif -const char *Txt_Tag_X_not_allowed_Click_to_allow_it = // Warning: it is very important to include %s in the following sentences -#if L==1 // ca - "Descriptor %s no permès. Premeu per permetre-ho."; -#elif L==2 // de - "Tag %s nicht erlaubt. Klicken Sie, um es zuzulassen."; -#elif L==3 // en - "Tag %s not allowed. Click to allow it."; -#elif L==4 // es - "Descriptor %s no permitido. Pulse para permitirlo."; -#elif L==5 // fr - "Balise %s non autorisée. Cliquez pour l'autoriser."; -#elif L==6 // gn - "Descriptor %s no permitido. Pulse para permitirlo."; // Okoteve traducción -#elif L==7 // it - "Etichetta %s censurata. Clicca per autorizzarla."; -#elif L==8 // pl - "Tag %s jest niedozwolony. Kliknij, aby na to zezwolić."; -#elif L==9 // pt - "Descritor %s não permitido. Clique para permitir."; -#elif L==10 // tr - "Tag %s not allowed. Click to allow it."; // Çeviri lazim! -#endif - #if defined LOCALHOST_UBUNTU // localhost (Ubuntu) ***************** const char *Txt_TAGLINE = @@ -58449,29 +58242,6 @@ const char *Txt_View_survey = "View survey"; // Çeviri lazim! #endif -const char *Txt_View_test = -#if L==1 // ca - "Veure test"; -#elif L==2 // de - "Siehe Test"; -#elif L==3 // en - "View test"; -#elif L==4 // es - "Ver test"; -#elif L==5 // fr - "Voir test"; -#elif L==6 // gn - "Ver test"; // Okoteve traducción -#elif L==7 // it - "Vedi test"; -#elif L==8 // pl - "Wiadomości test"; -#elif L==9 // pt - "Ver teste"; -#elif L==10 // tr - "View test"; // Çeviri lazim! -#endif - const char *Txt_View_homework = #if L==1 // ca "Veure treballs"; diff --git a/swad_text_action.c b/swad_text_action.c index 2b2b300b..c5bab5c5 100644 --- a/swad_text_action.c +++ b/swad_text_action.c @@ -430,25 +430,25 @@ const char *Txt_Actions[Act_NUM_ACTIONS] = , [ActLogOut] = #if L==1 // ca - "Close session" // Necessita traducció + "Tancar sessió" #elif L==2 // de - "Close session" // Need Übersetzung + "Abmelden" #elif L==3 // en - "Close session" + "Log out" #elif L==4 // es "Cerrar sesión" #elif L==5 // fr - "Close session" // Besoin de traduction + "Fermer session" #elif L==6 // gn - "Cerrar sesión" // Okoteve traducción + "Sẽ" #elif L==7 // it - "Close session" // Bisogno di traduzione + "Chiudi sessione" #elif L==8 // pl - "Close session" // Potrzebujesz tlumaczenie + "Wyloguj się" #elif L==9 // pt - "Close session" // Precisa de tradução + "Fechar sessão" #elif L==10 // tr - "Close session" // Çeviri lazim! + "Log out" // Çeviri lazim! #endif , [ActSch] = @@ -31206,71 +31206,71 @@ const char *Txt_Actions[Act_NUM_ACTIONS] = , [ActReqMsgUsr] = #if L==1 // ca - "Write message to other users" // Necessita traducció + "Write message" // Necessita traducció #elif L==2 // de - "Write message to other users" // Need Übersetzung + "Write message" // Need Übersetzung #elif L==3 // en - "Write message to other users" + "Write message" #elif L==4 // es - "Redactar mensaje a otros usuarios" + "Redactar mensaje" #elif L==5 // fr - "Write message to other users" // Besoin de traduction + "Write message" // Besoin de traduction #elif L==6 // gn - "Redactar mensaje a otros usuarios" // Okoteve traducción + "Redactar mensaje" // Okoteve traducción #elif L==7 // it - "Write message to other users" // Bisogno di traduzione + "Write message" // Bisogno di traduzione #elif L==8 // pl - "Write message to other users" // Potrzebujesz tlumaczenie + "Write message" // Potrzebujesz tlumaczenie #elif L==9 // pt - "Write message to other users" // Precisa de tradução + "Write message" // Precisa de tradução #elif L==10 // tr - "Write message to other users" // Çeviri lazim! + "Write message" // Çeviri lazim! #endif , [ActSeeSntMsg] = #if L==1 // ca - "See the messages sent" // Necessita traducció + "See messages sent" // Necessita traducció #elif L==2 // de - "See the messages sent" // Need Übersetzung + "See messages sent" // Need Übersetzung #elif L==3 // en - "See the messages sent" + "See messages sent" #elif L==4 // es "Ver mensajes enviados" #elif L==5 // fr - "See the messages sent" // Besoin de traduction + "See messages sent" // Besoin de traduction #elif L==6 // gn "Ver mensajes enviados" // Okoteve traducción #elif L==7 // it - "See the messages sent" // Bisogno di traduzione + "See messages sent" // Bisogno di traduzione #elif L==8 // pl - "See the messages sent" // Potrzebujesz tlumaczenie + "See messages sent" // Potrzebujesz tlumaczenie #elif L==9 // pt - "See the messages sent" // Precisa de tradução + "See messages sent" // Precisa de tradução #elif L==10 // tr - "See the messages sent" // Çeviri lazim! + "See messages sent" // Çeviri lazim! #endif , [ActRcvMsgUsr] = #if L==1 // ca - "Send message to other users" // Necessita traducció + "Send message" // Necessita traducció #elif L==2 // de - "Send message to other users" // Need Übersetzung + "Send message" // Need Übersetzung #elif L==3 // en - "Send message to other users" + "Send message" #elif L==4 // es - "Enviar un mensaje a otros usuarios" + "Enviar mensaje" #elif L==5 // fr - "Send message to other users" // Besoin de traduction + "Send message" // Besoin de traduction #elif L==6 // gn - "Enviar un mensaje a otros usuarios" // Okoteve traducción + "Enviar mensaje" // Okoteve traducción #elif L==7 // it - "Send message to other users" // Bisogno di traduzione + "Send message" // Bisogno di traduzione #elif L==8 // pl - "Send message to other users" // Potrzebujesz tlumaczenie + "Send message" // Potrzebujesz tlumaczenie #elif L==9 // pt - "Send message to other users" // Precisa de tradução + "Send message" // Precisa de tradução #elif L==10 // tr - "Send message to other users" // Çeviri lazim! + "Send message" // Çeviri lazim! #endif , [ActReqDelAllSntMsg] = diff --git a/swad_timeline_comment.c b/swad_timeline_comment.c index 59168b57..2a0da63f 100644 --- a/swad_timeline_comment.c +++ b/swad_timeline_comment.c @@ -702,8 +702,8 @@ static void TmlCom_PutFormToRemoveComm (const struct Tml_Timeline *Timeline, /* Icon to remove */ Ico_PutIconLink ("trash.svg",Ico_RED, - Act_GetActionText (Gbl.Usrs.Other.UsrDat.UsrCod > 0 ? TmlFrm_ActionUsr[TmlFrm_REQ_REM_COMM] : - TmlFrm_ActionGbl[TmlFrm_REQ_REM_COMM])); + Gbl.Usrs.Other.UsrDat.UsrCod > 0 ? TmlFrm_ActionUsr[TmlFrm_REQ_REM_COMM] : + TmlFrm_ActionGbl[TmlFrm_REQ_REM_COMM]); /* End form */ TmlFrm_EndForm (); diff --git a/swad_timeline_form.c b/swad_timeline_form.c index a2db5ca7..f6b4a7a2 100644 --- a/swad_timeline_form.c +++ b/swad_timeline_form.c @@ -227,7 +227,7 @@ void TmlFrm_FormFavSha (const struct Tml_Form *Form) Frm_BeginFormUniqueAnchorOnSubmit (ActUnk,"timeline",OnSubmit); free (OnSubmit); Ico_PutIconLink (Form->Icon,Form->Color, - Act_GetActionText (TmlFrm_ActionUsr[Form->Action])); + TmlFrm_ActionUsr[Form->Action]); } else { @@ -241,7 +241,7 @@ void TmlFrm_FormFavSha (const struct Tml_Form *Form) Frm_BeginFormUniqueAnchorOnSubmit (ActUnk,NULL,OnSubmit); free (OnSubmit); Ico_PutIconLink (Form->Icon,Form->Color, - Act_GetActionText (TmlFrm_ActionGbl[Form->Action])); + TmlFrm_ActionGbl[Form->Action]); } Frm_EndForm (); } diff --git a/swad_timeline_note.c b/swad_timeline_note.c index 56350c15..923d6b49 100644 --- a/swad_timeline_note.c +++ b/swad_timeline_note.c @@ -870,8 +870,8 @@ static void TmlNot_PutFormToRemoveNote (const struct Tml_Timeline *Timeline, /* Icon to remove */ Ico_PutIconLink ("trash.svg",Ico_RED, - Act_GetActionText (Gbl.Usrs.Other.UsrDat.UsrCod > 0 ? TmlFrm_ActionUsr[TmlFrm_REQ_REM_NOTE] : - TmlFrm_ActionGbl[TmlFrm_REQ_REM_NOTE])); + Gbl.Usrs.Other.UsrDat.UsrCod > 0 ? TmlFrm_ActionUsr[TmlFrm_REQ_REM_NOTE] : + TmlFrm_ActionGbl[TmlFrm_REQ_REM_NOTE]); /* End form */ TmlFrm_EndForm (); diff --git a/swad_user.c b/swad_user.c index 609c1bcb..374574ff 100644 --- a/swad_user.c +++ b/swad_user.c @@ -1336,11 +1336,8 @@ void Usr_FilterUsrBirthday (struct Dat_Date *Birthday) void Usr_PutFormLogIn (void) { - extern const char *Txt_Log_in; - - /***** Link to log in form *****/ Frm_BeginForm (ActFrmLogIn); - Ico_PutIconLink ("sign-in-alt.svg",Ico_WHITE,Txt_Log_in); + Ico_PutIconLink ("sign-in-alt.svg",Ico_WHITE,ActFrmLogIn); Frm_EndForm (); } @@ -1403,11 +1400,8 @@ void Usr_WriteLoggedUsrHead (void) void Usr_PutFormLogOut (void) { - extern const char *Txt_Log_out; - - /***** Link to log out form *****/ Frm_BeginForm (ActLogOut); - Ico_PutIconLink ("sign-out-alt.svg",Ico_WHITE,Txt_Log_out); + Ico_PutIconLink ("sign-out-alt.svg",Ico_WHITE,ActLogOut); Frm_EndForm (); }