From b6aae8da18323496f830c5e17351e947cec3a889 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Sun, 26 Mar 2017 03:10:07 +0200 Subject: [PATCH] Version 16.167.8 --- swad_action.c | 2 +- swad_changelog.h | 3 ++- swad_holiday.c | 22 ++++++++++++++-------- swad_holiday.h | 3 ++- 4 files changed, 19 insertions(+), 11 deletions(-) diff --git a/swad_action.c b/swad_action.c index d39c1504..ed08e03f 100644 --- a/swad_action.c +++ b/swad_action.c @@ -1647,7 +1647,7 @@ struct Act_Actions Act_Actions[Act_NUM_ACTIONS] = /* ActEdiHld */{ 713,-1,TabUnk,ActSeeCalIns , 0, 0, 0, 0,0x180, 0, 0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Hld_EditHolidays ,NULL}, /* ActNewHld */{ 714,-1,TabUnk,ActSeeCalIns , 0, 0, 0, 0,0x180, 0, 0,Act_CONT_NORM,Act_THIS_WINDOW,Hld_RecFormNewHoliday1 ,Hld_RecFormNewHoliday2 ,NULL}, /* ActRemHld */{ 716,-1,TabUnk,ActSeeCalIns , 0, 0, 0, 0,0x180, 0, 0,Act_CONT_NORM,Act_THIS_WINDOW,Hld_RemoveHoliday1 ,Hld_RemoveHoliday2 ,NULL}, - /* ActChgHldPlc */{ 896,-1,TabUnk,ActSeeCalIns , 0, 0, 0, 0,0x180, 0, 0,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Hld_ChangeHolidayPlace ,NULL}, + /* ActChgHldPlc */{ 896,-1,TabUnk,ActSeeCalIns , 0, 0, 0, 0,0x180, 0, 0,Act_CONT_NORM,Act_THIS_WINDOW,Hld_ChangeHolidayPlace1 ,Hld_ChangeHolidayPlace2 ,NULL}, /* ActChgHldTyp */{ 715,-1,TabUnk,ActSeeCalIns , 0, 0, 0, 0,0x180, 0, 0,Act_CONT_NORM,Act_THIS_WINDOW,Hld_ChangeHolidayType1 ,Hld_ChangeHolidayType2 ,NULL}, /* ActChgHldStrDat */{ 717,-1,TabUnk,ActSeeCalIns , 0, 0, 0, 0,0x180, 0, 0,Act_CONT_NORM,Act_THIS_WINDOW,Hld_ChangeStartDate1 ,Hld_ChangeDate2 ,NULL}, /* ActChgHldEndDat */{ 718,-1,TabUnk,ActSeeCalIns , 0, 0, 0, 0,0x180, 0, 0,Act_CONT_NORM,Act_THIS_WINDOW,Hld_ChangeEndDate1 ,Hld_ChangeDate2 ,NULL}, diff --git a/swad_changelog.h b/swad_changelog.h index 54ab3458..76c7d816 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -209,13 +209,14 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 16.167.7 (2017-03-26)" +#define Log_PLATFORM_VERSION "SWAD 16.167.8 (2017-03-26)" #define CSS_FILE "swad16.166.css" #define JS_FILE "swad16.144.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.167.8: Mar 26, 2017 Changes in edition of holidays. (217681 lines) Version 16.167.7: Mar 26, 2017 Changes in edition of holidays. (217674 lines) Version 16.167.6: Mar 26, 2017 Changes in edition of holidays. (217667 lines) Version 16.167.5: Mar 26, 2017 Changes in edition of holidays. (217660 lines) diff --git a/swad_holiday.c b/swad_holiday.c index f5a8e67b..5e1e3845 100644 --- a/swad_holiday.c +++ b/swad_holiday.c @@ -679,7 +679,7 @@ void Hld_RemoveHoliday2 (void) /************************* Change the place of a holiday *********************/ /*****************************************************************************/ -void Hld_ChangeHolidayPlace (void) +void Hld_ChangeHolidayPlace1 (void) { extern const char *Txt_The_place_of_the_holiday_X_has_changed_to_Y; char Query[128]; @@ -706,16 +706,22 @@ void Hld_ChangeHolidayPlace (void) sprintf (Query,"UPDATE holidays SET PlcCod=%ld WHERE HldCod=%ld", NewPlace.PlcCod,Hld->HldCod); DB_QueryUPDATE (Query,"can not update the place of a holiday"); - - /***** Write message to show the change made *****/ - sprintf (Gbl.Message,Txt_The_place_of_the_holiday_X_has_changed_to_Y, - Hld->Name,NewPlace.FullName); - Lay_ShowAlert (Lay_SUCCESS,Gbl.Message); - - /***** Show the form again *****/ Hld->PlcCod = NewPlace.PlcCod; Str_Copy (Hld->PlaceFullName,NewPlace.FullName, Plc_MAX_BYTES_PLACE_FULL_NAME); + + /***** Write message to show the change made *****/ + Gbl.AlertType = Lay_SUCCESS; + sprintf (Gbl.Message,Txt_The_place_of_the_holiday_X_has_changed_to_Y, + Hld->Name,NewPlace.FullName); + } + +void Hld_ChangeHolidayPlace2 (void) + { + /***** Show success message *****/ + Lay_ShowAlert (Gbl.AlertType,Gbl.Message); + + /***** Show the form again *****/ Hld_EditHolidays (); } diff --git a/swad_holiday.h b/swad_holiday.h index 39e5aaa0..e8d8917b 100644 --- a/swad_holiday.h +++ b/swad_holiday.h @@ -84,7 +84,8 @@ long Hld_GetParamHldCod (void); void Hld_RemoveHoliday1 (void); void Hld_RemoveHoliday2 (void); -void Hld_ChangeHolidayPlace (void); +void Hld_ChangeHolidayPlace1 (void); +void Hld_ChangeHolidayPlace2 (void); void Hld_ChangeHolidayType1 (void); void Hld_ChangeHolidayType2 (void);