mirror of https://github.com/acanas/swad-core.git
Version 15.143
This commit is contained in:
parent
f50297b48e
commit
421ba42caf
|
@ -1438,8 +1438,8 @@ struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
|
|||
/* ActNewIns */{ 698,-1,TabCty,ActSeeIns ,0x100,0x100,0x100,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Ins_RecFormNewIns ,NULL},
|
||||
/* ActRemIns */{ 759,-1,TabCty,ActSeeIns ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Ins_RemoveInstitution ,NULL},
|
||||
/* ActChgInsCty */{ 865,-1,TabCty,ActSeeIns ,0x100,0x100,0x100,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Ins_ChangeInsCountry ,NULL},
|
||||
/* ActRenInsSho */{ 702,-1,TabCty,ActSeeIns ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Ins_RenameInsShort ,NULL},
|
||||
/* ActRenInsFul */{ 701,-1,TabCty,ActSeeIns ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Ins_RenameInsFull ,NULL},
|
||||
/* ActRenInsSho */{ 702,-1,TabCty,ActSeeIns ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,Ins_RenameInsShort ,Ins_ContEditAfterChgIns ,NULL},
|
||||
/* ActRenInsFul */{ 701,-1,TabCty,ActSeeIns ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,Ins_RenameInsFull ,Ins_ContEditAfterChgIns ,NULL},
|
||||
/* ActChgInsWWW */{ 700,-1,TabCty,ActSeeIns ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Ins_ChangeInsWWW ,NULL},
|
||||
/* ActChgInsSta */{1211,-1,TabCty,ActSeeIns ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Ins_ChangeInsStatus ,NULL},
|
||||
|
||||
|
|
|
@ -1684,10 +1684,10 @@ void Ctr_RenameCentreFull (void)
|
|||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/************************ Change the name of a degree ************************/
|
||||
/************************ Change the name of a centre ************************/
|
||||
/*****************************************************************************/
|
||||
// Returns true if the degree is renamed
|
||||
// Returns false if the degree is not renamed
|
||||
// Returns true if the centre is renamed
|
||||
// Returns false if the centre is not renamed
|
||||
|
||||
static bool Ctr_RenameCentre (struct Centre *Ctr,Cns_ShortOrFullName_t ShortOrFullName)
|
||||
{
|
||||
|
@ -1760,7 +1760,7 @@ static bool Ctr_RenameCentre (struct Centre *Ctr,Cns_ShortOrFullName_t ShortOrFu
|
|||
sprintf (Gbl.Message,Txt_The_centre_X_has_been_renamed_as_Y,
|
||||
CurrentCtrName,NewCtrName);
|
||||
|
||||
/* Change current degree name in order to display it properly */
|
||||
/* Change current centre name in order to display it properly */
|
||||
strncpy (CurrentCtrName,NewCtrName,MaxLength);
|
||||
CurrentCtrName[MaxLength] = '\0';
|
||||
|
||||
|
@ -1812,6 +1812,9 @@ void Ctr_ChangeCtrWWW (void)
|
|||
/* Get the new WWW for the centre */
|
||||
Par_GetParToText ("WWW",NewWWW,Cns_MAX_LENGTH_WWW);
|
||||
|
||||
/***** Get data of centre *****/
|
||||
Ctr_GetDataOfCentreByCod (Ctr);
|
||||
|
||||
/***** Check if new WWW is empty *****/
|
||||
if (NewWWW[0])
|
||||
{
|
||||
|
@ -1903,8 +1906,7 @@ void Ctr_ContEditAfterChgCtr (void)
|
|||
Lay_ShowAlert (Lay_INFO,Gbl.Message);
|
||||
|
||||
/***** Put button to go to centre changed *****/
|
||||
if (Gbl.Ctrs.EditingCtr.CtrCod != Gbl.CurrentCtr.Ctr.CtrCod) // If changing other centre different than the current one...
|
||||
Ctr_PutButtonToGoToCtr (&Gbl.Ctrs.EditingCtr);
|
||||
Ctr_PutButtonToGoToCtr (&Gbl.Ctrs.EditingCtr);
|
||||
}
|
||||
|
||||
/***** Show the form again *****/
|
||||
|
@ -1919,11 +1921,15 @@ static void Ctr_PutButtonToGoToCtr (struct Centre *Ctr)
|
|||
{
|
||||
extern const char *Txt_Go_to_X;
|
||||
|
||||
Act_FormStart (ActSeeCtrInf);
|
||||
Ctr_PutParamCtrCod (Ctr->CtrCod);
|
||||
sprintf (Gbl.Title,Txt_Go_to_X,Ctr->ShortName);
|
||||
Lay_PutConfirmButton (Gbl.Title);
|
||||
Act_FormEnd ();
|
||||
// If the centre is different to the current one...
|
||||
if (Ctr->CtrCod != Gbl.CurrentCtr.Ctr.CtrCod)
|
||||
{
|
||||
Act_FormStart (ActSeeCtrInf);
|
||||
Ctr_PutParamCtrCod (Ctr->CtrCod);
|
||||
sprintf (Gbl.Title,Txt_Go_to_X,Ctr->ShortName);
|
||||
Lay_PutConfirmButton (Gbl.Title);
|
||||
Act_FormEnd ();
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -119,19 +119,19 @@
|
|||
// TODO: If a follower follows a user whose profile is no longer visible ==> put icon to unfollow in list of followed
|
||||
// TODO: FIX BUG: In results of search of students, no mark of confirmation is shown even if the student really has confirmed his/her registration in the course
|
||||
// TODO: Insert "http://" to WWW when WWW does not start with "*://"
|
||||
// TODO: Put link "Ir a ..." after editing an institution (similar to course, degree and centre)
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************** Public constants *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
#define Log_PLATFORM_VERSION "SWAD 15.142.1 (2016-03-01)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 15.143 (2016-03-01)"
|
||||
#define CSS_FILE "swad15.137.2.css"
|
||||
#define JS_FILE "swad15.131.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 15.143: Mar 01, 2016 Button to go to another institution after editing. (196033 lines)
|
||||
Version 15.142.1: Mar 01, 2016 Changes in some help messages. (195985 lines)
|
||||
Version 15.142: Mar 01, 2016 Button to go to another centre after editing. (195984 lines)
|
||||
Version 15.141.1: Mar 01, 2016 Fixed bug when creating a new degree. (195897 lines)
|
||||
|
|
|
@ -2413,8 +2413,7 @@ void Crs_ChangeInsCrsCod (void)
|
|||
}
|
||||
|
||||
/***** Put button to go to course changed *****/
|
||||
if (Crs->CrsCod != Gbl.CurrentCrs.Crs.CrsCod) // If changing other course different than the current one...
|
||||
Crs_PutButtonToGoToCrs (Crs);
|
||||
Crs_PutButtonToGoToCrs (Crs);
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_You_dont_have_permission_to_edit_this_course);
|
||||
|
@ -2497,8 +2496,7 @@ void Crs_ChangeCrsDegree (void)
|
|||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Message);
|
||||
|
||||
/***** Put button to go to course changed *****/
|
||||
if (Crs->CrsCod != Gbl.CurrentCrs.Crs.CrsCod) // If changing other course different than the current one...
|
||||
Crs_PutButtonToGoToCrs (Crs);
|
||||
Crs_PutButtonToGoToCrs (Crs);
|
||||
}
|
||||
}
|
||||
else // New degree has no current course year
|
||||
|
@ -2583,8 +2581,7 @@ void Crs_ChangeCrsYear (void)
|
|||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Message);
|
||||
|
||||
/***** Put button to go to course changed *****/
|
||||
if (Crs->CrsCod != Gbl.CurrentCrs.Crs.CrsCod) // If changing other course different than the current one...
|
||||
Crs_PutButtonToGoToCrs (Crs);
|
||||
Crs_PutButtonToGoToCrs (Crs);
|
||||
}
|
||||
}
|
||||
else // Year not valid
|
||||
|
@ -2792,8 +2789,7 @@ void Crs_ChangeCrsStatus (void)
|
|||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Message);
|
||||
|
||||
/***** Put button to go to course changed *****/
|
||||
if (Crs->CrsCod != Gbl.CurrentCrs.Crs.CrsCod) // If changing other course different than the current one...
|
||||
Crs_PutButtonToGoToCrs (Crs);
|
||||
Crs_PutButtonToGoToCrs (Crs);
|
||||
|
||||
/***** Show the form again *****/
|
||||
Crs_ReqEditCourses ();
|
||||
|
@ -2814,8 +2810,7 @@ void Crs_ContEditAfterChgCrs (void)
|
|||
Lay_ShowAlert (Lay_INFO,Gbl.Message);
|
||||
|
||||
/***** Put button to go to course changed *****/
|
||||
if (Gbl.Degs.EditingCrs.CrsCod != Gbl.CurrentCrs.Crs.CrsCod) // If changing other course different than the current one...
|
||||
Crs_PutButtonToGoToCrs (&Gbl.Degs.EditingCrs);
|
||||
Crs_PutButtonToGoToCrs (&Gbl.Degs.EditingCrs);
|
||||
}
|
||||
|
||||
/***** Show the form again *****/
|
||||
|
@ -2830,11 +2825,15 @@ static void Crs_PutButtonToGoToCrs (struct Course *Crs)
|
|||
{
|
||||
extern const char *Txt_Go_to_X;
|
||||
|
||||
Act_FormStart (ActSeeCrsInf);
|
||||
Crs_PutParamCrsCod (Crs->CrsCod);
|
||||
sprintf (Gbl.Title,Txt_Go_to_X,Crs->ShortName);
|
||||
Lay_PutConfirmButton (Gbl.Title);
|
||||
Act_FormEnd ();
|
||||
// If the course is different to the current one...
|
||||
if (Crs->CrsCod != Gbl.CurrentCrs.Crs.CrsCod)
|
||||
{
|
||||
Act_FormStart (ActSeeCrsInf);
|
||||
Crs_PutParamCrsCod (Crs->CrsCod);
|
||||
sprintf (Gbl.Title,Txt_Go_to_X,Crs->ShortName);
|
||||
Lay_PutConfirmButton (Gbl.Title);
|
||||
Act_FormEnd ();
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -3388,8 +3388,7 @@ void Deg_ChangeDegreeType (void)
|
|||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Message);
|
||||
|
||||
/***** Put button to go to degree changed *****/
|
||||
if (Deg->DegCod != Gbl.CurrentDeg.Deg.DegCod) // If changing other degree different than the current one...
|
||||
Deg_PutButtonToGoToDeg (Deg);
|
||||
Deg_PutButtonToGoToDeg (Deg);
|
||||
|
||||
/***** Show the form again *****/
|
||||
Gbl.Degs.EditingDegTyp.DegTypCod = NewDegTypCod;
|
||||
|
@ -3433,8 +3432,7 @@ void Deg_ChangeDegreeCtr (void)
|
|||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Message);
|
||||
|
||||
/***** Put button to go to degree changed *****/
|
||||
if (Deg->DegCod != Gbl.CurrentDeg.Deg.DegCod) // If changing other degree different than the current one...
|
||||
Deg_PutButtonToGoToDeg (Deg);
|
||||
Deg_PutButtonToGoToDeg (Deg);
|
||||
|
||||
/***** Show the form again *****/
|
||||
Deg_EditDegrees ();
|
||||
|
@ -3479,8 +3477,7 @@ void Deg_ChangeDegWWW (void)
|
|||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Message);
|
||||
|
||||
/***** Put button to go to degree changed *****/
|
||||
if (Deg->DegCod != Gbl.CurrentDeg.Deg.DegCod) // If changing other degree different than the current one...
|
||||
Deg_PutButtonToGoToDeg (Deg);
|
||||
Deg_PutButtonToGoToDeg (Deg);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -3536,8 +3533,7 @@ void Deg_ChangeDegStatus (void)
|
|||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Message);
|
||||
|
||||
/***** Put button to go to degree changed *****/
|
||||
if (Deg->DegCod != Gbl.CurrentDeg.Deg.DegCod) // If changing other degree different than the current one...
|
||||
Deg_PutButtonToGoToDeg (Deg);
|
||||
Deg_PutButtonToGoToDeg (Deg);
|
||||
|
||||
/***** Show the form again *****/
|
||||
Deg_EditDegrees ();
|
||||
|
@ -3558,8 +3554,7 @@ void Deg_ContEditAfterChgDeg (void)
|
|||
Lay_ShowAlert (Lay_INFO,Gbl.Message);
|
||||
|
||||
/***** Put button to go to degree changed *****/
|
||||
if (Gbl.Degs.EditingDeg.DegCod != Gbl.CurrentDeg.Deg.DegCod) // If changing other degree different than the current one...
|
||||
Deg_PutButtonToGoToDeg (&Gbl.Degs.EditingDeg);
|
||||
Deg_PutButtonToGoToDeg (&Gbl.Degs.EditingDeg);
|
||||
}
|
||||
|
||||
/***** Show the form again *****/
|
||||
|
@ -3574,11 +3569,15 @@ static void Deg_PutButtonToGoToDeg (struct Degree *Deg)
|
|||
{
|
||||
extern const char *Txt_Go_to_X;
|
||||
|
||||
Act_FormStart (ActSeeDegInf);
|
||||
Deg_PutParamDegCod (Deg->DegCod);
|
||||
sprintf (Gbl.Title,Txt_Go_to_X,Deg->ShortName);
|
||||
Lay_PutConfirmButton (Gbl.Title);
|
||||
Act_FormEnd ();
|
||||
// If the degree is different to the current one...
|
||||
if (Deg->DegCod != Gbl.CurrentDeg.Deg.DegCod)
|
||||
{
|
||||
Act_FormStart (ActSeeDegInf);
|
||||
Deg_PutParamDegCod (Deg->DegCod);
|
||||
sprintf (Gbl.Title,Txt_Go_to_X,Deg->ShortName);
|
||||
Lay_PutConfirmButton (Gbl.Title);
|
||||
Act_FormEnd ();
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -75,8 +75,10 @@ static bool Ins_CheckIfICanEdit (struct Institution *Ins);
|
|||
static Ins_StatusTxt_t Ins_GetStatusTxtFromStatusBits (Ins_Status_t Status);
|
||||
static Ins_Status_t Ins_GetStatusBitsFromStatusTxt (Ins_StatusTxt_t StatusTxt);
|
||||
static void Ins_PutParamOtherInsCod (long InsCod);
|
||||
static void Ins_RenameInstitution (Cns_ShortOrFullName_t ShortOrFullName);
|
||||
static bool Ins_RenameInstitution (struct Institution *Ins,Cns_ShortOrFullName_t ShortOrFullName);
|
||||
static bool Ins_CheckIfInsNameExistsInCty (const char *FieldName,const char *Name,long InsCod,long CtyCod);
|
||||
static void Ins_PutButtonToGoToIns (struct Institution *Ins);
|
||||
|
||||
static void Ins_PutFormToCreateInstitution (void);
|
||||
static void Ins_PutHeadInstitutionsForEdition (void);
|
||||
static void Ins_RecFormRequestOrCreateIns (unsigned Status);
|
||||
|
@ -1472,7 +1474,13 @@ void Ins_RemoveInstitution (void)
|
|||
|
||||
void Ins_RenameInsShort (void)
|
||||
{
|
||||
Ins_RenameInstitution (Cns_SHORT_NAME);
|
||||
struct Institution *Ins;
|
||||
|
||||
Ins = &Gbl.Inss.EditingIns;
|
||||
|
||||
if (Ins_RenameInstitution (Ins,Cns_SHORT_NAME))
|
||||
if (Ins->InsCod == Gbl.CurrentIns.Ins.InsCod) // If renaming current institution...
|
||||
strcpy (Gbl.CurrentIns.Ins.ShortName,Ins->ShortName); // Overwrite current institution name in order to show correctly in page title and heading
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -1481,28 +1489,35 @@ void Ins_RenameInsShort (void)
|
|||
|
||||
void Ins_RenameInsFull (void)
|
||||
{
|
||||
Ins_RenameInstitution (Cns_FULL_NAME);
|
||||
struct Institution *Ins;
|
||||
|
||||
Ins = &Gbl.Inss.EditingIns;
|
||||
|
||||
if (Ins_RenameInstitution (Ins,Cns_FULL_NAME))
|
||||
if (Ins->InsCod == Gbl.CurrentIns.Ins.InsCod) // If renaming current institution...
|
||||
strcpy (Gbl.CurrentIns.Ins.FullName,Ins->FullName); // Overwrite current institution name in order to show correctly in page title and heading
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/******************** Change the name of an institution **********************/
|
||||
/*****************************************************************************/
|
||||
// Returns true if the institution is renamed
|
||||
// Returns false if the institution is not renamed
|
||||
|
||||
static void Ins_RenameInstitution (Cns_ShortOrFullName_t ShortOrFullName)
|
||||
static bool Ins_RenameInstitution (struct Institution *Ins,Cns_ShortOrFullName_t ShortOrFullName)
|
||||
{
|
||||
extern const char *Txt_You_can_not_leave_the_name_of_the_institution_X_empty;
|
||||
extern const char *Txt_The_institution_X_already_exists;
|
||||
extern const char *Txt_The_name_of_the_institution_X_has_changed_to_Y;
|
||||
extern const char *Txt_The_institution_X_has_been_renamed_as_Y;
|
||||
extern const char *Txt_The_name_of_the_institution_X_has_not_changed;
|
||||
char Query[512];
|
||||
struct Institution *Ins;
|
||||
const char *ParamName = NULL; // Initialized to avoid warning
|
||||
const char *FieldName = NULL; // Initialized to avoid warning
|
||||
unsigned MaxLength = 0; // Initialized to avoid warning
|
||||
char *CurrentInsName = NULL; // Initialized to avoid warning
|
||||
char NewInsName[Ins_MAX_LENGTH_INSTITUTION_FULL_NAME+1];
|
||||
bool InstitutionHasBeenRenamed = false;
|
||||
|
||||
Ins = &Gbl.Inss.EditingIns;
|
||||
switch (ShortOrFullName)
|
||||
{
|
||||
case Cns_SHORT_NAME:
|
||||
|
@ -1535,7 +1550,7 @@ static void Ins_RenameInstitution (Cns_ShortOrFullName_t ShortOrFullName)
|
|||
{
|
||||
sprintf (Gbl.Message,Txt_You_can_not_leave_the_name_of_the_institution_X_empty,
|
||||
CurrentInsName);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Message);
|
||||
Gbl.Error = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1547,7 +1562,7 @@ static void Ins_RenameInstitution (Cns_ShortOrFullName_t ShortOrFullName)
|
|||
{
|
||||
sprintf (Gbl.Message,Txt_The_institution_X_already_exists,
|
||||
NewInsName);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Message);
|
||||
Gbl.Error = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1556,23 +1571,23 @@ static void Ins_RenameInstitution (Cns_ShortOrFullName_t ShortOrFullName)
|
|||
FieldName,NewInsName,Ins->InsCod);
|
||||
DB_QueryUPDATE (Query,"can not update the name of an institution");
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
sprintf (Gbl.Message,Txt_The_name_of_the_institution_X_has_changed_to_Y,
|
||||
/* Write message to show the change made */
|
||||
sprintf (Gbl.Message,Txt_The_institution_X_has_been_renamed_as_Y,
|
||||
CurrentInsName,NewInsName);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Message);
|
||||
|
||||
/* Change current institution name in order to display it properly */
|
||||
strncpy (CurrentInsName,NewInsName,MaxLength);
|
||||
CurrentInsName[MaxLength] = '\0';
|
||||
|
||||
InstitutionHasBeenRenamed = true;
|
||||
}
|
||||
}
|
||||
else // The same name
|
||||
{
|
||||
sprintf (Gbl.Message,Txt_The_name_of_the_institution_X_has_not_changed,
|
||||
CurrentInsName);
|
||||
Lay_ShowAlert (Lay_INFO,Gbl.Message);
|
||||
}
|
||||
}
|
||||
|
||||
/***** Show the form again *****/
|
||||
strcpy (CurrentInsName,NewInsName);
|
||||
Ins_EditInstitutions ();
|
||||
return InstitutionHasBeenRenamed;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -1642,13 +1657,15 @@ void Ins_ChangeInsCountry (void)
|
|||
" WHERE InsCod='%ld'",
|
||||
NewCty.CtyCod,Ins->InsCod);
|
||||
DB_QueryUPDATE (Query,"can not update the country of an institution");
|
||||
Ins->CtyCod = NewCty.CtyCod;
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
sprintf (Gbl.Message,Txt_The_country_of_the_institution_X_has_changed_to_Y,
|
||||
Ins->FullName,NewCty.Name[Gbl.Prefs.Language]);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Message);
|
||||
|
||||
Ins->CtyCod = NewCty.CtyCod;
|
||||
/***** Put button to go to institution changed *****/
|
||||
Ins_PutButtonToGoToIns (Ins);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1678,6 +1695,9 @@ void Ins_ChangeInsWWW (void)
|
|||
/* Get the new WWW for the institution */
|
||||
Par_GetParToText ("WWW",NewWWW,Cns_MAX_LENGTH_WWW);
|
||||
|
||||
/***** Get data of institution *****/
|
||||
Ins_GetDataOfInstitutionByCod (Ins,Ins_GET_BASIC_DATA);
|
||||
|
||||
/***** Check if new WWW is empty *****/
|
||||
if (NewWWW[0])
|
||||
{
|
||||
|
@ -1690,6 +1710,9 @@ void Ins_ChangeInsWWW (void)
|
|||
sprintf (Gbl.Message,Txt_The_new_web_address_is_X,
|
||||
NewWWW);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Message);
|
||||
|
||||
/***** Put button to go to institution changed *****/
|
||||
Ins_PutButtonToGoToIns (Ins);
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_You_can_not_leave_the_web_address_empty);
|
||||
|
@ -1741,10 +1764,54 @@ void Ins_ChangeInsStatus (void)
|
|||
Ins->ShortName);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Message);
|
||||
|
||||
/***** Put button to go to institution changed *****/
|
||||
Ins_PutButtonToGoToIns (Ins);
|
||||
|
||||
/***** Show the form again *****/
|
||||
Ins_EditInstitutions ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/*********** Show message of success after changing an institution ***********/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Ins_ContEditAfterChgIns (void)
|
||||
{
|
||||
if (Gbl.Error)
|
||||
/***** Write error message *****/
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Message);
|
||||
else
|
||||
{
|
||||
/***** Write success message showing the change made *****/
|
||||
Lay_ShowAlert (Lay_INFO,Gbl.Message);
|
||||
|
||||
/***** Put button to go to institution changed *****/
|
||||
Ins_PutButtonToGoToIns (&Gbl.Inss.EditingIns);
|
||||
}
|
||||
|
||||
/***** Show the form again *****/
|
||||
Ins_EditInstitutions ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/********************* Put button to go to institution ***********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Ins_PutButtonToGoToIns (struct Institution *Ins)
|
||||
{
|
||||
extern const char *Txt_Go_to_X;
|
||||
|
||||
// If the institution is different to the current one...
|
||||
if (Ins->InsCod != Gbl.CurrentIns.Ins.InsCod)
|
||||
{
|
||||
Act_FormStart (ActSeeInsInf);
|
||||
Ins_PutParamInsCod (Ins->InsCod);
|
||||
sprintf (Gbl.Title,Txt_Go_to_X,Ins->ShortName);
|
||||
Lay_PutConfirmButton (Gbl.Title);
|
||||
Act_FormEnd ();
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/******** Show a form for sending a logo of the current institution **********/
|
||||
/*****************************************************************************/
|
||||
|
@ -2049,12 +2116,15 @@ static void Ins_CreateInstitution (struct Institution *Ins,unsigned Status)
|
|||
Status,
|
||||
Gbl.Usrs.Me.UsrDat.UsrCod,
|
||||
Ins->ShortName,Ins->FullName,Ins->WWW);
|
||||
DB_QueryINSERT (Query,"can not create institution");
|
||||
Ins->InsCod = DB_QueryINSERTandReturnCode (Query,"can not create institution");
|
||||
|
||||
/***** Write success message *****/
|
||||
sprintf (Gbl.Message,Txt_Created_new_institution_X,
|
||||
Ins->FullName);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Message);
|
||||
|
||||
/***** Put button to go to institution created *****/
|
||||
Ins_PutButtonToGoToIns (Ins);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -114,6 +114,8 @@ void Ins_RenameInsFull (void);
|
|||
void Ins_ChangeInsCountry (void);
|
||||
void Ins_ChangeInsWWW (void);
|
||||
void Ins_ChangeInsStatus (void);
|
||||
void Ins_ContEditAfterChgIns (void);
|
||||
|
||||
void Ins_RequestLogo (void);
|
||||
void Ins_ReceiveLogo (void);
|
||||
void Ins_RemoveLogo (void);
|
||||
|
|
20
swad_text.c
20
swad_text.c
|
@ -42357,25 +42357,25 @@ const char *Txt_The_name_of_the_holiday_X_has_not_changed = // Warning: it is ve
|
|||
"The name of the holiday <strong>%s</strong> has not changed."; // Necessita de tradução
|
||||
#endif
|
||||
|
||||
const char *Txt_The_name_of_the_institution_X_has_changed_to_Y = // Warning: it is very important to include two %s in the following sentences
|
||||
const char *Txt_The_institution_X_has_been_renamed_as_Y = // Warning: it is very important to include two %s in the following sentences
|
||||
#if L==1
|
||||
"El nombre de la institución <strong>%s</strong> ha cambiado a <strong>%s</strong>."; // Necessita traduccio
|
||||
"La institución <strong>%s</strong> ha pasado a denominarse <strong>%s</strong>."; // Necessita traduccio
|
||||
#elif L==2
|
||||
"The name of the institution <strong>%s</strong> has changed to <strong>%s</strong>."; // Need Übersetzung
|
||||
"The institution <strong>%s</strong> has been renamed as <strong>%s</strong>."; // Need Übersetzung
|
||||
#elif L==3
|
||||
"The name of the institution <strong>%s</strong> has changed to <strong>%s</strong>.";
|
||||
"The institution <strong>%s</strong> has been renamed as <strong>%s</strong>.";
|
||||
#elif L==4
|
||||
"El nombre de la institución <strong>%s</strong> ha cambiado a <strong>%s</strong>.";
|
||||
"La institución <strong>%s</strong> ha pasado a denominarse <strong>%s</strong>.";
|
||||
#elif L==5
|
||||
"The name of the institution <strong>%s</strong> has changed to <strong>%s</strong>."; // Besoin de traduction
|
||||
"The institution <strong>%s</strong> has been renamed as <strong>%s</strong>."; // Besoin de traduction
|
||||
#elif L==6
|
||||
"El nombre de la institución <strong>%s</strong> ha cambiado a <strong>%s</strong>."; // Okoteve traducción
|
||||
"La institución <strong>%s</strong> ha pasado a denominarse <strong>%s</strong>."; // Okoteve traducción
|
||||
#elif L==7
|
||||
"Il nome dell'istituzione <strong>%s</strong> è cambiato a <strong>%s</strong>.";
|
||||
"L'istituzione <strong>%s</strong> è stata rinominata <strong>%s</strong>.";
|
||||
#elif L==8
|
||||
"The name of the institution <strong>%s</strong> has changed to <strong>%s</strong>."; // Potrzebujesz tlumaczenie
|
||||
"The institution <strong>%s</strong> has been renamed as <strong>%s</strong>."; // Potrzebujesz tlumaczenie
|
||||
#elif L==9
|
||||
"The name of the institution <strong>%s</strong> has changed to <strong>%s</strong>."; // Necessita de tradução
|
||||
"The institution <strong>%s</strong> has been renamed as <strong>%s</strong>."; // Necessita de tradução
|
||||
#endif
|
||||
|
||||
const char *Txt_The_name_of_the_institution_X_has_not_changed = // Warning: it is very important to include %s in the following sentences
|
||||
|
|
Loading…
Reference in New Issue