mirror of https://github.com/acanas/swad-core.git
Version 18.46.7
This commit is contained in:
parent
7de9865d15
commit
001f4938dc
|
@ -124,7 +124,7 @@ void Ale_ShowAlert (Ale_AlertType_t AlertType,const char *fmt,...)
|
|||
// vasprintf will return -1
|
||||
Lay_NotEnoughMemoryExit ();
|
||||
|
||||
Ale_ShowAlert (AlertType,Txt);
|
||||
Ale_ShowFixAlert (AlertType,Txt);
|
||||
|
||||
free ((void *) Txt);
|
||||
}
|
||||
|
|
|
@ -383,6 +383,8 @@ OPTIMIZE TABLE debug;
|
|||
|
||||
// TODO: Revisar todos los Ale_ShowAlertAndButton
|
||||
|
||||
// TODO: Pasar a una función Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************** Public constants *****************************/
|
||||
/*****************************************************************************/
|
||||
|
@ -402,10 +404,11 @@ En OpenSWAD:
|
|||
ps2pdf source.ps destination.pdf
|
||||
*/
|
||||
|
||||
#define Log_PLATFORM_VERSION "SWAD 18.46.6 (2019-02-16)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 18.46.7 (2019-02-16)"
|
||||
#define CSS_FILE "swad18.41.1.css"
|
||||
#define JS_FILE "swad18.32.1.js"
|
||||
/*
|
||||
Version 18.46.7: Feb 16, 2019 Refactoring code related to alerts. (237953 lines)
|
||||
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.4: Feb 16, 2019 Refactoring code related to alerts. (238061 lines)
|
||||
|
|
|
@ -1761,10 +1761,8 @@ void Ins_RemoveInstitution (void)
|
|||
Ins_FlushCacheFullNameAndCtyOfInstitution ();
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Institution_X_removed,
|
||||
Ins.FullName);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Txt_Institution_X_removed,
|
||||
Ins.FullName);
|
||||
}
|
||||
|
||||
/***** Show the form again *****/
|
||||
|
@ -2025,14 +2023,14 @@ void Ins_ChangeInsWWW (void)
|
|||
|
||||
/***** Write message to show the change made
|
||||
and put button to go to institution changed *****/
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Gbl.DelayedAlert.Type = Ale_SUCCESS;
|
||||
snprintf (Gbl.DelayedAlert.Txt,sizeof (Gbl.DelayedAlert.Txt),
|
||||
Txt_The_new_web_address_is_X,
|
||||
NewWWW);
|
||||
Ins_ShowAlertAndButtonToGoToIns ();
|
||||
}
|
||||
else
|
||||
Ale_ShowA_old (Ale_WARNING,Txt_You_can_not_leave_the_web_address_empty);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_You_can_not_leave_the_web_address_empty);
|
||||
|
||||
/***** Show the form again *****/
|
||||
Ins_EditInstitutions ();
|
||||
|
@ -2057,13 +2055,11 @@ void Ins_ChangeInsWWWInConfig (void)
|
|||
Cns_MAX_BYTES_WWW);
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_new_web_address_is_X,
|
||||
NewWWW);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Txt_The_new_web_address_is_X,
|
||||
NewWWW);
|
||||
}
|
||||
else
|
||||
Ale_ShowA_old (Ale_WARNING,Txt_You_can_not_leave_the_web_address_empty);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_You_can_not_leave_the_web_address_empty);
|
||||
|
||||
/***** Show the form again *****/
|
||||
Ins_ShowConfiguration ();
|
||||
|
@ -2117,8 +2113,8 @@ void Ins_ChangeInsStatus (void)
|
|||
|
||||
/***** Write message to show the change made
|
||||
and put button to go to institution changed *****/
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Gbl.DelayedAlert.Type = Ale_SUCCESS;
|
||||
snprintf (Gbl.DelayedAlert.Txt,sizeof (Gbl.DelayedAlert.Txt),
|
||||
Txt_The_status_of_the_institution_X_has_changed,
|
||||
Gbl.Inss.EditingIns.ShrtName);
|
||||
Ins_ShowAlertAndButtonToGoToIns ();
|
||||
|
@ -2165,7 +2161,7 @@ static void Ins_ShowAlertAndButtonToGoToIns (void)
|
|||
}
|
||||
else
|
||||
/***** Alert *****/
|
||||
Ale_ShowA_old (Gbl.Alert.Type,Gbl.Alert.Txt);
|
||||
Ale_ShowDelayedAlert ();
|
||||
}
|
||||
|
||||
static void Ins_PutParamGoToIns (void)
|
||||
|
@ -2399,27 +2395,19 @@ static void Ins_RecFormRequestOrCreateIns (unsigned Status)
|
|||
{
|
||||
/***** If name of institution was in database... *****/
|
||||
if (Ins_CheckIfInsNameExistsInCty ("ShortName",Gbl.Inss.EditingIns.ShrtName,-1L,Gbl.CurrentCty.Cty.CtyCod))
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_institution_X_already_exists,
|
||||
Gbl.Inss.EditingIns.ShrtName);
|
||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_The_institution_X_already_exists,
|
||||
Gbl.Inss.EditingIns.ShrtName);
|
||||
else if (Ins_CheckIfInsNameExistsInCty ("FullName",Gbl.Inss.EditingIns.FullName,-1L,Gbl.CurrentCty.Cty.CtyCod))
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_institution_X_already_exists,
|
||||
Gbl.Inss.EditingIns.FullName);
|
||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_The_institution_X_already_exists,
|
||||
Gbl.Inss.EditingIns.FullName);
|
||||
else // Add new institution to database
|
||||
Ins_CreateInstitution (Status);
|
||||
}
|
||||
else // If there is not a web
|
||||
Ale_ShowA_old (Ale_WARNING,Txt_You_must_specify_the_web_address_of_the_new_institution);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_You_must_specify_the_web_address_of_the_new_institution);
|
||||
}
|
||||
else // If there is not a institution name
|
||||
Ale_ShowA_old (Ale_WARNING,Txt_You_must_specify_the_short_name_and_the_full_name_of_the_new_institution);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_You_must_specify_the_short_name_and_the_full_name_of_the_new_institution);
|
||||
|
||||
/***** Show the form again *****/
|
||||
Ins_EditInstitutions ();
|
||||
|
@ -2450,8 +2438,8 @@ static void Ins_CreateInstitution (unsigned Status)
|
|||
|
||||
/***** Write message to show the change made
|
||||
and put button to go to institution created *****/
|
||||
Gbl.Alert.Type = Ale_SUCCESS;
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Gbl.DelayedAlert.Type = Ale_SUCCESS;
|
||||
snprintf (Gbl.DelayedAlert.Txt,sizeof (Gbl.DelayedAlert.Txt),
|
||||
Txt_Created_new_institution_X,
|
||||
Gbl.Inss.EditingIns.FullName);
|
||||
Ins_ShowAlertAndButtonToGoToIns ();
|
||||
|
|
|
@ -1269,7 +1269,7 @@ void Lay_ShowErrorAndExit (const char *Txt)
|
|||
|
||||
/***** Write possible error message *****/
|
||||
if (Txt)
|
||||
Ale_ShowA_old (Ale_ERROR,Txt);
|
||||
Ale_ShowAlert (Ale_ERROR,Txt);
|
||||
|
||||
/***** Finish the page, except </body> and </html> *****/
|
||||
Lay_WriteEndOfPage ();
|
||||
|
|
72
swad_link.c
72
swad_link.c
|
@ -104,7 +104,7 @@ void Lnk_SeeLinks (void)
|
|||
if (Gbl.Links.Num) // There are links
|
||||
Lnk_WriteListOfLinks ();
|
||||
else // No links created
|
||||
Ale_ShowA_old (Ale_INFO,Txt_No_links);
|
||||
Ale_ShowAlert (Ale_INFO,Txt_No_links);
|
||||
|
||||
/***** Button to create link *****/
|
||||
if (Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM)
|
||||
|
@ -507,10 +507,8 @@ void Lnk_RemoveLink (void)
|
|||
Lnk.LnkCod);
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Link_X_removed,
|
||||
Lnk.ShrtName);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Txt_Link_X_removed,
|
||||
Lnk.ShrtName);
|
||||
|
||||
/***** Show the form again *****/
|
||||
Lnk_EditLinks ();
|
||||
|
@ -581,12 +579,8 @@ static void Lnk_RenameLink (Cns_ShrtOrFullName_t ShrtOrFullName)
|
|||
|
||||
/***** Check if new name is empty *****/
|
||||
if (!NewLnkName[0])
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_You_can_not_leave_the_name_of_the_link_X_empty,
|
||||
CurrentLnkName);
|
||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_You_can_not_leave_the_name_of_the_link_X_empty,
|
||||
CurrentLnkName);
|
||||
else
|
||||
{
|
||||
/***** Check if old and new names are the same
|
||||
|
@ -595,31 +589,21 @@ static void Lnk_RenameLink (Cns_ShrtOrFullName_t ShrtOrFullName)
|
|||
{
|
||||
/***** If link was in database... *****/
|
||||
if (Lnk_CheckIfLinkNameExists (ParamName,NewLnkName,Lnk->LnkCod))
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_link_X_already_exists,
|
||||
NewLnkName);
|
||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_The_link_X_already_exists,
|
||||
NewLnkName);
|
||||
else
|
||||
{
|
||||
/* Update the table changing old name by new name */
|
||||
Lnk_UpdateLnkNameDB (Lnk->LnkCod,FieldName,NewLnkName);
|
||||
|
||||
/* Write message to show the change made */
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_link_X_has_been_renamed_as_Y,
|
||||
CurrentLnkName,NewLnkName);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Txt_The_link_X_has_been_renamed_as_Y,
|
||||
CurrentLnkName,NewLnkName);
|
||||
}
|
||||
}
|
||||
else // The same name
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_name_of_the_link_X_has_not_changed,
|
||||
CurrentLnkName);
|
||||
Ale_ShowA_old (Ale_INFO,Gbl.Alert.Txt);
|
||||
}
|
||||
Ale_ShowAlert (Ale_INFO,Txt_The_name_of_the_link_X_has_not_changed,
|
||||
CurrentLnkName);
|
||||
}
|
||||
|
||||
/***** Show the form again *****/
|
||||
|
@ -684,13 +668,11 @@ void Lnk_ChangeLinkWWW (void)
|
|||
NewWWW,Lnk->LnkCod);
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_new_web_address_is_X,
|
||||
NewWWW);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Txt_The_new_web_address_is_X,
|
||||
NewWWW);
|
||||
}
|
||||
else
|
||||
Ale_ShowA_old (Ale_WARNING,Txt_You_can_not_leave_the_web_address_empty);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_You_can_not_leave_the_web_address_empty);
|
||||
|
||||
/***** Show the form again *****/
|
||||
Str_Copy (Lnk->WWW,NewWWW,
|
||||
|
@ -820,26 +802,18 @@ void Lnk_RecFormNewLink (void)
|
|||
{
|
||||
/***** If name of link was in database... *****/
|
||||
if (Lnk_CheckIfLinkNameExists ("ShortName",Lnk->ShrtName,-1L))
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_link_X_already_exists,
|
||||
Lnk->ShrtName);
|
||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_The_link_X_already_exists,
|
||||
Lnk->ShrtName);
|
||||
else if (Lnk_CheckIfLinkNameExists ("FullName",Lnk->FullName,-1L))
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_link_X_already_exists,
|
||||
Lnk->FullName);
|
||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_The_link_X_already_exists,
|
||||
Lnk->FullName);
|
||||
else if (!Lnk->WWW[0])
|
||||
Ale_ShowA_old (Ale_WARNING,Txt_You_must_specify_the_URL_of_the_new_link);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_You_must_specify_the_URL_of_the_new_link);
|
||||
else // Add new link to database
|
||||
Lnk_CreateLink (Lnk);
|
||||
}
|
||||
else // If there is not a link name
|
||||
Ale_ShowA_old (Ale_WARNING,Txt_You_must_specify_the_short_name_and_the_full_name_of_the_new_link);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_You_must_specify_the_short_name_and_the_full_name_of_the_new_link);
|
||||
|
||||
/***** Show the form again *****/
|
||||
Lnk_EditLinks ();
|
||||
|
@ -862,8 +836,6 @@ static void Lnk_CreateLink (struct Link *Lnk)
|
|||
Lnk->ShrtName,Lnk->FullName,Lnk->WWW);
|
||||
|
||||
/***** Write success message *****/
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Created_new_link_X,
|
||||
Lnk->ShrtName);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Txt_Created_new_link_X,
|
||||
Lnk->ShrtName);
|
||||
}
|
||||
|
|
16
swad_logo.c
16
swad_logo.c
|
@ -292,10 +292,8 @@ void Log_RequestLogo (Sco_Scope_t Scope)
|
|||
NULL,Box_NOT_CLOSABLE);
|
||||
|
||||
/***** Write help message *****/
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_You_can_send_a_file_with_an_image_in_PNG_format_transparent_background_and_size_X_Y,
|
||||
64,64);
|
||||
Ale_ShowA_old (Ale_INFO,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_INFO,Txt_You_can_send_a_file_with_an_image_in_PNG_format_transparent_background_and_size_X_Y,
|
||||
64,64);
|
||||
|
||||
/***** Upload logo *****/
|
||||
fprintf (Gbl.F.Out,"<label class=\"%s\">"
|
||||
|
@ -385,12 +383,8 @@ void Log_ReceiveLogo (Sco_Scope_t Scope)
|
|||
if (strcmp (MIMEType,"application/octet"))
|
||||
WrongType = true;
|
||||
if (WrongType)
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_file_is_not_X,
|
||||
"png");
|
||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_The_file_is_not_X,
|
||||
"png");
|
||||
else
|
||||
{
|
||||
/* End the reception of logo in a temporary file */
|
||||
|
@ -401,7 +395,7 @@ void Log_ReceiveLogo (Sco_Scope_t Scope)
|
|||
(unsigned) Cod,
|
||||
(unsigned) Cod);
|
||||
if (!Fil_EndReceptionOfFile (FileNameLogo,Param))
|
||||
Ale_ShowA_old (Ale_WARNING,"Error copying file.");
|
||||
Ale_ShowAlert (Ale_ERROR,"Error copying file.");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
79
swad_mail.c
79
swad_mail.c
|
@ -375,14 +375,12 @@ void Mai_WriteWarningEmailNotifications (void)
|
|||
Tab_Tab_t TabMyAccount = Act_GetTab (ActFrmMyAcc );
|
||||
Tab_Tab_t TabMailDomains = Act_GetTab (ActSeeMai);
|
||||
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_You_can_only_receive_email_notifications_if_,
|
||||
Txt_TABS_TXT [TabMyAccount ],
|
||||
Txt_MENU_TITLE[TabMyAccount ][Act_GetIndexInMenu (ActFrmMyAcc)],
|
||||
Txt_TABS_TXT [TabMailDomains],
|
||||
Txt_MENU_TITLE[TabMailDomains][Act_GetIndexInMenu (ActSeeMai )],
|
||||
Txt_Domains);
|
||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_You_can_only_receive_email_notifications_if_,
|
||||
Txt_TABS_TXT [TabMyAccount ],
|
||||
Txt_MENU_TITLE[TabMyAccount ][Act_GetIndexInMenu (ActFrmMyAcc)],
|
||||
Txt_TABS_TXT [TabMailDomains],
|
||||
Txt_MENU_TITLE[TabMailDomains][Act_GetIndexInMenu (ActSeeMai )],
|
||||
Txt_Domains);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -559,10 +557,8 @@ void Mai_RemoveMailDomain (void)
|
|||
Mai.MaiCod);
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Email_domain_X_removed,
|
||||
Mai.Domain);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Txt_Email_domain_X_removed,
|
||||
Mai.Domain);
|
||||
|
||||
/***** Show the form again *****/
|
||||
Mai_EditMailDomains ();
|
||||
|
@ -823,24 +819,16 @@ void Mai_RecFormNewMailDomain (void)
|
|||
{
|
||||
/***** If name of mail was in database... *****/
|
||||
if (Mai_CheckIfMailDomainNameExists ("Domain",Mai->Domain,-1L))
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_email_domain_X_already_exists,
|
||||
Mai->Domain);
|
||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_The_email_domain_X_already_exists,
|
||||
Mai->Domain);
|
||||
else if (Mai_CheckIfMailDomainNameExists ("Info",Mai->Info,-1L))
|
||||
{
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_email_domain_X_already_exists,
|
||||
Mai->Info);
|
||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
|
||||
}
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_The_email_domain_X_already_exists,
|
||||
Mai->Info);
|
||||
else // Add new mail to database
|
||||
Mai_CreateMailDomain (Mai);
|
||||
}
|
||||
else // If there is not a mail name
|
||||
Ale_ShowA_old (Ale_WARNING,Txt_You_must_specify_the_short_name_and_the_full_name_of_the_new_email_domain);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_You_must_specify_the_short_name_and_the_full_name_of_the_new_email_domain);
|
||||
|
||||
/***** Show the form again *****/
|
||||
Mai_EditMailDomains ();
|
||||
|
@ -863,10 +851,8 @@ static void Mai_CreateMailDomain (struct Mail *Mai)
|
|||
Mai->Domain,Mai->Info);
|
||||
|
||||
/***** Write success message *****/
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Created_new_email_domain_X,
|
||||
Mai->Domain);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Txt_Created_new_email_domain_X,
|
||||
Mai->Domain);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -1233,13 +1219,13 @@ static void Mai_ShowFormChangeUsrEmail (const struct UsrData *UsrDat,bool ItsMe,
|
|||
|
||||
/***** Show possible alert *****/
|
||||
if (Gbl.Alert.Section == (const char *) Mai_EMAIL_SECTION_ID)
|
||||
Ale_ShowA_old (Gbl.Alert.Type,Gbl.Alert.Txt);
|
||||
Ale_ShowDelayedAlert ();
|
||||
|
||||
/***** Help message *****/
|
||||
if (IMustFillInEmail)
|
||||
Ale_ShowA_old (Ale_WARNING,Txt_Before_going_to_any_other_option_you_must_fill_in_your_email_address);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_Before_going_to_any_other_option_you_must_fill_in_your_email_address);
|
||||
else if (IShouldConfirmEmail)
|
||||
Ale_ShowA_old (Ale_WARNING,Txt_Please_confirm_your_email_address);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_Please_confirm_your_email_address);
|
||||
|
||||
/***** Get my emails *****/
|
||||
NumEmails = (unsigned) DB_QuerySELECT (&mysql_res,"can not get"
|
||||
|
@ -1445,10 +1431,10 @@ void Mai_RemoveOtherUsrEmail (void)
|
|||
Acc_ShowFormChgOtherUsrAccount ();
|
||||
}
|
||||
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
|
||||
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_);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -1480,11 +1466,7 @@ static void Mai_RemoveEmail (struct UsrData *UsrDat)
|
|||
Mai_GetEmailFromUsrCod (UsrDat);
|
||||
}
|
||||
else
|
||||
{
|
||||
Gbl.Alert.Type = Ale_WARNING;
|
||||
Gbl.Alert.Section = Mai_EMAIL_SECTION_ID;
|
||||
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_);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -1536,10 +1518,10 @@ void Mai_NewOtherUsrEmail (void)
|
|||
Acc_ShowFormChgOtherUsrAccount ();
|
||||
}
|
||||
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
|
||||
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_);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -1838,9 +1820,8 @@ void Mai_ConfirmEmail (void)
|
|||
|
||||
/***** Confirm email *****/
|
||||
if (Confirmed)
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_Email_X_has_already_been_confirmed_before,
|
||||
Email);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Txt_Email_X_has_already_been_confirmed_before,
|
||||
Email);
|
||||
else
|
||||
{
|
||||
DB_QueryUPDATE ("can not confirm email",
|
||||
|
@ -1849,20 +1830,18 @@ void Mai_ConfirmEmail (void)
|
|||
" AND usr_emails.E_mail='%s'",
|
||||
UsrCod,Email);
|
||||
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_email_X_has_been_confirmed,
|
||||
Email);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Txt_The_email_X_has_been_confirmed,
|
||||
Email);
|
||||
}
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
}
|
||||
else
|
||||
Ale_ShowA_old (Ale_WARNING,Txt_The_email_address_has_not_been_confirmed);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_The_email_address_has_not_been_confirmed);
|
||||
|
||||
/***** Free structure that stores the query result *****/
|
||||
DB_FreeMySQLResult (&mysql_res);
|
||||
}
|
||||
else
|
||||
Ale_ShowA_old (Ale_WARNING,Txt_Failed_email_confirmation_key);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_Failed_email_confirmation_key);
|
||||
|
||||
/***** Form to log in *****/
|
||||
Usr_WriteFormLogin (ActLogIn,NULL);
|
||||
|
|
15
swad_mark.c
15
swad_mark.c
|
@ -283,10 +283,8 @@ static void Mrk_ChangeNumRowsHeaderOrFooter (Brw_HeadOrFoot_t HeaderOrFooter)
|
|||
Gbl.FileBrowser.Priv.FullPathInTree);
|
||||
|
||||
/***** Write message of success *****/
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Txt_The_number_of_rows_is_now_X,
|
||||
NumRows);
|
||||
Ale_ShowA_old (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Txt_The_number_of_rows_is_now_X,
|
||||
NumRows);
|
||||
}
|
||||
else
|
||||
Lay_ShowErrorAndExit ("Wrong number of rows.");
|
||||
|
@ -466,8 +464,8 @@ static bool Mrk_GetUsrMarks (FILE *FileUsrMarks,struct UsrData *UsrDat,
|
|||
/***** Open HTML file with the table of marks *****/
|
||||
if (!(FileAllMarks = fopen (PathFileAllMarks,"rb")))
|
||||
{ // Can't open the file with the table of marks
|
||||
Gbl.Alert.Type = Ale_ERROR;
|
||||
Str_Copy (Gbl.Alert.Txt,"Can not open file of marks.",
|
||||
Gbl.DelayedAlert.Type = Ale_ERROR;
|
||||
Str_Copy (Gbl.DelayedAlert.Txt,"Can not open file of marks.",
|
||||
Ale_MAX_BYTES_ALERT);
|
||||
return false;
|
||||
}
|
||||
|
@ -603,7 +601,8 @@ static bool Mrk_GetUsrMarks (FILE *FileUsrMarks,struct UsrData *UsrDat,
|
|||
|
||||
/***** User's ID not found in table *****/
|
||||
fclose (FileAllMarks);
|
||||
snprintf (Gbl.Alert.Txt,sizeof (Gbl.Alert.Txt),
|
||||
Gbl.DelayedAlert.Type = Ale_WARNING;
|
||||
snprintf (Gbl.DelayedAlert.Txt,sizeof (Gbl.DelayedAlert.Txt),
|
||||
Txt_THE_USER_X_is_not_found_in_the_file_of_marks,
|
||||
UsrDat->FullName);
|
||||
return false;
|
||||
|
@ -715,7 +714,7 @@ void Mrk_ShowMyMarks (void)
|
|||
else // Problems in table of marks or user's ID not found
|
||||
{
|
||||
fclose (FileUsrMarks);
|
||||
Ale_ShowA_old (Ale_WARNING,Gbl.Alert.Txt);
|
||||
Ale_ShowDelayedAlert ();
|
||||
}
|
||||
|
||||
unlink (FileNameUsrMarks); // File with marks is no longer necessary
|
||||
|
|
Loading…
Reference in New Issue