diff --git a/swad_action.c b/swad_action.c index 885882f75..24e5c0b2b 100644 --- a/swad_action.c +++ b/swad_action.c @@ -285,6 +285,7 @@ Centre: 171. ActPrnCtrInf Print information on the current centre 172. ActChgCtrInsCfg Request change of the institution of a centre in centre configuration + NEW. ActRenCtrFulCfg Change full name centre in centre configuration 173. ActReqCtrLog Show form to send the logo of the current centre 174. ActRecCtrLog Receive and store the logo of the current centre 175. ActRemCtrLog Remove the logo of the current centre @@ -1635,6 +1636,7 @@ struct Act_Actions Act_Actions[Act_NUM_ACTIONS] = /* ActPrnCtrInf */{1152,-1,TabUnk,ActSeeCtrInf ,0x1FF,0x1FF,0x1FF,Act_CONT_NORM,Act_BLNK_WINDOW,NULL ,Ctr_PrintConfiguration ,NULL}, /* ActChgCtrInsCfg */{1589,-1,TabUnk,ActSeeCtrInf ,0x100,0x100,0x100,Act_CONT_NORM,Act_THIS_WINDOW,Ctr_ChangeCtrInsInConfig ,Ctr_ContEditAfterChgCtrInConfig,NULL}, + /* ActRenCtrFulCfg */{1594,-1,TabUnk,ActSeeCtrInf ,0x180,0x180,0x180,Act_CONT_NORM,Act_THIS_WINDOW,Ctr_RenameCentreFullInConfig ,Ctr_ContEditAfterChgCtrInConfig,NULL}, /* ActReqCtrLog */{1244,-1,TabUnk,ActSeeCtrInf ,0x100,0x100,0x100,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Ctr_RequestLogo ,NULL}, /* ActRecCtrLog */{1051,-1,TabUnk,ActSeeCtrInf ,0x100,0x100,0x100,Act_CONT_DATA,Act_THIS_WINDOW,Ctr_ReceiveLogo ,Ctr_ShowConfiguration ,NULL}, /* ActRemCtrLog */{1342,-1,TabUnk,ActSeeCtrInf ,0x100,0x100,0x100,Act_CONT_DATA,Act_THIS_WINDOW,Ctr_RemoveLogo ,Ctr_ShowConfiguration ,NULL}, @@ -4449,6 +4451,7 @@ Act_Action_t Act_FromActCodToAction[1+Act_MAX_ACTION_COD] = // Do not reuse uniq ActRenInsFulCfg, // #1591 ActRenInsShoCfg, // #1592 ActChgInsWWWCfg, // #1593 + ActRenCtrFulCfg, // #1594 }; /*****************************************************************************/ diff --git a/swad_action.h b/swad_action.h index 9102121ef..6430a9c59 100644 --- a/swad_action.h +++ b/swad_action.h @@ -55,9 +55,9 @@ typedef enum typedef int Act_Action_t; // Must be a signed type, because -1 is used to indicate obsolete action -#define Act_NUM_ACTIONS (1+9+51+14+93+70+67+247+186+155+172+36+30+86) +#define Act_NUM_ACTIONS (1+9+51+14+93+71+67+247+186+155+172+36+30+86) -#define Act_MAX_ACTION_COD 1593 +#define Act_MAX_ACTION_COD 1594 #define Act_MAX_OPTIONS_IN_MENU_PER_TAB 20 @@ -285,71 +285,72 @@ typedef int Act_Action_t; // Must be a signed type, because -1 is used to indica #define ActCtrSch (ActDowShaIns+ 6) #define ActPrnCtrInf (ActDowShaIns+ 7) #define ActChgCtrInsCfg (ActDowShaIns+ 8) -#define ActReqCtrLog (ActDowShaIns+ 9) -#define ActRecCtrLog (ActDowShaIns+ 10) -#define ActRemCtrLog (ActDowShaIns+ 11) -#define ActReqCtrPho (ActDowShaIns+ 12) -#define ActRecCtrPho (ActDowShaIns+ 13) -#define ActChgCtrPhoAtt (ActDowShaIns+ 14) +#define ActRenCtrFulCfg (ActDowShaIns+ 9) +#define ActReqCtrLog (ActDowShaIns+ 10) +#define ActRecCtrLog (ActDowShaIns+ 11) +#define ActRemCtrLog (ActDowShaIns+ 12) +#define ActReqCtrPho (ActDowShaIns+ 13) +#define ActRecCtrPho (ActDowShaIns+ 14) +#define ActChgCtrPhoAtt (ActDowShaIns+ 15) -#define ActEdiDeg (ActDowShaIns+ 15) -#define ActReqDeg (ActDowShaIns+ 16) -#define ActNewDeg (ActDowShaIns+ 17) -#define ActRemDeg (ActDowShaIns+ 18) -#define ActRenDegSho (ActDowShaIns+ 19) -#define ActRenDegFul (ActDowShaIns+ 20) -#define ActChgDegTyp (ActDowShaIns+ 21) -#define ActChgDegWWW (ActDowShaIns+ 22) -#define ActChgDegSta (ActDowShaIns+ 23) +#define ActEdiDeg (ActDowShaIns+ 16) +#define ActReqDeg (ActDowShaIns+ 17) +#define ActNewDeg (ActDowShaIns+ 18) +#define ActRemDeg (ActDowShaIns+ 19) +#define ActRenDegSho (ActDowShaIns+ 20) +#define ActRenDegFul (ActDowShaIns+ 21) +#define ActChgDegTyp (ActDowShaIns+ 22) +#define ActChgDegWWW (ActDowShaIns+ 23) +#define ActChgDegSta (ActDowShaIns+ 24) -#define ActChgToSeeDocCtr (ActDowShaIns+ 24) -#define ActSeeDocCtr (ActDowShaIns+ 25) -#define ActExpSeeDocCtr (ActDowShaIns+ 26) -#define ActConSeeDocCtr (ActDowShaIns+ 27) -#define ActZIPSeeDocCtr (ActDowShaIns+ 28) -#define ActReqDatSeeDocCtr (ActDowShaIns+ 29) -#define ActDowSeeDocCtr (ActDowShaIns+ 30) -#define ActChgToAdmDocCtr (ActDowShaIns+ 31) -#define ActAdmDocCtr (ActDowShaIns+ 32) -#define ActReqRemFilDocCtr (ActDowShaIns+ 33) -#define ActRemFilDocCtr (ActDowShaIns+ 34) -#define ActRemFolDocCtr (ActDowShaIns+ 35) -#define ActCopDocCtr (ActDowShaIns+ 36) -#define ActPasDocCtr (ActDowShaIns+ 37) -#define ActRemTreDocCtr (ActDowShaIns+ 38) -#define ActFrmCreDocCtr (ActDowShaIns+ 39) -#define ActCreFolDocCtr (ActDowShaIns+ 40) -#define ActCreLnkDocCtr (ActDowShaIns+ 41) -#define ActRenFolDocCtr (ActDowShaIns+ 42) -#define ActRcvFilDocCtrDZ (ActDowShaIns+ 43) -#define ActRcvFilDocCtrCla (ActDowShaIns+ 44) -#define ActExpAdmDocCtr (ActDowShaIns+ 45) -#define ActConAdmDocCtr (ActDowShaIns+ 46) -#define ActZIPAdmDocCtr (ActDowShaIns+ 47) -#define ActShoDocCtr (ActDowShaIns+ 48) -#define ActHidDocCtr (ActDowShaIns+ 49) -#define ActReqDatAdmDocCtr (ActDowShaIns+ 50) -#define ActChgDatAdmDocCtr (ActDowShaIns+ 51) -#define ActDowAdmDocCtr (ActDowShaIns+ 52) +#define ActChgToSeeDocCtr (ActDowShaIns+ 25) +#define ActSeeDocCtr (ActDowShaIns+ 26) +#define ActExpSeeDocCtr (ActDowShaIns+ 27) +#define ActConSeeDocCtr (ActDowShaIns+ 28) +#define ActZIPSeeDocCtr (ActDowShaIns+ 29) +#define ActReqDatSeeDocCtr (ActDowShaIns+ 30) +#define ActDowSeeDocCtr (ActDowShaIns+ 31) +#define ActChgToAdmDocCtr (ActDowShaIns+ 32) +#define ActAdmDocCtr (ActDowShaIns+ 33) +#define ActReqRemFilDocCtr (ActDowShaIns+ 34) +#define ActRemFilDocCtr (ActDowShaIns+ 35) +#define ActRemFolDocCtr (ActDowShaIns+ 36) +#define ActCopDocCtr (ActDowShaIns+ 37) +#define ActPasDocCtr (ActDowShaIns+ 38) +#define ActRemTreDocCtr (ActDowShaIns+ 39) +#define ActFrmCreDocCtr (ActDowShaIns+ 40) +#define ActCreFolDocCtr (ActDowShaIns+ 41) +#define ActCreLnkDocCtr (ActDowShaIns+ 42) +#define ActRenFolDocCtr (ActDowShaIns+ 43) +#define ActRcvFilDocCtrDZ (ActDowShaIns+ 44) +#define ActRcvFilDocCtrCla (ActDowShaIns+ 45) +#define ActExpAdmDocCtr (ActDowShaIns+ 46) +#define ActConAdmDocCtr (ActDowShaIns+ 47) +#define ActZIPAdmDocCtr (ActDowShaIns+ 48) +#define ActShoDocCtr (ActDowShaIns+ 49) +#define ActHidDocCtr (ActDowShaIns+ 50) +#define ActReqDatAdmDocCtr (ActDowShaIns+ 51) +#define ActChgDatAdmDocCtr (ActDowShaIns+ 52) +#define ActDowAdmDocCtr (ActDowShaIns+ 53) -#define ActReqRemFilShaCtr (ActDowShaIns+ 53) -#define ActRemFilShaCtr (ActDowShaIns+ 54) -#define ActRemFolShaCtr (ActDowShaIns+ 55) -#define ActCopShaCtr (ActDowShaIns+ 56) -#define ActPasShaCtr (ActDowShaIns+ 57) -#define ActRemTreShaCtr (ActDowShaIns+ 58) -#define ActFrmCreShaCtr (ActDowShaIns+ 59) -#define ActCreFolShaCtr (ActDowShaIns+ 60) -#define ActCreLnkShaCtr (ActDowShaIns+ 61) -#define ActRenFolShaCtr (ActDowShaIns+ 62) -#define ActRcvFilShaCtrDZ (ActDowShaIns+ 63) -#define ActRcvFilShaCtrCla (ActDowShaIns+ 64) -#define ActExpShaCtr (ActDowShaIns+ 65) -#define ActConShaCtr (ActDowShaIns+ 66) -#define ActZIPShaCtr (ActDowShaIns+ 67) -#define ActReqDatShaCtr (ActDowShaIns+ 68) -#define ActChgDatShaCtr (ActDowShaIns+ 69) -#define ActDowShaCtr (ActDowShaIns+ 70) +#define ActReqRemFilShaCtr (ActDowShaIns+ 54) +#define ActRemFilShaCtr (ActDowShaIns+ 55) +#define ActRemFolShaCtr (ActDowShaIns+ 56) +#define ActCopShaCtr (ActDowShaIns+ 57) +#define ActPasShaCtr (ActDowShaIns+ 58) +#define ActRemTreShaCtr (ActDowShaIns+ 59) +#define ActFrmCreShaCtr (ActDowShaIns+ 60) +#define ActCreFolShaCtr (ActDowShaIns+ 61) +#define ActCreLnkShaCtr (ActDowShaIns+ 62) +#define ActRenFolShaCtr (ActDowShaIns+ 63) +#define ActRcvFilShaCtrDZ (ActDowShaIns+ 64) +#define ActRcvFilShaCtrCla (ActDowShaIns+ 65) +#define ActExpShaCtr (ActDowShaIns+ 66) +#define ActConShaCtr (ActDowShaIns+ 67) +#define ActZIPShaCtr (ActDowShaIns+ 68) +#define ActReqDatShaCtr (ActDowShaIns+ 69) +#define ActChgDatShaCtr (ActDowShaIns+ 70) +#define ActDowShaCtr (ActDowShaIns+ 71) /*****************************************************************************/ /********************************* Degree tab ********************************/ diff --git a/swad_centre.c b/swad_centre.c index 57cfe6ebf..af55f636b 100644 --- a/swad_centre.c +++ b/swad_centre.c @@ -91,7 +91,8 @@ static Ctr_StatusTxt_t Ctr_GetStatusTxtFromStatusBits (Ctr_Status_t Status); static Ctr_Status_t Ctr_GetStatusBitsFromStatusTxt (Ctr_StatusTxt_t StatusTxt); static void Ctr_PutParamOtherCtrCod (long CtrCod); static void Ctr_UpdateCtrInsDB (long CtrCod,long InsCod); -static bool Ctr_RenameCentre (struct Centre *Ctr,Cns_ShortOrFullName_t ShortOrFullName); +static void Ctr_GetCtrCodFromForm (void); +static void Ctr_RenameCentre (struct Centre *Ctr,Cns_ShortOrFullName_t ShortOrFullName); static bool Ctr_CheckIfCtrNameExistsInIns (const char *FieldName,const char *Name,long CtrCod,long InsCod); static void Ctr_PutButtonToGoToCtr (struct Centre *Ctr); @@ -408,12 +409,21 @@ static void Ctr_Configuration (bool PrintView) "