Version 18.46.6

This commit is contained in:
Antonio Cañas Vargas 2019-02-16 16:18:54 +01:00
parent a1c44eca91
commit 7de9865d15
17 changed files with 114 additions and 157 deletions

View File

@ -592,11 +592,11 @@ static void ID_ShowFormChangeUsrID (const struct UsrData *UsrDat,
/***** Show possible alert *****/ /***** Show possible alert *****/
if (Gbl.Alert.Section == (const char *) ID_ID_SECTION_ID) if (Gbl.Alert.Section == (const char *) ID_ID_SECTION_ID)
Ale_ShowA_old (Gbl.Alert.Type,Gbl.Alert.Txt); Ale_ShowDelayedAlert ();
/***** Help message *****/ /***** Help message *****/
if (IShouldFillInID) if (IShouldFillInID)
Ale_ShowA_old (Ale_WARNING,Txt_Please_fill_in_your_ID); Ale_ShowAlert (Ale_WARNING,Txt_Please_fill_in_your_ID);
/***** Start table *****/ /***** Start table *****/
Tbl_StartTableWide (2); Tbl_StartTableWide (2);
@ -676,7 +676,7 @@ static void ID_ShowFormChangeUsrID (const struct UsrData *UsrDat,
/***** Write help text *****/ /***** Write help text *****/
fprintf (Gbl.F.Out,"<tr>" fprintf (Gbl.F.Out,"<tr>"
"<td colspan=\"2\" class=\"DAT CENTER_MIDDLE\">"); "<td colspan=\"2\" class=\"DAT CENTER_MIDDLE\">");
Ale_ShowA_old (Ale_INFO,Txt_The_ID_is_used_in_order_to_facilitate_); Ale_ShowAlert (Ale_INFO,Txt_The_ID_is_used_in_order_to_facilitate_);
fprintf (Gbl.F.Out,"</td>" fprintf (Gbl.F.Out,"</td>"
"</tr>"); "</tr>");
@ -767,10 +767,10 @@ void ID_RemoveOtherUsrID (void)
Acc_ShowFormChgOtherUsrAccount (); Acc_ShowFormChgOtherUsrAccount ();
} }
else else
Ale_ShowA_old (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_); Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
} }
else // User not found else // User not found
Ale_ShowA_old (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_); Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
} }
/*****************************************************************************/ /*****************************************************************************/
@ -898,10 +898,10 @@ void ID_NewOtherUsrID (void)
Acc_ShowFormChgOtherUsrAccount (); Acc_ShowFormChgOtherUsrAccount ();
} }
else else
Ale_ShowA_old (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_); Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
} }
else // User not found else // User not found
Ale_ShowA_old (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_); Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -1357,7 +1357,7 @@ void Asg_RecFormAssignment (void)
else // Folder name not valid else // Folder name not valid
{ {
NewAssignmentIsCorrect = false; NewAssignmentIsCorrect = false;
Ale_ShowDelayedAlert (Ale_WARNING,Gbl.DelayedAlert.Txt); Ale_ShowDelayedAlert ();
} }
} }
else // NewAsg.SendWork == Asg_DO_NOT_SEND_WORK else // NewAsg.SendWork == Asg_DO_NOT_SEND_WORK

View File

@ -2259,7 +2259,7 @@ static void Ctr_ShowAlertAndButtonToGoToCtr (void)
} }
else else
/***** Alert *****/ /***** Alert *****/
Ale_ShowDelayedAlert (Gbl.DelayedAlert.Type,Gbl.DelayedAlert.Txt); Ale_ShowDelayedAlert ();
} }
static void Ctr_PutParamGoToCtr (void) static void Ctr_PutParamGoToCtr (void)

View File

@ -402,10 +402,11 @@ En OpenSWAD:
ps2pdf source.ps destination.pdf ps2pdf source.ps destination.pdf
*/ */
#define Log_PLATFORM_VERSION "SWAD 18.46.5 (2019-02-16)" #define Log_PLATFORM_VERSION "SWAD 18.46.6 (2019-02-16)"
#define CSS_FILE "swad18.41.1.css" #define CSS_FILE "swad18.41.1.css"
#define JS_FILE "swad18.32.1.js" #define JS_FILE "swad18.32.1.js"
/* /*
Version 18.46.6: Feb 16, 2019 Refactoring code related to alerts. (238019 lines)
Version 18.46.5: Feb 16, 2019 Refactoring code related to alerts. (238062 lines) Version 18.46.5: Feb 16, 2019 Refactoring code related to alerts. (238062 lines)
Version 18.46.4: Feb 16, 2019 Refactoring code related to alerts. (238061 lines) Version 18.46.4: Feb 16, 2019 Refactoring code related to alerts. (238061 lines)
Version 18.46.3: Feb 16, 2019 Refactoring code related to alerts. (238243 lines) Version 18.46.3: Feb 16, 2019 Refactoring code related to alerts. (238243 lines)

View File

@ -2295,7 +2295,7 @@ void Deg_ShowAlertAndButtonToGoToDeg (void)
} }
else else
/***** Alert *****/ /***** Alert *****/
Ale_ShowDelayedAlert (Gbl.DelayedAlert.Type,Gbl.DelayedAlert.Txt); Ale_ShowDelayedAlert ();
} }
static void Deg_PutParamGoToDeg (void) static void Deg_PutParamGoToDeg (void)

View File

@ -3490,7 +3490,7 @@ void Enr_RemUsrFromCrs1 (void)
void Enr_RemUsrFromCrs2 (void) void Enr_RemUsrFromCrs2 (void)
{ {
Ale_ShowDelayedAlert (Gbl.DelayedAlert.Type,Gbl.DelayedAlert.Txt); Ale_ShowDelayedAlert ();
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -8869,7 +8869,7 @@ void Brw_RecFolderFileBrowser (void)
} }
} }
else // Folder name not valid else // Folder name not valid
Ale_ShowDelayedAlert (Ale_WARNING,Gbl.DelayedAlert.Txt); Ale_ShowDelayedAlert ();
} }
else else
Lay_ShowErrorAndExit (Txt_You_can_not_create_folders_here); // It's difficult, but not impossible that a user sees this message Lay_ShowErrorAndExit (Txt_You_can_not_create_folders_here); // It's difficult, but not impossible that a user sees this message
@ -8982,7 +8982,7 @@ void Brw_RenFolderFileBrowser (void)
Gbl.FileBrowser.FilFolLnkName); Gbl.FileBrowser.FilFolLnkName);
} }
else // Folder name not valid else // Folder name not valid
Ale_ShowDelayedAlert (Ale_WARNING,Gbl.DelayedAlert.Txt); Ale_ShowDelayedAlert ();
} }
else else
Lay_ShowErrorAndExit (Txt_You_can_not_rename_this_folder); Lay_ShowErrorAndExit (Txt_You_can_not_rename_this_folder);

View File

@ -277,7 +277,7 @@ static void Gam_ListAllGames (void)
Tbl_EndTable (); Tbl_EndTable ();
} }
else // No games created else // No games created
Ale_ShowA_old (Ale_INFO,Txt_No_games); Ale_ShowAlert (Ale_INFO,Txt_No_games);
/***** Button to create a new game *****/ /***** Button to create a new game *****/
if (Gam_CheckIfICanCreateGame ()) if (Gam_CheckIfICanCreateGame ())
@ -1549,10 +1549,8 @@ void Gam_RemoveGame (void)
Game.GamCod); Game.GamCod);
/***** Write message to show the change made *****/ /***** Write message to show the change made *****/
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), Ale_ShowAlert (Ale_SUCCESS,Txt_Game_X_removed,
Txt_Game_X_removed, Game.Title);
Game.Title);
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
/***** Show games again *****/ /***** Show games again *****/
Gam_ListAllGames (); Gam_ListAllGames ();
@ -1582,10 +1580,8 @@ void Gam_AskResetGame (void)
Lay_ShowErrorAndExit ("You can not reset this game."); Lay_ShowErrorAndExit ("You can not reset this game.");
/***** Ask for confirmation of reset *****/ /***** Ask for confirmation of reset *****/
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), Ale_ShowAlert (Ale_WARNING,Txt_Do_you_really_want_to_reset_the_game_X,
Txt_Do_you_really_want_to_reset_the_game_X, Game.Title);
Game.Title);
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
/***** Button of confirmation of reset *****/ /***** Button of confirmation of reset *****/
Gbl.Games.CurrentGamCod = Game.GamCod; Gbl.Games.CurrentGamCod = Game.GamCod;
@ -1641,10 +1637,8 @@ void Gam_ResetGame (void)
Game.GamCod); Game.GamCod);
/***** Write message to show the change made *****/ /***** Write message to show the change made *****/
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), Ale_ShowAlert (Ale_SUCCESS,Txt_Game_X_reset,
Txt_Game_X_reset, Game.Title);
Game.Title);
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
/***** Show games again *****/ /***** Show games again *****/
Gam_ListAllGames (); Gam_ListAllGames ();
@ -1674,10 +1668,8 @@ void Gam_HideGame (void)
Game.GamCod); Game.GamCod);
/***** Write message to show the change made *****/ /***** Write message to show the change made *****/
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), Ale_ShowAlert (Ale_SUCCESS,Txt_Game_X_is_now_hidden,
Txt_Game_X_is_now_hidden, Game.Title);
Game.Title);
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
/***** Show games again *****/ /***** Show games again *****/
Gam_ListAllGames (); Gam_ListAllGames ();
@ -1707,10 +1699,8 @@ void Gam_UnhideGame (void)
Game.GamCod); Game.GamCod);
/***** Write message to show the change made *****/ /***** Write message to show the change made *****/
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), Ale_ShowAlert (Ale_SUCCESS,Txt_Game_X_is_now_visible,
Txt_Game_X_is_now_visible, Game.Title);
Game.Title);
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
/***** Show games again *****/ /***** Show games again *****/
Gam_ListAllGames (); Gam_ListAllGames ();
@ -2150,16 +2140,14 @@ void Gam_RecFormGame (void)
if (Gam_CheckIfSimilarGameExists (&NewGame)) if (Gam_CheckIfSimilarGameExists (&NewGame))
{ {
NewGameIsCorrect = false; NewGameIsCorrect = false;
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), Ale_ShowAlert (Ale_WARNING,Txt_Already_existed_a_game_with_the_title_X,
Txt_Already_existed_a_game_with_the_title_X, NewGame.Title);
NewGame.Title);
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
} }
} }
else // If there is not a game title else // If there is not a game title
{ {
NewGameIsCorrect = false; NewGameIsCorrect = false;
Ale_ShowA_old (Ale_WARNING,Txt_You_must_specify_the_title_of_the_game); Ale_ShowAlert (Ale_WARNING,Txt_You_must_specify_the_title_of_the_game);
} }
/***** Create a new game or update an existing one *****/ /***** Create a new game or update an existing one *****/
@ -2214,10 +2202,8 @@ static void Gam_CreateGame (struct Game *Game,const char *Txt)
Gam_CreateGrps (Game->GamCod); Gam_CreateGrps (Game->GamCod);
/***** Write success message *****/ /***** Write success message *****/
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), Ale_ShowAlert (Ale_SUCCESS,Txt_Created_new_game_X,
Txt_Created_new_game_X, Game->Title);
Game->Title);
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
} }
/*****************************************************************************/ /*****************************************************************************/
@ -2254,7 +2240,7 @@ static void Gam_UpdateGame (struct Game *Game,const char *Txt)
Gam_CreateGrps (Game->GamCod); Gam_CreateGrps (Game->GamCod);
/***** Write success message *****/ /***** Write success message *****/
Ale_ShowA_old (Ale_SUCCESS,Txt_The_game_has_been_modified); Ale_ShowAlert (Ale_SUCCESS,Txt_The_game_has_been_modified);
} }
/*****************************************************************************/ /*****************************************************************************/
@ -2792,7 +2778,7 @@ static void Gam_ListGameQuestions (struct Game *Game)
} }
} }
else // This game has no questions else // This game has no questions
Ale_ShowA_old (Ale_INFO,Txt_This_game_has_no_questions); Ale_ShowAlert (Ale_INFO,Txt_This_game_has_no_questions);
if (Game->Status.ICanEdit && // I can edit if (Game->Status.ICanEdit && // I can edit
(!NumQsts || // This game has no questions (!NumQsts || // This game has no questions
@ -3034,7 +3020,7 @@ void Gam_AddTstQuestionsToGame (void)
/* Check number of questions */ /* Check number of questions */
if (Gam_CountNumQuestionsInList () == 0) // If no questions selected... if (Gam_CountNumQuestionsInList () == 0) // If no questions selected...
{ // ...write warning alert { // ...write warning alert
Ale_ShowA_old (Ale_WARNING,Txt_You_must_select_one_ore_more_questions); Ale_ShowAlert (Ale_WARNING,Txt_You_must_select_one_ore_more_questions);
// TODO: Show form again!!! // TODO: Show form again!!!
} }
@ -3307,7 +3293,7 @@ void Gam_RemoveQst (void)
Game.GamCod,QstInd); Game.GamCod,QstInd);
/***** Write message *****/ /***** Write message *****/
Ale_ShowA_old (Ale_SUCCESS,Txt_Question_removed); Ale_ShowAlert (Ale_SUCCESS,Txt_Question_removed);
/***** Show current game *****/ /***** Show current game *****/
Gam_ShowOneGame (Game.GamCod, Gam_ShowOneGame (Game.GamCod,
@ -3353,7 +3339,7 @@ void Gam_MoveUpQst (void)
(unsigned) QstIndTop,(unsigned) QstIndBottom); (unsigned) QstIndTop,(unsigned) QstIndBottom);
/* Success alert */ /* Success alert */
Ale_ShowA_old (Ale_SUCCESS,Txt_The_question_has_been_moved_up); Ale_ShowAlert (Ale_SUCCESS,Txt_The_question_has_been_moved_up);
} }
/***** Show current game *****/ /***** Show current game *****/
@ -3405,7 +3391,7 @@ void Gam_MoveDownQst (void)
(unsigned) QstIndTop,(unsigned) QstIndBottom); (unsigned) QstIndTop,(unsigned) QstIndBottom);
/* Success alert */ /* Success alert */
Ale_ShowA_old (Ale_SUCCESS,Txt_The_question_has_been_moved_down); Ale_ShowAlert (Ale_SUCCESS,Txt_The_question_has_been_moved_down);
} }
/***** Show current game *****/ /***** Show current game *****/
@ -3576,7 +3562,7 @@ static void Gam_PlayGameShowQuestionAndAnswers (bool ShowAnswers)
" AND gam_questions.QstInd=%u" " AND gam_questions.QstInd=%u"
" AND gam_questions.QstCod=tst_questions.QstCod", " AND gam_questions.QstCod=tst_questions.QstCod",
Game.GamCod,QstInd)) Game.GamCod,QstInd))
Ale_ShowA_old (Ale_WARNING,"Questions doesn't exist."); Ale_ShowAlert (Ale_ERROR,"Question doesn't exist.");
row = mysql_fetch_row (mysql_res); row = mysql_fetch_row (mysql_res);
/***** Show question *****/ /***** Show question *****/
@ -3687,12 +3673,12 @@ void Gam_ReceiveGameAnswers (void)
/***** Check if I have no answered this game formerly *****/ /***** Check if I have no answered this game formerly *****/
if (Game.Status.IHaveAnswered) if (Game.Status.IHaveAnswered)
Ale_ShowA_old (Ale_WARNING,Txt_You_already_played_this_game_before); Ale_ShowAlert (Ale_WARNING,Txt_You_already_played_this_game_before);
else else
{ {
/***** Receive and store user's answers *****/ /***** Receive and store user's answers *****/
Gam_ReceiveAndStoreUserAnswersToAGame (Game.GamCod); Gam_ReceiveAndStoreUserAnswersToAGame (Game.GamCod);
Ale_ShowA_old (Ale_INFO,Txt_Thanks_for_playing_the_game); Ale_ShowAlert (Ale_INFO,Txt_Thanks_for_playing_the_game);
} }
/***** Show current game *****/ /***** Show current game *****/

View File

@ -238,7 +238,7 @@ static void Grp_ReqEditGroupsInternal1 (Ale_AlertType_t AlertTypeGroupTypes,cons
/***** Show optional alert *****/ /***** Show optional alert *****/
if (MessageGroupTypes) if (MessageGroupTypes)
if (MessageGroupTypes[0]) if (MessageGroupTypes[0])
Ale_ShowA_old (AlertTypeGroupTypes,MessageGroupTypes); Ale_ShowAlert (AlertTypeGroupTypes,MessageGroupTypes);
/***** Put form to edit group types *****/ /***** Put form to edit group types *****/
Grp_EditGroupTypes (); Grp_EditGroupTypes ();
@ -255,7 +255,7 @@ static void Grp_ReqEditGroupsInternal2 (Ale_AlertType_t AlertTypeGroups,const ch
/***** Show optional alert *****/ /***** Show optional alert *****/
if (MessageGroups) if (MessageGroups)
if (MessageGroups[0]) if (MessageGroups[0])
Ale_ShowA_old (AlertTypeGroups,MessageGroups); Ale_ShowAlert (AlertTypeGroups,MessageGroups);
/***** Put form to edit groups *****/ /***** Put form to edit groups *****/
if (Gbl.CurrentCrs.Grps.GrpTypes.Num) // If there are group types... if (Gbl.CurrentCrs.Grps.GrpTypes.Num) // If there are group types...
@ -292,12 +292,8 @@ static void Grp_EditGroupTypes (void)
if (Gbl.CurrentCrs.Grps.GrpTypes.Num) // Group types found... if (Gbl.CurrentCrs.Grps.GrpTypes.Num) // Group types found...
Grp_ListGroupTypesForEdition (); Grp_ListGroupTypesForEdition ();
else // No group types found in this course else // No group types found in this course
{ Ale_ShowAlert (Ale_INFO,Txt_There_are_no_types_of_group_in_the_course_X,
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), Gbl.CurrentCrs.Crs.ShrtName);
Txt_There_are_no_types_of_group_in_the_course_X,
Gbl.CurrentCrs.Crs.ShrtName);
Ale_ShowA_old (Ale_INFO,Gbl.Alert.Txt);
}
/***** End box *****/ /***** End box *****/
Box_EndBox (); Box_EndBox ();
@ -324,12 +320,8 @@ static void Grp_EditGroups (void)
if (Gbl.CurrentCrs.Grps.GrpTypes.NumGrpsTotal) // If there are groups... if (Gbl.CurrentCrs.Grps.GrpTypes.NumGrpsTotal) // If there are groups...
Grp_ListGroupsForEdition (); Grp_ListGroupsForEdition ();
else // There are group types, but there aren't groups else // There are group types, but there aren't groups
{ Ale_ShowAlert (Ale_INFO,Txt_No_groups_have_been_created_in_the_course_X,
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), Gbl.CurrentCrs.Crs.ShrtName);
Txt_No_groups_have_been_created_in_the_course_X,
Gbl.CurrentCrs.Crs.ShrtName);
Ale_ShowA_old (Ale_INFO,Gbl.Alert.Txt);
}
/***** End box *****/ /***** End box *****/
Box_EndBox (); Box_EndBox ();
@ -1125,20 +1117,16 @@ void Grp_RegisterUsrIntoGroups (struct UsrData *UsrDat,struct ListCodGrps *LstGr
/* If the enrolment is single and the group to which the user belongs is different from the selected ==> /* If the enrolment is single and the group to which the user belongs is different from the selected ==>
remove user from the group to which he belongs */ remove user from the group to which he belongs */
Grp_RemoveUsrFromGroup (UsrDat->UsrCod,LstGrpsHeBelongs.GrpCods[NumGrpHeBelongs]); Grp_RemoveUsrFromGroup (UsrDat->UsrCod,LstGrpsHeBelongs.GrpCods[NumGrpHeBelongs]);
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), Ale_ShowAlert (Ale_SUCCESS,Txt_THE_USER_X_has_been_removed_from_the_group_of_type_Y_to_which_it_belonged,
Txt_THE_USER_X_has_been_removed_from_the_group_of_type_Y_to_which_it_belonged, UsrDat->FullName,Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypName);
UsrDat->FullName,Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypName);
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
} }
if (!AlreadyRegisteredInGrp) // If the user does not belong to the selected group if (!AlreadyRegisteredInGrp) // If the user does not belong to the selected group
{ {
Grp_AddUsrToGroup (UsrDat,LstGrps->GrpCods[NumGrpSel]); Grp_AddUsrToGroup (UsrDat,LstGrps->GrpCods[NumGrpSel]);
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), Ale_ShowAlert (Ale_SUCCESS,Txt_THE_USER_X_has_been_enroled_in_the_group_of_type_Y_Z,
Txt_THE_USER_X_has_been_enroled_in_the_group_of_type_Y_Z, UsrDat->FullName,Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypName,
UsrDat->FullName,Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypName, Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].LstGrps[NumGrpThisType].GrpName);
Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].LstGrps[NumGrpThisType].GrpName);
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
} }
break; // Once we know the type of a selected group, it's not necessary to check the rest of types break; // Once we know the type of a selected group, it's not necessary to check the rest of types
@ -1186,18 +1174,14 @@ unsigned Grp_RemoveUsrFromGroups (struct UsrData *UsrDat,struct ListCodGrps *Lst
/***** Write message to inform about how many groups the student has been removed from *****/ /***** Write message to inform about how many groups the student has been removed from *****/
if (NumGrpsHeIsRemoved == 0) if (NumGrpsHeIsRemoved == 0)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), Ale_ShowAlert (Ale_SUCCESS,Txt_THE_USER_X_has_not_been_removed_from_any_group,
Txt_THE_USER_X_has_not_been_removed_from_any_group, UsrDat->FullName);
UsrDat->FullName);
else if (NumGrpsHeIsRemoved == 1) else if (NumGrpsHeIsRemoved == 1)
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), Ale_ShowAlert (Ale_SUCCESS,Txt_THE_USER_X_has_been_removed_from_one_group,
Txt_THE_USER_X_has_been_removed_from_one_group, UsrDat->FullName);
UsrDat->FullName);
else // NumGrpsHeIsRemoved > 1 else // NumGrpsHeIsRemoved > 1
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), Ale_ShowAlert (Ale_SUCCESS,Txt_THE_USER_X_has_been_removed_from_Y_groups,
Txt_THE_USER_X_has_been_removed_from_Y_groups, UsrDat->FullName,NumGrpsHeIsRemoved);
UsrDat->FullName,NumGrpsHeIsRemoved);
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
/***** Free the list of groups of this type to which the user belonged *****/ /***** Free the list of groups of this type to which the user belonged *****/
Grp_FreeListCodGrp (&LstGrpsHeBelongs); Grp_FreeListCodGrp (&LstGrpsHeBelongs);
@ -1866,10 +1850,8 @@ void Grp_ShowLstGrpsToChgMyGrps (void)
} }
else // This course has no groups else // This course has no groups
{ {
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), Ale_ShowAlert (Ale_INFO,Txt_No_groups_have_been_created_in_the_course_X,
Txt_No_groups_have_been_created_in_the_course_X, Gbl.CurrentCrs.Crs.FullName);
Gbl.CurrentCrs.Crs.FullName);
Ale_ShowA_old (Ale_INFO,Gbl.Alert.Txt);
/***** Button to create group *****/ /***** Button to create group *****/
if (ICanEdit) if (ICanEdit)
@ -1920,21 +1902,13 @@ static void Grp_ShowWarningToStdsToChangeGrps (void)
if (Grp_GetIfGrpIsAvailable (GrpTyp->GrpTypCod)) // If there is any group of this type available if (Grp_GetIfGrpIsAvailable (GrpTyp->GrpTypCod)) // If there is any group of this type available
{ {
if (GrpTyp->MandatoryEnrolment) if (GrpTyp->MandatoryEnrolment)
{ Ale_ShowAlert (Ale_WARNING,GrpTyp->MultipleEnrolment ? Txt_You_have_to_register_compulsorily_at_least_in_one_group_of_type_X :
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), Txt_You_have_to_register_compulsorily_in_one_group_of_type_X,
GrpTyp->MultipleEnrolment ? Txt_You_have_to_register_compulsorily_at_least_in_one_group_of_type_X : GrpTyp->GrpTypName);
Txt_You_have_to_register_compulsorily_in_one_group_of_type_X,
GrpTyp->GrpTypName);
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
}
else else
{ Ale_ShowAlert (Ale_INFO,GrpTyp->MultipleEnrolment ? Txt_You_can_register_voluntarily_in_one_or_more_groups_of_type_X :
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), Txt_You_can_register_voluntarily_in_one_group_of_type_X,
GrpTyp->MultipleEnrolment ? Txt_You_can_register_voluntarily_in_one_or_more_groups_of_type_X : GrpTyp->GrpTypName);
Txt_You_can_register_voluntarily_in_one_group_of_type_X,
GrpTyp->GrpTypName);
Ale_ShowA_old (Ale_INFO,Gbl.Alert.Txt);
}
} }
} }
} }
@ -4644,7 +4618,7 @@ void Grp_ChangeOpenTimeGrpTyp (void)
Gbl.CurrentCrs.Grps.GrpTyp.GrpTypCod); Gbl.CurrentCrs.Grps.GrpTyp.GrpTypCod);
/***** Write message to show the change made *****/ /***** Write message to show the change made *****/
Ale_ShowA_old (Ale_SUCCESS,Txt_The_date_time_of_opening_of_groups_has_changed); Ale_ShowAlert (Ale_SUCCESS,Txt_The_date_time_of_opening_of_groups_has_changed);
/***** Show the form again *****/ /***** Show the form again *****/
Grp_ReqEditGroupsInternal (Ale_SUCCESS,Gbl.Alert.Txt, Grp_ReqEditGroupsInternal (Ale_SUCCESS,Gbl.Alert.Txt,

View File

@ -121,14 +121,10 @@ void Hlp_ShowHelpWhatWouldYouLikeToDo (void)
/***** Alert message *****/ /***** Alert message *****/
if (Gbl.Usrs.Me.Logged && if (Gbl.Usrs.Me.Logged &&
!Gbl.Usrs.Me.MyCrss.Num) !Gbl.Usrs.Me.MyCrss.Num)
{ Ale_ShowAlert (Ale_INFO,"%s<br />%s<br />%s",
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), Txt_You_are_not_enroled_in_any_course[Gbl.Usrs.Me.UsrDat.Sex],
"%s<br />%s<br />%s", Txt_You_can_search_for_courses_select_them_and_request_your_enrolment_in_them,
Txt_You_are_not_enroled_in_any_course[Gbl.Usrs.Me.UsrDat.Sex], Txt_If_you_can_not_find_your_institution_your_centre_your_degree_or_your_courses_you_can_create_them);
Txt_You_can_search_for_courses_select_them_and_request_your_enrolment_in_them,
Txt_If_you_can_not_find_your_institution_your_centre_your_degree_or_your_courses_you_can_create_them);
Ale_ShowA_old (Ale_INFO,Gbl.Alert.Txt);
}
/***** Start box and table *****/ /***** Start box and table *****/
Box_StartBoxTable (NULL,Txt_What_would_you_like_to_do,NULL, Box_StartBoxTable (NULL,Txt_What_would_you_like_to_do,NULL,

View File

@ -176,7 +176,7 @@ void Hld_SeeHolidays (void)
Tbl_EndTable (); Tbl_EndTable ();
} }
else // No holidays created in the current institution else // No holidays created in the current institution
Ale_ShowA_old (Ale_INFO,Txt_No_holidays); Ale_ShowAlert (Ale_INFO,Txt_No_holidays);
/***** Button to create centre *****/ /***** Button to create centre *****/
if (Gbl.Usrs.Me.Role.Logged >= Rol_INS_ADM) // Institution admin or system admin if (Gbl.Usrs.Me.Role.Logged >= Rol_INS_ADM) // Institution admin or system admin

View File

@ -545,7 +545,7 @@ void Img_MoveImageToDefinitiveDirectory (struct Image *Image)
/***** Move file *****/ /***** Move file *****/
if (rename (FileNameImgTmp,FileNameImg)) // Fail if (rename (FileNameImgTmp,FileNameImg)) // Fail
Ale_ShowA_old (Ale_ERROR,"Can not move file."); Ale_ShowAlert (Ale_ERROR,"Can not move file.");
else // Success else // Success
Image->Status = Img_FILE_MOVED; Image->Status = Img_FILE_MOVED;
} }
@ -628,7 +628,7 @@ void Img_ShowImage (struct Image *Image,
fprintf (Gbl.F.Out,"</div>"); fprintf (Gbl.F.Out,"</div>");
} }
else else
Ale_ShowA_old (Ale_WARNING,Txt_Image_not_found); Ale_ShowAlert (Ale_WARNING,Txt_Image_not_found);
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -450,7 +450,7 @@ void Inf_ShowInfo (void)
ICanEdit ? Inf_PutIconToEditInfo : ICanEdit ? Inf_PutIconToEditInfo :
NULL, NULL,
Help[Gbl.CurrentCrs.Info.Type],Box_NOT_CLOSABLE); Help[Gbl.CurrentCrs.Info.Type],Box_NOT_CLOSABLE);
Ale_ShowA_old (Ale_INFO,Txt_No_information); Ale_ShowAlert (Ale_INFO,Txt_No_information);
if (ICanEdit) if (ICanEdit)
Inf_PutButtonToEditInfo (); Inf_PutButtonToEditInfo ();
Box_EndBox (); Box_EndBox ();
@ -597,7 +597,7 @@ void Inf_WriteMsgYouMustReadInfo (void)
NULL,Box_NOT_CLOSABLE); NULL,Box_NOT_CLOSABLE);
/***** Write message *****/ /***** Write message *****/
Ale_ShowA_old (Ale_WARNING,Txt_You_should_read_the_following_information); Ale_ShowAlert (Ale_WARNING,Txt_You_should_read_the_following_information);
/***** Write every information I must read *****/ /***** Write every information I must read *****/
fprintf (Gbl.F.Out,"<div class=\"CENTER_MIDDLE\">" fprintf (Gbl.F.Out,"<div class=\"CENTER_MIDDLE\">"
@ -642,7 +642,7 @@ void Inf_ChangeForceReadInfo (void)
Inf_SetForceReadIntoDB (MustBeRead); Inf_SetForceReadIntoDB (MustBeRead);
/***** Write message of success *****/ /***** Write message of success *****/
Ale_ShowA_old (Ale_SUCCESS, Ale_ShowAlert (Ale_SUCCESS,
MustBeRead ? Txt_Students_now_are_required_to_read_this_information : MustBeRead ? Txt_Students_now_are_required_to_read_this_information :
Txt_Students_are_no_longer_obliged_to_read_this_information); Txt_Students_are_no_longer_obliged_to_read_this_information);
@ -667,7 +667,7 @@ void Inf_ChangeIHaveReadInfo (void)
Inf_SetIHaveReadIntoDB (IHaveRead); Inf_SetIHaveReadIntoDB (IHaveRead);
/***** Write message of success *****/ /***** Write message of success *****/
Ale_ShowA_old (Ale_SUCCESS, Ale_ShowAlert (Ale_SUCCESS,
IHaveRead ? Txt_You_have_confirmed_that_you_have_read_this_information : IHaveRead ? Txt_You_have_confirmed_that_you_have_read_this_information :
Txt_You_have_eliminated_the_confirmation_that_you_have_read_this_information); Txt_You_have_eliminated_the_confirmation_that_you_have_read_this_information);
@ -2243,14 +2243,12 @@ void Inf_ReceiveURLInfo (void)
fclose (FileURL); fclose (FileURL);
/***** Write message *****/ /***** Write message *****/
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), Ale_ShowAlert (Ale_SUCCESS,Txt_The_URL_X_has_been_updated,
Txt_The_URL_X_has_been_updated, Gbl.CurrentCrs.Info.URL);
Gbl.CurrentCrs.Info.URL);
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
URLIsOK = true; URLIsOK = true;
} }
else else
Ale_ShowA_old (Ale_ERROR,"Error when saving URL to file."); Ale_ShowAlert (Ale_ERROR,"Error when saving URL to file.");
if (URLIsOK) if (URLIsOK)
{ {
@ -2312,12 +2310,8 @@ void Inf_ReceivePagInfo (void)
if (strcmp (MIMEType,"application/octet")) if (strcmp (MIMEType,"application/octet"))
WrongType = true; WrongType = true;
if (WrongType) if (WrongType)
{ Ale_ShowAlert (Ale_INFO,Txt_The_file_type_is_X_and_should_be_HTML_or_ZIP,
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt), MIMEType);
Txt_The_file_type_is_X_and_should_be_HTML_or_ZIP,
MIMEType);
Ale_ShowA_old (Ale_INFO,Gbl.Alert.Txt);
}
else else
{ {
/***** Build path of directory containing web page *****/ /***** Build path of directory containing web page *****/
@ -2334,11 +2328,11 @@ void Inf_ReceivePagInfo (void)
PathRelDirHTML); PathRelDirHTML);
if (Fil_EndReceptionOfFile (PathRelFileHTML,Param)) if (Fil_EndReceptionOfFile (PathRelFileHTML,Param))
{ {
Ale_ShowA_old (Ale_SUCCESS,Txt_The_HTML_file_has_been_received_successfully); Ale_ShowAlert (Ale_SUCCESS,Txt_The_HTML_file_has_been_received_successfully);
FileIsOK = true; FileIsOK = true;
} }
else else
Ale_ShowA_old (Ale_WARNING,"Error uploading file."); Ale_ShowAlert (Ale_ERROR,"Error uploading file.");
} }
else if (Str_FileIs (SourceFileName,"zip")) // .zip file else if (Str_FileIs (SourceFileName,"zip")) // .zip file
{ {
@ -2351,7 +2345,7 @@ void Inf_ReceivePagInfo (void)
if (Fil_EndReceptionOfFile (PathRelFileZIP,Param)) if (Fil_EndReceptionOfFile (PathRelFileZIP,Param))
{ {
Ale_ShowA_old (Ale_SUCCESS,Txt_The_ZIP_file_has_been_received_successfully); Ale_ShowAlert (Ale_SUCCESS,Txt_The_ZIP_file_has_been_received_successfully);
/* Uncompress ZIP */ /* Uncompress ZIP */
snprintf (StrUnzip,sizeof (StrUnzip), snprintf (StrUnzip,sizeof (StrUnzip),
@ -2365,8 +2359,8 @@ void Inf_ReceivePagInfo (void)
PathRelDirHTML); PathRelDirHTML);
if (Fil_CheckIfPathExists (PathRelFileHTML)) if (Fil_CheckIfPathExists (PathRelFileHTML))
{ {
Ale_ShowA_old (Ale_SUCCESS,Txt_The_ZIP_file_has_been_unzipped_successfully); Ale_ShowAlert (Ale_SUCCESS,Txt_The_ZIP_file_has_been_unzipped_successfully);
Ale_ShowA_old (Ale_SUCCESS,Txt_Found_an_index_html_file); Ale_ShowAlert (Ale_SUCCESS,Txt_Found_an_index_html_file);
FileIsOK = true; FileIsOK = true;
} }
else else
@ -2376,22 +2370,22 @@ void Inf_ReceivePagInfo (void)
PathRelDirHTML); PathRelDirHTML);
if (Fil_CheckIfPathExists (PathRelFileHTML)) if (Fil_CheckIfPathExists (PathRelFileHTML))
{ {
Ale_ShowA_old (Ale_SUCCESS,Txt_The_ZIP_file_has_been_unzipped_successfully); Ale_ShowAlert (Ale_SUCCESS,Txt_The_ZIP_file_has_been_unzipped_successfully);
Ale_ShowA_old (Ale_SUCCESS,Txt_Found_an_index_htm_file); Ale_ShowAlert (Ale_SUCCESS,Txt_Found_an_index_htm_file);
FileIsOK = true; FileIsOK = true;
} }
else else
Ale_ShowA_old (Ale_WARNING,Txt_No_file_index_html_index_htm_found_within_the_ZIP_file); Ale_ShowAlert (Ale_WARNING,Txt_No_file_index_html_index_htm_found_within_the_ZIP_file);
} }
} }
else else
Lay_ShowErrorAndExit ("Can not unzip file."); Lay_ShowErrorAndExit ("Can not unzip file.");
} }
else else
Ale_ShowA_old (Ale_WARNING,"Error uploading file."); Ale_ShowAlert (Ale_ERROR,"Error uploading file.");
} }
else else
Ale_ShowA_old (Ale_WARNING,Txt_The_file_type_should_be_HTML_or_ZIP); Ale_ShowAlert (Ale_WARNING,Txt_The_file_type_should_be_HTML_or_ZIP);
} }
if (FileIsOK) if (FileIsOK)
@ -2420,7 +2414,7 @@ void Inf_EditorCourseInfo (void)
{ {
extern const char *Txt_The_integrated_editor_is_not_yet_available; extern const char *Txt_The_integrated_editor_is_not_yet_available;
Ale_ShowA_old (Ale_WARNING,Txt_The_integrated_editor_is_not_yet_available); Ale_ShowAlert (Ale_WARNING,Txt_The_integrated_editor_is_not_yet_available);
/***** Show again the form to select and send course info *****/ /***** Show again the form to select and send course info *****/
Inf_FormsToSelSendInfo (); Inf_FormsToSelSendInfo ();
@ -2434,7 +2428,7 @@ void Inf_EditorTeachingGuide (void)
{ {
extern const char *Txt_The_integrated_editor_is_not_yet_available; extern const char *Txt_The_integrated_editor_is_not_yet_available;
Ale_ShowA_old (Ale_WARNING,Txt_The_integrated_editor_is_not_yet_available); Ale_ShowAlert (Ale_WARNING,Txt_The_integrated_editor_is_not_yet_available);
/***** Show again the form to select and send course info *****/ /***** Show again the form to select and send course info *****/
Inf_FormsToSelSendInfo (); Inf_FormsToSelSendInfo ();
@ -2448,7 +2442,7 @@ void Inf_EditorBibliography (void)
{ {
extern const char *Txt_The_integrated_editor_is_not_yet_available; extern const char *Txt_The_integrated_editor_is_not_yet_available;
Ale_ShowA_old (Ale_WARNING,Txt_The_integrated_editor_is_not_yet_available); Ale_ShowAlert (Ale_WARNING,Txt_The_integrated_editor_is_not_yet_available);
/***** Show again the form to select and send course info *****/ /***** Show again the form to select and send course info *****/
Inf_FormsToSelSendInfo (); Inf_FormsToSelSendInfo ();
@ -2462,7 +2456,7 @@ void Inf_EditorFAQ (void)
{ {
extern const char *Txt_The_integrated_editor_is_not_yet_available; extern const char *Txt_The_integrated_editor_is_not_yet_available;
Ale_ShowA_old (Ale_WARNING,Txt_The_integrated_editor_is_not_yet_available); Ale_ShowAlert (Ale_WARNING,Txt_The_integrated_editor_is_not_yet_available);
/***** Show again the form to select and send course info *****/ /***** Show again the form to select and send course info *****/
Inf_FormsToSelSendInfo (); Inf_FormsToSelSendInfo ();
@ -2476,7 +2470,7 @@ void Inf_EditorLinks (void)
{ {
extern const char *Txt_The_integrated_editor_is_not_yet_available; extern const char *Txt_The_integrated_editor_is_not_yet_available;
Ale_ShowA_old (Ale_WARNING,Txt_The_integrated_editor_is_not_yet_available); Ale_ShowAlert (Ale_WARNING,Txt_The_integrated_editor_is_not_yet_available);
/***** Show again the form to select and send course info *****/ /***** Show again the form to select and send course info *****/
Inf_FormsToSelSendInfo (); Inf_FormsToSelSendInfo ();
@ -2490,7 +2484,7 @@ void Inf_EditorAssessment (void)
{ {
extern const char *Txt_The_integrated_editor_is_not_yet_available; extern const char *Txt_The_integrated_editor_is_not_yet_available;
Ale_ShowA_old (Ale_WARNING,Txt_The_integrated_editor_is_not_yet_available); Ale_ShowAlert (Ale_WARNING,Txt_The_integrated_editor_is_not_yet_available);
/***** Show again the form to select and send course info *****/ /***** Show again the form to select and send course info *****/
Inf_FormsToSelSendInfo (); Inf_FormsToSelSendInfo ();

View File

@ -215,7 +215,7 @@ void Ins_SeeInsWithPendingCtrs (void)
Box_EndBoxTable (); Box_EndBoxTable ();
} }
else else
Ale_ShowA_old (Ale_INFO,Txt_There_are_no_institutions_with_requests_for_centres_to_be_confirmed); Ale_ShowAlert (Ale_INFO,Txt_There_are_no_institutions_with_requests_for_centres_to_be_confirmed);
/***** Free structure that stores the query result *****/ /***** Free structure that stores the query result *****/
DB_FreeMySQLResult (&mysql_res); DB_FreeMySQLResult (&mysql_res);
@ -708,7 +708,7 @@ static void Ins_ListInstitutions (void)
Tbl_EndTable (); Tbl_EndTable ();
} }
else // No insrtitutions created in the current country else // No insrtitutions created in the current country
Ale_ShowA_old (Ale_INFO,Txt_No_institutions); Ale_ShowAlert (Ale_INFO,Txt_No_institutions);
/***** Button to create institution *****/ /***** Button to create institution *****/
if (Ins_CheckIfICanCreateInstitutions ()) if (Ins_CheckIfICanCreateInstitutions ())
@ -1731,7 +1731,7 @@ void Ins_RemoveInstitution (void)
else if (Ins.NumCtrs || else if (Ins.NumCtrs ||
Ins.NumUsrsWhoClaimToBelongToIns || Ins.NumUsrsWhoClaimToBelongToIns ||
Ins.NumUsrs) // Institution has centres or users ==> don't remove Ins.NumUsrs) // Institution has centres or users ==> don't remove
Ale_ShowA_old (Ale_WARNING,Txt_To_remove_an_institution_you_must_first_remove_all_centres_and_users_in_the_institution); Ale_ShowAlert (Ale_WARNING,Txt_To_remove_an_institution_you_must_first_remove_all_centres_and_users_in_the_institution);
else // Institution has no users ==> remove it else // Institution has no users ==> remove it
{ {
/***** Remove all the threads and posts in forums of the institution *****/ /***** Remove all the threads and posts in forums of the institution *****/

View File

@ -466,8 +466,8 @@ static bool Mrk_GetUsrMarks (FILE *FileUsrMarks,struct UsrData *UsrDat,
/***** Open HTML file with the table of marks *****/ /***** Open HTML file with the table of marks *****/
if (!(FileAllMarks = fopen (PathFileAllMarks,"rb"))) if (!(FileAllMarks = fopen (PathFileAllMarks,"rb")))
{ // Can't open the file with the table of marks { // Can't open the file with the table of marks
Gbl.Alert.Type = Ale_WARNING; Gbl.Alert.Type = Ale_ERROR;
Str_Copy (Gbl.Alert.Txt,"Can not open file of marks.", // TODO: Need translation! Str_Copy (Gbl.Alert.Txt,"Can not open file of marks.",
Ale_MAX_BYTES_ALERT); Ale_MAX_BYTES_ALERT);
return false; return false;
} }
@ -881,8 +881,8 @@ void Mrk_GetNotifMyMarks (char SummaryStr[Ntf_MAX_BYTES_SUMMARY + 1],
} }
else else
{ {
Gbl.Alert.Type = Ale_WARNING; Gbl.Alert.Type = Ale_ERROR;
Str_Copy (Gbl.Alert.Txt,"Can not open file of marks.", // TODO: Need translation! Str_Copy (Gbl.Alert.Txt,"Can not open file of marks.",
Ale_MAX_BYTES_ALERT); Ale_MAX_BYTES_ALERT);
if (asprintf (ContentStr,"<![CDATA[%s]]>", if (asprintf (ContentStr,"<![CDATA[%s]]>",
Gbl.Alert.Txt) < 0) Gbl.Alert.Txt) < 0)
@ -892,8 +892,8 @@ void Mrk_GetNotifMyMarks (char SummaryStr[Ntf_MAX_BYTES_SUMMARY + 1],
} }
else else
{ {
Gbl.Alert.Type = Ale_WARNING; Gbl.Alert.Type = Ale_ERROR;
Str_Copy (Gbl.Alert.Txt,"User's IDs not found!", // TODO: Need translation! Str_Copy (Gbl.Alert.Txt,"User's IDs not found!",
Ale_MAX_BYTES_ALERT); Ale_MAX_BYTES_ALERT);
if (asprintf (ContentStr,"<![CDATA[%s]]>", if (asprintf (ContentStr,"<![CDATA[%s]]>",
Gbl.Alert.Txt) < 0) Gbl.Alert.Txt) < 0)

View File

@ -692,7 +692,7 @@ void Pwd_ShowFormChgMyPwd (void)
/***** Show possible alert *****/ /***** Show possible alert *****/
if (Gbl.Alert.Section == Pwd_PASSWORD_SECTION_ID) if (Gbl.Alert.Section == Pwd_PASSWORD_SECTION_ID)
Ale_ShowA_old (Gbl.Alert.Type,Gbl.Alert.Txt); Ale_ShowA_old (Gbl.DelayedAlert.Type,Gbl.DelayedAlert.Txt);
/***** Help message *****/ /***** Help message *****/
if (!IHaveAPasswordInDB) // If I don't have a password in database... if (!IHaveAPasswordInDB) // If I don't have a password in database...

View File

@ -2797,16 +2797,22 @@ bool Str_ConvertFilFolLnkNameToValid (char *FileName)
if (NumAlfanum) if (NumAlfanum)
FileNameIsOK = true; FileNameIsOK = true;
else else
{
Gbl.DelayedAlert.Type = Ale_WARNING;
snprintf (Gbl.DelayedAlert.Txt,sizeof (Gbl.DelayedAlert.Txt), snprintf (Gbl.DelayedAlert.Txt,sizeof (Gbl.DelayedAlert.Txt),
Gbl.FileBrowser.UploadingWithDropzone ? Txt_UPLOAD_FILE_X_invalid_name_NO_HTML : Gbl.FileBrowser.UploadingWithDropzone ? Txt_UPLOAD_FILE_X_invalid_name_NO_HTML :
Txt_UPLOAD_FILE_X_invalid_name, Txt_UPLOAD_FILE_X_invalid_name,
FileName); FileName);
}
} }
else // FileName is empty else // FileName is empty
{
Gbl.DelayedAlert.Type = Ale_WARNING;
Str_Copy (Gbl.DelayedAlert.Txt, Str_Copy (Gbl.DelayedAlert.Txt,
Gbl.FileBrowser.UploadingWithDropzone ? Txt_UPLOAD_FILE_Invalid_name_NO_HTML : Gbl.FileBrowser.UploadingWithDropzone ? Txt_UPLOAD_FILE_Invalid_name_NO_HTML :
Txt_UPLOAD_FILE_Invalid_name, Txt_UPLOAD_FILE_Invalid_name,
Ale_MAX_BYTES_ALERT); Ale_MAX_BYTES_ALERT);
}
return FileNameIsOK; return FileNameIsOK;
} }