From 5543e7285f0d43b76d8ab49e6b7f7eacfdc55947 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Thu, 25 May 2017 14:25:22 +0200 Subject: [PATCH] Version 16.224.2 --- swad_account.c | 4 ++-- swad_action.c | 13 ++++++++----- swad_action.h | 1 + swad_agenda.c | 3 ++- swad_assignment.c | 2 +- swad_centre.c | 2 +- swad_changelog.h | 5 ++--- swad_course.c | 2 +- swad_degree.c | 2 +- swad_enrolment.c | 10 +++++----- swad_exam.c | 2 +- swad_file_browser.c | 4 ++-- swad_forum.c | 2 +- swad_group.c | 5 +++-- swad_indicator.c | 20 +++++++++----------- swad_institution.c | 2 +- swad_message.c | 4 ++-- swad_notice.c | 2 +- swad_photo.c | 4 ++-- swad_record.c | 2 +- swad_social.c | 8 ++++---- swad_survey.c | 4 ++-- swad_test.c | 4 ++-- swad_user.c | 44 ++++++++++++++++---------------------------- 24 files changed, 71 insertions(+), 80 deletions(-) diff --git a/swad_account.c b/swad_account.c index 71f938b03..1e4b4946e 100644 --- a/swad_account.c +++ b/swad_account.c @@ -920,7 +920,7 @@ void Acc_AskIfRemoveMyAccount (void) Act_FormEnd (); /* End alert */ - Ale_ShowAlertAndButton2 (ActUnk,NULL,NULL,Lay_NO_BUTTON,NULL); + Ale_ShowAlertAndButton2 (ActUnk,NULL,NULL,NULL,Lay_NO_BUTTON,NULL); } static void Acc_AskIfRemoveOtherUsrAccount (void) @@ -946,7 +946,7 @@ static void Acc_AskIfRemoveOtherUsrAccount (void) Act_FormEnd (); /* End alert */ - Ale_ShowAlertAndButton2 (ActUnk,NULL,NULL,Lay_NO_BUTTON,NULL); + Ale_ShowAlertAndButton2 (ActUnk,NULL,NULL,NULL,Lay_NO_BUTTON,NULL); } else Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_); diff --git a/swad_action.c b/swad_action.c index 7082714c1..3242f1a73 100644 --- a/swad_action.c +++ b/swad_action.c @@ -4776,21 +4776,24 @@ void Act_FormGoToStart (Act_Action_t NextAction) void Act_FormStart (Act_Action_t NextAction) { - Act_FormStartAnchor (NextAction,NULL); + Act_FormStartAnchorOnSubmit (NextAction,NULL,NULL); } void Act_FormStartAnchor (Act_Action_t NextAction,const char *Anchor) { - Gbl.Form.Num++; // Initialized to -1. The first time it is incremented, it will be equal to 0 - sprintf (Gbl.Form.Id,"form_%d",Gbl.Form.Num); - Act_FormStartInternal (NextAction,true,Gbl.Form.Id,Anchor,NULL); // Do put now parameter location (if no open session) + Act_FormStartAnchorOnSubmit (NextAction,Anchor,NULL); } void Act_FormStartOnSubmit (Act_Action_t NextAction,const char *OnSubmit) + { + Act_FormStartAnchorOnSubmit (NextAction,NULL,OnSubmit); + } + +void Act_FormStartAnchorOnSubmit (Act_Action_t NextAction,const char *Anchor,const char *OnSubmit) { Gbl.Form.Num++; // Initialized to -1. The first time it is incremented, it will be equal to 0 sprintf (Gbl.Form.Id,"form_%d",Gbl.Form.Num); - Act_FormStartInternal (NextAction,true,Gbl.Form.Id,NULL,OnSubmit); // Do put now parameter location (if no open session) + Act_FormStartInternal (NextAction,true,Gbl.Form.Id,Anchor,OnSubmit); // Do put now parameter location (if no open session) } void Act_FormStartUnique (Act_Action_t NextAction) diff --git a/swad_action.h b/swad_action.h index 294d1a312..3970209b9 100644 --- a/swad_action.h +++ b/swad_action.h @@ -1564,6 +1564,7 @@ char *Act_GetActionTextFromDB (long ActCod, void Act_FormGoToStart (Act_Action_t NextAction); void Act_FormStart (Act_Action_t NextAction); void Act_FormStartOnSubmit (Act_Action_t NextAction,const char *OnSubmit); +void Act_FormStartAnchorOnSubmit (Act_Action_t NextAction,const char *Anchor,const char *OnSubmit); void Act_FormStartUnique (Act_Action_t NextAction); void Act_FormStartAnchor (Act_Action_t NextAction,const char *Anchor); void Act_FormStartUniqueAnchor (Act_Action_t NextAction,const char *Anchor); diff --git a/swad_agenda.c b/swad_agenda.c index a213d7787..1d11fd90b 100644 --- a/swad_agenda.c +++ b/swad_agenda.c @@ -1302,7 +1302,8 @@ void Agd_AskRemEvent (void) sprintf (Gbl.Alert.Txt,Txt_Do_you_really_want_to_remove_the_event_X, AgdEvent.Event); Ale_ShowAlertAndButton (Ale_QUESTION,Gbl.Alert.Txt, - ActRemEvtMyAgd,NULL,Agd_PutCurrentParamsMyAgenda, + ActRemEvtMyAgd,NULL,NULL, + Agd_PutCurrentParamsMyAgenda, Lay_REMOVE_BUTTON,Txt_Remove_event); /***** Show events again *****/ diff --git a/swad_assignment.c b/swad_assignment.c index 15978d9fe..ff7580d51 100644 --- a/swad_assignment.c +++ b/swad_assignment.c @@ -974,7 +974,7 @@ void Asg_ReqRemAssignment (void) sprintf (Gbl.Alert.Txt,Txt_Do_you_really_want_to_remove_the_assignment_X, Asg.Title); Ale_ShowAlertAndButton (Ale_QUESTION,Gbl.Alert.Txt, - ActRemAsg,NULL,Asg_PutParams, + ActRemAsg,NULL,NULL,Asg_PutParams, Lay_REMOVE_BUTTON,Txt_Remove_assignment); /***** Show assignments again *****/ diff --git a/swad_centre.c b/swad_centre.c index f39efecb6..757d62444 100644 --- a/swad_centre.c +++ b/swad_centre.c @@ -2162,7 +2162,7 @@ static void Ctr_ShowAlertAndButtonToGoToCtr (void) /***** Alert with button to go to centre *****/ sprintf (Gbl.Title,Txt_Go_to_X,Gbl.Ctrs.EditingCtr.ShrtName); Ale_ShowAlertAndButton (Gbl.Alert.Type,Gbl.Alert.Txt, - ActSeeDeg,NULL,Ctr_PutParamGoToCtr, + ActSeeDeg,NULL,NULL,Ctr_PutParamGoToCtr, Lay_CONFIRM_BUTTON,Gbl.Title); } else diff --git a/swad_changelog.h b/swad_changelog.h index e952dc374..83c9172bb 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -231,19 +231,18 @@ // TODO: Statistics of hits in course accessible by non-editing teachers. -// TODO: "Mostrar de todos modos" button integrated in alert - /*****************************************************************************/ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 16.224.1 (2017-05-25)" +#define Log_PLATFORM_VERSION "SWAD 16.224.2 (2017-05-25)" #define CSS_FILE "swad16.222.css" #define JS_FILE "swad16.206.3.js" // Number of lines (includes comments but not blank lines) has been got with the following command: // nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*?.h sql/swad*.sql | tail -1 /* + Version 16.224.2: May 25, 2017 Button to show big list of users/courses integrated in alert. (220465 lines) Version 16.224.1: May 25, 2017 User lists are shown when changing type of listing. (220463 lines) Version 16.224: May 25, 2017 Code refactoring related to sections. (220459 lines) Version 16.223.2: May 25, 2017 User lists are shown when clicking on "Update students". (220435 lines) diff --git a/swad_course.c b/swad_course.c index cf0f6640f..65a1f8a6f 100644 --- a/swad_course.c +++ b/swad_course.c @@ -2802,7 +2802,7 @@ void Crs_ContEditAfterChgCrs (void) } /***** End alert *****/ - Ale_ShowAlertAndButton2 (ActUnk,NULL,NULL,Lay_NO_BUTTON,NULL); + Ale_ShowAlertAndButton2 (ActUnk,NULL,NULL,NULL,Lay_NO_BUTTON,NULL); /***** Show the form again *****/ Crs_EditCourses (); diff --git a/swad_degree.c b/swad_degree.c index 871f0d214..98548d8f9 100644 --- a/swad_degree.c +++ b/swad_degree.c @@ -2276,7 +2276,7 @@ void Deg_ShowAlertAndButtonToGoToDeg (void) /***** Alert with button to go to degree *****/ sprintf (Gbl.Title,Txt_Go_to_X,Gbl.Degs.EditingDeg.ShrtName); Ale_ShowAlertAndButton (Gbl.Alert.Type,Gbl.Alert.Txt, - ActSeeCrs,NULL,Deg_PutParamGoToDeg, + ActSeeCrs,NULL,NULL,Deg_PutParamGoToDeg, Lay_CONFIRM_BUTTON,Gbl.Title); } else diff --git a/swad_enrolment.c b/swad_enrolment.c index 5a510eb97..c945c22d3 100644 --- a/swad_enrolment.c +++ b/swad_enrolment.c @@ -1854,7 +1854,7 @@ void Enr_AskRemAllStdsThisCrs (void) Act_FormEnd (); /* End alert */ - Ale_ShowAlertAndButton2 (ActUnk,NULL,NULL,Lay_NO_BUTTON,NULL); + Ale_ShowAlertAndButton2 (ActUnk,NULL,NULL,NULL,Lay_NO_BUTTON,NULL); } else /***** Show warning indicating no students found *****/ @@ -2143,7 +2143,7 @@ void Enr_AskIfRejectSignUp (void) Rec_ShowSharedRecordUnmodifiable (&Gbl.Usrs.Other.UsrDat); /* End alert */ - Ale_ShowAlertAndButton2 (ActRejSignUp,NULL, + Ale_ShowAlertAndButton2 (ActRejSignUp,NULL,NULL, Usr_PutParamOtherUsrCodEncrypted, Lay_REMOVE_BUTTON,Txt_Reject); } @@ -3647,7 +3647,7 @@ static void Enr_ReqAddAdm (Sco_Scope_t Scope,long Cod,const char *InsCtrDegName) Rec_ShowSharedRecordUnmodifiable (&Gbl.Usrs.Other.UsrDat); /* End alert */ - Ale_ShowAlertAndButton2 (Enr_ActNewAdm[Scope],NULL, + Ale_ShowAlertAndButton2 (Enr_ActNewAdm[Scope],NULL,NULL, Usr_PutParamOtherUsrCodEncrypted, Lay_CREATE_BUTTON,Txt_Register_user_IN_A_COURSE_OR_DEGREE); } @@ -4079,7 +4079,7 @@ static void Enr_AskIfRemoveUsrFromCrs (struct UsrData *UsrDat,bool ItsMe) Act_FormEnd (); /* End alert */ - Ale_ShowAlertAndButton2 (ActUnk,NULL,NULL,Lay_NO_BUTTON,NULL); + Ale_ShowAlertAndButton2 (ActUnk,NULL,NULL,NULL,Lay_NO_BUTTON,NULL); } else Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_); @@ -4179,7 +4179,7 @@ static void Enr_AskIfRemAdm (bool ItsMe,Sco_Scope_t Scope,const char *InsCtrDegN Rec_ShowSharedRecordUnmodifiable (&Gbl.Usrs.Other.UsrDat); /* End alert */ - Ale_ShowAlertAndButton2 (Enr_ActRemAdm[Scope],NULL, + Ale_ShowAlertAndButton2 (Enr_ActRemAdm[Scope],NULL,NULL, Usr_PutParamOtherUsrCodEncrypted, Lay_REMOVE_BUTTON, ItsMe ? Txt_Remove_me_as_an_administrator : diff --git a/swad_exam.c b/swad_exam.c index 00ae1f024..00b8282f5 100644 --- a/swad_exam.c +++ b/swad_exam.c @@ -372,7 +372,7 @@ void Exa_ReqRemoveExamAnnouncement (void) Exa_FreeMemExamAnnouncement (); /* End alert */ - Ale_ShowAlertAndButton2 (ActRemExaAnn,NULL,Exa_PutParamExaCodToEdit, + Ale_ShowAlertAndButton2 (ActRemExaAnn,NULL,NULL,Exa_PutParamExaCodToEdit, Lay_REMOVE_BUTTON,Txt_Remove); } diff --git a/swad_file_browser.c b/swad_file_browser.c index 21bf27172..0f5125f17 100644 --- a/swad_file_browser.c +++ b/swad_file_browser.c @@ -6241,7 +6241,7 @@ void Brw_AskRemFileFromTree (void) sprintf (Gbl.Alert.Txt,Txt_Do_you_really_want_to_remove_FILE_OR_LINK_X, FileNameToShow); Ale_ShowAlertAndButton (Ale_QUESTION,Gbl.Alert.Txt, - Brw_ActRemoveFile[Gbl.FileBrowser.Type],NULL, + Brw_ActRemoveFile[Gbl.FileBrowser.Type],NULL,NULL, Brw_PutParamsRemFile, Lay_REMOVE_BUTTON, Gbl.FileBrowser.FileType == Brw_IS_FILE ? Txt_Remove_file : @@ -6386,7 +6386,7 @@ static void Brw_AskConfirmRemoveFolderNotEmpty (void) sprintf (Gbl.Alert.Txt,Txt_Do_you_really_want_to_remove_the_folder_X, Gbl.FileBrowser.FilFolLnkName); Ale_ShowAlertAndButton (Ale_QUESTION,Gbl.Alert.Txt, - Brw_ActRemoveFolderNotEmpty[Gbl.FileBrowser.Type],NULL, + Brw_ActRemoveFolderNotEmpty[Gbl.FileBrowser.Type],NULL,NULL, Brw_PutParamsRemFolder, Lay_REMOVE_BUTTON,Txt_Remove_folder); } diff --git a/swad_forum.c b/swad_forum.c index d188a0f8d..39410b570 100644 --- a/swad_forum.c +++ b/swad_forum.c @@ -4156,7 +4156,7 @@ void For_RequestRemoveThread (void) Txt_Do_you_really_want_to_remove_the_entire_thread); Ale_ShowAlertAndButton (Ale_QUESTION,Gbl.Alert.Txt, For_ActionsDelThrFor[Gbl.Forum.ForumSelected.Type], - For_FORUM_THREADS_SECTION_ID, + For_FORUM_THREADS_SECTION_ID,NULL, For_PutAllHiddenParamsRemThread, Lay_REMOVE_BUTTON,Txt_Remove_thread); Lay_EndSection (); diff --git a/swad_group.c b/swad_group.c index d61a568fa..714222a9b 100644 --- a/swad_group.c +++ b/swad_group.c @@ -3509,7 +3509,7 @@ static void Grp_AskConfirmRemGrpTypWithGrps (unsigned NumGrps) sprintf (Gbl.Alert.Txt,Txt_Do_you_really_want_to_remove_the_type_of_group_X_Y_groups_, Gbl.CurrentCrs.Grps.GrpTyp.GrpTypName,NumGrps); Ale_ShowAlertAndButton (Ale_QUESTION,Gbl.Alert.Txt, - ActRemGrpTyp,Grp_GROUP_TYPES_SECTION_ID, + ActRemGrpTyp,Grp_GROUP_TYPES_SECTION_ID,NULL, Grp_PutParamRemGrpTyp, Lay_REMOVE_BUTTON,Txt_Remove_type_of_group); @@ -3562,7 +3562,8 @@ static void Grp_AskConfirmRemGrp (void) sprintf (Gbl.Alert.Txt,Txt_Do_you_really_want_to_remove_the_group_X_Y_students_, GrpDat.GrpName,NumStds); Ale_ShowAlertAndButton (Ale_QUESTION,Gbl.Alert.Txt, - ActRemGrp,Grp_GROUPS_SECTION_ID,Grp_PutParamRemGrp, + ActRemGrp,Grp_GROUPS_SECTION_ID,NULL, + Grp_PutParamRemGrp, Lay_REMOVE_BUTTON,Txt_Remove_group); /***** Show the form to edit groups again *****/ diff --git a/swad_indicator.c b/swad_indicator.c index 2036844b2..a99ab4b96 100644 --- a/swad_indicator.c +++ b/swad_indicator.c @@ -65,6 +65,7 @@ static void Ind_GetParamNumIndicators (void); static unsigned Ind_GetTableOfCourses (MYSQL_RES **mysql_res); static bool Ind_GetIfShowBigList (unsigned NumCrss); static void Ind_PutButtonToConfirmIWantToSeeBigList (unsigned NumCrss); +static void Ind_PutParamsConfirmIWantToSeeBigList (void); static void Ind_GetNumCoursesWithIndicators (unsigned NumCrssWithIndicatorYes[1 + Ind_NUM_INDICATORS], unsigned NumCrss,MYSQL_RES *mysql_res); @@ -517,26 +518,23 @@ static void Ind_PutButtonToConfirmIWantToSeeBigList (unsigned NumCrss) extern const char *Txt_The_list_of_X_courses_is_too_large_to_be_displayed; extern const char *Txt_Show_anyway; - fprintf (Gbl.F.Out,"
"); - - /***** Show warning *****/ + /***** Show alert and button to confirm that I want to see the big list *****/ sprintf (Gbl.Alert.Txt,Txt_The_list_of_X_courses_is_too_large_to_be_displayed, NumCrss); - Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); + Ale_ShowAlertAndButton (Ale_WARNING,Gbl.Alert.Txt, + Gbl.Action.Act,NULL,NULL, + Ind_PutParamsConfirmIWantToSeeBigList, + Lay_CONFIRM_BUTTON,Txt_Show_anyway); + } - /***** Put form to confirm that I want to see the big list *****/ - Act_FormStart (Gbl.Action.Act); +static void Ind_PutParamsConfirmIWantToSeeBigList (void) + { Sco_PutParamScope ("ScopeInd",Gbl.Scope.Current); Par_PutHiddenParamLong ("OthDegTypCod",Gbl.Stat.DegTypCod); Par_PutHiddenParamLong ("DptCod",Gbl.Stat.DptCod); if (Gbl.Stat.StrIndicatorsSelected[0]) Par_PutHiddenParamString ("Indicators",Gbl.Stat.StrIndicatorsSelected); Par_PutHiddenParamChar ("ShowBigList",'Y'); - - /***** Send button *****/ - Lay_PutConfirmButton (Txt_Show_anyway); - Act_FormEnd (); - fprintf (Gbl.F.Out,"
"); } /*****************************************************************************/ diff --git a/swad_institution.c b/swad_institution.c index dae930e35..f7213df9f 100644 --- a/swad_institution.c +++ b/swad_institution.c @@ -2094,7 +2094,7 @@ static void Ins_ShowAlertAndButtonToGoToIns (void) /***** Alert with button to go to degree *****/ sprintf (Gbl.Title,Txt_Go_to_X,Gbl.Inss.EditingIns.ShrtName); Ale_ShowAlertAndButton (Gbl.Alert.Type,Gbl.Alert.Txt, - ActSeeCtr,NULL,Ins_PutParamGoToIns, + ActSeeCtr,NULL,NULL,Ins_PutParamGoToIns, Lay_CONFIRM_BUTTON,Gbl.Title); } else diff --git a/swad_message.c b/swad_message.c index c323ced0b..1643b7398 100644 --- a/swad_message.c +++ b/swad_message.c @@ -892,7 +892,7 @@ void Msg_ReqDelAllRecMsgs (void) Msg_ShowSentOrReceivedMessages (); /* End alert */ - Ale_ShowAlertAndButton2 (ActDelAllRcvMsg,NULL, + Ale_ShowAlertAndButton2 (ActDelAllRcvMsg,NULL,NULL, Msg_PutHiddenParamsMsgsFilters, Lay_REMOVE_BUTTON,Txt_Delete_messages_received); } @@ -932,7 +932,7 @@ void Msg_ReqDelAllSntMsgs (void) Msg_ShowSentOrReceivedMessages (); /* End alert */ - Ale_ShowAlertAndButton2 (ActDelAllSntMsg,NULL, + Ale_ShowAlertAndButton2 (ActDelAllSntMsg,NULL,NULL, Msg_PutHiddenParamsMsgsFilters, Lay_REMOVE_BUTTON,Txt_Delete_messages_sent); } diff --git a/swad_notice.c b/swad_notice.c index c37a2e94f..f415f558f 100644 --- a/swad_notice.c +++ b/swad_notice.c @@ -280,7 +280,7 @@ void Not_RequestRemNotice (void) Not_GetDataAndShowNotice (Gbl.CurrentCrs.Notices.NotCod); /* End alert */ - Ale_ShowAlertAndButton2 (ActRemNot,NULL,Not_PutParams, + Ale_ShowAlertAndButton2 (ActRemNot,NULL,NULL,Not_PutParams, Lay_REMOVE_BUTTON,Txt_Remove); /***** Show all notices *****/ diff --git a/swad_photo.c b/swad_photo.c index 4c9157869..8024066a7 100644 --- a/swad_photo.c +++ b/swad_photo.c @@ -462,7 +462,7 @@ void Pho_ReqRemoveMyPhoto (void) "PHOTO186x248",Pho_NO_ZOOM,false); /* End alert */ - Ale_ShowAlertAndButton2 (ActRemMyPho,NULL,NULL, + Ale_ShowAlertAndButton2 (ActRemMyPho,NULL,NULL,NULL, Lay_REMOVE_BUTTON,Txt_Remove_photo); } else @@ -537,7 +537,7 @@ void Pho_ReqRemoveUsrPhoto (void) NextAction = ActRemOthPho; break; } - Ale_ShowAlertAndButton2 (NextAction,NULL, + Ale_ShowAlertAndButton2 (NextAction,NULL,NULL, Usr_PutParamOtherUsrCodEncrypted, Lay_REMOVE_BUTTON,Txt_Remove_photo); } diff --git a/swad_record.c b/swad_record.c index 6b4698ea9..5a22837c8 100644 --- a/swad_record.c +++ b/swad_record.c @@ -655,7 +655,7 @@ void Rec_AskConfirmRemFieldWithRecords (unsigned NumRecords) Ale_MAX_BYTES_ALERT); } Ale_ShowAlertAndButton (Ale_QUESTION,Gbl.Alert.Txt, - ActRemFie,NULL,Rec_PutParamFielCod, + ActRemFie,NULL,NULL,Rec_PutParamFielCod, Lay_REMOVE_BUTTON,Txt_Remove_record_field); /***** List record fields again *****/ diff --git a/swad_social.c b/swad_social.c index 233a393f0..16adb481d 100644 --- a/swad_social.c +++ b/swad_social.c @@ -3664,11 +3664,11 @@ static void Soc_RequestRemovalSocialNote (void) /* End alert */ Gbl.Social.NotCod = SocNot.NotCod; // Social note to be removed if (Gbl.Usrs.Other.UsrDat.UsrCod > 0) - Ale_ShowAlertAndButton2 (ActRemSocPubUsr,"timeline", + Ale_ShowAlertAndButton2 (ActRemSocPubUsr,"timeline",NULL, Soc_PutParamsRemoveSocialNote, Lay_REMOVE_BUTTON,Txt_Remove); else - Ale_ShowAlertAndButton2 (ActRemSocPubGbl,NULL, + Ale_ShowAlertAndButton2 (ActRemSocPubGbl,NULL,NULL, Soc_PutParamsRemoveSocialNote, Lay_REMOVE_BUTTON,Txt_Remove); } @@ -4002,11 +4002,11 @@ static void Soc_RequestRemovalSocialComment (void) /* End alert */ Gbl.Social.PubCod = SocCom.PubCod; // Social publishing to be removed if (Gbl.Usrs.Other.UsrDat.UsrCod > 0) - Ale_ShowAlertAndButton2 (ActRemSocComUsr,"timeline", + Ale_ShowAlertAndButton2 (ActRemSocComUsr,"timeline",NULL, Soc_PutParamsRemoveSocialCommment, Lay_REMOVE_BUTTON,Txt_Remove); else - Ale_ShowAlertAndButton2 (ActRemSocComGbl,NULL, + Ale_ShowAlertAndButton2 (ActRemSocComGbl,NULL,NULL, Soc_PutParamsRemoveSocialCommment, Lay_REMOVE_BUTTON,Txt_Remove); } diff --git a/swad_survey.c b/swad_survey.c index f37810785..5fa185bbb 100644 --- a/swad_survey.c +++ b/swad_survey.c @@ -1497,7 +1497,7 @@ void Svy_AskRemSurvey (void) sprintf (Gbl.Alert.Txt,Txt_Do_you_really_want_to_remove_the_survey_X, Svy.Title); Ale_ShowAlertAndButton (Ale_QUESTION,Gbl.Alert.Txt, - ActRemSvy,NULL,Svy_PutParams, + ActRemSvy,NULL,NULL,Svy_PutParams, Lay_REMOVE_BUTTON,Txt_Remove_survey); /***** Show surveys again *****/ @@ -3531,7 +3531,7 @@ void Svy_RequestRemoveQst (void) sprintf (Gbl.Alert.Txt,Txt_Do_you_really_want_to_remove_the_question_X, (unsigned long) (SvyQst.QstInd + 1)); Ale_ShowAlertAndButton (Ale_QUESTION,Gbl.Alert.Txt, - ActRemSvyQst,NULL,Svy_PutParamsRemoveOneQst, + ActRemSvyQst,NULL,NULL,Svy_PutParamsRemoveOneQst, Lay_REMOVE_BUTTON,Txt_Remove_question); /***** Show current survey *****/ diff --git a/swad_test.c b/swad_test.c index 679524610..7b9990495 100644 --- a/swad_test.c +++ b/swad_test.c @@ -5878,13 +5878,13 @@ void Tst_RequestRemoveQst (void) (unsigned long) Gbl.Test.QstCod); if (EditingOnlyThisQst) Ale_ShowAlertAndButton (Ale_QUESTION,Gbl.Alert.Txt, - ActRemTstQst,NULL, + ActRemTstQst,NULL,NULL, Tst_PutParamsRemoveOneQst, Lay_REMOVE_BUTTON,Txt_Remove_question); else { Ale_ShowAlertAndButton (Ale_QUESTION,Gbl.Alert.Txt, - ActRemTstQst,NULL, + ActRemTstQst,NULL,NULL, Tst_PutParamsRemoveQst, Lay_REMOVE_BUTTON,Txt_Remove_question); Tst_FreeTagsList (); diff --git a/swad_user.c b/swad_user.c index 32ce4b672..5b3d9a3c8 100644 --- a/swad_user.c +++ b/swad_user.c @@ -157,7 +157,7 @@ static void Usr_GetListUsrsFromQuery (const char *Query,Rol_Role_t Role,Sco_Scop static void Usr_AllocateUsrsList (Rol_Role_t Role); static void Usr_PutButtonToConfirmIWantToSeeBigList (unsigned NumUsrs,const char *OnSubmit); -static void Usr_ShowWarningListIsTooBig (unsigned NumUsrs); +static void Usr_PutParamsConfirmIWantToSeeBigList (void); static void Usr_AllocateListSelectedUsrCod (Rol_Role_t Role); static void Usr_AllocateListOtherRecipients (void); @@ -4892,6 +4892,7 @@ void Usr_GetUnorderedStdsCodesInDeg (long DegCod) static void Usr_GetListUsrsFromQuery (const char *Query,Rol_Role_t Role,Sco_Scope_t Scope) { + extern const char *Txt_The_list_of_X_users_is_too_large_to_be_displayed; MYSQL_RES *mysql_res; MYSQL_ROW row; unsigned NumUsr; @@ -4909,7 +4910,9 @@ static void Usr_GetListUsrsFromQuery (const char *Query,Rol_Role_t Role,Sco_Scop { if (Gbl.Usrs.LstUsrs[Role].NumUsrs > Cfg_MAX_USRS_IN_LIST) { - Usr_ShowWarningListIsTooBig (Gbl.Usrs.LstUsrs[Role].NumUsrs); + sprintf (Gbl.Alert.Txt,Txt_The_list_of_X_users_is_too_large_to_be_displayed, + Gbl.Usrs.LstUsrs[Role].NumUsrs); + Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); Abort = true; } else @@ -5153,39 +5156,24 @@ bool Usr_GetIfShowBigList (unsigned NumUsrs,const char *OnSubmit) static void Usr_PutButtonToConfirmIWantToSeeBigList (unsigned NumUsrs,const char *OnSubmit) { + extern const char *Txt_The_list_of_X_users_is_too_large_to_be_displayed; extern const char *Txt_Show_anyway; - fprintf (Gbl.F.Out,"
"); + /***** Show alert and button to confirm that I want to see the big list *****/ + sprintf (Gbl.Alert.Txt,Txt_The_list_of_X_users_is_too_large_to_be_displayed, + NumUsrs); + Ale_ShowAlertAndButton (Ale_WARNING,Gbl.Alert.Txt, + Gbl.Action.Act,NULL,OnSubmit, + Usr_PutParamsConfirmIWantToSeeBigList, + Lay_CONFIRM_BUTTON,Txt_Show_anyway); + } - /***** Show warning *****/ - Usr_ShowWarningListIsTooBig (NumUsrs); - - /***** Put form to confirm that I want to see the big list *****/ - Act_FormStartOnSubmit (Gbl.Action.Act,OnSubmit); +static void Usr_PutParamsConfirmIWantToSeeBigList (void) + { Grp_PutParamsCodGrps (); Usr_PutParamsPrefsAboutUsrList (); Usr_PutExtraParamsUsrList (Gbl.Action.Act); Par_PutHiddenParamChar ("ShowBigList",'Y'); - - /***** Send button *****/ - Lay_PutConfirmButton (Txt_Show_anyway); - - Act_FormEnd (); - - fprintf (Gbl.F.Out,"
"); - } - -/*****************************************************************************/ -/************************** Show big list warning ****************************/ -/*****************************************************************************/ - -static void Usr_ShowWarningListIsTooBig (unsigned NumUsrs) - { - extern const char *Txt_The_list_of_X_users_is_too_large_to_be_displayed; - - sprintf (Gbl.Alert.Txt,Txt_The_list_of_X_users_is_too_large_to_be_displayed, - NumUsrs); - Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); } /*****************************************************************************/