mirror of https://github.com/acanas/swad-core.git
Version 22.108: May 11, 2023 Code refactoring in forms.
This commit is contained in:
parent
1bd200959b
commit
2f2f88d74a
113
swad_banner.c
113
swad_banner.c
|
@ -789,82 +789,65 @@ void Ban_ContEditAfterChgBan (void)
|
||||||
|
|
||||||
static void Ban_PutFormToCreateBanner (const struct Ban_Banner *Ban)
|
static void Ban_PutFormToCreateBanner (const struct Ban_Banner *Ban)
|
||||||
{
|
{
|
||||||
extern const char *Txt_Actions[ActLst_NUM_ACTIONS];
|
/***** Begin form to create *****/
|
||||||
extern const char *Txt_Create;
|
Frm_BeginFormTable (ActNewBan,NULL,NULL,NULL);
|
||||||
|
|
||||||
/***** Begin fieldset *****/
|
/***** Write heading *****/
|
||||||
HTM_FIELDSET_Begin (NULL);
|
Ban_PutHeadBanners ();
|
||||||
HTM_LEGEND (Txt_Actions[ActNewBan]);
|
|
||||||
|
|
||||||
/***** Begin form *****/
|
/***** Table row for input fields *****/
|
||||||
Frm_BeginForm (ActNewBan);
|
/* Begin table row */
|
||||||
|
HTM_TR_Begin (NULL);
|
||||||
|
|
||||||
/***** Begin table *****/
|
/* Banner code */
|
||||||
HTM_TABLE_BeginWidePadding (2);
|
HTM_TD_Begin ("class=\"BM\"");
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Write heading *****/
|
HTM_TD_Begin ("class=\"BM\"");
|
||||||
Ban_PutHeadBanners ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Table row for input fields *****/
|
HTM_TD_Empty (1);
|
||||||
/* Begin table row */
|
|
||||||
HTM_TR_Begin (NULL);
|
|
||||||
|
|
||||||
/* Banner code */
|
/* Banner short name */
|
||||||
HTM_TD_Begin ("class=\"BM\"");
|
HTM_TD_Begin ("class=\"CM\"");
|
||||||
HTM_TD_End ();
|
HTM_INPUT_TEXT ("ShortName",Ban_MAX_CHARS_SHRT_NAME,Ban->ShrtName,
|
||||||
|
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||||
|
"class=\"INPUT_SHORT_NAME INPUT_%s\""
|
||||||
|
" required=\"required\"",
|
||||||
|
The_GetSuffix ());
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
HTM_TD_Begin ("class=\"BM\"");
|
/* Banner full name */
|
||||||
HTM_TD_End ();
|
HTM_TD_Begin ("class=\"CM\"");
|
||||||
|
HTM_INPUT_TEXT ("FullName",Ban_MAX_CHARS_FULL_NAME,Ban->FullName,
|
||||||
|
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||||
|
"class=\"INPUT_FULL_NAME INPUT_%s\""
|
||||||
|
" required=\"required\"",
|
||||||
|
The_GetSuffix ());
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
HTM_TD_Empty (1);
|
/* Banner image */
|
||||||
|
HTM_TD_Begin ("class=\"CM\"");
|
||||||
|
HTM_INPUT_TEXT ("Img",Ban_MAX_CHARS_IMAGE,Ban->Img,
|
||||||
|
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||||
|
"size=\"12\" class=\"INPUT_%s\""
|
||||||
|
" required=\"required\"",
|
||||||
|
The_GetSuffix ());
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
/* Banner short name */
|
/* Banner WWW */
|
||||||
HTM_TD_Begin ("class=\"CM\"");
|
HTM_TD_Begin ("class=\"CM\"");
|
||||||
HTM_INPUT_TEXT ("ShortName",Ban_MAX_CHARS_SHRT_NAME,Ban->ShrtName,
|
HTM_INPUT_URL ("WWW",Ban->WWW,HTM_DONT_SUBMIT_ON_CHANGE,
|
||||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
"class=\"INPUT_WWW_NARROW INPUT_%s\""
|
||||||
"class=\"INPUT_SHORT_NAME INPUT_%s\""
|
" required=\"required\"",
|
||||||
" required=\"required\"",
|
The_GetSuffix ());
|
||||||
The_GetSuffix ());
|
HTM_TD_End ();
|
||||||
HTM_TD_End ();
|
|
||||||
|
|
||||||
/* Banner full name */
|
/* End table row */
|
||||||
HTM_TD_Begin ("class=\"CM\"");
|
HTM_TR_End ();
|
||||||
HTM_INPUT_TEXT ("FullName",Ban_MAX_CHARS_FULL_NAME,Ban->FullName,
|
|
||||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
|
||||||
"class=\"INPUT_FULL_NAME INPUT_%s\""
|
|
||||||
" required=\"required\"",
|
|
||||||
The_GetSuffix ());
|
|
||||||
HTM_TD_End ();
|
|
||||||
|
|
||||||
/* Banner image */
|
/***** End form to create *****/
|
||||||
HTM_TD_Begin ("class=\"CM\"");
|
Frm_EndFormTable (Btn_CREATE_BUTTON);
|
||||||
HTM_INPUT_TEXT ("Img",Ban_MAX_CHARS_IMAGE,Ban->Img,
|
|
||||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
|
||||||
"size=\"12\" class=\"INPUT_%s\""
|
|
||||||
" required=\"required\"",
|
|
||||||
The_GetSuffix ());
|
|
||||||
HTM_TD_End ();
|
|
||||||
|
|
||||||
/* Banner WWW */
|
|
||||||
HTM_TD_Begin ("class=\"CM\"");
|
|
||||||
HTM_INPUT_URL ("WWW",Ban->WWW,HTM_DONT_SUBMIT_ON_CHANGE,
|
|
||||||
"class=\"INPUT_WWW_NARROW INPUT_%s\""
|
|
||||||
" required=\"required\"",
|
|
||||||
The_GetSuffix ());
|
|
||||||
HTM_TD_End ();
|
|
||||||
|
|
||||||
/* End table row */
|
|
||||||
HTM_TR_End ();
|
|
||||||
|
|
||||||
/***** End table and send button *****/
|
|
||||||
HTM_TABLE_End ();
|
|
||||||
Btn_PutButton (Btn_CREATE_BUTTON,Txt_Create);
|
|
||||||
|
|
||||||
/***** End form *****/
|
|
||||||
Frm_EndForm ();
|
|
||||||
|
|
||||||
/***** End fieldset *****/
|
|
||||||
HTM_FIELDSET_End ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
|
@ -670,69 +670,52 @@ void Bld_ContEditAfterChgBuilding (void)
|
||||||
|
|
||||||
static void Bld_PutFormToCreateBuilding (void)
|
static void Bld_PutFormToCreateBuilding (void)
|
||||||
{
|
{
|
||||||
extern const char *Txt_Actions[ActLst_NUM_ACTIONS];
|
/***** Begin form to create *****/
|
||||||
extern const char *Txt_Create;
|
Frm_BeginFormTable (ActNewBld,NULL,NULL,NULL);
|
||||||
|
|
||||||
/***** Begin fieldset *****/
|
/***** Write heading *****/
|
||||||
HTM_FIELDSET_Begin (NULL);
|
Bld_PutHeadBuildings ();
|
||||||
HTM_LEGEND (Txt_Actions[ActNewBld]);
|
|
||||||
|
|
||||||
/***** Begin form *****/
|
HTM_TR_Begin (NULL);
|
||||||
Frm_BeginForm (ActNewBld);
|
|
||||||
|
|
||||||
/***** Begin table *****/
|
/***** Column to remove building, disabled here *****/
|
||||||
HTM_TABLE_BeginWidePadding (2);
|
HTM_TD_Begin ("class=\"BM\"");
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Write heading *****/
|
/***** Building code *****/
|
||||||
Bld_PutHeadBuildings ();
|
HTM_TD_Begin ("class=\"CODE\"");
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
HTM_TR_Begin (NULL);
|
/***** Building short name *****/
|
||||||
|
HTM_TD_Begin ("class=\"LM\"");
|
||||||
|
HTM_INPUT_TEXT ("ShortName",Bld_MAX_CHARS_SHRT_NAME,Bld_EditingBuilding->ShrtName,
|
||||||
|
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||||
|
"size=\"10\" class=\"INPUT_SHORT_NAME INPUT_%s\""
|
||||||
|
" required=\"required\"",
|
||||||
|
The_GetSuffix ());
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Column to remove building, disabled here *****/
|
/***** Building full name *****/
|
||||||
HTM_TD_Begin ("class=\"BM\"");
|
HTM_TD_Begin ("class=\"LM\"");
|
||||||
HTM_TD_End ();
|
HTM_INPUT_TEXT ("FullName",Bld_MAX_CHARS_FULL_NAME,Bld_EditingBuilding->FullName,
|
||||||
|
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||||
|
"size=\"20\" class=\"INPUT_FULL_NAME INPUT_%s\""
|
||||||
|
" required=\"required\"",
|
||||||
|
The_GetSuffix ());
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Building code *****/
|
/***** Building location *****/
|
||||||
HTM_TD_Begin ("class=\"CODE\"");
|
HTM_TD_Begin ("class=\"LM\"");
|
||||||
HTM_TD_End ();
|
HTM_INPUT_TEXT ("Location",Bld_MAX_CHARS_LOCATION,Bld_EditingBuilding->Location,
|
||||||
|
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||||
|
"size=\"15\" class=\"INPUT_FULL_NAME INPUT_%s\"",
|
||||||
|
The_GetSuffix ());
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Building short name *****/
|
HTM_TR_End ();
|
||||||
HTM_TD_Begin ("class=\"LM\"");
|
|
||||||
HTM_INPUT_TEXT ("ShortName",Bld_MAX_CHARS_SHRT_NAME,Bld_EditingBuilding->ShrtName,
|
|
||||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
|
||||||
"size=\"10\" class=\"INPUT_SHORT_NAME INPUT_%s\""
|
|
||||||
" required=\"required\"",
|
|
||||||
The_GetSuffix ());
|
|
||||||
HTM_TD_End ();
|
|
||||||
|
|
||||||
/***** Building full name *****/
|
/***** End form to create *****/
|
||||||
HTM_TD_Begin ("class=\"LM\"");
|
Frm_EndFormTable (Btn_CREATE_BUTTON);
|
||||||
HTM_INPUT_TEXT ("FullName",Bld_MAX_CHARS_FULL_NAME,Bld_EditingBuilding->FullName,
|
|
||||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
|
||||||
"size=\"20\" class=\"INPUT_FULL_NAME INPUT_%s\""
|
|
||||||
" required=\"required\"",
|
|
||||||
The_GetSuffix ());
|
|
||||||
HTM_TD_End ();
|
|
||||||
|
|
||||||
/***** Building location *****/
|
|
||||||
HTM_TD_Begin ("class=\"LM\"");
|
|
||||||
HTM_INPUT_TEXT ("Location",Bld_MAX_CHARS_LOCATION,Bld_EditingBuilding->Location,
|
|
||||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
|
||||||
"size=\"15\" class=\"INPUT_FULL_NAME INPUT_%s\"",
|
|
||||||
The_GetSuffix ());
|
|
||||||
HTM_TD_End ();
|
|
||||||
|
|
||||||
HTM_TR_End ();
|
|
||||||
|
|
||||||
/***** End table and send button *****/
|
|
||||||
HTM_TABLE_End ();
|
|
||||||
Btn_PutButton (Btn_CREATE_BUTTON,Txt_Create);
|
|
||||||
|
|
||||||
/***** End form *****/
|
|
||||||
Frm_EndForm ();
|
|
||||||
|
|
||||||
/***** End fieldset *****/
|
|
||||||
HTM_FIELDSET_End ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
|
@ -37,32 +37,26 @@ void Btn_PutButton (Btn_Button_t Button,const char *TxtButton)
|
||||||
{
|
{
|
||||||
static void (*Function[Btn_NUM_BUTTON_TYPES]) (const char *TxtButton) =
|
static void (*Function[Btn_NUM_BUTTON_TYPES]) (const char *TxtButton) =
|
||||||
{
|
{
|
||||||
[Btn_NO_BUTTON ] = NULL,
|
|
||||||
[Btn_CREATE_BUTTON ] = Btn_PutCreateButton,
|
[Btn_CREATE_BUTTON ] = Btn_PutCreateButton,
|
||||||
[Btn_CONFIRM_BUTTON] = Btn_PutConfirmButton,
|
[Btn_CONFIRM_BUTTON] = Btn_PutConfirmButton,
|
||||||
[Btn_REMOVE_BUTTON ] = Btn_PutRemoveButton,
|
[Btn_REMOVE_BUTTON ] = Btn_PutRemoveButton,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (TxtButton)
|
if (Button != Btn_NO_BUTTON && TxtButton)
|
||||||
if (TxtButton[0])
|
Function[Button] (TxtButton);
|
||||||
if (Function[Button])
|
|
||||||
Function[Button] (TxtButton);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Btn_PutButtonInline (Btn_Button_t Button,const char *TxtButton)
|
void Btn_PutButtonInline (Btn_Button_t Button,const char *TxtButton)
|
||||||
{
|
{
|
||||||
static void (*Function[Btn_NUM_BUTTON_TYPES]) (const char *TxtButton) =
|
static void (*Function[Btn_NUM_BUTTON_TYPES]) (const char *TxtButton) =
|
||||||
{
|
{
|
||||||
[Btn_NO_BUTTON ] = NULL,
|
|
||||||
[Btn_CREATE_BUTTON ] = Btn_PutCreateButtonInline,
|
[Btn_CREATE_BUTTON ] = Btn_PutCreateButtonInline,
|
||||||
[Btn_CONFIRM_BUTTON] = Btn_PutConfirmButtonInline,
|
[Btn_CONFIRM_BUTTON] = Btn_PutConfirmButtonInline,
|
||||||
[Btn_REMOVE_BUTTON ] = Btn_PutRemoveButtonInline,
|
[Btn_REMOVE_BUTTON ] = Btn_PutRemoveButtonInline,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (TxtButton)
|
if (Button != Btn_NO_BUTTON && TxtButton)
|
||||||
if (TxtButton[0])
|
Function[Button] (TxtButton);
|
||||||
if (Function[Button])
|
|
||||||
Function[Button] (TxtButton);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Btn_PutCreateButton (const char *TxtButton)
|
void Btn_PutCreateButton (const char *TxtButton)
|
||||||
|
|
180
swad_center.c
180
swad_center.c
|
@ -1237,9 +1237,7 @@ static void Ctr_ShowAlertAndButtonToGoToCtr (void)
|
||||||
|
|
||||||
static void Ctr_PutFormToCreateCenter (const struct Plc_Places *Places)
|
static void Ctr_PutFormToCreateCenter (const struct Plc_Places *Places)
|
||||||
{
|
{
|
||||||
extern const char *Txt_Actions[ActLst_NUM_ACTIONS];
|
|
||||||
extern const char *Txt_Another_place;
|
extern const char *Txt_Another_place;
|
||||||
extern const char *Txt_Create;
|
|
||||||
Act_Action_t NextAction = ActUnk;
|
Act_Action_t NextAction = ActUnk;
|
||||||
unsigned NumPlc;
|
unsigned NumPlc;
|
||||||
const struct Plc_Place *PlcInLst;
|
const struct Plc_Place *PlcInLst;
|
||||||
|
@ -1252,118 +1250,104 @@ static void Ctr_PutFormToCreateCenter (const struct Plc_Places *Places)
|
||||||
else
|
else
|
||||||
Err_NoPermissionExit ();
|
Err_NoPermissionExit ();
|
||||||
|
|
||||||
/***** Begin fieldset *****/
|
/***** Begin form to create *****/
|
||||||
HTM_FIELDSET_Begin (NULL);
|
Frm_BeginFormTable (NextAction,NULL,NULL,NULL);
|
||||||
HTM_LEGEND (Txt_Actions[NextAction]);
|
|
||||||
|
|
||||||
/***** Begin form *****/
|
/***** Write heading *****/
|
||||||
Frm_BeginForm (NextAction);
|
Ctr_PutHeadCentersForEdition ();
|
||||||
|
|
||||||
/***** Begin table *****/
|
HTM_TR_Begin (NULL);
|
||||||
HTM_TABLE_BeginWidePadding (2);
|
|
||||||
|
|
||||||
/***** Write heading *****/
|
/***** Column to remove center, disabled here *****/
|
||||||
Ctr_PutHeadCentersForEdition ();
|
HTM_TD_Begin ("class=\"BM\"");
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
HTM_TR_Begin (NULL);
|
/***** Center code *****/
|
||||||
|
HTM_TD_Begin ("class=\"CODE\"");
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Column to remove center, disabled here *****/
|
/***** Center logo *****/
|
||||||
HTM_TD_Begin ("class=\"BM\"");
|
HTM_TD_Begin ("title=\"%s\" class=\"HIE_LOGO\"",Ctr_EditingCtr->FullName);
|
||||||
HTM_TD_End ();
|
Lgo_DrawLogo (HieLvl_CTR,-1L,"",20,NULL,true);
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Center code *****/
|
/***** Place *****/
|
||||||
HTM_TD_Begin ("class=\"CODE\"");
|
HTM_TD_Begin ("class=\"LM\"");
|
||||||
HTM_TD_End ();
|
HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE,NULL,
|
||||||
|
"name=\"PlcCod\" class=\"PLC_SEL INPUT_%s\"",
|
||||||
|
The_GetSuffix ());
|
||||||
|
HTM_OPTION (HTM_Type_STRING,"0",
|
||||||
|
Ctr_EditingCtr->PlcCod == 0, // Selected?
|
||||||
|
HTM_OPTION_ENABLED,
|
||||||
|
"%s",Txt_Another_place);
|
||||||
|
for (NumPlc = 0;
|
||||||
|
NumPlc < Places->Num;
|
||||||
|
NumPlc++)
|
||||||
|
{
|
||||||
|
PlcInLst = &Places->Lst[NumPlc];
|
||||||
|
HTM_OPTION (HTM_Type_LONG,&PlcInLst->PlcCod,
|
||||||
|
PlcInLst->PlcCod == Ctr_EditingCtr->PlcCod, // Selected?
|
||||||
|
HTM_OPTION_ENABLED,
|
||||||
|
"%s",PlcInLst->ShrtName);
|
||||||
|
}
|
||||||
|
HTM_SELECT_End ();
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Center logo *****/
|
/***** Center short name *****/
|
||||||
HTM_TD_Begin ("title=\"%s\" class=\"HIE_LOGO\"",Ctr_EditingCtr->FullName);
|
HTM_TD_Begin ("class=\"LM\"");
|
||||||
Lgo_DrawLogo (HieLvl_CTR,-1L,"",20,NULL,true);
|
HTM_INPUT_TEXT ("ShortName",Cns_HIERARCHY_MAX_CHARS_SHRT_NAME,Ctr_EditingCtr->ShrtName,
|
||||||
HTM_TD_End ();
|
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||||
|
"class=\"INPUT_SHORT_NAME INPUT_%s\""
|
||||||
|
" required=\"required\"",
|
||||||
|
The_GetSuffix ());
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Place *****/
|
/***** Center full name *****/
|
||||||
HTM_TD_Begin ("class=\"LM\"");
|
HTM_TD_Begin ("class=\"LM\"");
|
||||||
HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE,NULL,
|
HTM_INPUT_TEXT ("FullName",Cns_HIERARCHY_MAX_CHARS_FULL_NAME,Ctr_EditingCtr->FullName,
|
||||||
"name=\"PlcCod\" class=\"PLC_SEL INPUT_%s\"",
|
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||||
The_GetSuffix ());
|
"class=\"INPUT_FULL_NAME INPUT_%s\""
|
||||||
HTM_OPTION (HTM_Type_STRING,"0",
|
" required=\"required\"",
|
||||||
Ctr_EditingCtr->PlcCod == 0, // Selected?
|
The_GetSuffix ());
|
||||||
HTM_OPTION_ENABLED,
|
HTM_TD_End ();
|
||||||
"%s",Txt_Another_place);
|
|
||||||
for (NumPlc = 0;
|
|
||||||
NumPlc < Places->Num;
|
|
||||||
NumPlc++)
|
|
||||||
{
|
|
||||||
PlcInLst = &Places->Lst[NumPlc];
|
|
||||||
HTM_OPTION (HTM_Type_LONG,&PlcInLst->PlcCod,
|
|
||||||
PlcInLst->PlcCod == Ctr_EditingCtr->PlcCod, // Selected?
|
|
||||||
HTM_OPTION_ENABLED,
|
|
||||||
"%s",PlcInLst->ShrtName);
|
|
||||||
}
|
|
||||||
HTM_SELECT_End ();
|
|
||||||
HTM_TD_End ();
|
|
||||||
|
|
||||||
/***** Center short name *****/
|
/***** Center WWW *****/
|
||||||
HTM_TD_Begin ("class=\"LM\"");
|
HTM_TD_Begin ("class=\"LM\"");
|
||||||
HTM_INPUT_TEXT ("ShortName",Cns_HIERARCHY_MAX_CHARS_SHRT_NAME,Ctr_EditingCtr->ShrtName,
|
HTM_INPUT_URL ("WWW",Ctr_EditingCtr->WWW,HTM_DONT_SUBMIT_ON_CHANGE,
|
||||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
"class=\"INPUT_WWW_NARROW INPUT_%s\""
|
||||||
"class=\"INPUT_SHORT_NAME INPUT_%s\""
|
" required=\"required\"",
|
||||||
" required=\"required\"",
|
The_GetSuffix ());
|
||||||
The_GetSuffix ());
|
HTM_TD_End ();
|
||||||
HTM_TD_End ();
|
|
||||||
|
|
||||||
/***** Center full name *****/
|
/***** Number of users who claim to belong to this center *****/
|
||||||
HTM_TD_Begin ("class=\"LM\"");
|
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||||
HTM_INPUT_TEXT ("FullName",Cns_HIERARCHY_MAX_CHARS_FULL_NAME,Ctr_EditingCtr->FullName,
|
HTM_Unsigned (0);
|
||||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
HTM_TD_End ();
|
||||||
"class=\"INPUT_FULL_NAME INPUT_%s\""
|
|
||||||
" required=\"required\"",
|
|
||||||
The_GetSuffix ());
|
|
||||||
HTM_TD_End ();
|
|
||||||
|
|
||||||
/***** Center WWW *****/
|
/***** Number of degrees *****/
|
||||||
HTM_TD_Begin ("class=\"LM\"");
|
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||||
HTM_INPUT_URL ("WWW",Ctr_EditingCtr->WWW,HTM_DONT_SUBMIT_ON_CHANGE,
|
HTM_Unsigned (0);
|
||||||
"class=\"INPUT_WWW_NARROW INPUT_%s\""
|
HTM_TD_End ();
|
||||||
" required=\"required\"",
|
|
||||||
The_GetSuffix ());
|
|
||||||
HTM_TD_End ();
|
|
||||||
|
|
||||||
/***** Number of users who claim to belong to this center *****/
|
/***** Number of users in courses of this center *****/
|
||||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||||
HTM_Unsigned (0);
|
HTM_Unsigned (0);
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Number of degrees *****/
|
/***** Center requester *****/
|
||||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
HTM_TD_Begin ("class=\"DAT_%s INPUT_REQUESTER LT\"",
|
||||||
HTM_Unsigned (0);
|
The_GetSuffix ());
|
||||||
HTM_TD_End ();
|
Msg_WriteMsgAuthor (&Gbl.Usrs.Me.UsrDat,true);
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Number of users in courses of this center *****/
|
/***** Center status *****/
|
||||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
HTM_TD_Begin ("class=\"LM DAT_%s\"",The_GetSuffix ());
|
||||||
HTM_Unsigned (0);
|
HTM_TD_End ();
|
||||||
HTM_TD_End ();
|
|
||||||
|
|
||||||
/***** Center requester *****/
|
HTM_TR_End ();
|
||||||
HTM_TD_Begin ("class=\"DAT_%s INPUT_REQUESTER LT\"",
|
|
||||||
The_GetSuffix ());
|
|
||||||
Msg_WriteMsgAuthor (&Gbl.Usrs.Me.UsrDat,true);
|
|
||||||
HTM_TD_End ();
|
|
||||||
|
|
||||||
/***** Center status *****/
|
/***** End form to create *****/
|
||||||
HTM_TD_Begin ("class=\"LM DAT_%s\"",The_GetSuffix ());
|
Frm_EndFormTable (Btn_CREATE_BUTTON);
|
||||||
HTM_TD_End ();
|
|
||||||
|
|
||||||
HTM_TR_End ();
|
|
||||||
|
|
||||||
/***** End table and send button *****/
|
|
||||||
HTM_TABLE_End ();
|
|
||||||
Btn_PutButton (Btn_CREATE_BUTTON,Txt_Create);
|
|
||||||
|
|
||||||
/***** End form *****/
|
|
||||||
Frm_EndForm ();
|
|
||||||
|
|
||||||
/***** End fieldset *****/
|
|
||||||
HTM_FIELDSET_End ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
|
@ -629,11 +629,12 @@ TODO: Emilce Barrera Mesa: Podr
|
||||||
TODO: Emilce Barrera Mesa: Mis estudiantes presentan muchas dificultades a la hora de poner la foto porque la plataforma es muy exigente respecto al fondo de la imagen.
|
TODO: Emilce Barrera Mesa: Mis estudiantes presentan muchas dificultades a la hora de poner la foto porque la plataforma es muy exigente respecto al fondo de la imagen.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
#define Log_PLATFORM_VERSION "SWAD 22.107.40 (2023-05-10)"
|
#define Log_PLATFORM_VERSION "SWAD 22.108 (2023-05-11)"
|
||||||
#define CSS_FILE "swad22.107.36.css"
|
#define CSS_FILE "swad22.107.36.css"
|
||||||
#define JS_FILE "swad22.49.js"
|
#define JS_FILE "swad22.49.js"
|
||||||
/*
|
/*
|
||||||
Version 22.107.40:May 10, 2023 Changes in creation of test questions and survey questions. (? lines)
|
Version 22.108: May 11, 2023 Code refactoring in forms. (337145 lines)
|
||||||
|
Version 22.107.40:May 10, 2023 Changes in creation of test questions and survey questions. (337447 lines)
|
||||||
Version 22.107.39:May 10, 2023 Changes in creation of user account. (337435 lines)
|
Version 22.107.39:May 10, 2023 Changes in creation of user account. (337435 lines)
|
||||||
Version 22.107.38:May 10, 2023 Changes in edition of mail domains. (337455 lines)
|
Version 22.107.38:May 10, 2023 Changes in edition of mail domains. (337455 lines)
|
||||||
Version 22.107.37:May 10, 2023 Changes in edition of attendance events and agenda events. (337484 lines)
|
Version 22.107.37:May 10, 2023 Changes in edition of attendance events and agenda events. (337484 lines)
|
||||||
|
|
154
swad_country.c
154
swad_country.c
|
@ -1401,111 +1401,95 @@ static void Cty_PutFormToCreateCountry (void)
|
||||||
{
|
{
|
||||||
extern const char *Lan_STR_LANG_ID[1 + Lan_NUM_LANGUAGES];
|
extern const char *Lan_STR_LANG_ID[1 + Lan_NUM_LANGUAGES];
|
||||||
extern const char *Par_CodeStr[];
|
extern const char *Par_CodeStr[];
|
||||||
extern const char *Txt_Actions[ActLst_NUM_ACTIONS];
|
|
||||||
extern const char *Txt_STR_LANG_NAME[1 + Lan_NUM_LANGUAGES];
|
extern const char *Txt_STR_LANG_NAME[1 + Lan_NUM_LANGUAGES];
|
||||||
extern const char *Txt_Create;
|
|
||||||
Lan_Language_t Lan;
|
Lan_Language_t Lan;
|
||||||
char StrCtyCod[Cns_MAX_DECIMAL_DIGITS_LONG + 1];
|
char StrCtyCod[Cns_MAX_DECIMAL_DIGITS_LONG + 1];
|
||||||
char StrName[32];
|
char StrName[32];
|
||||||
|
|
||||||
/***** Begin fieldset *****/
|
/***** Begin form to create *****/
|
||||||
HTM_FIELDSET_Begin (NULL);
|
Frm_BeginFormTable (ActNewCty,NULL,NULL,NULL);
|
||||||
HTM_LEGEND (Txt_Actions[ActNewCty]);
|
|
||||||
|
|
||||||
/***** Begin form *****/
|
/***** Write heading *****/
|
||||||
Frm_BeginForm (ActNewCty);
|
Cty_PutHeadCountriesForEdition ();
|
||||||
|
|
||||||
/***** Begin table *****/
|
HTM_TR_Begin (NULL);
|
||||||
HTM_TABLE_BeginWidePadding (2);
|
|
||||||
|
|
||||||
/***** Write heading *****/
|
/***** Column to remove country, disabled here *****/
|
||||||
Cty_PutHeadCountriesForEdition ();
|
HTM_TD_Begin ("rowspan=\"%u\" class=\"BT\"",1 + Lan_NUM_LANGUAGES);
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
HTM_TR_Begin (NULL);
|
/***** Numerical country code (ISO 3166-1) *****/
|
||||||
|
HTM_TD_Begin ("rowspan=\"%u\" class=\"RT\"",1 + Lan_NUM_LANGUAGES);
|
||||||
|
if (Cty_EditingCty->CtyCod > 0)
|
||||||
|
snprintf (StrCtyCod,sizeof (StrCtyCod),"%03ld",Cty_EditingCty->CtyCod);
|
||||||
|
else
|
||||||
|
StrCtyCod[0] = '\0';
|
||||||
|
HTM_INPUT_TEXT (Par_CodeStr[ParCod_OthCty],3,StrCtyCod,HTM_DONT_SUBMIT_ON_CHANGE,
|
||||||
|
"size=\"3\" class=\"INPUT_%s\""
|
||||||
|
" required=\"required\"",
|
||||||
|
The_GetSuffix ());
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Column to remove country, disabled here *****/
|
/***** Alphabetic country code with 2 letters (ISO 3166-1) *****/
|
||||||
HTM_TD_Begin ("rowspan=\"%u\" class=\"BT\"",1 + Lan_NUM_LANGUAGES);
|
HTM_TD_Begin ("rowspan=\"%u\" class=\"RT\"",1 + Lan_NUM_LANGUAGES);
|
||||||
HTM_TD_End ();
|
HTM_INPUT_TEXT ("Alpha2",2,Cty_EditingCty->Alpha2,HTM_DONT_SUBMIT_ON_CHANGE,
|
||||||
|
"size=\"2\" class=\"INPUT_%s\""
|
||||||
|
" required=\"required\"",
|
||||||
|
The_GetSuffix ());
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Numerical country code (ISO 3166-1) *****/
|
HTM_TD_Empty (3);
|
||||||
HTM_TD_Begin ("rowspan=\"%u\" class=\"RT\"",1 + Lan_NUM_LANGUAGES);
|
|
||||||
if (Cty_EditingCty->CtyCod > 0)
|
|
||||||
snprintf (StrCtyCod,sizeof (StrCtyCod),"%03ld",Cty_EditingCty->CtyCod);
|
|
||||||
else
|
|
||||||
StrCtyCod[0] = '\0';
|
|
||||||
HTM_INPUT_TEXT (Par_CodeStr[ParCod_OthCty],3,StrCtyCod,HTM_DONT_SUBMIT_ON_CHANGE,
|
|
||||||
"size=\"3\" class=\"INPUT_%s\""
|
|
||||||
" required=\"required\"",
|
|
||||||
The_GetSuffix ());
|
|
||||||
HTM_TD_End ();
|
|
||||||
|
|
||||||
/***** Alphabetic country code with 2 letters (ISO 3166-1) *****/
|
/***** Number of users *****/
|
||||||
HTM_TD_Begin ("rowspan=\"%u\" class=\"RT\"",1 + Lan_NUM_LANGUAGES);
|
HTM_TD_Begin ("rowspan=\"%u\" class=\"RT DAT_%s\"",
|
||||||
HTM_INPUT_TEXT ("Alpha2",2,Cty_EditingCty->Alpha2,HTM_DONT_SUBMIT_ON_CHANGE,
|
1 + Lan_NUM_LANGUAGES,The_GetSuffix ());
|
||||||
"size=\"2\" class=\"INPUT_%s\""
|
HTM_Unsigned (0);
|
||||||
" required=\"required\"",
|
HTM_TD_End ();
|
||||||
The_GetSuffix ());
|
|
||||||
HTM_TD_End ();
|
|
||||||
|
|
||||||
HTM_TD_Empty (3);
|
/***** Number of institutions *****/
|
||||||
|
HTM_TD_Begin ("rowspan=\"%u\" class=\"RT DAT_%s\"",
|
||||||
|
1 + Lan_NUM_LANGUAGES,The_GetSuffix ());
|
||||||
|
HTM_Unsigned (0);
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Number of users *****/
|
HTM_TR_End ();
|
||||||
HTM_TD_Begin ("rowspan=\"%u\" class=\"RT DAT_%s\"",
|
|
||||||
1 + Lan_NUM_LANGUAGES,The_GetSuffix ());
|
|
||||||
HTM_Unsigned (0);
|
|
||||||
HTM_TD_End ();
|
|
||||||
|
|
||||||
/***** Number of institutions *****/
|
/***** Country name in several languages *****/
|
||||||
HTM_TD_Begin ("rowspan=\"%u\" class=\"RT DAT_%s\"",
|
for (Lan = (Lan_Language_t) 1;
|
||||||
1 + Lan_NUM_LANGUAGES,The_GetSuffix ());
|
Lan <= (Lan_Language_t) Lan_NUM_LANGUAGES;
|
||||||
HTM_Unsigned (0);
|
Lan++)
|
||||||
HTM_TD_End ();
|
{
|
||||||
|
HTM_TR_Begin (NULL);
|
||||||
|
|
||||||
HTM_TR_End ();
|
/* Language */
|
||||||
|
HTM_TD_Begin ("class=\"RT DAT_%s\"",The_GetSuffix ());
|
||||||
|
HTM_Txt (Txt_STR_LANG_NAME[Lan]);
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Country name in several languages *****/
|
/* Name */
|
||||||
for (Lan = (Lan_Language_t) 1;
|
HTM_TD_Begin ("class=\"LM\"");
|
||||||
Lan <= (Lan_Language_t) Lan_NUM_LANGUAGES;
|
snprintf (StrName,sizeof (StrName),"Name_%s",Lan_STR_LANG_ID[Lan]);
|
||||||
Lan++)
|
HTM_INPUT_TEXT (StrName,Cty_MAX_CHARS_NAME,Cty_EditingCty->Name[Lan],
|
||||||
{
|
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||||
HTM_TR_Begin (NULL);
|
"size=\"15\" class=\"INPUT_%s\""
|
||||||
|
" required=\"required\"",
|
||||||
|
The_GetSuffix ());
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
/* Language */
|
/* WWW */
|
||||||
HTM_TD_Begin ("class=\"RT DAT_%s\"",The_GetSuffix ());
|
HTM_TD_Begin ("class=\"LM\"");
|
||||||
HTM_Txt (Txt_STR_LANG_NAME[Lan]);
|
snprintf (StrName,sizeof (StrName),"WWW_%s",Lan_STR_LANG_ID[Lan]);
|
||||||
HTM_TD_End ();
|
HTM_INPUT_URL (StrName,Cty_EditingCty->WWW[Lan],HTM_DONT_SUBMIT_ON_CHANGE,
|
||||||
|
"class=\"INPUT_WWW_NARROW INPUT_%s\""
|
||||||
|
" required=\"required\"",
|
||||||
|
The_GetSuffix ());
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
/* Name */
|
HTM_TR_End ();
|
||||||
HTM_TD_Begin ("class=\"LM\"");
|
}
|
||||||
snprintf (StrName,sizeof (StrName),"Name_%s",Lan_STR_LANG_ID[Lan]);
|
|
||||||
HTM_INPUT_TEXT (StrName,Cty_MAX_CHARS_NAME,Cty_EditingCty->Name[Lan],
|
|
||||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
|
||||||
"size=\"15\" class=\"INPUT_%s\""
|
|
||||||
" required=\"required\"",
|
|
||||||
The_GetSuffix ());
|
|
||||||
HTM_TD_End ();
|
|
||||||
|
|
||||||
/* WWW */
|
/***** End form to create *****/
|
||||||
HTM_TD_Begin ("class=\"LM\"");
|
Frm_EndFormTable (Btn_CREATE_BUTTON);
|
||||||
snprintf (StrName,sizeof (StrName),"WWW_%s",Lan_STR_LANG_ID[Lan]);
|
|
||||||
HTM_INPUT_URL (StrName,Cty_EditingCty->WWW[Lan],HTM_DONT_SUBMIT_ON_CHANGE,
|
|
||||||
"class=\"INPUT_WWW_NARROW INPUT_%s\""
|
|
||||||
" required=\"required\"",
|
|
||||||
The_GetSuffix ());
|
|
||||||
HTM_TD_End ();
|
|
||||||
|
|
||||||
HTM_TR_End ();
|
|
||||||
}
|
|
||||||
|
|
||||||
/***** End table and send button *****/
|
|
||||||
HTM_TABLE_End ();
|
|
||||||
Btn_PutButton (Btn_CREATE_BUTTON,Txt_Create);
|
|
||||||
|
|
||||||
/***** End form *****/
|
|
||||||
Frm_EndForm ();
|
|
||||||
|
|
||||||
/***** End fieldset *****/
|
|
||||||
HTM_FIELDSET_End ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
154
swad_course.c
154
swad_course.c
|
@ -1280,9 +1280,7 @@ static bool Crs_CheckIfICanEdit (struct Crs_Course *Crs)
|
||||||
|
|
||||||
static void Crs_PutFormToCreateCourse (void)
|
static void Crs_PutFormToCreateCourse (void)
|
||||||
{
|
{
|
||||||
extern const char *Txt_Actions[ActLst_NUM_ACTIONS];
|
|
||||||
extern const char *Txt_YEAR_OF_DEGREE[1 + Deg_MAX_YEARS_PER_DEGREE];
|
extern const char *Txt_YEAR_OF_DEGREE[1 + Deg_MAX_YEARS_PER_DEGREE];
|
||||||
extern const char *Txt_Create;
|
|
||||||
Act_Action_t NextAction = ActUnk;
|
Act_Action_t NextAction = ActUnk;
|
||||||
unsigned Year;
|
unsigned Year;
|
||||||
|
|
||||||
|
@ -1296,103 +1294,89 @@ static void Crs_PutFormToCreateCourse (void)
|
||||||
else
|
else
|
||||||
Err_NoPermissionExit ();
|
Err_NoPermissionExit ();
|
||||||
|
|
||||||
/***** Begin fieldset *****/
|
/***** Begin form to create *****/
|
||||||
HTM_FIELDSET_Begin (NULL);
|
Frm_BeginFormTable (NextAction,NULL,NULL,NULL);
|
||||||
HTM_LEGEND (Txt_Actions[NextAction]);
|
|
||||||
|
|
||||||
/***** Begin form *****/
|
/***** Write heading *****/
|
||||||
Frm_BeginForm (NextAction);
|
Crs_PutHeadCoursesForEdition ();
|
||||||
|
|
||||||
/***** Begin table *****/
|
HTM_TR_Begin (NULL);
|
||||||
HTM_TABLE_BeginWidePadding (2);
|
|
||||||
|
|
||||||
/***** Write heading *****/
|
/***** Column to remove course, disabled here *****/
|
||||||
Crs_PutHeadCoursesForEdition ();
|
HTM_TD_Begin ("class=\"BM\"");
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
HTM_TR_Begin (NULL);
|
/***** Course code *****/
|
||||||
|
HTM_TD_Begin ("class=\"CODE\"");
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Column to remove course, disabled here *****/
|
/***** Institutional code of the course *****/
|
||||||
HTM_TD_Begin ("class=\"BM\"");
|
HTM_TD_Begin ("class=\"CM\"");
|
||||||
HTM_TD_End ();
|
HTM_INPUT_TEXT ("InsCrsCod",Crs_MAX_CHARS_INSTITUTIONAL_CRS_COD,
|
||||||
|
Crs_EditingCrs->InstitutionalCrsCod,
|
||||||
|
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||||
|
"class=\"INPUT_INS_CODE INPUT_%s\"",
|
||||||
|
The_GetSuffix ());
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Course code *****/
|
/***** Year *****/
|
||||||
HTM_TD_Begin ("class=\"CODE\"");
|
HTM_TD_Begin ("class=\"CM\"");
|
||||||
HTM_TD_End ();
|
HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE,NULL,
|
||||||
|
"name=\"OthCrsYear\""
|
||||||
|
" class=\"HIE_SEL_NARROW INPUT_%s\"",
|
||||||
|
The_GetSuffix ());
|
||||||
|
for (Year = 0;
|
||||||
|
Year <= Deg_MAX_YEARS_PER_DEGREE;
|
||||||
|
Year++)
|
||||||
|
HTM_OPTION (HTM_Type_UNSIGNED,&Year,
|
||||||
|
Year == Crs_EditingCrs->Year, // Selected?
|
||||||
|
HTM_OPTION_ENABLED,
|
||||||
|
"%s",Txt_YEAR_OF_DEGREE[Year]);
|
||||||
|
HTM_SELECT_End ();
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Institutional code of the course *****/
|
/***** Course short name *****/
|
||||||
HTM_TD_Begin ("class=\"CM\"");
|
HTM_TD_Begin ("class=\"LM\"");
|
||||||
HTM_INPUT_TEXT ("InsCrsCod",Crs_MAX_CHARS_INSTITUTIONAL_CRS_COD,
|
HTM_INPUT_TEXT ("ShortName",Cns_HIERARCHY_MAX_CHARS_SHRT_NAME,Crs_EditingCrs->ShrtName,
|
||||||
Crs_EditingCrs->InstitutionalCrsCod,
|
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
"class=\"INPUT_SHORT_NAME INPUT_%s\""
|
||||||
"class=\"INPUT_INS_CODE INPUT_%s\"",
|
" required=\"required\"",
|
||||||
The_GetSuffix ());
|
The_GetSuffix ());
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Year *****/
|
/***** Course full name *****/
|
||||||
HTM_TD_Begin ("class=\"CM\"");
|
HTM_TD_Begin ("class=\"LM\"");
|
||||||
HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE,NULL,
|
HTM_INPUT_TEXT ("FullName",Cns_HIERARCHY_MAX_CHARS_FULL_NAME,Crs_EditingCrs->FullName,
|
||||||
"name=\"OthCrsYear\""
|
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||||
" class=\"HIE_SEL_NARROW INPUT_%s\"",
|
"class=\"INPUT_FULL_NAME INPUT_%s\""
|
||||||
The_GetSuffix ());
|
" required=\"required\"",
|
||||||
for (Year = 0;
|
The_GetSuffix ());
|
||||||
Year <= Deg_MAX_YEARS_PER_DEGREE;
|
HTM_TD_End ();
|
||||||
Year++)
|
|
||||||
HTM_OPTION (HTM_Type_UNSIGNED,&Year,
|
|
||||||
Year == Crs_EditingCrs->Year, // Selected?
|
|
||||||
HTM_OPTION_ENABLED,
|
|
||||||
"%s",Txt_YEAR_OF_DEGREE[Year]);
|
|
||||||
HTM_SELECT_End ();
|
|
||||||
HTM_TD_End ();
|
|
||||||
|
|
||||||
/***** Course short name *****/
|
/***** Current number of teachers in this course *****/
|
||||||
HTM_TD_Begin ("class=\"LM\"");
|
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||||
HTM_INPUT_TEXT ("ShortName",Cns_HIERARCHY_MAX_CHARS_SHRT_NAME,Crs_EditingCrs->ShrtName,
|
HTM_Unsigned (0);
|
||||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
HTM_TD_End ();
|
||||||
"class=\"INPUT_SHORT_NAME INPUT_%s\""
|
|
||||||
" required=\"required\"",
|
|
||||||
The_GetSuffix ());
|
|
||||||
HTM_TD_End ();
|
|
||||||
|
|
||||||
/***** Course full name *****/
|
/***** Current number of students in this course *****/
|
||||||
HTM_TD_Begin ("class=\"LM\"");
|
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||||
HTM_INPUT_TEXT ("FullName",Cns_HIERARCHY_MAX_CHARS_FULL_NAME,Crs_EditingCrs->FullName,
|
HTM_Unsigned (0);
|
||||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
HTM_TD_End ();
|
||||||
"class=\"INPUT_FULL_NAME INPUT_%s\""
|
|
||||||
" required=\"required\"",
|
|
||||||
The_GetSuffix ());
|
|
||||||
HTM_TD_End ();
|
|
||||||
|
|
||||||
/***** Current number of teachers in this course *****/
|
/***** Course requester *****/
|
||||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
HTM_TD_Begin ("class=\"LT DAT_%s INPUT_REQUESTER\"",
|
||||||
HTM_Unsigned (0);
|
The_GetSuffix ());
|
||||||
HTM_TD_End ();
|
Msg_WriteMsgAuthor (&Gbl.Usrs.Me.UsrDat,true);
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Current number of students in this course *****/
|
/***** Course status *****/
|
||||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
HTM_TD_Begin ("class=\"LM DAT_%s\"",The_GetSuffix ());
|
||||||
HTM_Unsigned (0);
|
HTM_TD_End ();
|
||||||
HTM_TD_End ();
|
|
||||||
|
|
||||||
/***** Course requester *****/
|
HTM_TR_End ();
|
||||||
HTM_TD_Begin ("class=\"LT DAT_%s INPUT_REQUESTER\"",
|
|
||||||
The_GetSuffix ());
|
|
||||||
Msg_WriteMsgAuthor (&Gbl.Usrs.Me.UsrDat,true);
|
|
||||||
HTM_TD_End ();
|
|
||||||
|
|
||||||
/***** Course status *****/
|
/***** End form to create *****/
|
||||||
HTM_TD_Begin ("class=\"LM DAT_%s\"",The_GetSuffix ());
|
Frm_EndFormTable (Btn_CREATE_BUTTON);
|
||||||
HTM_TD_End ();
|
|
||||||
|
|
||||||
HTM_TR_End ();
|
|
||||||
|
|
||||||
/***** End table and send button *****/
|
|
||||||
HTM_TABLE_End ();
|
|
||||||
Btn_PutButton (Btn_CREATE_BUTTON,Txt_Create);
|
|
||||||
|
|
||||||
/***** End form *****/
|
|
||||||
Frm_EndForm ();
|
|
||||||
|
|
||||||
/***** End fieldset *****/
|
|
||||||
HTM_FIELDSET_End ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
166
swad_degree.c
166
swad_degree.c
|
@ -513,8 +513,6 @@ static bool Deg_CheckIfICanEditADegree (struct Deg_Degree *Deg)
|
||||||
|
|
||||||
static void Deg_PutFormToCreateDegree (const struct DegTyp_DegTypes *DegTypes)
|
static void Deg_PutFormToCreateDegree (const struct DegTyp_DegTypes *DegTypes)
|
||||||
{
|
{
|
||||||
extern const char *Txt_Actions[ActLst_NUM_ACTIONS];
|
|
||||||
extern const char *Txt_Create;
|
|
||||||
Act_Action_t NextAction = ActUnk;
|
Act_Action_t NextAction = ActUnk;
|
||||||
unsigned NumDegTyp;
|
unsigned NumDegTyp;
|
||||||
struct DegTyp_DegreeType *DegTypInLst;
|
struct DegTyp_DegreeType *DegTypInLst;
|
||||||
|
@ -527,110 +525,96 @@ static void Deg_PutFormToCreateDegree (const struct DegTyp_DegTypes *DegTypes)
|
||||||
else
|
else
|
||||||
Err_NoPermissionExit ();
|
Err_NoPermissionExit ();
|
||||||
|
|
||||||
/***** Begin fieldset *****/
|
/***** Begin form to create *****/
|
||||||
HTM_FIELDSET_Begin (NULL);
|
Frm_BeginFormTable (NextAction,NULL,NULL,NULL);
|
||||||
HTM_LEGEND (Txt_Actions[NextAction]);
|
|
||||||
|
|
||||||
/***** Begin form *****/
|
/***** Write heading *****/
|
||||||
Frm_BeginForm (NextAction);
|
Deg_PutHeadDegreesForEdition ();
|
||||||
|
|
||||||
/***** Begin table *****/
|
HTM_TR_Begin (NULL);
|
||||||
HTM_TABLE_BeginWidePadding (2);
|
|
||||||
|
|
||||||
/***** Write heading *****/
|
/***** Column to remove degree, disabled here *****/
|
||||||
Deg_PutHeadDegreesForEdition ();
|
HTM_TD_Begin ("class=\"BM\"");
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
HTM_TR_Begin (NULL);
|
/***** Degree code *****/
|
||||||
|
HTM_TD_Begin ("class=\"CODE\"");
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Column to remove degree, disabled here *****/
|
/***** Degree logo *****/
|
||||||
HTM_TD_Begin ("class=\"BM\"");
|
HTM_TD_Begin ("title=\"%s\" class=\"HIE_LOGO\"",Deg_EditingDeg->FullName);
|
||||||
HTM_TD_End ();
|
Lgo_DrawLogo (HieLvl_DEG,-1L,"",20,NULL,true);
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Degree code *****/
|
/***** Degree short name *****/
|
||||||
HTM_TD_Begin ("class=\"CODE\"");
|
HTM_TD_Begin ("class=\"LM\"");
|
||||||
HTM_TD_End ();
|
HTM_INPUT_TEXT ("ShortName",Cns_HIERARCHY_MAX_CHARS_SHRT_NAME,Deg_EditingDeg->ShrtName,
|
||||||
|
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||||
|
"class=\"INPUT_SHORT_NAME INPUT_%s\""
|
||||||
|
" required=\"required\"",
|
||||||
|
The_GetSuffix ());
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Degree logo *****/
|
/***** Degree full name *****/
|
||||||
HTM_TD_Begin ("title=\"%s\" class=\"HIE_LOGO\"",Deg_EditingDeg->FullName);
|
HTM_TD_Begin ("class=\"LM\"");
|
||||||
Lgo_DrawLogo (HieLvl_DEG,-1L,"",20,NULL,true);
|
HTM_INPUT_TEXT ("FullName",Cns_HIERARCHY_MAX_CHARS_FULL_NAME,Deg_EditingDeg->FullName,
|
||||||
HTM_TD_End ();
|
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||||
|
"class=\"INPUT_FULL_NAME INPUT_%s\""
|
||||||
|
" required=\"required\"",
|
||||||
|
The_GetSuffix ());
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Degree short name *****/
|
/***** Degree type *****/
|
||||||
HTM_TD_Begin ("class=\"LM\"");
|
HTM_TD_Begin ("class=\"LM\"");
|
||||||
HTM_INPUT_TEXT ("ShortName",Cns_HIERARCHY_MAX_CHARS_SHRT_NAME,Deg_EditingDeg->ShrtName,
|
HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE,NULL,
|
||||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
"name=\"OthDegTypCod\""
|
||||||
"class=\"INPUT_SHORT_NAME INPUT_%s\""
|
" class=\"HIE_SEL_NARROW INPUT_%s\"",
|
||||||
" required=\"required\"",
|
The_GetSuffix ());
|
||||||
The_GetSuffix ());
|
for (NumDegTyp = 0;
|
||||||
HTM_TD_End ();
|
NumDegTyp < DegTypes->Num;
|
||||||
|
NumDegTyp++)
|
||||||
|
{
|
||||||
|
DegTypInLst = &DegTypes->Lst[NumDegTyp];
|
||||||
|
HTM_OPTION (HTM_Type_LONG,&DegTypInLst->DegTypCod,
|
||||||
|
DegTypInLst->DegTypCod == Deg_EditingDeg->DegTypCod, // Selected?
|
||||||
|
HTM_OPTION_ENABLED,
|
||||||
|
"%s",DegTypInLst->DegTypName);
|
||||||
|
}
|
||||||
|
HTM_SELECT_End ();
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Degree full name *****/
|
/***** Degree WWW *****/
|
||||||
HTM_TD_Begin ("class=\"LM\"");
|
HTM_TD_Begin ("class=\"LM\"");
|
||||||
HTM_INPUT_TEXT ("FullName",Cns_HIERARCHY_MAX_CHARS_FULL_NAME,Deg_EditingDeg->FullName,
|
HTM_INPUT_URL ("WWW",Deg_EditingDeg->WWW,HTM_DONT_SUBMIT_ON_CHANGE,
|
||||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
"class=\"INPUT_WWW_NARROW INPUT_%s\""
|
||||||
"class=\"INPUT_FULL_NAME INPUT_%s\""
|
" required=\"required\"",
|
||||||
" required=\"required\"",
|
The_GetSuffix ());
|
||||||
The_GetSuffix ());
|
HTM_TD_End ();
|
||||||
HTM_TD_End ();
|
|
||||||
|
|
||||||
/***** Degree type *****/
|
/***** Number of courses in this degree *****/
|
||||||
HTM_TD_Begin ("class=\"LM\"");
|
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||||
HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE,NULL,
|
HTM_Unsigned (0);
|
||||||
"name=\"OthDegTypCod\""
|
HTM_TD_End ();
|
||||||
" class=\"HIE_SEL_NARROW INPUT_%s\"",
|
|
||||||
The_GetSuffix ());
|
|
||||||
for (NumDegTyp = 0;
|
|
||||||
NumDegTyp < DegTypes->Num;
|
|
||||||
NumDegTyp++)
|
|
||||||
{
|
|
||||||
DegTypInLst = &DegTypes->Lst[NumDegTyp];
|
|
||||||
HTM_OPTION (HTM_Type_LONG,&DegTypInLst->DegTypCod,
|
|
||||||
DegTypInLst->DegTypCod == Deg_EditingDeg->DegTypCod, // Selected?
|
|
||||||
HTM_OPTION_ENABLED,
|
|
||||||
"%s",DegTypInLst->DegTypName);
|
|
||||||
}
|
|
||||||
HTM_SELECT_End ();
|
|
||||||
HTM_TD_End ();
|
|
||||||
|
|
||||||
/***** Degree WWW *****/
|
/***** Number of users in courses of this degree *****/
|
||||||
HTM_TD_Begin ("class=\"LM\"");
|
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||||
HTM_INPUT_URL ("WWW",Deg_EditingDeg->WWW,HTM_DONT_SUBMIT_ON_CHANGE,
|
HTM_Unsigned (0);
|
||||||
"class=\"INPUT_WWW_NARROW INPUT_%s\""
|
HTM_TD_End ();
|
||||||
" required=\"required\"",
|
|
||||||
The_GetSuffix ());
|
|
||||||
HTM_TD_End ();
|
|
||||||
|
|
||||||
/***** Number of courses in this degree *****/
|
/***** Degree requester *****/
|
||||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
HTM_TD_Begin ("class=\"LT DAT_%s INPUT_REQUESTER\"",
|
||||||
HTM_Unsigned (0);
|
The_GetSuffix ());
|
||||||
HTM_TD_End ();
|
Msg_WriteMsgAuthor (&Gbl.Usrs.Me.UsrDat,true);
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Number of users in courses of this degree *****/
|
/***** Degree status *****/
|
||||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
HTM_TD_Begin ("class=\"LM DAT_%s\"",The_GetSuffix ());
|
||||||
HTM_Unsigned (0);
|
HTM_TD_End ();
|
||||||
HTM_TD_End ();
|
|
||||||
|
|
||||||
/***** Degree requester *****/
|
HTM_TR_End ();
|
||||||
HTM_TD_Begin ("class=\"LT DAT_%s INPUT_REQUESTER\"",
|
|
||||||
The_GetSuffix ());
|
|
||||||
Msg_WriteMsgAuthor (&Gbl.Usrs.Me.UsrDat,true);
|
|
||||||
HTM_TD_End ();
|
|
||||||
|
|
||||||
/***** Degree status *****/
|
/***** End form to create *****/
|
||||||
HTM_TD_Begin ("class=\"LM DAT_%s\"",The_GetSuffix ());
|
Frm_EndFormTable (Btn_CREATE_BUTTON);
|
||||||
HTM_TD_End ();
|
|
||||||
|
|
||||||
HTM_TR_End ();
|
|
||||||
|
|
||||||
/***** End table and send button *****/
|
|
||||||
HTM_TABLE_End ();
|
|
||||||
Btn_PutButton (Btn_CREATE_BUTTON,Txt_Create);
|
|
||||||
|
|
||||||
/***** End form *****/
|
|
||||||
Frm_EndForm ();
|
|
||||||
|
|
||||||
/***** End fieldset *****/
|
|
||||||
HTM_FIELDSET_End ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
|
@ -457,59 +457,42 @@ bool DegTyp_CheckIfICanCreateDegreeTypes (void)
|
||||||
|
|
||||||
static void DegTyp_PutFormToCreateDegreeType (void)
|
static void DegTyp_PutFormToCreateDegreeType (void)
|
||||||
{
|
{
|
||||||
extern const char *Txt_Actions[ActLst_NUM_ACTIONS];
|
/***** Begin form to create *****/
|
||||||
extern const char *Txt_Create;
|
Frm_BeginFormTable (ActNewDegTyp,NULL,NULL,NULL);
|
||||||
|
|
||||||
/***** Begin fieldset *****/
|
/***** Write heading *****/
|
||||||
HTM_FIELDSET_Begin (NULL);
|
DegTyp_PutHeadDegreeTypesForEdition ();
|
||||||
HTM_LEGEND (Txt_Actions[ActNewDegTyp]);
|
|
||||||
|
|
||||||
/***** Begin form *****/
|
/***** Begin table row *****/
|
||||||
Frm_BeginForm (ActNewDegTyp);
|
HTM_TR_Begin (NULL);
|
||||||
|
|
||||||
/***** Begin table *****/
|
/***** Column to remove degree type, disabled here *****/
|
||||||
HTM_TABLE_BeginWidePadding (2);
|
HTM_TD_Begin ("class=\"BM\"");
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Write heading *****/
|
/***** Degree type code *****/
|
||||||
DegTyp_PutHeadDegreeTypesForEdition ();
|
HTM_TD_Begin ("class=\"CODE\"");
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Begin table row *****/
|
/***** Degree type name *****/
|
||||||
HTM_TR_Begin (NULL);
|
HTM_TD_Begin ("class=\"LM\"");
|
||||||
|
HTM_INPUT_TEXT ("DegTypName",DegTyp_MAX_CHARS_DEGREE_TYPE_NAME,DegTyp_EditingDegTyp->DegTypName,
|
||||||
|
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||||
|
"size=\"25\" class=\"INPUT_%s\""
|
||||||
|
" required=\"required\"",
|
||||||
|
The_GetSuffix ());
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Column to remove degree type, disabled here *****/
|
/***** Number of degrees of this degree type ****/
|
||||||
HTM_TD_Begin ("class=\"BM\"");
|
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||||
HTM_TD_End ();
|
HTM_Unsigned (0);
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Degree type code *****/
|
/***** End table row *****/
|
||||||
HTM_TD_Begin ("class=\"CODE\"");
|
HTM_TR_End ();
|
||||||
HTM_TD_End ();
|
|
||||||
|
|
||||||
/***** Degree type name *****/
|
/***** End form to create *****/
|
||||||
HTM_TD_Begin ("class=\"LM\"");
|
Frm_EndFormTable (Btn_CREATE_BUTTON);
|
||||||
HTM_INPUT_TEXT ("DegTypName",DegTyp_MAX_CHARS_DEGREE_TYPE_NAME,DegTyp_EditingDegTyp->DegTypName,
|
|
||||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
|
||||||
"size=\"25\" class=\"INPUT_%s\""
|
|
||||||
" required=\"required\"",
|
|
||||||
The_GetSuffix ());
|
|
||||||
HTM_TD_End ();
|
|
||||||
|
|
||||||
/***** Number of degrees of this degree type ****/
|
|
||||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
|
||||||
HTM_Unsigned (0);
|
|
||||||
HTM_TD_End ();
|
|
||||||
|
|
||||||
/***** End table row *****/
|
|
||||||
HTM_TR_End ();
|
|
||||||
|
|
||||||
/***** End table and send button *****/
|
|
||||||
HTM_TABLE_End ();
|
|
||||||
Btn_PutButton (Btn_CREATE_BUTTON,Txt_Create);
|
|
||||||
|
|
||||||
/***** End form *****/
|
|
||||||
Frm_EndForm ();
|
|
||||||
|
|
||||||
/***** End fieldset *****/
|
|
||||||
HTM_FIELDSET_End ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
|
@ -810,100 +810,84 @@ void Dpt_ContEditAfterChgDpt (void)
|
||||||
|
|
||||||
static void Dpt_PutFormToCreateDepartment (void)
|
static void Dpt_PutFormToCreateDepartment (void)
|
||||||
{
|
{
|
||||||
extern const char *Txt_Actions[ActLst_NUM_ACTIONS];
|
|
||||||
extern const char *Txt_Another_institution;
|
extern const char *Txt_Another_institution;
|
||||||
extern const char *Txt_Create;
|
|
||||||
unsigned NumIns;
|
unsigned NumIns;
|
||||||
const struct Ins_Instit *InsInLst;
|
const struct Ins_Instit *InsInLst;
|
||||||
|
|
||||||
/***** Begin fieldset *****/
|
/***** Begin form to create *****/
|
||||||
HTM_FIELDSET_Begin (NULL);
|
Frm_BeginFormTable (ActNewDpt,NULL,NULL,NULL);
|
||||||
HTM_LEGEND (Txt_Actions[ActNewDpt]);
|
|
||||||
|
|
||||||
/***** Begin form *****/
|
/***** Write heading *****/
|
||||||
Frm_BeginForm (ActNewDpt);
|
Dpt_PutHeadDepartments ();
|
||||||
|
|
||||||
/***** Begin table *****/
|
HTM_TR_Begin (NULL);
|
||||||
HTM_TABLE_BeginWidePadding (2);
|
|
||||||
|
|
||||||
/***** Write heading *****/
|
/***** Column to remove department, disabled here *****/
|
||||||
Dpt_PutHeadDepartments ();
|
HTM_TD_Begin ("class=\"BM\"");
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
HTM_TR_Begin (NULL);
|
/***** Department code *****/
|
||||||
|
HTM_TD_Begin ("class=\"CODE\"");
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Column to remove department, disabled here *****/
|
/***** Institution *****/
|
||||||
HTM_TD_Begin ("class=\"BM\"");
|
HTM_TD_Begin ("class=\"LM\"");
|
||||||
HTM_TD_End ();
|
HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE,NULL,
|
||||||
|
"name=\"OthInsCod\""
|
||||||
|
" class=\"HIE_SEL_NARROW INPUT_%s\"",
|
||||||
|
The_GetSuffix ());
|
||||||
|
HTM_OPTION (HTM_Type_STRING,"0",
|
||||||
|
Dpt_EditingDpt->InsCod == 0, // Selected?
|
||||||
|
HTM_OPTION_ENABLED,
|
||||||
|
"%s",Txt_Another_institution);
|
||||||
|
for (NumIns = 0;
|
||||||
|
NumIns < Gbl.Hierarchy.Inss.Num;
|
||||||
|
NumIns++)
|
||||||
|
{
|
||||||
|
InsInLst = &Gbl.Hierarchy.Inss.Lst[NumIns];
|
||||||
|
HTM_OPTION (HTM_Type_LONG,&InsInLst->InsCod,
|
||||||
|
InsInLst->InsCod == Dpt_EditingDpt->InsCod, // Selected?
|
||||||
|
HTM_OPTION_ENABLED,
|
||||||
|
"%s",InsInLst->ShrtName);
|
||||||
|
}
|
||||||
|
HTM_SELECT_End ();
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Department code *****/
|
/***** Department short name *****/
|
||||||
HTM_TD_Begin ("class=\"CODE\"");
|
HTM_TD_Begin ("class=\"LM\"");
|
||||||
HTM_TD_End ();
|
HTM_INPUT_TEXT ("ShortName",Cns_HIERARCHY_MAX_CHARS_SHRT_NAME,Dpt_EditingDpt->ShrtName,
|
||||||
|
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||||
|
"class=\"INPUT_SHORT_NAME INPUT_%s\""
|
||||||
|
" required=\"required\"",
|
||||||
|
The_GetSuffix ());
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Institution *****/
|
/***** Department full name *****/
|
||||||
HTM_TD_Begin ("class=\"LM\"");
|
HTM_TD_Begin ("class=\"LM\"");
|
||||||
HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE,NULL,
|
HTM_INPUT_TEXT ("FullName",Cns_HIERARCHY_MAX_CHARS_FULL_NAME,Dpt_EditingDpt->FullName,
|
||||||
"name=\"OthInsCod\""
|
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||||
" class=\"HIE_SEL_NARROW INPUT_%s\"",
|
"class=\"INPUT_FULL_NAME INPUT_%s\""
|
||||||
The_GetSuffix ());
|
" required=\"required\"",
|
||||||
HTM_OPTION (HTM_Type_STRING,"0",
|
The_GetSuffix ());
|
||||||
Dpt_EditingDpt->InsCod == 0, // Selected?
|
HTM_TD_End ();
|
||||||
HTM_OPTION_ENABLED,
|
|
||||||
"%s",Txt_Another_institution);
|
|
||||||
for (NumIns = 0;
|
|
||||||
NumIns < Gbl.Hierarchy.Inss.Num;
|
|
||||||
NumIns++)
|
|
||||||
{
|
|
||||||
InsInLst = &Gbl.Hierarchy.Inss.Lst[NumIns];
|
|
||||||
HTM_OPTION (HTM_Type_LONG,&InsInLst->InsCod,
|
|
||||||
InsInLst->InsCod == Dpt_EditingDpt->InsCod, // Selected?
|
|
||||||
HTM_OPTION_ENABLED,
|
|
||||||
"%s",InsInLst->ShrtName);
|
|
||||||
}
|
|
||||||
HTM_SELECT_End ();
|
|
||||||
HTM_TD_End ();
|
|
||||||
|
|
||||||
/***** Department short name *****/
|
/***** Department WWW *****/
|
||||||
HTM_TD_Begin ("class=\"LM\"");
|
HTM_TD_Begin ("class=\"LM\"");
|
||||||
HTM_INPUT_TEXT ("ShortName",Cns_HIERARCHY_MAX_CHARS_SHRT_NAME,Dpt_EditingDpt->ShrtName,
|
HTM_INPUT_URL ("WWW",Dpt_EditingDpt->WWW,HTM_DONT_SUBMIT_ON_CHANGE,
|
||||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
"class=\"INPUT_WWW_NARROW INPUT_%s\""
|
||||||
"class=\"INPUT_SHORT_NAME INPUT_%s\""
|
" required=\"required\"",
|
||||||
" required=\"required\"",
|
The_GetSuffix ());
|
||||||
The_GetSuffix ());
|
HTM_TD_End ();
|
||||||
HTM_TD_End ();
|
|
||||||
|
|
||||||
/***** Department full name *****/
|
/***** Number of teachers *****/
|
||||||
HTM_TD_Begin ("class=\"LM\"");
|
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||||
HTM_INPUT_TEXT ("FullName",Cns_HIERARCHY_MAX_CHARS_FULL_NAME,Dpt_EditingDpt->FullName,
|
HTM_Unsigned (0);
|
||||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
HTM_TD_End ();
|
||||||
"class=\"INPUT_FULL_NAME INPUT_%s\""
|
|
||||||
" required=\"required\"",
|
|
||||||
The_GetSuffix ());
|
|
||||||
HTM_TD_End ();
|
|
||||||
|
|
||||||
/***** Department WWW *****/
|
HTM_TR_End ();
|
||||||
HTM_TD_Begin ("class=\"LM\"");
|
|
||||||
HTM_INPUT_URL ("WWW",Dpt_EditingDpt->WWW,HTM_DONT_SUBMIT_ON_CHANGE,
|
|
||||||
"class=\"INPUT_WWW_NARROW INPUT_%s\""
|
|
||||||
" required=\"required\"",
|
|
||||||
The_GetSuffix ());
|
|
||||||
HTM_TD_End ();
|
|
||||||
|
|
||||||
/***** Number of teachers *****/
|
/***** End form to create *****/
|
||||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
Frm_EndFormTable (Btn_CREATE_BUTTON);
|
||||||
HTM_Unsigned (0);
|
|
||||||
HTM_TD_End ();
|
|
||||||
|
|
||||||
HTM_TR_End ();
|
|
||||||
|
|
||||||
/***** End table and send button *****/
|
|
||||||
HTM_TABLE_End ();
|
|
||||||
Btn_PutButton (Btn_CREATE_BUTTON,Txt_Create);
|
|
||||||
|
|
||||||
/***** End form *****/
|
|
||||||
Frm_EndForm ();
|
|
||||||
|
|
||||||
/***** End fieldset *****/
|
|
||||||
HTM_FIELDSET_End ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
|
@ -95,7 +95,9 @@ static void ExaSes_ListOneOrMoreSessionsResultTch (struct Exa_Exams *Exams,
|
||||||
static void ExaSes_GetSessionDataFromRow (MYSQL_RES *mysql_res,
|
static void ExaSes_GetSessionDataFromRow (MYSQL_RES *mysql_res,
|
||||||
struct ExaSes_Session *Session);
|
struct ExaSes_Session *Session);
|
||||||
|
|
||||||
static void ExaSes_PutFormSession (const struct ExaSes_Session *Session);
|
static void ExaSes_PutFormSession (struct ExaSes_Session *Session);
|
||||||
|
static void ExaSes_ParsFormSession (void *Session);
|
||||||
|
|
||||||
static void ExaSes_ShowLstGrpsToCreateSession (long SesCod);
|
static void ExaSes_ShowLstGrpsToCreateSession (long SesCod);
|
||||||
|
|
||||||
static void ExaSes_CreateSession (struct ExaSes_Session *Session);
|
static void ExaSes_CreateSession (struct ExaSes_Session *Session);
|
||||||
|
@ -957,79 +959,64 @@ void ExaSes_GetAndCheckPars (struct Exa_Exams *Exams,
|
||||||
/* Put a big button to play exam session (start a new session) as a teacher **/
|
/* Put a big button to play exam session (start a new session) as a teacher **/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void ExaSes_PutFormSession (const struct ExaSes_Session *Session)
|
static void ExaSes_PutFormSession (struct ExaSes_Session *Session)
|
||||||
{
|
{
|
||||||
extern const char *Txt_Actions[ActLst_NUM_ACTIONS];
|
|
||||||
extern const char *Txt_Title;
|
extern const char *Txt_Title;
|
||||||
extern const char *Txt_Create;
|
|
||||||
extern const char *Txt_Save_changes;
|
|
||||||
static const Dat_SetHMS SetHMS[Dat_NUM_START_END_TIME] =
|
static const Dat_SetHMS SetHMS[Dat_NUM_START_END_TIME] =
|
||||||
{
|
{
|
||||||
[Dat_STR_TIME] = Dat_HMS_DO_NOT_SET,
|
[Dat_STR_TIME] = Dat_HMS_DO_NOT_SET,
|
||||||
[Dat_END_TIME] = Dat_HMS_DO_NOT_SET
|
[Dat_END_TIME] = Dat_HMS_DO_NOT_SET
|
||||||
};
|
};
|
||||||
bool ItsANewSession = Session->SesCod <= 0;
|
bool ItsANewSession = (Session->SesCod <= 0);
|
||||||
Act_Action_t NextAction = ItsANewSession ? ActNewExaSes :
|
|
||||||
ActChgExaSes;
|
|
||||||
|
|
||||||
/***** Begin section for a new exam session *****/
|
/***** Begin section for a new exam session *****/
|
||||||
HTM_SECTION_Begin (ExaSes_NEW_SESSION_SECTION_ID);
|
HTM_SECTION_Begin (ExaSes_NEW_SESSION_SECTION_ID);
|
||||||
|
|
||||||
/***** Begin fieldset *****/
|
/***** Begin form to create *****/
|
||||||
HTM_FIELDSET_Begin (NULL);
|
Frm_BeginFormTable (ItsANewSession ? ActNewExaSes :
|
||||||
HTM_LEGEND (Txt_Actions[NextAction]);
|
ActChgExaSes,
|
||||||
|
ExaSes_NEW_SESSION_SECTION_ID,
|
||||||
|
ExaSes_ParsFormSession,Session);
|
||||||
|
|
||||||
/***** Begin form *****/
|
/***** Session title *****/
|
||||||
Frm_BeginForm (NextAction);
|
HTM_TR_Begin (NULL);
|
||||||
ParCod_PutPar (ParCod_Exa,Session->ExaCod);
|
|
||||||
if (!ItsANewSession) // Existing session
|
|
||||||
ParCod_PutPar (ParCod_Ses,Session->SesCod);
|
|
||||||
|
|
||||||
/***** Begin table *****/
|
/* Label */
|
||||||
HTM_TABLE_BeginWidePadding (2);
|
Frm_LabelColumn ("RT","Title",Txt_Title);
|
||||||
|
|
||||||
/***** Session title *****/
|
/* Data */
|
||||||
HTM_TR_Begin (NULL);
|
HTM_TD_Begin ("class=\"LT\"");
|
||||||
|
HTM_INPUT_TEXT ("Title",ExaSes_MAX_CHARS_TITLE,Session->Title,
|
||||||
|
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||||
|
"id=\"Title\" size=\"45\" class=\"INPUT_%s\""
|
||||||
|
" required=\"required\"",
|
||||||
|
The_GetSuffix ());
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
/* Label */
|
HTM_TR_End ();
|
||||||
Frm_LabelColumn ("RT","Title",Txt_Title);
|
|
||||||
|
|
||||||
/* Data */
|
/***** Start and end dates *****/
|
||||||
HTM_TD_Begin ("class=\"LT\"");
|
Dat_PutFormStartEndClientLocalDateTimes (Session->TimeUTC,
|
||||||
HTM_INPUT_TEXT ("Title",ExaSes_MAX_CHARS_TITLE,Session->Title,
|
Dat_FORM_SECONDS_OFF,
|
||||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
SetHMS);
|
||||||
"id=\"Title\" size=\"45\" class=\"INPUT_%s\""
|
|
||||||
" required=\"required\"",
|
|
||||||
The_GetSuffix ());
|
|
||||||
HTM_TD_End ();
|
|
||||||
|
|
||||||
HTM_TR_End ();
|
/***** Groups *****/
|
||||||
|
ExaSes_ShowLstGrpsToCreateSession (Session->SesCod);
|
||||||
|
|
||||||
/***** Start and end dates *****/
|
/***** End form to create *****/
|
||||||
Dat_PutFormStartEndClientLocalDateTimes (Session->TimeUTC,
|
Frm_EndFormTable (ItsANewSession ? Btn_CREATE_BUTTON :
|
||||||
Dat_FORM_SECONDS_OFF,
|
Btn_CONFIRM_BUTTON);
|
||||||
SetHMS);
|
|
||||||
|
|
||||||
/***** Groups *****/
|
|
||||||
ExaSes_ShowLstGrpsToCreateSession (Session->SesCod);
|
|
||||||
|
|
||||||
/***** End table and send button *****/
|
|
||||||
HTM_TABLE_End ();
|
|
||||||
if (ItsANewSession)
|
|
||||||
Btn_PutButton (Btn_CREATE_BUTTON,Txt_Create);
|
|
||||||
else
|
|
||||||
Btn_PutButton (Btn_CONFIRM_BUTTON,Txt_Save_changes);
|
|
||||||
|
|
||||||
/***** End form *****/
|
|
||||||
Frm_EndForm ();
|
|
||||||
|
|
||||||
/***** End fieldset *****/
|
|
||||||
HTM_FIELDSET_End ();
|
|
||||||
|
|
||||||
/***** End section for a new exam session *****/
|
/***** End section for a new exam session *****/
|
||||||
HTM_SECTION_End ();
|
HTM_SECTION_End ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void ExaSes_ParsFormSession (void *Session)
|
||||||
|
{
|
||||||
|
ParCod_PutPar (ParCod_Exa,((struct ExaSes_Session *) Session)->ExaCod);
|
||||||
|
ParCod_PutPar (ParCod_Ses,((struct ExaSes_Session *) Session)->SesCod);
|
||||||
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/************* Show list of groups to create a new exam session **************/
|
/************* Show list of groups to create a new exam session **************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
|
@ -180,69 +180,51 @@ static void ExaSet_PutFormNewSet (struct Exa_Exams *Exams,
|
||||||
struct ExaSet_Set *Set,
|
struct ExaSet_Set *Set,
|
||||||
unsigned MaxSetInd)
|
unsigned MaxSetInd)
|
||||||
{
|
{
|
||||||
extern const char *Txt_Actions[ActLst_NUM_ACTIONS];
|
/***** Begin form to create *****/
|
||||||
extern const char *Txt_Create;
|
Frm_BeginFormTable (ActNewExaSet,NULL,Exa_PutPars,Exams);
|
||||||
|
|
||||||
/***** Begin fieldset *****/
|
/***** Table heading *****/
|
||||||
HTM_FIELDSET_Begin (NULL);
|
ExaSet_PutTableHeadingForSets ();
|
||||||
HTM_LEGEND (Txt_Actions[ActNewExaSet]);
|
|
||||||
|
|
||||||
/***** Begin form *****/
|
/***** Begin row *****/
|
||||||
Frm_BeginForm (ActNewExaSet);
|
HTM_TR_Begin (NULL);
|
||||||
Exa_PutPars (Exams);
|
|
||||||
|
|
||||||
/***** Begin table *****/
|
/***** Empty column for buttons *****/
|
||||||
HTM_TABLE_BeginWidePadding (2);
|
HTM_TD_Begin ("class=\"BM\"");
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Table heading *****/
|
/***** Index *****/
|
||||||
ExaSet_PutTableHeadingForSets ();
|
HTM_TD_Begin ("class=\"RM\"");
|
||||||
|
Lay_WriteIndex (MaxSetInd + 1,"BIG_INDEX");
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Begin row *****/
|
/***** Title *****/
|
||||||
HTM_TR_Begin (NULL);
|
HTM_TD_Begin ("class=\"LM\"");
|
||||||
|
HTM_INPUT_TEXT ("Title",ExaSet_MAX_CHARS_TITLE,Set->Title,
|
||||||
|
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||||
|
"id=\"Title\""
|
||||||
|
" class=\"TITLE_DESCRIPTION_WIDTH INPUT_%s\""
|
||||||
|
" required=\"required\"",
|
||||||
|
The_GetSuffix ());
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Empty column for buttons *****/
|
/***** Current number of questions in set *****/
|
||||||
HTM_TD_Begin ("class=\"BM\"");
|
HTM_TD_Begin ("class=\"RM\"");
|
||||||
HTM_TD_End ();
|
HTM_Unsigned (0); // New set ==> no questions yet
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Index *****/
|
/***** Number of questions to appear in the exam *****/
|
||||||
HTM_TD_Begin ("class=\"RM\"");
|
HTM_TD_Begin ("class=\"RM\"");
|
||||||
Lay_WriteIndex (MaxSetInd + 1,"BIG_INDEX");
|
HTM_INPUT_LONG ("NumQstsToPrint",0,UINT_MAX,(long) Set->NumQstsToPrint,
|
||||||
HTM_TD_End ();
|
HTM_DONT_SUBMIT_ON_CHANGE,false,
|
||||||
|
"class=\"INPUT_LONG\" required=\"required\"");
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Title *****/
|
/***** End row *****/
|
||||||
HTM_TD_Begin ("class=\"LM\"");
|
HTM_TR_End ();
|
||||||
HTM_INPUT_TEXT ("Title",ExaSet_MAX_CHARS_TITLE,Set->Title,
|
|
||||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
|
||||||
"id=\"Title\""
|
|
||||||
" class=\"TITLE_DESCRIPTION_WIDTH INPUT_%s\""
|
|
||||||
" required=\"required\"",
|
|
||||||
The_GetSuffix ());
|
|
||||||
HTM_TD_End ();
|
|
||||||
|
|
||||||
/***** Current number of questions in set *****/
|
/***** End form to create *****/
|
||||||
HTM_TD_Begin ("class=\"RM\"");
|
Frm_EndFormTable (Btn_CREATE_BUTTON);
|
||||||
HTM_Unsigned (0); // New set ==> no questions yet
|
|
||||||
HTM_TD_End ();
|
|
||||||
|
|
||||||
/***** Number of questions to appear in the exam *****/
|
|
||||||
HTM_TD_Begin ("class=\"RM\"");
|
|
||||||
HTM_INPUT_LONG ("NumQstsToPrint",0,UINT_MAX,(long) Set->NumQstsToPrint,
|
|
||||||
HTM_DONT_SUBMIT_ON_CHANGE,false,
|
|
||||||
"class=\"INPUT_LONG\" required=\"required\"");
|
|
||||||
HTM_TD_End ();
|
|
||||||
|
|
||||||
/***** End row *****/
|
|
||||||
HTM_TR_End ();
|
|
||||||
|
|
||||||
/***** End table and send button *****/
|
|
||||||
HTM_TABLE_End ();
|
|
||||||
Btn_PutButton (Btn_CREATE_BUTTON,Txt_Create);
|
|
||||||
|
|
||||||
/***** End form *****/
|
|
||||||
Frm_EndForm ();
|
|
||||||
|
|
||||||
/***** End fieldset *****/
|
|
||||||
HTM_FIELDSET_End ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
48
swad_form.c
48
swad_form.c
|
@ -245,6 +245,54 @@ void Frm_EndForm (void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/********************** Put a form and a table to create *********************/
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
void Frm_BeginFormTable (Act_Action_t NextAction,const char *Anchor,
|
||||||
|
void (*FuncPars) (void *Args),void *Args)
|
||||||
|
{
|
||||||
|
extern const char *Txt_Actions[ActLst_NUM_ACTIONS];
|
||||||
|
|
||||||
|
/***** Begin fieldset *****/
|
||||||
|
HTM_FIELDSET_Begin (NULL);
|
||||||
|
HTM_LEGEND (Txt_Actions[NextAction]);
|
||||||
|
|
||||||
|
/***** Begin form *****/
|
||||||
|
Frm_BeginFormAnchor (NextAction,Anchor);
|
||||||
|
if (FuncPars)
|
||||||
|
FuncPars (Args);
|
||||||
|
|
||||||
|
/***** Begin table *****/
|
||||||
|
HTM_TABLE_BeginWidePadding (2);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Frm_EndFormTable (Btn_Button_t Button)
|
||||||
|
{
|
||||||
|
extern const char *Txt_Create;
|
||||||
|
extern const char *Txt_Save_changes;
|
||||||
|
extern const char *Txt_Remove;
|
||||||
|
static const char **TxtButton[Btn_NUM_BUTTON_TYPES] =
|
||||||
|
{
|
||||||
|
[Btn_CREATE_BUTTON ] = &Txt_Create,
|
||||||
|
[Btn_CONFIRM_BUTTON] = &Txt_Save_changes,
|
||||||
|
[Btn_REMOVE_BUTTON ] = &Txt_Remove,
|
||||||
|
};
|
||||||
|
|
||||||
|
/***** End table *****/
|
||||||
|
HTM_TABLE_End ();
|
||||||
|
|
||||||
|
/***** Send button *****/
|
||||||
|
if (Button != Btn_NO_BUTTON)
|
||||||
|
Btn_PutButton (Button,*TxtButton[Button]);
|
||||||
|
|
||||||
|
/***** End form *****/
|
||||||
|
Frm_EndForm ();
|
||||||
|
|
||||||
|
/***** End fieldset *****/
|
||||||
|
HTM_FIELDSET_End ();
|
||||||
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/***************************** Get unique Id *********************************/
|
/***************************** Get unique Id *********************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#include "swad_action.h"
|
#include "swad_action.h"
|
||||||
|
#include "swad_button.h"
|
||||||
#include "swad_constant.h"
|
#include "swad_constant.h"
|
||||||
#include "swad_cryptography.h"
|
#include "swad_cryptography.h"
|
||||||
|
|
||||||
|
@ -65,6 +66,10 @@ void Frm_SetParsForm (char ParsStr[Frm_MAX_BYTES_PARAMS_STR + 1],Act_Action_t Ne
|
||||||
bool PutParLocationIfNoSession);
|
bool PutParLocationIfNoSession);
|
||||||
void Frm_EndForm (void);
|
void Frm_EndForm (void);
|
||||||
|
|
||||||
|
void Frm_BeginFormTable (Act_Action_t NextAction,const char *Anchor,
|
||||||
|
void (*FuncPars) (void *Args),void *Args);
|
||||||
|
void Frm_EndFormTable (Btn_Button_t Button);
|
||||||
|
|
||||||
void Frm_SetUniqueId (char UniqueId[Frm_MAX_BYTES_ID + 1]);
|
void Frm_SetUniqueId (char UniqueId[Frm_MAX_BYTES_ID + 1]);
|
||||||
|
|
||||||
void Frm_SetAnchorStr (long Cod,char **Anchor);
|
void Frm_SetAnchorStr (long Cod,char **Anchor);
|
||||||
|
|
397
swad_group.c
397
swad_group.c
|
@ -2373,7 +2373,6 @@ static void Grp_WriteRowGrp (struct Group *Grp,bool Highlight)
|
||||||
|
|
||||||
static void Grp_PutFormToCreateGroupType (void)
|
static void Grp_PutFormToCreateGroupType (void)
|
||||||
{
|
{
|
||||||
extern const char *Txt_Actions[ActLst_NUM_ACTIONS];
|
|
||||||
extern const char *Txt_Type_of_group;
|
extern const char *Txt_Type_of_group;
|
||||||
extern const char *Txt_It_is_optional_to_choose_a_group;
|
extern const char *Txt_It_is_optional_to_choose_a_group;
|
||||||
extern const char *Txt_It_is_mandatory_to_choose_a_group;
|
extern const char *Txt_It_is_mandatory_to_choose_a_group;
|
||||||
|
@ -2381,120 +2380,106 @@ static void Grp_PutFormToCreateGroupType (void)
|
||||||
extern const char *Txt_A_student_can_only_belong_to_one_group;
|
extern const char *Txt_A_student_can_only_belong_to_one_group;
|
||||||
extern const char *Txt_The_groups_will_automatically_open;
|
extern const char *Txt_The_groups_will_automatically_open;
|
||||||
extern const char *Txt_The_groups_will_not_automatically_open;
|
extern const char *Txt_The_groups_will_not_automatically_open;
|
||||||
extern const char *Txt_Create;
|
|
||||||
unsigned CurrentYear = Dat_GetCurrentYear ();
|
unsigned CurrentYear = Dat_GetCurrentYear ();
|
||||||
|
|
||||||
/***** Begin section *****/
|
/***** Begin section *****/
|
||||||
HTM_SECTION_Begin (Grp_NEW_GROUP_TYPE_SECTION_ID);
|
HTM_SECTION_Begin (Grp_NEW_GROUP_TYPE_SECTION_ID);
|
||||||
|
|
||||||
/***** Begin fieldset *****/
|
/***** Begin form to create *****/
|
||||||
HTM_FIELDSET_Begin (NULL);
|
Frm_BeginFormTable (ActNewGrpTyp,Grp_NEW_GROUP_TYPE_SECTION_ID,
|
||||||
HTM_LEGEND (Txt_Actions[ActNewGrpTyp]);
|
NULL,NULL);
|
||||||
|
|
||||||
/***** Begin form *****/
|
/***** Write heading *****/
|
||||||
Frm_BeginFormAnchor (ActNewGrpTyp,Grp_NEW_GROUP_TYPE_SECTION_ID);
|
Grp_WriteHeadingGroupTypes ();
|
||||||
|
|
||||||
/***** Begin table *****/
|
HTM_TR_Begin (NULL);
|
||||||
HTM_TABLE_BeginWidePadding (2);
|
|
||||||
|
|
||||||
/***** Write heading *****/
|
/***** Column to remove group type, disabled here *****/
|
||||||
Grp_WriteHeadingGroupTypes ();
|
HTM_TD_Begin ("class=\"BM\"");
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
HTM_TR_Begin (NULL);
|
/***** Name of group type *****/
|
||||||
|
HTM_TD_Begin ("class=\"LM\"");
|
||||||
|
HTM_INPUT_TEXT ("GrpTypName",Grp_MAX_CHARS_GROUP_TYPE_NAME,
|
||||||
|
Gbl.Crs.Grps.GrpTyp.GrpTypName,HTM_DONT_SUBMIT_ON_CHANGE,
|
||||||
|
"size=\"12\" class=\"INPUT_%s\""
|
||||||
|
" required=\"required\"",
|
||||||
|
The_GetSuffix ());
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Column to remove group type, disabled here *****/
|
/***** Is it mandatory to register in any groups of this type? *****/
|
||||||
HTM_TD_Begin ("class=\"BM\"");
|
HTM_TD_Begin ("class=\"CM\"");
|
||||||
HTM_TD_End ();
|
HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE,NULL,
|
||||||
|
"name=\"MandatoryEnrolment\""
|
||||||
|
" class=\"INPUT_%s\" style=\"width:150px;\"",
|
||||||
|
The_GetSuffix ());
|
||||||
|
HTM_OPTION (HTM_Type_STRING,"N",
|
||||||
|
!Gbl.Crs.Grps.GrpTyp.MandatoryEnrolment, // Selected?
|
||||||
|
HTM_OPTION_ENABLED,
|
||||||
|
"%s",Txt_It_is_optional_to_choose_a_group);
|
||||||
|
HTM_OPTION (HTM_Type_STRING,"Y",
|
||||||
|
Gbl.Crs.Grps.GrpTyp.MandatoryEnrolment, // Selected?
|
||||||
|
HTM_OPTION_ENABLED,
|
||||||
|
"%s",Txt_It_is_mandatory_to_choose_a_group);
|
||||||
|
HTM_SELECT_End ();
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Name of group type *****/
|
/***** Is it possible to register in multiple groups of this type? *****/
|
||||||
HTM_TD_Begin ("class=\"LM\"");
|
HTM_TD_Begin ("class=\"CM\"");
|
||||||
HTM_INPUT_TEXT ("GrpTypName",Grp_MAX_CHARS_GROUP_TYPE_NAME,
|
HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE,NULL,
|
||||||
Gbl.Crs.Grps.GrpTyp.GrpTypName,HTM_DONT_SUBMIT_ON_CHANGE,
|
"name=\"MultipleEnrolment\""
|
||||||
"size=\"12\" class=\"INPUT_%s\""
|
" class=\"INPUT_%s\" style=\"width:150px;\"",
|
||||||
" required=\"required\"",
|
The_GetSuffix ());
|
||||||
The_GetSuffix ());
|
HTM_OPTION (HTM_Type_STRING,"N",
|
||||||
HTM_TD_End ();
|
!Gbl.Crs.Grps.GrpTyp.MultipleEnrolment, // Selected?
|
||||||
|
HTM_OPTION_ENABLED,
|
||||||
|
"%s",Txt_A_student_can_only_belong_to_one_group);
|
||||||
|
HTM_OPTION (HTM_Type_STRING,"Y",
|
||||||
|
Gbl.Crs.Grps.GrpTyp.MultipleEnrolment, // Selected?
|
||||||
|
HTM_OPTION_ENABLED,
|
||||||
|
"%s",Txt_A_student_can_belong_to_several_groups);
|
||||||
|
HTM_SELECT_End ();
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Is it mandatory to register in any groups of this type? *****/
|
/***** Open time *****/
|
||||||
HTM_TD_Begin ("class=\"CM\"");
|
HTM_TD_Begin ("class=\"LM\"");
|
||||||
HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE,NULL,
|
HTM_TABLE_BeginPadding (2);
|
||||||
"name=\"MandatoryEnrolment\""
|
HTM_TR_Begin (NULL);
|
||||||
" class=\"INPUT_%s\" style=\"width:150px;\"",
|
|
||||||
The_GetSuffix ());
|
|
||||||
HTM_OPTION (HTM_Type_STRING,"N",
|
|
||||||
!Gbl.Crs.Grps.GrpTyp.MandatoryEnrolment, // Selected?
|
|
||||||
HTM_OPTION_ENABLED,
|
|
||||||
"%s",Txt_It_is_optional_to_choose_a_group);
|
|
||||||
HTM_OPTION (HTM_Type_STRING,"Y",
|
|
||||||
Gbl.Crs.Grps.GrpTyp.MandatoryEnrolment, // Selected?
|
|
||||||
HTM_OPTION_ENABLED,
|
|
||||||
"%s",Txt_It_is_mandatory_to_choose_a_group);
|
|
||||||
HTM_SELECT_End ();
|
|
||||||
HTM_TD_End ();
|
|
||||||
|
|
||||||
/***** Is it possible to register in multiple groups of this type? *****/
|
HTM_TD_Begin ("class=\"LM\" style=\"width:20px;\"");
|
||||||
HTM_TD_Begin ("class=\"CM\"");
|
if (Gbl.Crs.Grps.GrpTyp.MustBeOpened)
|
||||||
HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE,NULL,
|
Ico_PutIconOn ("clock.svg",Ico_BLACK,
|
||||||
"name=\"MultipleEnrolment\""
|
Txt_The_groups_will_automatically_open);
|
||||||
" class=\"INPUT_%s\" style=\"width:150px;\"",
|
else
|
||||||
The_GetSuffix ());
|
Ico_PutIconOff ("clock.svg",Ico_BLACK,
|
||||||
HTM_OPTION (HTM_Type_STRING,"N",
|
Txt_The_groups_will_not_automatically_open);
|
||||||
!Gbl.Crs.Grps.GrpTyp.MultipleEnrolment, // Selected?
|
HTM_TD_End ();
|
||||||
HTM_OPTION_ENABLED,
|
|
||||||
"%s",Txt_A_student_can_only_belong_to_one_group);
|
|
||||||
HTM_OPTION (HTM_Type_STRING,"Y",
|
|
||||||
Gbl.Crs.Grps.GrpTyp.MultipleEnrolment, // Selected?
|
|
||||||
HTM_OPTION_ENABLED,
|
|
||||||
"%s",Txt_A_student_can_belong_to_several_groups);
|
|
||||||
HTM_SELECT_End ();
|
|
||||||
HTM_TD_End ();
|
|
||||||
|
|
||||||
/***** Open time *****/
|
HTM_TD_Begin ("class=\"LM\"");
|
||||||
HTM_TD_Begin ("class=\"LM\"");
|
Dat_WriteFormClientLocalDateTimeFromTimeUTC ("open_time",
|
||||||
HTM_TABLE_BeginPadding (2);
|
Dat_STR_TIME,
|
||||||
HTM_TR_Begin (NULL);
|
Gbl.Crs.Grps.GrpTyp.OpenTimeUTC,
|
||||||
|
CurrentYear,
|
||||||
|
CurrentYear + 1,
|
||||||
|
Dat_FORM_SECONDS_ON,
|
||||||
|
Dat_HMS_DO_NOT_SET, // Don't set hour, minute and second
|
||||||
|
HTM_DONT_SUBMIT_ON_CHANGE);
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
HTM_TD_Begin ("class=\"LM\" style=\"width:20px;\"");
|
HTM_TR_End ();
|
||||||
if (Gbl.Crs.Grps.GrpTyp.MustBeOpened)
|
HTM_TABLE_End ();
|
||||||
Ico_PutIconOn ("clock.svg",Ico_BLACK,
|
HTM_TD_End ();
|
||||||
Txt_The_groups_will_automatically_open);
|
|
||||||
else
|
|
||||||
Ico_PutIconOff ("clock.svg",Ico_BLACK,
|
|
||||||
Txt_The_groups_will_not_automatically_open);
|
|
||||||
HTM_TD_End ();
|
|
||||||
|
|
||||||
HTM_TD_Begin ("class=\"LM\"");
|
/***** Number of groups of this type *****/
|
||||||
Dat_WriteFormClientLocalDateTimeFromTimeUTC ("open_time",
|
HTM_TD_Begin ("class=\"CM DAT_%s\"",
|
||||||
Dat_STR_TIME,
|
The_GetSuffix ());
|
||||||
Gbl.Crs.Grps.GrpTyp.OpenTimeUTC,
|
HTM_Unsigned (0); // It's a new group type ==> 0 groups
|
||||||
CurrentYear,
|
HTM_TD_End ();
|
||||||
CurrentYear + 1,
|
|
||||||
Dat_FORM_SECONDS_ON,
|
|
||||||
Dat_HMS_DO_NOT_SET, // Don't set hour, minute and second
|
|
||||||
HTM_DONT_SUBMIT_ON_CHANGE);
|
|
||||||
HTM_TD_End ();
|
|
||||||
|
|
||||||
HTM_TR_End ();
|
HTM_TR_End ();
|
||||||
HTM_TABLE_End ();
|
|
||||||
HTM_TD_End ();
|
|
||||||
|
|
||||||
/***** Number of groups of this type *****/
|
/***** End form to create *****/
|
||||||
HTM_TD_Begin ("class=\"CM DAT_%s\"",
|
Frm_EndFormTable (Btn_CREATE_BUTTON);
|
||||||
The_GetSuffix ());
|
|
||||||
HTM_Unsigned (0); // It's a new group type ==> 0 groups
|
|
||||||
HTM_TD_End ();
|
|
||||||
|
|
||||||
HTM_TR_End ();
|
|
||||||
|
|
||||||
/***** End table and send button *****/
|
|
||||||
HTM_TABLE_End ();
|
|
||||||
Btn_PutButton (Btn_CREATE_BUTTON,Txt_Create);
|
|
||||||
|
|
||||||
/***** End form *****/
|
|
||||||
Frm_EndForm ();
|
|
||||||
|
|
||||||
/***** End fieldset *****/
|
|
||||||
HTM_FIELDSET_End ();
|
|
||||||
|
|
||||||
/***** End section *****/
|
/***** End section *****/
|
||||||
HTM_SECTION_End ();
|
HTM_SECTION_End ();
|
||||||
|
@ -2506,13 +2491,11 @@ static void Grp_PutFormToCreateGroupType (void)
|
||||||
|
|
||||||
static void Grp_PutFormToCreateGroup (const struct Roo_Rooms *Rooms)
|
static void Grp_PutFormToCreateGroup (const struct Roo_Rooms *Rooms)
|
||||||
{
|
{
|
||||||
extern const char *Txt_Actions[ActLst_NUM_ACTIONS];
|
|
||||||
extern const char *Txt_Group;
|
extern const char *Txt_Group;
|
||||||
extern const char *Txt_Group_closed;
|
extern const char *Txt_Group_closed;
|
||||||
extern const char *Txt_File_zones_disabled;
|
extern const char *Txt_File_zones_disabled;
|
||||||
extern const char *Txt_No_assigned_room;
|
extern const char *Txt_No_assigned_room;
|
||||||
extern const char *Txt_Another_room;
|
extern const char *Txt_Another_room;
|
||||||
extern const char *Txt_Create;
|
|
||||||
unsigned NumGrpTyp;
|
unsigned NumGrpTyp;
|
||||||
const struct GroupType *GrpTypInLst;
|
const struct GroupType *GrpTypInLst;
|
||||||
unsigned NumRoo;
|
unsigned NumRoo;
|
||||||
|
@ -2523,135 +2506,121 @@ static void Grp_PutFormToCreateGroup (const struct Roo_Rooms *Rooms)
|
||||||
/***** Begin section *****/
|
/***** Begin section *****/
|
||||||
HTM_SECTION_Begin (Grp_NEW_GROUP_SECTION_ID);
|
HTM_SECTION_Begin (Grp_NEW_GROUP_SECTION_ID);
|
||||||
|
|
||||||
/***** Begin fieldset *****/
|
/***** Begin form to create *****/
|
||||||
HTM_FIELDSET_Begin (NULL);
|
Frm_BeginFormTable (ActNewGrp,Grp_GROUPS_SECTION_ID,NULL,NULL);
|
||||||
HTM_LEGEND (Txt_Actions[ActNewGrp]);
|
|
||||||
|
|
||||||
/***** Begin form *****/
|
/***** Write heading *****/
|
||||||
Frm_BeginFormAnchor (ActNewGrp,Grp_GROUPS_SECTION_ID);
|
Grp_WriteHeadingGroups ();
|
||||||
|
|
||||||
/***** Begin table *****/
|
HTM_TR_Begin (NULL);
|
||||||
HTM_TABLE_BeginWidePadding (2);
|
|
||||||
|
|
||||||
/***** Write heading *****/
|
/***** Empty column to remove *****/
|
||||||
Grp_WriteHeadingGroups ();
|
HTM_TD_Begin ("class=\"BM\"");
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
HTM_TR_Begin (NULL);
|
/***** Disabled icon to open group *****/
|
||||||
|
HTM_TD_Begin ("class=\"BM\"");
|
||||||
|
Ico_PutIconOff ("lock.svg",Ico_RED,Txt_Group_closed);
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Empty column to remove *****/
|
/***** Disabled icon for archive zone *****/
|
||||||
HTM_TD_Begin ("class=\"BM\"");
|
HTM_TD_Begin ("class=\"BM\"");
|
||||||
HTM_TD_End ();
|
Ico_PutIconOff ("folder.svg",Ico_RED,Txt_File_zones_disabled);
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Disabled icon to open group *****/
|
/***** Group type *****/
|
||||||
HTM_TD_Begin ("class=\"BM\"");
|
/* Begin selector */
|
||||||
Ico_PutIconOff ("lock.svg",Ico_RED,Txt_Group_closed);
|
HTM_TD_Begin ("class=\"CM\"");
|
||||||
HTM_TD_End ();
|
HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE,NULL,
|
||||||
|
"name=\"GrpTypCod\""
|
||||||
|
" class=\"INPUT_%s\" style=\"width:100px;\"",
|
||||||
|
The_GetSuffix ());
|
||||||
|
|
||||||
/***** Disabled icon for archive zone *****/
|
/* Options for group types */
|
||||||
HTM_TD_Begin ("class=\"BM\"");
|
for (NumGrpTyp = 0;
|
||||||
Ico_PutIconOff ("folder.svg",Ico_RED,Txt_File_zones_disabled);
|
NumGrpTyp < Gbl.Crs.Grps.GrpTypes.NumGrpTypes;
|
||||||
HTM_TD_End ();
|
NumGrpTyp++)
|
||||||
|
|
||||||
/***** Group type *****/
|
|
||||||
/* Begin selector */
|
|
||||||
HTM_TD_Begin ("class=\"CM\"");
|
|
||||||
HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE,NULL,
|
|
||||||
"name=\"GrpTypCod\""
|
|
||||||
" class=\"INPUT_%s\" style=\"width:100px;\"",
|
|
||||||
The_GetSuffix ());
|
|
||||||
|
|
||||||
/* Options for group types */
|
|
||||||
for (NumGrpTyp = 0;
|
|
||||||
NumGrpTyp < Gbl.Crs.Grps.GrpTypes.NumGrpTypes;
|
|
||||||
NumGrpTyp++)
|
|
||||||
{
|
|
||||||
GrpTypInLst = &Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp];
|
|
||||||
HTM_OPTION (HTM_Type_LONG,&GrpTypInLst->GrpTypCod,
|
|
||||||
GrpTypInLst->GrpTypCod == Gbl.Crs.Grps.GrpTyp.GrpTypCod, // Selected?
|
|
||||||
HTM_OPTION_ENABLED,
|
|
||||||
"%s",GrpTypInLst->GrpTypName);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* End selector */
|
|
||||||
HTM_SELECT_End ();
|
|
||||||
HTM_TD_End ();
|
|
||||||
|
|
||||||
/***** Group name *****/
|
|
||||||
HTM_TD_Begin ("class=\"CM\"");
|
|
||||||
HTM_INPUT_TEXT ("GrpName",Grp_MAX_CHARS_GROUP_NAME,Gbl.Crs.Grps.GrpName,
|
|
||||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
|
||||||
"size=\"20\" class=\"INPUT_%s\""
|
|
||||||
" required=\"required\"",
|
|
||||||
The_GetSuffix ());
|
|
||||||
HTM_TD_End ();
|
|
||||||
|
|
||||||
/***** Room *****/
|
|
||||||
/* Begin selector */
|
|
||||||
HTM_TD_Begin ("class=\"CM\"");
|
|
||||||
HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE,NULL,
|
|
||||||
"name=\"RooCod\""
|
|
||||||
" class=\"INPUT_%s\" style=\"width:100px;\"",
|
|
||||||
The_GetSuffix ());
|
|
||||||
|
|
||||||
/* Option for no assigned room */
|
|
||||||
HTM_OPTION (HTM_Type_STRING,"-1",
|
|
||||||
Gbl.Crs.Grps.RooCod < 0, // Selected?
|
|
||||||
HTM_OPTION_ENABLED,
|
|
||||||
"%s",Txt_No_assigned_room);
|
|
||||||
|
|
||||||
/* Option for another room */
|
|
||||||
HTM_OPTION (HTM_Type_STRING,"0",
|
|
||||||
Gbl.Crs.Grps.RooCod == 0, // Selected?
|
|
||||||
HTM_OPTION_ENABLED,
|
|
||||||
"%s",Txt_Another_room);
|
|
||||||
|
|
||||||
/* Options for rooms */
|
|
||||||
for (NumRoo = 0;
|
|
||||||
NumRoo < Rooms->Num;
|
|
||||||
NumRoo++)
|
|
||||||
{
|
|
||||||
RooInLst = &Rooms->Lst[NumRoo];
|
|
||||||
HTM_OPTION (HTM_Type_LONG,&RooInLst->RooCod,
|
|
||||||
RooInLst->RooCod == Gbl.Crs.Grps.RooCod, // Selected?
|
|
||||||
HTM_OPTION_ENABLED,
|
|
||||||
"%s",RooInLst->ShrtName);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* End selector */
|
|
||||||
HTM_SELECT_End ();
|
|
||||||
HTM_TD_End ();
|
|
||||||
|
|
||||||
/***** Current number of users in this group *****/
|
|
||||||
for (Role = Rol_TCH;
|
|
||||||
Role >= Rol_STD;
|
|
||||||
Role--)
|
|
||||||
{
|
{
|
||||||
HTM_TD_Begin ("class=\"CM DAT_%s\"",
|
GrpTypInLst = &Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp];
|
||||||
The_GetSuffix ());
|
HTM_OPTION (HTM_Type_LONG,&GrpTypInLst->GrpTypCod,
|
||||||
HTM_Unsigned (0);
|
GrpTypInLst->GrpTypCod == Gbl.Crs.Grps.GrpTyp.GrpTypCod, // Selected?
|
||||||
HTM_TD_End ();
|
HTM_OPTION_ENABLED,
|
||||||
|
"%s",GrpTypInLst->GrpTypName);
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** Maximum number of students *****/
|
/* End selector */
|
||||||
HTM_TD_Begin ("class=\"CM\"");
|
HTM_SELECT_End ();
|
||||||
Grp_WriteMaxStds (StrMaxStudents,Gbl.Crs.Grps.MaxStudents);
|
HTM_TD_End ();
|
||||||
HTM_INPUT_TEXT ("MaxStudents",Cns_MAX_DECIMAL_DIGITS_UINT,StrMaxStudents,
|
|
||||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
|
||||||
"size=\"3\" class=\"INPUT_%s\"",
|
|
||||||
The_GetSuffix ());
|
|
||||||
HTM_TD_End ();
|
|
||||||
|
|
||||||
HTM_TR_End ();
|
/***** Group name *****/
|
||||||
|
HTM_TD_Begin ("class=\"CM\"");
|
||||||
|
HTM_INPUT_TEXT ("GrpName",Grp_MAX_CHARS_GROUP_NAME,Gbl.Crs.Grps.GrpName,
|
||||||
|
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||||
|
"size=\"20\" class=\"INPUT_%s\""
|
||||||
|
" required=\"required\"",
|
||||||
|
The_GetSuffix ());
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** End table and send button *****/
|
/***** Room *****/
|
||||||
HTM_TABLE_End ();
|
/* Begin selector */
|
||||||
Btn_PutButton (Btn_CREATE_BUTTON,Txt_Create);
|
HTM_TD_Begin ("class=\"CM\"");
|
||||||
|
HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE,NULL,
|
||||||
|
"name=\"RooCod\""
|
||||||
|
" class=\"INPUT_%s\" style=\"width:100px;\"",
|
||||||
|
The_GetSuffix ());
|
||||||
|
|
||||||
/***** End form *****/
|
/* Option for no assigned room */
|
||||||
Frm_EndForm ();
|
HTM_OPTION (HTM_Type_STRING,"-1",
|
||||||
|
Gbl.Crs.Grps.RooCod < 0, // Selected?
|
||||||
|
HTM_OPTION_ENABLED,
|
||||||
|
"%s",Txt_No_assigned_room);
|
||||||
|
|
||||||
/***** End fieldset *****/
|
/* Option for another room */
|
||||||
HTM_FIELDSET_End ();
|
HTM_OPTION (HTM_Type_STRING,"0",
|
||||||
|
Gbl.Crs.Grps.RooCod == 0, // Selected?
|
||||||
|
HTM_OPTION_ENABLED,
|
||||||
|
"%s",Txt_Another_room);
|
||||||
|
|
||||||
|
/* Options for rooms */
|
||||||
|
for (NumRoo = 0;
|
||||||
|
NumRoo < Rooms->Num;
|
||||||
|
NumRoo++)
|
||||||
|
{
|
||||||
|
RooInLst = &Rooms->Lst[NumRoo];
|
||||||
|
HTM_OPTION (HTM_Type_LONG,&RooInLst->RooCod,
|
||||||
|
RooInLst->RooCod == Gbl.Crs.Grps.RooCod, // Selected?
|
||||||
|
HTM_OPTION_ENABLED,
|
||||||
|
"%s",RooInLst->ShrtName);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* End selector */
|
||||||
|
HTM_SELECT_End ();
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
|
/***** Current number of users in this group *****/
|
||||||
|
for (Role = Rol_TCH;
|
||||||
|
Role >= Rol_STD;
|
||||||
|
Role--)
|
||||||
|
{
|
||||||
|
HTM_TD_Begin ("class=\"CM DAT_%s\"",
|
||||||
|
The_GetSuffix ());
|
||||||
|
HTM_Unsigned (0);
|
||||||
|
HTM_TD_End ();
|
||||||
|
}
|
||||||
|
|
||||||
|
/***** Maximum number of students *****/
|
||||||
|
HTM_TD_Begin ("class=\"CM\"");
|
||||||
|
Grp_WriteMaxStds (StrMaxStudents,Gbl.Crs.Grps.MaxStudents);
|
||||||
|
HTM_INPUT_TEXT ("MaxStudents",Cns_MAX_DECIMAL_DIGITS_UINT,StrMaxStudents,
|
||||||
|
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||||
|
"size=\"3\" class=\"INPUT_%s\"",
|
||||||
|
The_GetSuffix ());
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
|
HTM_TR_End ();
|
||||||
|
|
||||||
|
/***** End form to create *****/
|
||||||
|
Frm_EndFormTable (Btn_CREATE_BUTTON);
|
||||||
|
|
||||||
/***** End section *****/
|
/***** End section *****/
|
||||||
HTM_SECTION_End ();
|
HTM_SECTION_End ();
|
||||||
|
|
|
@ -1032,29 +1032,6 @@ const char *Hlp_COURSE_Program =
|
||||||
"COURSE.Program.en";
|
"COURSE.Program.en";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const char *Hlp_COURSE_Program_edit_item =
|
|
||||||
#if L==1
|
|
||||||
"COURSE.Program.es#editar-item";
|
|
||||||
#elif L==2
|
|
||||||
"COURSE.Program.en#edit-item";
|
|
||||||
#elif L==3
|
|
||||||
"COURSE.Program.en#edit-item";
|
|
||||||
#elif L==4
|
|
||||||
"COURSE.Program.es#editar-item";
|
|
||||||
#elif L==5
|
|
||||||
"COURSE.Program.en#edit-item";
|
|
||||||
#elif L==6
|
|
||||||
"COURSE.Program.es#editar-item";
|
|
||||||
#elif L==7
|
|
||||||
"COURSE.Program.en#edit-item";
|
|
||||||
#elif L==8
|
|
||||||
"COURSE.Program.en#edit-item";
|
|
||||||
#elif L==9
|
|
||||||
"COURSE.Program.en#edit-item";
|
|
||||||
#elif L==10 // tr
|
|
||||||
"COURSE.Program.en#edit-item";
|
|
||||||
#endif
|
|
||||||
|
|
||||||
const char *Hlp_COURSE_Program_resource_clipboard =
|
const char *Hlp_COURSE_Program_resource_clipboard =
|
||||||
#if L==1
|
#if L==1
|
||||||
"COURSE.Program.en#resource-clipboard";
|
"COURSE.Program.en#resource-clipboard";
|
||||||
|
|
176
swad_holiday.c
176
swad_holiday.c
|
@ -884,122 +884,106 @@ void Hld_ContEditAfterChgHld (void)
|
||||||
|
|
||||||
static void Hld_PutFormToCreateHoliday (const struct Plc_Places *Places)
|
static void Hld_PutFormToCreateHoliday (const struct Plc_Places *Places)
|
||||||
{
|
{
|
||||||
extern const char *Txt_Actions[ActLst_NUM_ACTIONS];
|
|
||||||
extern const char *Txt_All_places;
|
extern const char *Txt_All_places;
|
||||||
extern const char *Txt_HOLIDAY_TYPES[Hld_NUM_TYPES_HOLIDAY];
|
extern const char *Txt_HOLIDAY_TYPES[Hld_NUM_TYPES_HOLIDAY];
|
||||||
extern const char *Txt_Create;
|
|
||||||
unsigned NumPlc;
|
unsigned NumPlc;
|
||||||
const struct Plc_Place *PlcInLst;
|
const struct Plc_Place *PlcInLst;
|
||||||
Hld_HolidayType_t HolidayType;
|
Hld_HolidayType_t HolidayType;
|
||||||
unsigned HolidayTypeUnsigned;
|
unsigned HolidayTypeUnsigned;
|
||||||
unsigned CurrentYear = Dat_GetCurrentYear ();
|
unsigned CurrentYear = Dat_GetCurrentYear ();
|
||||||
|
|
||||||
/***** Begin fieldset *****/
|
/***** Begin form to create *****/
|
||||||
HTM_FIELDSET_Begin (NULL);
|
Frm_BeginFormTable (ActNewHld,NULL,NULL,NULL);
|
||||||
HTM_LEGEND (Txt_Actions[ActNewHld]);
|
|
||||||
|
|
||||||
/***** Begin form *****/
|
/***** Write heading *****/
|
||||||
Frm_BeginForm (ActNewHld);
|
Hld_PutHeadHolidays ();
|
||||||
|
|
||||||
/***** Begin table *****/
|
HTM_TR_Begin (NULL);
|
||||||
HTM_TABLE_BeginWidePadding (2);
|
|
||||||
|
|
||||||
/***** Write heading *****/
|
/***** Column to remove holiday, disabled here *****/
|
||||||
Hld_PutHeadHolidays ();
|
HTM_TD_Begin ("class=\"BM\"");
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
HTM_TR_Begin (NULL);
|
/***** Holiday code *****/
|
||||||
|
HTM_TD_Begin ("class=\"CODE\"");
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Column to remove holiday, disabled here *****/
|
/***** Holiday place *****/
|
||||||
HTM_TD_Begin ("class=\"BM\"");
|
HTM_TD_Begin ("class=\"CM\"");
|
||||||
HTM_TD_End ();
|
HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE,NULL,
|
||||||
|
"name=\"PlcCod\" class=\"PLC_SEL INPUT_%s\"",
|
||||||
|
The_GetSuffix ());
|
||||||
|
HTM_OPTION (HTM_Type_STRING,"-1",
|
||||||
|
Hld_EditingHld->PlcCod <= 0, // Selected?
|
||||||
|
HTM_OPTION_ENABLED,
|
||||||
|
"%s",Txt_All_places);
|
||||||
|
for (NumPlc = 0;
|
||||||
|
NumPlc < Places->Num;
|
||||||
|
NumPlc++)
|
||||||
|
{
|
||||||
|
PlcInLst = &Places->Lst[NumPlc];
|
||||||
|
HTM_OPTION (HTM_Type_LONG,&PlcInLst->PlcCod,
|
||||||
|
PlcInLst->PlcCod == Hld_EditingHld->PlcCod, // Selected?
|
||||||
|
HTM_OPTION_ENABLED,
|
||||||
|
"%s",PlcInLst->ShrtName);
|
||||||
|
}
|
||||||
|
HTM_SELECT_End ();
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Holiday code *****/
|
/***** Holiday type *****/
|
||||||
HTM_TD_Begin ("class=\"CODE\"");
|
HTM_TD_Begin ("class=\"CM\"");
|
||||||
HTM_TD_End ();
|
HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE,NULL,
|
||||||
|
"name=\"HldTyp\" class=\"INPUT_%s\""
|
||||||
|
" style=\"width:62px;\"", // TODO: Use a CSS class
|
||||||
|
The_GetSuffix ());
|
||||||
|
for (HolidayType = (Hld_HolidayType_t) 0;
|
||||||
|
HolidayType <= (Hld_HolidayType_t) (Hld_NUM_TYPES_HOLIDAY - 1);
|
||||||
|
HolidayType++)
|
||||||
|
{
|
||||||
|
HolidayTypeUnsigned = (unsigned) HolidayType;
|
||||||
|
HTM_OPTION (HTM_Type_UNSIGNED,&HolidayTypeUnsigned,
|
||||||
|
HolidayType == Hld_EditingHld->HldTyp, // Selected?
|
||||||
|
HTM_OPTION_ENABLED,
|
||||||
|
"%s",Txt_HOLIDAY_TYPES[HolidayType]);
|
||||||
|
}
|
||||||
|
HTM_SELECT_End ();
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Holiday place *****/
|
/***** Holiday date / Non school period start date *****/
|
||||||
HTM_TD_Begin ("class=\"CM\"");
|
HTM_TD_Begin ("class=\"CM\"");
|
||||||
HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE,NULL,
|
Dat_WriteFormDate (CurrentYear - 1,
|
||||||
"name=\"PlcCod\" class=\"PLC_SEL INPUT_%s\"",
|
CurrentYear + 1,
|
||||||
The_GetSuffix ());
|
"Start",
|
||||||
HTM_OPTION (HTM_Type_STRING,"-1",
|
&Hld_EditingHld->StartDate,
|
||||||
Hld_EditingHld->PlcCod <= 0, // Selected?
|
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||||
HTM_OPTION_ENABLED,
|
false);
|
||||||
"%s",Txt_All_places);
|
HTM_TD_End ();
|
||||||
for (NumPlc = 0;
|
|
||||||
NumPlc < Places->Num;
|
|
||||||
NumPlc++)
|
|
||||||
{
|
|
||||||
PlcInLst = &Places->Lst[NumPlc];
|
|
||||||
HTM_OPTION (HTM_Type_LONG,&PlcInLst->PlcCod,
|
|
||||||
PlcInLst->PlcCod == Hld_EditingHld->PlcCod, // Selected?
|
|
||||||
HTM_OPTION_ENABLED,
|
|
||||||
"%s",PlcInLst->ShrtName);
|
|
||||||
}
|
|
||||||
HTM_SELECT_End ();
|
|
||||||
HTM_TD_End ();
|
|
||||||
|
|
||||||
/***** Holiday type *****/
|
/***** Non school period end date *****/
|
||||||
HTM_TD_Begin ("class=\"CM\"");
|
HTM_TD_Begin ("class=\"CM\"");
|
||||||
HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE,NULL,
|
Dat_WriteFormDate (CurrentYear - 1,
|
||||||
"name=\"HldTyp\" class=\"INPUT_%s\""
|
CurrentYear + 1,
|
||||||
" style=\"width:62px;\"", // TODO: Use a CSS class
|
"End",
|
||||||
The_GetSuffix ());
|
&Hld_EditingHld->EndDate,
|
||||||
for (HolidayType = (Hld_HolidayType_t) 0;
|
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||||
HolidayType <= (Hld_HolidayType_t) (Hld_NUM_TYPES_HOLIDAY - 1);
|
false);
|
||||||
HolidayType++)
|
HTM_TD_End ();
|
||||||
{
|
|
||||||
HolidayTypeUnsigned = (unsigned) HolidayType;
|
|
||||||
HTM_OPTION (HTM_Type_UNSIGNED,&HolidayTypeUnsigned,
|
|
||||||
HolidayType == Hld_EditingHld->HldTyp, // Selected?
|
|
||||||
HTM_OPTION_ENABLED,
|
|
||||||
"%s",Txt_HOLIDAY_TYPES[HolidayType]);
|
|
||||||
}
|
|
||||||
HTM_SELECT_End ();
|
|
||||||
HTM_TD_End ();
|
|
||||||
|
|
||||||
/***** Holiday date / Non school period start date *****/
|
/***** Holiday name *****/
|
||||||
HTM_TD_Begin ("class=\"CM\"");
|
HTM_TD_Begin ("class=\"CM\"");
|
||||||
Dat_WriteFormDate (CurrentYear - 1,
|
HTM_INPUT_TEXT ("Name",Hld_MAX_CHARS_HOLIDAY_NAME,Hld_EditingHld->Name,
|
||||||
CurrentYear + 1,
|
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||||
"Start",
|
"size=\"20\" class=\"INPUT_%s\""
|
||||||
&Hld_EditingHld->StartDate,
|
" required=\"required\"",
|
||||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
The_GetSuffix ());
|
||||||
false);
|
HTM_TD_End ();
|
||||||
HTM_TD_End ();
|
|
||||||
|
|
||||||
/***** Non school period end date *****/
|
HTM_TD_Empty (1);
|
||||||
HTM_TD_Begin ("class=\"CM\"");
|
|
||||||
Dat_WriteFormDate (CurrentYear - 1,
|
|
||||||
CurrentYear + 1,
|
|
||||||
"End",
|
|
||||||
&Hld_EditingHld->EndDate,
|
|
||||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
|
||||||
false);
|
|
||||||
HTM_TD_End ();
|
|
||||||
|
|
||||||
/***** Holiday name *****/
|
HTM_TR_End ();
|
||||||
HTM_TD_Begin ("class=\"CM\"");
|
|
||||||
HTM_INPUT_TEXT ("Name",Hld_MAX_CHARS_HOLIDAY_NAME,Hld_EditingHld->Name,
|
|
||||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
|
||||||
"size=\"20\" class=\"INPUT_%s\""
|
|
||||||
" required=\"required\"",
|
|
||||||
The_GetSuffix ());
|
|
||||||
HTM_TD_End ();
|
|
||||||
|
|
||||||
HTM_TD_Empty (1);
|
/***** End form to create *****/
|
||||||
|
Frm_EndFormTable (Btn_CREATE_BUTTON);
|
||||||
HTM_TR_End ();
|
|
||||||
|
|
||||||
/***** End table and send button *****/
|
|
||||||
HTM_TABLE_End ();
|
|
||||||
Btn_PutButton (Btn_CREATE_BUTTON,Txt_Create);
|
|
||||||
|
|
||||||
/***** End form *****/
|
|
||||||
Frm_EndForm ();
|
|
||||||
|
|
||||||
/***** End fieldset *****/
|
|
||||||
HTM_FIELDSET_End ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
|
@ -1365,8 +1365,6 @@ static void Ins_ShowAlertAndButtonToGoToIns (void)
|
||||||
|
|
||||||
static void Ins_PutFormToCreateInstitution (void)
|
static void Ins_PutFormToCreateInstitution (void)
|
||||||
{
|
{
|
||||||
extern const char *Txt_Actions[ActLst_NUM_ACTIONS];
|
|
||||||
extern const char *Txt_Create;
|
|
||||||
Act_Action_t NextAction = ActUnk;
|
Act_Action_t NextAction = ActUnk;
|
||||||
|
|
||||||
/***** Set action depending on role *****/
|
/***** Set action depending on role *****/
|
||||||
|
@ -1377,96 +1375,82 @@ static void Ins_PutFormToCreateInstitution (void)
|
||||||
else
|
else
|
||||||
Err_NoPermissionExit ();
|
Err_NoPermissionExit ();
|
||||||
|
|
||||||
/***** Begin fieldset *****/
|
/***** Begin form to create *****/
|
||||||
HTM_FIELDSET_Begin (NULL);
|
Frm_BeginFormTable (NextAction,NULL,NULL,NULL);
|
||||||
HTM_LEGEND (Txt_Actions[NextAction]);
|
|
||||||
|
|
||||||
/***** Begin form *****/
|
/***** Write heading *****/
|
||||||
Frm_BeginForm (NextAction);
|
Ins_PutHeadInstitutionsForEdition ();
|
||||||
|
|
||||||
/***** Begin table *****/
|
HTM_TR_Begin (NULL);
|
||||||
HTM_TABLE_BeginWidePadding (2);
|
|
||||||
|
|
||||||
/***** Write heading *****/
|
/***** Column to remove institution, disabled here *****/
|
||||||
Ins_PutHeadInstitutionsForEdition ();
|
HTM_TD_Begin ("class=\"BM\"");
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
HTM_TR_Begin (NULL);
|
/***** Institution code *****/
|
||||||
|
HTM_TD_Begin ("class=\"CODE\"");
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Column to remove institution, disabled here *****/
|
/***** Institution logo *****/
|
||||||
HTM_TD_Begin ("class=\"BM\"");
|
HTM_TD_Begin ("title=\"%s\" class=\"HIE_LOGO\"",Ins_EditingIns->FullName);
|
||||||
HTM_TD_End ();
|
Lgo_DrawLogo (HieLvl_INS,-1L,"",20,NULL,true);
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Institution code *****/
|
/***** Institution short name *****/
|
||||||
HTM_TD_Begin ("class=\"CODE\"");
|
HTM_TD_Begin ("class=\"LM\"");
|
||||||
HTM_TD_End ();
|
HTM_INPUT_TEXT ("ShortName",Cns_HIERARCHY_MAX_CHARS_SHRT_NAME,Ins_EditingIns->ShrtName,
|
||||||
|
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||||
|
"class=\"INPUT_SHORT_NAME INPUT_%s\""
|
||||||
|
" required=\"required\"",
|
||||||
|
The_GetSuffix ());
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Institution logo *****/
|
/***** Institution full name *****/
|
||||||
HTM_TD_Begin ("title=\"%s\" class=\"HIE_LOGO\"",Ins_EditingIns->FullName);
|
HTM_TD_Begin ("class=\"LM\"");
|
||||||
Lgo_DrawLogo (HieLvl_INS,-1L,"",20,NULL,true);
|
HTM_INPUT_TEXT ("FullName",Cns_HIERARCHY_MAX_CHARS_FULL_NAME,Ins_EditingIns->FullName,
|
||||||
HTM_TD_End ();
|
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||||
|
"class=\"INPUT_FULL_NAME INPUT_%s\""
|
||||||
|
" required=\"required\"",
|
||||||
|
The_GetSuffix ());
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Institution short name *****/
|
/***** Institution WWW *****/
|
||||||
HTM_TD_Begin ("class=\"LM\"");
|
HTM_TD_Begin ("class=\"LM\"");
|
||||||
HTM_INPUT_TEXT ("ShortName",Cns_HIERARCHY_MAX_CHARS_SHRT_NAME,Ins_EditingIns->ShrtName,
|
HTM_INPUT_URL ("WWW",Ins_EditingIns->WWW,HTM_DONT_SUBMIT_ON_CHANGE,
|
||||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
"class=\"INPUT_WWW_NARROW INPUT_%s\""
|
||||||
"class=\"INPUT_SHORT_NAME INPUT_%s\""
|
" required=\"required\"",
|
||||||
" required=\"required\"",
|
The_GetSuffix ());
|
||||||
The_GetSuffix ());
|
HTM_TD_End ();
|
||||||
HTM_TD_End ();
|
|
||||||
|
|
||||||
/***** Institution full name *****/
|
/***** Number of users who claim to belong to this institution ****/
|
||||||
HTM_TD_Begin ("class=\"LM\"");
|
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||||
HTM_INPUT_TEXT ("FullName",Cns_HIERARCHY_MAX_CHARS_FULL_NAME,Ins_EditingIns->FullName,
|
HTM_Unsigned (0);
|
||||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
HTM_TD_End ();
|
||||||
"class=\"INPUT_FULL_NAME INPUT_%s\""
|
|
||||||
" required=\"required\"",
|
|
||||||
The_GetSuffix ());
|
|
||||||
HTM_TD_End ();
|
|
||||||
|
|
||||||
/***** Institution WWW *****/
|
/***** Number of centers *****/
|
||||||
HTM_TD_Begin ("class=\"LM\"");
|
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||||
HTM_INPUT_URL ("WWW",Ins_EditingIns->WWW,HTM_DONT_SUBMIT_ON_CHANGE,
|
HTM_Unsigned (0);
|
||||||
"class=\"INPUT_WWW_NARROW INPUT_%s\""
|
HTM_TD_End ();
|
||||||
" required=\"required\"",
|
|
||||||
The_GetSuffix ());
|
|
||||||
HTM_TD_End ();
|
|
||||||
|
|
||||||
/***** Number of users who claim to belong to this institution ****/
|
/***** Number of users in courses of this institution ****/
|
||||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||||
HTM_Unsigned (0);
|
HTM_Unsigned (0);
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Number of centers *****/
|
/***** Institution requester *****/
|
||||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
HTM_TD_Begin ("class=\"LT DAT_%s INPUT_REQUESTER\"",
|
||||||
HTM_Unsigned (0);
|
The_GetSuffix ());
|
||||||
HTM_TD_End ();
|
Msg_WriteMsgAuthor (&Gbl.Usrs.Me.UsrDat,true);
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Number of users in courses of this institution ****/
|
/***** Institution status *****/
|
||||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
HTM_TD_Begin ("class=\"LM DAT_%s\"",The_GetSuffix ());
|
||||||
HTM_Unsigned (0);
|
HTM_TD_End ();
|
||||||
HTM_TD_End ();
|
|
||||||
|
|
||||||
/***** Institution requester *****/
|
HTM_TR_End ();
|
||||||
HTM_TD_Begin ("class=\"LT DAT_%s INPUT_REQUESTER\"",
|
|
||||||
The_GetSuffix ());
|
|
||||||
Msg_WriteMsgAuthor (&Gbl.Usrs.Me.UsrDat,true);
|
|
||||||
HTM_TD_End ();
|
|
||||||
|
|
||||||
/***** Institution status *****/
|
/***** End form to create *****/
|
||||||
HTM_TD_Begin ("class=\"LM DAT_%s\"",The_GetSuffix ());
|
Frm_EndFormTable (Btn_CREATE_BUTTON);
|
||||||
HTM_TD_End ();
|
|
||||||
|
|
||||||
HTM_TR_End ();
|
|
||||||
|
|
||||||
/***** End table and send button *****/
|
|
||||||
HTM_TABLE_End ();
|
|
||||||
Btn_PutButton (Btn_CREATE_BUTTON,Txt_Create);
|
|
||||||
|
|
||||||
/***** End form *****/
|
|
||||||
Frm_EndForm ();
|
|
||||||
|
|
||||||
/***** End fieldset *****/
|
|
||||||
HTM_FIELDSET_End ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
91
swad_link.c
91
swad_link.c
|
@ -667,69 +667,52 @@ void Lnk_ContEditAfterChgLnk (void)
|
||||||
|
|
||||||
static void Lnk_PutFormToCreateLink (void)
|
static void Lnk_PutFormToCreateLink (void)
|
||||||
{
|
{
|
||||||
extern const char *Txt_Actions[ActLst_NUM_ACTIONS];
|
/***** Begin form to create *****/
|
||||||
extern const char *Txt_Create;
|
Frm_BeginFormTable (ActNewLnk,NULL,NULL,NULL);
|
||||||
|
|
||||||
/***** Begin fieldset *****/
|
/***** Write heading *****/
|
||||||
HTM_FIELDSET_Begin (NULL);
|
Lnk_PutHeadLinks ();
|
||||||
HTM_LEGEND (Txt_Actions[ActNewLnk]);
|
|
||||||
|
|
||||||
/***** Begin form *****/
|
HTM_TR_Begin (NULL);
|
||||||
Frm_BeginForm (ActNewLnk);
|
|
||||||
|
|
||||||
/***** Begin table *****/
|
/***** Column to remove link, disabled here *****/
|
||||||
HTM_TABLE_BeginWidePadding (2);
|
HTM_TD_Begin ("class=\"BM\"");
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Write heading *****/
|
/***** Link code *****/
|
||||||
Lnk_PutHeadLinks ();
|
HTM_TD_Begin ("class=\"CODE\"");
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
HTM_TR_Begin (NULL);
|
/***** Link short name *****/
|
||||||
|
HTM_TD_Begin ("class=\"CM\"");
|
||||||
|
HTM_INPUT_TEXT ("ShortName",Lnk_MAX_CHARS_LINK_SHRT_NAME,Lnk_EditingLnk->ShrtName,
|
||||||
|
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||||
|
"class=\"INPUT_SHORT_NAME INPUT_%s\""
|
||||||
|
" required=\"required\"",
|
||||||
|
The_GetSuffix ());
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Column to remove link, disabled here *****/
|
/***** Link full name *****/
|
||||||
HTM_TD_Begin ("class=\"BM\"");
|
HTM_TD_Begin ("class=\"CM\"");
|
||||||
HTM_TD_End ();
|
HTM_INPUT_TEXT ("FullName",Lnk_MAX_CHARS_LINK_FULL_NAME,Lnk_EditingLnk->FullName,
|
||||||
|
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||||
|
"class=\"INPUT_FULL_NAME INPUT_%s\""
|
||||||
|
" required=\"required\"",
|
||||||
|
The_GetSuffix ());
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Link code *****/
|
/***** Link WWW *****/
|
||||||
HTM_TD_Begin ("class=\"CODE\"");
|
HTM_TD_Begin ("class=\"CM\"");
|
||||||
HTM_TD_End ();
|
HTM_INPUT_URL ("WWW",Lnk_EditingLnk->WWW,HTM_DONT_SUBMIT_ON_CHANGE,
|
||||||
|
"class=\"INPUT_WWW_NARROW INPUT_%s\""
|
||||||
|
" required=\"required\"",
|
||||||
|
The_GetSuffix ());
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Link short name *****/
|
HTM_TR_End ();
|
||||||
HTM_TD_Begin ("class=\"CM\"");
|
|
||||||
HTM_INPUT_TEXT ("ShortName",Lnk_MAX_CHARS_LINK_SHRT_NAME,Lnk_EditingLnk->ShrtName,
|
|
||||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
|
||||||
"class=\"INPUT_SHORT_NAME INPUT_%s\""
|
|
||||||
" required=\"required\"",
|
|
||||||
The_GetSuffix ());
|
|
||||||
HTM_TD_End ();
|
|
||||||
|
|
||||||
/***** Link full name *****/
|
/***** End form to create *****/
|
||||||
HTM_TD_Begin ("class=\"CM\"");
|
Frm_EndFormTable (Btn_CREATE_BUTTON);
|
||||||
HTM_INPUT_TEXT ("FullName",Lnk_MAX_CHARS_LINK_FULL_NAME,Lnk_EditingLnk->FullName,
|
|
||||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
|
||||||
"class=\"INPUT_FULL_NAME INPUT_%s\""
|
|
||||||
" required=\"required\"",
|
|
||||||
The_GetSuffix ());
|
|
||||||
HTM_TD_End ();
|
|
||||||
|
|
||||||
/***** Link WWW *****/
|
|
||||||
HTM_TD_Begin ("class=\"CM\"");
|
|
||||||
HTM_INPUT_URL ("WWW",Lnk_EditingLnk->WWW,HTM_DONT_SUBMIT_ON_CHANGE,
|
|
||||||
"class=\"INPUT_WWW_NARROW INPUT_%s\""
|
|
||||||
" required=\"required\"",
|
|
||||||
The_GetSuffix ());
|
|
||||||
HTM_TD_End ();
|
|
||||||
|
|
||||||
HTM_TR_End ();
|
|
||||||
|
|
||||||
/***** End table and send button *****/
|
|
||||||
HTM_TABLE_End ();
|
|
||||||
Btn_PutButton (Btn_CREATE_BUTTON,Txt_Create);
|
|
||||||
|
|
||||||
/***** End form *****/
|
|
||||||
Frm_EndForm ();
|
|
||||||
|
|
||||||
/***** End fieldset *****/
|
|
||||||
HTM_FIELDSET_End ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
87
swad_mail.c
87
swad_mail.c
|
@ -679,67 +679,50 @@ void Mai_ContEditAfterChgMai (void)
|
||||||
|
|
||||||
static void Mai_PutFormToCreateMailDomain (void)
|
static void Mai_PutFormToCreateMailDomain (void)
|
||||||
{
|
{
|
||||||
extern const char *Txt_Actions[ActLst_NUM_ACTIONS];
|
/***** Begin form to create *****/
|
||||||
extern const char *Txt_Create;
|
Frm_BeginFormTable (ActNewMai,NULL,NULL,NULL);
|
||||||
|
|
||||||
/***** Begin fieldset *****/
|
/***** Write heading *****/
|
||||||
HTM_FIELDSET_Begin (NULL);
|
Mai_PutHeadMailDomains ();
|
||||||
HTM_LEGEND (Txt_Actions[ActNewMai]);
|
|
||||||
|
|
||||||
/***** Begin form *****/
|
/***** Second row *****/
|
||||||
Frm_BeginForm (ActNewMai);
|
HTM_TR_Begin (NULL);
|
||||||
|
|
||||||
/***** Begin table *****/
|
/* Column to remove mail domain, disabled here */
|
||||||
HTM_TABLE_BeginWidePadding (2);
|
HTM_TD_Begin ("class=\"BM\"");
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Write heading *****/
|
/* Mail domain code */
|
||||||
Mai_PutHeadMailDomains ();
|
HTM_TD_Begin ("class=\"CODE\"");
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Second row *****/
|
/* Mail domain */
|
||||||
HTM_TR_Begin (NULL);
|
HTM_TD_Begin ("class=\"CM\"");
|
||||||
|
HTM_INPUT_TEXT ("Domain",Cns_MAX_CHARS_EMAIL_ADDRESS,Mai_EditingMai->Domain,
|
||||||
|
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||||
|
"size=\"15\" class=\"INPUT_%s\""
|
||||||
|
" required=\"required\"",
|
||||||
|
The_GetSuffix ());
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
/* Column to remove mail domain, disabled here */
|
/* Mail domain info */
|
||||||
HTM_TD_Begin ("class=\"BM\"");
|
HTM_TD_Begin ("class=\"CM\"");
|
||||||
HTM_TD_End ();
|
HTM_INPUT_TEXT ("Info",Mai_MAX_CHARS_MAIL_INFO,Mai_EditingMai->Info,
|
||||||
|
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||||
|
"size=\"40\" class=\"INPUT_%s\""
|
||||||
|
" required=\"required\"",
|
||||||
|
The_GetSuffix ());
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
/* Mail domain code */
|
/* Number of users */
|
||||||
HTM_TD_Begin ("class=\"CODE\"");
|
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||||
HTM_TD_End ();
|
HTM_Unsigned (0);
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
/* Mail domain */
|
HTM_TR_End ();
|
||||||
HTM_TD_Begin ("class=\"CM\"");
|
|
||||||
HTM_INPUT_TEXT ("Domain",Cns_MAX_CHARS_EMAIL_ADDRESS,Mai_EditingMai->Domain,
|
|
||||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
|
||||||
"size=\"15\" class=\"INPUT_%s\""
|
|
||||||
" required=\"required\"",
|
|
||||||
The_GetSuffix ());
|
|
||||||
HTM_TD_End ();
|
|
||||||
|
|
||||||
/* Mail domain info */
|
/***** End form to create *****/
|
||||||
HTM_TD_Begin ("class=\"CM\"");
|
Frm_EndFormTable (Btn_CREATE_BUTTON);
|
||||||
HTM_INPUT_TEXT ("Info",Mai_MAX_CHARS_MAIL_INFO,Mai_EditingMai->Info,
|
|
||||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
|
||||||
"size=\"40\" class=\"INPUT_%s\""
|
|
||||||
" required=\"required\"",
|
|
||||||
The_GetSuffix ());
|
|
||||||
HTM_TD_End ();
|
|
||||||
|
|
||||||
/* Number of users */
|
|
||||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
|
||||||
HTM_Unsigned (0);
|
|
||||||
HTM_TD_End ();
|
|
||||||
|
|
||||||
HTM_TR_End ();
|
|
||||||
|
|
||||||
/***** End table and send button *****/
|
|
||||||
HTM_TABLE_End ();
|
|
||||||
Btn_PutButton (Btn_CREATE_BUTTON,Txt_Create);
|
|
||||||
|
|
||||||
/***** End form *****/
|
|
||||||
Frm_EndForm ();
|
|
||||||
|
|
||||||
/***** End fieldset *****/
|
|
||||||
HTM_FIELDSET_End ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
85
swad_place.c
85
swad_place.c
|
@ -676,66 +676,49 @@ void Plc_ContEditAfterChgPlc (void)
|
||||||
|
|
||||||
static void Plc_PutFormToCreatePlace (void)
|
static void Plc_PutFormToCreatePlace (void)
|
||||||
{
|
{
|
||||||
extern const char *Txt_Actions[ActLst_NUM_ACTIONS];
|
/***** Begin form to create *****/
|
||||||
extern const char *Txt_Create;
|
Frm_BeginFormTable (ActNewPlc,NULL,NULL,NULL);
|
||||||
|
|
||||||
/***** Begin fieldset *****/
|
/***** Write heading *****/
|
||||||
HTM_FIELDSET_Begin (NULL);
|
Plc_PutHeadPlaces ();
|
||||||
HTM_LEGEND (Txt_Actions[ActNewPlc]);
|
|
||||||
|
|
||||||
/***** Begin form *****/
|
HTM_TR_Begin (NULL);
|
||||||
Frm_BeginForm (ActNewPlc);
|
|
||||||
|
|
||||||
/***** Begin table *****/
|
/***** Column to remove place, disabled here *****/
|
||||||
HTM_TABLE_BeginWidePadding (2);
|
HTM_TD_Begin ("class=\"BM\"");
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Write heading *****/
|
/***** Place code *****/
|
||||||
Plc_PutHeadPlaces ();
|
HTM_TD_Begin ("class=\"CODE\"");
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
HTM_TR_Begin (NULL);
|
/***** Place short name *****/
|
||||||
|
HTM_TD_Begin ("class=\"CM\"");
|
||||||
|
HTM_INPUT_TEXT ("ShortName",Plc_MAX_CHARS_PLACE_SHRT_NAME,Plc_EditingPlc->ShrtName,
|
||||||
|
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||||
|
"class=\"INPUT_SHORT_NAME INPUT_%s\""
|
||||||
|
" required=\"required\"",
|
||||||
|
The_GetSuffix ());
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Column to remove place, disabled here *****/
|
/***** Place full name *****/
|
||||||
HTM_TD_Begin ("class=\"BM\"");
|
HTM_TD_Begin ("class=\"CM\"");
|
||||||
HTM_TD_End ();
|
HTM_INPUT_TEXT ("FullName",Plc_MAX_CHARS_PLACE_FULL_NAME,Plc_EditingPlc->FullName,
|
||||||
|
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||||
|
"class=\"INPUT_FULL_NAME INPUT_%s\""
|
||||||
|
" required=\"required\"",
|
||||||
|
The_GetSuffix ());
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Place code *****/
|
/***** Number of centers *****/
|
||||||
HTM_TD_Begin ("class=\"CODE\"");
|
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||||
HTM_TD_End ();
|
HTM_Unsigned (0);
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Place short name *****/
|
HTM_TR_End ();
|
||||||
HTM_TD_Begin ("class=\"CM\"");
|
|
||||||
HTM_INPUT_TEXT ("ShortName",Plc_MAX_CHARS_PLACE_SHRT_NAME,Plc_EditingPlc->ShrtName,
|
|
||||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
|
||||||
"class=\"INPUT_SHORT_NAME INPUT_%s\""
|
|
||||||
" required=\"required\"",
|
|
||||||
The_GetSuffix ());
|
|
||||||
HTM_TD_End ();
|
|
||||||
|
|
||||||
/***** Place full name *****/
|
/***** End form to create *****/
|
||||||
HTM_TD_Begin ("class=\"CM\"");
|
Frm_EndFormTable (Btn_CREATE_BUTTON);
|
||||||
HTM_INPUT_TEXT ("FullName",Plc_MAX_CHARS_PLACE_FULL_NAME,Plc_EditingPlc->FullName,
|
|
||||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
|
||||||
"class=\"INPUT_FULL_NAME INPUT_%s\""
|
|
||||||
" required=\"required\"",
|
|
||||||
The_GetSuffix ());
|
|
||||||
HTM_TD_End ();
|
|
||||||
|
|
||||||
/***** Number of centers *****/
|
|
||||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
|
||||||
HTM_Unsigned (0);
|
|
||||||
HTM_TD_End ();
|
|
||||||
|
|
||||||
HTM_TR_End ();
|
|
||||||
|
|
||||||
/***** End table and send button *****/
|
|
||||||
HTM_TABLE_End ();
|
|
||||||
Btn_PutButton (Btn_CREATE_BUTTON,Txt_Create);
|
|
||||||
|
|
||||||
/***** End form *****/
|
|
||||||
Frm_EndForm ();
|
|
||||||
|
|
||||||
/***** End fieldset *****/
|
|
||||||
HTM_FIELDSET_End ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
153
swad_plugin.c
153
swad_plugin.c
|
@ -788,104 +788,87 @@ void Plg_ContEditAfterChgPlg (void)
|
||||||
|
|
||||||
static void Plg_PutFormToCreatePlugin (void)
|
static void Plg_PutFormToCreatePlugin (void)
|
||||||
{
|
{
|
||||||
extern const char *Txt_Actions[ActLst_NUM_ACTIONS];
|
/***** Begin form to create *****/
|
||||||
extern const char *Txt_Create;
|
Frm_BeginFormTable (ActNewPlg,NULL,NULL,NULL);
|
||||||
|
|
||||||
/***** Begin fieldset *****/
|
/***** Write heading *****/
|
||||||
HTM_FIELDSET_Begin (NULL);
|
Plg_PutHeadPlugins ();
|
||||||
HTM_LEGEND (Txt_Actions[ActNewPlg]);
|
|
||||||
|
|
||||||
/***** Begin form *****/
|
/***** Row begin *****/
|
||||||
Frm_BeginForm (ActNewPlg);
|
HTM_TR_Begin (NULL);
|
||||||
|
|
||||||
/***** Begin table *****/
|
/***** Column to remove plugin, disabled here *****/
|
||||||
HTM_TABLE_BeginWidePadding (2);
|
HTM_TD_Begin ("class=\"BM\"");
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Write heading *****/
|
/***** Plugin code */
|
||||||
Plg_PutHeadPlugins ();
|
HTM_TD_Begin ("class=\"CODE\"");
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Row begin *****/
|
/***** Plugin logo *****/
|
||||||
HTM_TR_Begin (NULL);
|
// TODO: Change plugin icons to 32x32
|
||||||
|
HTM_TD_Begin ("style=\"width:45px;\"");
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Column to remove plugin, disabled here *****/
|
/***** Plugin name *****/
|
||||||
HTM_TD_Begin ("class=\"BM\"");
|
HTM_TD_Begin ("class=\"CM\"");
|
||||||
HTM_TD_End ();
|
HTM_INPUT_TEXT ("Name",Plg_MAX_CHARS_PLUGIN_NAME,Plg_EditingPlg->Name,
|
||||||
|
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||||
|
"size=\"8\" class=\"INPUT_%s\""
|
||||||
|
" required=\"required\"",
|
||||||
|
The_GetSuffix ());
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Plugin code */
|
/***** Plugin description *****/
|
||||||
HTM_TD_Begin ("class=\"CODE\"");
|
HTM_TD_Begin ("class=\"CM\"");
|
||||||
HTM_TD_End ();
|
HTM_INPUT_TEXT ("Description",Plg_MAX_CHARS_PLUGIN_DESCRIPTION,
|
||||||
|
Plg_EditingPlg->Description,
|
||||||
|
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||||
|
"size=\"16\" class=\"INPUT_%s\""
|
||||||
|
" required=\"required\"",
|
||||||
|
The_GetSuffix ());
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Plugin logo *****/
|
/***** Plugin logo *****/
|
||||||
// TODO: Change plugin icons to 32x32
|
HTM_TD_Begin ("class=\"CM\"");
|
||||||
HTM_TD_Begin ("style=\"width:45px;\"");
|
HTM_INPUT_TEXT ("Logo",Plg_MAX_CHARS_PLUGIN_LOGO,Plg_EditingPlg->Logo,
|
||||||
HTM_TD_End ();
|
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||||
|
"size=\"4\" class=\"INPUT_%s\""
|
||||||
|
" required=\"required\"",
|
||||||
|
The_GetSuffix ());
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Plugin name *****/
|
/***** Plugin application key *****/
|
||||||
HTM_TD_Begin ("class=\"CM\"");
|
HTM_TD_Begin ("class=\"CM\"");
|
||||||
HTM_INPUT_TEXT ("Name",Plg_MAX_CHARS_PLUGIN_NAME,Plg_EditingPlg->Name,
|
HTM_INPUT_TEXT ("AppKey",Plg_MAX_CHARS_PLUGIN_APP_KEY,Plg_EditingPlg->AppKey,
|
||||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||||
"size=\"8\" class=\"INPUT_%s\""
|
"size=\"8\" class=\"INPUT_%s\""
|
||||||
" required=\"required\"",
|
" required=\"required\"",
|
||||||
The_GetSuffix ());
|
The_GetSuffix ());
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Plugin description *****/
|
/***** Plugin URL *****/
|
||||||
HTM_TD_Begin ("class=\"CM\"");
|
HTM_TD_Begin ("class=\"CM\"");
|
||||||
HTM_INPUT_TEXT ("Description",Plg_MAX_CHARS_PLUGIN_DESCRIPTION,
|
HTM_INPUT_URL ("URL",Plg_EditingPlg->URL,HTM_DONT_SUBMIT_ON_CHANGE,
|
||||||
Plg_EditingPlg->Description,
|
"size=\"8\" class=\"INPUT_%s\""
|
||||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
" required=\"required\"",
|
||||||
"size=\"16\" class=\"INPUT_%s\""
|
The_GetSuffix ());
|
||||||
" required=\"required\"",
|
HTM_TD_End ();
|
||||||
The_GetSuffix ());
|
|
||||||
HTM_TD_End ();
|
|
||||||
|
|
||||||
/***** Plugin logo *****/
|
/***** Plugin IP address *****/
|
||||||
HTM_TD_Begin ("class=\"CM\"");
|
HTM_TD_Begin ("class=\"CM\"");
|
||||||
HTM_INPUT_TEXT ("Logo",Plg_MAX_CHARS_PLUGIN_LOGO,Plg_EditingPlg->Logo,
|
HTM_INPUT_TEXT ("IP",Cns_MAX_CHARS_IP,Plg_EditingPlg->IP,
|
||||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||||
"size=\"4\" class=\"INPUT_%s\""
|
"size=\"8\" class=\"INPUT_%s\""
|
||||||
" required=\"required\"",
|
" required=\"required\"",
|
||||||
The_GetSuffix ());
|
The_GetSuffix ());
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Plugin application key *****/
|
/***** Row end *****/
|
||||||
HTM_TD_Begin ("class=\"CM\"");
|
HTM_TR_End ();
|
||||||
HTM_INPUT_TEXT ("AppKey",Plg_MAX_CHARS_PLUGIN_APP_KEY,Plg_EditingPlg->AppKey,
|
|
||||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
|
||||||
"size=\"8\" class=\"INPUT_%s\""
|
|
||||||
" required=\"required\"",
|
|
||||||
The_GetSuffix ());
|
|
||||||
HTM_TD_End ();
|
|
||||||
|
|
||||||
/***** Plugin URL *****/
|
/***** End form to create *****/
|
||||||
HTM_TD_Begin ("class=\"CM\"");
|
Frm_EndFormTable (Btn_CREATE_BUTTON);
|
||||||
HTM_INPUT_URL ("URL",Plg_EditingPlg->URL,HTM_DONT_SUBMIT_ON_CHANGE,
|
|
||||||
"size=\"8\" class=\"INPUT_%s\""
|
|
||||||
" required=\"required\"",
|
|
||||||
The_GetSuffix ());
|
|
||||||
HTM_TD_End ();
|
|
||||||
|
|
||||||
/***** Plugin IP address *****/
|
|
||||||
HTM_TD_Begin ("class=\"CM\"");
|
|
||||||
HTM_INPUT_TEXT ("IP",Cns_MAX_CHARS_IP,Plg_EditingPlg->IP,
|
|
||||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
|
||||||
"size=\"8\" class=\"INPUT_%s\""
|
|
||||||
" required=\"required\"",
|
|
||||||
The_GetSuffix ());
|
|
||||||
HTM_TD_End ();
|
|
||||||
|
|
||||||
/***** Row end *****/
|
|
||||||
HTM_TR_End ();
|
|
||||||
|
|
||||||
/***** End table and send button *****/
|
|
||||||
HTM_TABLE_End ();
|
|
||||||
Btn_PutButton (Btn_CREATE_BUTTON,Txt_Create);
|
|
||||||
|
|
||||||
/***** End form *****/
|
|
||||||
Frm_EndForm ();
|
|
||||||
|
|
||||||
/***** End fieldset *****/
|
|
||||||
HTM_FIELDSET_End ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
|
@ -179,6 +179,7 @@ static unsigned Prg_GetLastChild (int NumItem);
|
||||||
|
|
||||||
static void Prg_ShowFormToCreateItem (long ParentItmCod);
|
static void Prg_ShowFormToCreateItem (long ParentItmCod);
|
||||||
static void Prg_ShowFormToChangeItem (long ItmCod);
|
static void Prg_ShowFormToChangeItem (long ItmCod);
|
||||||
|
static void Prg_ParsFormItem (void *ItmCod);
|
||||||
static void Prg_ShowFormItem (const struct Prg_Item *Item,
|
static void Prg_ShowFormItem (const struct Prg_Item *Item,
|
||||||
const Dat_SetHMS SetHMS[Dat_NUM_START_END_TIME],
|
const Dat_SetHMS SetHMS[Dat_NUM_START_END_TIME],
|
||||||
const char *Txt);
|
const char *Txt);
|
||||||
|
@ -1932,8 +1933,6 @@ void Prg_ReqCreateItem (void)
|
||||||
|
|
||||||
static void Prg_ShowFormToCreateItem (long ParentItmCod)
|
static void Prg_ShowFormToCreateItem (long ParentItmCod)
|
||||||
{
|
{
|
||||||
extern const char *Txt_Actions[ActLst_NUM_ACTIONS];
|
|
||||||
extern const char *Txt_Create;
|
|
||||||
struct Prg_Item ParentItem; // Parent item
|
struct Prg_Item ParentItem; // Parent item
|
||||||
struct Prg_Item Item;
|
struct Prg_Item Item;
|
||||||
static const Dat_SetHMS SetHMS[Dat_NUM_START_END_TIME] =
|
static const Dat_SetHMS SetHMS[Dat_NUM_START_END_TIME] =
|
||||||
|
@ -1955,40 +1954,19 @@ static void Prg_ShowFormToCreateItem (long ParentItmCod)
|
||||||
/***** Show pending alerts */
|
/***** Show pending alerts */
|
||||||
Ale_ShowAlerts (NULL);
|
Ale_ShowAlerts (NULL);
|
||||||
|
|
||||||
/***** Begin fieldset *****/
|
/***** Begin form to create *****/
|
||||||
HTM_FIELDSET_Begin (NULL);
|
Frm_BeginFormTable (ActNewPrgItm,NULL,
|
||||||
HTM_LEGEND (Txt_Actions[ActNewPrgItm]);
|
Prg_ParsFormItem,&ParentItem.Hierarchy.ItmCod);
|
||||||
|
|
||||||
/***** Begin form *****/
|
/***** Show form *****/
|
||||||
Frm_BeginFormAnchor (ActNewPrgItm,Prg_HIGHLIGHTED_SECTION_ID);
|
Prg_ShowFormItem (&Item,SetHMS,NULL);
|
||||||
ParCod_PutPar (ParCod_Itm,ParentItem.Hierarchy.ItmCod);
|
|
||||||
|
|
||||||
/***** Begin table *****/
|
/***** End form to create *****/
|
||||||
HTM_TABLE_BeginWidePadding (2);
|
Frm_EndFormTable (Btn_CREATE_BUTTON);
|
||||||
|
|
||||||
/***** Show form *****/
|
|
||||||
Prg_ShowFormItem (&Item,SetHMS,NULL);
|
|
||||||
|
|
||||||
/***** End table and send button *****/
|
|
||||||
HTM_TABLE_End ();
|
|
||||||
Btn_PutButton (Btn_CREATE_BUTTON,Txt_Create);
|
|
||||||
|
|
||||||
/***** End form *****/
|
|
||||||
Frm_EndForm ();
|
|
||||||
|
|
||||||
/***** End fieldset *****/
|
|
||||||
HTM_FIELDSET_End ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
|
||||||
/***************** Put a form to change program item *******************/
|
|
||||||
/*****************************************************************************/
|
|
||||||
|
|
||||||
static void Prg_ShowFormToChangeItem (long ItmCod)
|
static void Prg_ShowFormToChangeItem (long ItmCod)
|
||||||
{
|
{
|
||||||
extern const char *Hlp_COURSE_Program_edit_item;
|
|
||||||
extern const char *Txt_Edit_item;
|
|
||||||
extern const char *Txt_Save_changes;
|
|
||||||
struct Prg_Item Item;
|
struct Prg_Item Item;
|
||||||
char Txt[Cns_MAX_BYTES_TEXT + 1];
|
char Txt[Cns_MAX_BYTES_TEXT + 1];
|
||||||
static const Dat_SetHMS SetHMS[Dat_NUM_START_END_TIME] =
|
static const Dat_SetHMS SetHMS[Dat_NUM_START_END_TIME] =
|
||||||
|
@ -2002,25 +1980,20 @@ static void Prg_ShowFormToChangeItem (long ItmCod)
|
||||||
Prg_GetItemDataByCod (&Item);
|
Prg_GetItemDataByCod (&Item);
|
||||||
Prg_DB_GetItemTxt (Item.Hierarchy.ItmCod,Txt);
|
Prg_DB_GetItemTxt (Item.Hierarchy.ItmCod,Txt);
|
||||||
|
|
||||||
/***** Begin form *****/
|
/***** Begin form to change *****/
|
||||||
Frm_BeginFormAnchor (ActChgPrgItm,Prg_HIGHLIGHTED_SECTION_ID);
|
Frm_BeginFormTable (ActChgPrgItm,Prg_HIGHLIGHTED_SECTION_ID,
|
||||||
ParCod_PutPar (ParCod_Itm,Item.Hierarchy.ItmCod);
|
Prg_ParsFormItem,&Item.Hierarchy.ItmCod);
|
||||||
|
|
||||||
/***** Begin box and table *****/
|
/***** Show form *****/
|
||||||
Box_BoxTableBegin ("100%",
|
Prg_ShowFormItem (&Item,SetHMS,Txt);
|
||||||
Item.Title[0] ? Item.Title :
|
|
||||||
Txt_Edit_item,
|
|
||||||
NULL,NULL,
|
|
||||||
Hlp_COURSE_Program_edit_item,Box_NOT_CLOSABLE,2);
|
|
||||||
|
|
||||||
/***** Show form *****/
|
/***** End form to change *****/
|
||||||
Prg_ShowFormItem (&Item,SetHMS,Txt);
|
Frm_EndFormTable (Btn_CONFIRM_BUTTON);
|
||||||
|
}
|
||||||
|
|
||||||
/***** End table, send button and end box *****/
|
static void Prg_ParsFormItem (void *ItmCod)
|
||||||
Box_BoxTableWithButtonEnd (Btn_CONFIRM_BUTTON,Txt_Save_changes);
|
{
|
||||||
|
ParCod_PutPar (ParCod_Itm,*(long *) ItmCod);
|
||||||
/***** End form *****/
|
|
||||||
Frm_EndForm ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
110
swad_record.c
110
swad_record.c
|
@ -352,82 +352,66 @@ static void Rec_ListFieldsRecordsForEdition (void)
|
||||||
void Rec_ShowFormCreateRecordField (void)
|
void Rec_ShowFormCreateRecordField (void)
|
||||||
{
|
{
|
||||||
extern const char *Hlp_USERS_Students_course_record_card;
|
extern const char *Hlp_USERS_Students_course_record_card;
|
||||||
extern const char *Txt_Actions[ActLst_NUM_ACTIONS];
|
|
||||||
extern const char *Txt_RECORD_FIELD_VISIBILITY_MENU[Rec_NUM_TYPES_VISIBILITY];
|
extern const char *Txt_RECORD_FIELD_VISIBILITY_MENU[Rec_NUM_TYPES_VISIBILITY];
|
||||||
extern const char *Txt_Create;
|
|
||||||
Rec_VisibilityRecordFields_t Vis;
|
Rec_VisibilityRecordFields_t Vis;
|
||||||
unsigned VisUnsigned;
|
unsigned VisUnsigned;
|
||||||
char StrNumLines[Cns_MAX_DECIMAL_DIGITS_UINT + 1];
|
char StrNumLines[Cns_MAX_DECIMAL_DIGITS_UINT + 1];
|
||||||
|
|
||||||
/***** Begin fieldset *****/
|
/***** Begin form to create *****/
|
||||||
HTM_FIELDSET_Begin (NULL);
|
Frm_BeginFormTable (ActNewFie,NULL,NULL,NULL);
|
||||||
HTM_LEGEND (Txt_Actions[ActNewFie]);
|
|
||||||
|
|
||||||
/***** Begin form *****/
|
/***** Write heading *****/
|
||||||
Frm_BeginForm (ActNewFie);
|
Rec_WriteHeadingRecordFields ();
|
||||||
|
|
||||||
/***** Begin table *****/
|
HTM_TR_Begin (NULL);
|
||||||
HTM_TABLE_BeginWidePadding (2);
|
|
||||||
|
|
||||||
/***** Write heading *****/
|
/***** Write disabled icon to remove the field *****/
|
||||||
Rec_WriteHeadingRecordFields ();
|
HTM_TD_Begin ("class=\"BM\"");
|
||||||
|
Ico_PutIconRemovalNotAllowed ();
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
HTM_TR_Begin (NULL);
|
/***** Field name *****/
|
||||||
|
HTM_TD_Begin ("class=\"LM\"");
|
||||||
|
HTM_INPUT_TEXT ("FieldName",Rec_MAX_CHARS_NAME_FIELD,Gbl.Crs.Records.Field.Name,
|
||||||
|
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||||
|
"class=\"REC_FIELDNAME INPUT_%s\""
|
||||||
|
" required=\"required\"",
|
||||||
|
The_GetSuffix ());
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Write disabled icon to remove the field *****/
|
/***** Number of lines in form ******/
|
||||||
HTM_TD_Begin ("class=\"BM\"");
|
HTM_TD_Begin ("class=\"CM\"");
|
||||||
Ico_PutIconRemovalNotAllowed ();
|
snprintf (StrNumLines,sizeof (StrNumLines),"%u",
|
||||||
HTM_TD_End ();
|
Gbl.Crs.Records.Field.NumLines);
|
||||||
|
HTM_INPUT_TEXT ("NumLines",Cns_MAX_DECIMAL_DIGITS_UINT,StrNumLines,
|
||||||
|
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||||
|
"size=\"2\" class=\"INPUT_%s\""
|
||||||
|
" required=\"required\"",
|
||||||
|
The_GetSuffix ());
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Field name *****/
|
/***** Visibility to students *****/
|
||||||
HTM_TD_Begin ("class=\"LM\"");
|
HTM_TD_Begin ("class=\"CM\"");
|
||||||
HTM_INPUT_TEXT ("FieldName",Rec_MAX_CHARS_NAME_FIELD,Gbl.Crs.Records.Field.Name,
|
HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE,NULL,
|
||||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
"name=\"Visibility\" class=\"INPUT_%s\"",
|
||||||
"class=\"REC_FIELDNAME INPUT_%s\""
|
The_GetSuffix ());
|
||||||
" required=\"required\"",
|
for (Vis = (Rec_VisibilityRecordFields_t) 0;
|
||||||
The_GetSuffix ());
|
Vis <= (Rec_VisibilityRecordFields_t) (Rec_NUM_TYPES_VISIBILITY - 1);
|
||||||
HTM_TD_End ();
|
Vis++)
|
||||||
|
{
|
||||||
|
VisUnsigned = (unsigned) Vis;
|
||||||
|
HTM_OPTION (HTM_Type_UNSIGNED,&VisUnsigned,
|
||||||
|
Vis == Gbl.Crs.Records.Field.Visibility, // Selected?
|
||||||
|
HTM_OPTION_ENABLED,
|
||||||
|
"%s",Txt_RECORD_FIELD_VISIBILITY_MENU[Vis]);
|
||||||
|
}
|
||||||
|
HTM_SELECT_End ();
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Number of lines in form ******/
|
HTM_TR_End ();
|
||||||
HTM_TD_Begin ("class=\"CM\"");
|
|
||||||
snprintf (StrNumLines,sizeof (StrNumLines),"%u",
|
|
||||||
Gbl.Crs.Records.Field.NumLines);
|
|
||||||
HTM_INPUT_TEXT ("NumLines",Cns_MAX_DECIMAL_DIGITS_UINT,StrNumLines,
|
|
||||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
|
||||||
"size=\"2\" class=\"INPUT_%s\""
|
|
||||||
" required=\"required\"",
|
|
||||||
The_GetSuffix ());
|
|
||||||
HTM_TD_End ();
|
|
||||||
|
|
||||||
/***** Visibility to students *****/
|
/***** End form to create *****/
|
||||||
HTM_TD_Begin ("class=\"CM\"");
|
Frm_EndFormTable (Btn_CREATE_BUTTON);
|
||||||
HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE,NULL,
|
|
||||||
"name=\"Visibility\" class=\"INPUT_%s\"",
|
|
||||||
The_GetSuffix ());
|
|
||||||
for (Vis = (Rec_VisibilityRecordFields_t) 0;
|
|
||||||
Vis <= (Rec_VisibilityRecordFields_t) (Rec_NUM_TYPES_VISIBILITY - 1);
|
|
||||||
Vis++)
|
|
||||||
{
|
|
||||||
VisUnsigned = (unsigned) Vis;
|
|
||||||
HTM_OPTION (HTM_Type_UNSIGNED,&VisUnsigned,
|
|
||||||
Vis == Gbl.Crs.Records.Field.Visibility, // Selected?
|
|
||||||
HTM_OPTION_ENABLED,
|
|
||||||
"%s",Txt_RECORD_FIELD_VISIBILITY_MENU[Vis]);
|
|
||||||
}
|
|
||||||
HTM_SELECT_End ();
|
|
||||||
HTM_TD_End ();
|
|
||||||
|
|
||||||
HTM_TR_End ();
|
|
||||||
|
|
||||||
/***** End table and send button *****/
|
|
||||||
HTM_TABLE_End ();
|
|
||||||
Btn_PutButton (Btn_CREATE_BUTTON,Txt_Create);
|
|
||||||
|
|
||||||
/***** End form *****/
|
|
||||||
Frm_EndForm ();
|
|
||||||
|
|
||||||
/***** End fieldset *****/
|
|
||||||
HTM_FIELDSET_End ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
142
swad_room.c
142
swad_room.c
|
@ -1210,101 +1210,85 @@ void Roo_ContEditAfterChgRoom (void)
|
||||||
|
|
||||||
static void Roo_PutFormToCreateRoom (const struct Bld_Buildings *Buildings)
|
static void Roo_PutFormToCreateRoom (const struct Bld_Buildings *Buildings)
|
||||||
{
|
{
|
||||||
extern const char *Txt_Actions[ActLst_NUM_ACTIONS];
|
|
||||||
extern const char *Txt_Create;
|
|
||||||
char StrCapacity[Cns_MAX_DECIMAL_DIGITS_UINT + 1];
|
char StrCapacity[Cns_MAX_DECIMAL_DIGITS_UINT + 1];
|
||||||
char MACstr[MAC_LENGTH_MAC_ADDRESS + 1]; // MAC address in xx:xx:xx:xx:xx:xx format
|
char MACstr[MAC_LENGTH_MAC_ADDRESS + 1]; // MAC address in xx:xx:xx:xx:xx:xx format
|
||||||
|
|
||||||
/***** Begin fieldset *****/
|
/***** Begin form to create *****/
|
||||||
HTM_FIELDSET_Begin (NULL);
|
Frm_BeginFormTable (ActNewRoo,NULL,NULL,NULL);
|
||||||
HTM_LEGEND (Txt_Actions[ActNewRoo]);
|
|
||||||
|
|
||||||
/***** Begin form *****/
|
/***** Write heading *****/
|
||||||
Frm_BeginForm (ActNewRoo);
|
Roo_PutHeadRooms ();
|
||||||
|
|
||||||
/***** Begin table *****/
|
HTM_TR_Begin (NULL);
|
||||||
HTM_TABLE_BeginWidePadding (2);
|
|
||||||
|
|
||||||
/***** Write heading *****/
|
/***** Column to remove room, disabled here *****/
|
||||||
Roo_PutHeadRooms ();
|
HTM_TD_Begin ("class=\"BM\"");
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
HTM_TR_Begin (NULL);
|
/***** Room code *****/
|
||||||
|
HTM_TD_Begin ("class=\"CODE\"");
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Column to remove room, disabled here *****/
|
/***** Building *****/
|
||||||
HTM_TD_Begin ("class=\"BM\"");
|
HTM_TD_Begin ("class=\"LM\"");
|
||||||
HTM_TD_End ();
|
Roo_PutSelectorBuilding (Roo_EditingRoom->BldCod,Buildings,
|
||||||
|
HTM_DONT_SUBMIT_ON_CHANGE);
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Room code *****/
|
/***** Floor *****/
|
||||||
HTM_TD_Begin ("class=\"CODE\"");
|
HTM_TD_Begin ("class=\"LM\"");
|
||||||
HTM_TD_End ();
|
HTM_INPUT_LONG ("Floor",(long) INT_MIN,(long) INT_MAX,(long) Roo_EditingRoom->Floor,
|
||||||
|
HTM_DONT_SUBMIT_ON_CHANGE,false,
|
||||||
|
"class=\"INPUT_LONG INPUT_%s\"",
|
||||||
|
The_GetSuffix ());
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Building *****/
|
/***** Room type *****/
|
||||||
HTM_TD_Begin ("class=\"LM\"");
|
HTM_TD_Begin ("class=\"LM\"");
|
||||||
Roo_PutSelectorBuilding (Roo_EditingRoom->BldCod,Buildings,
|
Roo_PutSelectorType (Roo_EditingRoom->Type,
|
||||||
HTM_DONT_SUBMIT_ON_CHANGE);
|
HTM_DONT_SUBMIT_ON_CHANGE);
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Floor *****/
|
/***** Room short name *****/
|
||||||
HTM_TD_Begin ("class=\"LM\"");
|
HTM_TD_Begin ("class=\"LM\"");
|
||||||
HTM_INPUT_LONG ("Floor",(long) INT_MIN,(long) INT_MAX,(long) Roo_EditingRoom->Floor,
|
HTM_INPUT_TEXT ("ShortName",Roo_MAX_CHARS_SHRT_NAME,Roo_EditingRoom->ShrtName,
|
||||||
HTM_DONT_SUBMIT_ON_CHANGE,false,
|
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||||
"class=\"INPUT_LONG INPUT_%s\"",
|
"size=\"10\" class=\"INPUT_SHORT_NAME INPUT_%s\""
|
||||||
The_GetSuffix ());
|
" required=\"required\"",
|
||||||
HTM_TD_End ();
|
The_GetSuffix ());
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Room type *****/
|
/***** Room full name *****/
|
||||||
HTM_TD_Begin ("class=\"LM\"");
|
HTM_TD_Begin ("class=\"LM\"");
|
||||||
Roo_PutSelectorType (Roo_EditingRoom->Type,
|
HTM_INPUT_TEXT ("FullName",Roo_MAX_CHARS_FULL_NAME,Roo_EditingRoom->FullName,
|
||||||
HTM_DONT_SUBMIT_ON_CHANGE);
|
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||||
HTM_TD_End ();
|
"size=\"20\" class=\"INPUT_FULL_NAME INPUT_%s\""
|
||||||
|
" required=\"required\"",
|
||||||
|
The_GetSuffix ());
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Room short name *****/
|
/***** Seating capacity *****/
|
||||||
HTM_TD_Begin ("class=\"LM\"");
|
HTM_TD_Begin ("class=\"LM\"");
|
||||||
HTM_INPUT_TEXT ("ShortName",Roo_MAX_CHARS_SHRT_NAME,Roo_EditingRoom->ShrtName,
|
Roo_WriteCapacity (StrCapacity,Roo_EditingRoom->Capacity);
|
||||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
HTM_INPUT_TEXT ("Capacity",Cns_MAX_DECIMAL_DIGITS_UINT,StrCapacity,
|
||||||
"size=\"10\" class=\"INPUT_SHORT_NAME INPUT_%s\""
|
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||||
" required=\"required\"",
|
"size=\"3\" class=\"INPUT_%s\"",
|
||||||
The_GetSuffix ());
|
The_GetSuffix ());
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Room full name *****/
|
/***** MAC address *****/
|
||||||
HTM_TD_Begin ("class=\"LM\"");
|
HTM_TD_Begin ("class=\"LM\"");
|
||||||
HTM_INPUT_TEXT ("FullName",Roo_MAX_CHARS_FULL_NAME,Roo_EditingRoom->FullName,
|
MAC_MACnumToMACstr (Roo_EditingRoom->MACnum,MACstr);
|
||||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
HTM_INPUT_TEXT ("MAC",MAC_LENGTH_MAC_ADDRESS,MACstr,
|
||||||
"size=\"20\" class=\"INPUT_FULL_NAME INPUT_%s\""
|
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||||
" required=\"required\"",
|
"size=\"8\" class=\"INPUT_%s\"",
|
||||||
The_GetSuffix ());
|
The_GetSuffix ());
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Seating capacity *****/
|
HTM_TR_End ();
|
||||||
HTM_TD_Begin ("class=\"LM\"");
|
|
||||||
Roo_WriteCapacity (StrCapacity,Roo_EditingRoom->Capacity);
|
|
||||||
HTM_INPUT_TEXT ("Capacity",Cns_MAX_DECIMAL_DIGITS_UINT,StrCapacity,
|
|
||||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
|
||||||
"size=\"3\" class=\"INPUT_%s\"",
|
|
||||||
The_GetSuffix ());
|
|
||||||
HTM_TD_End ();
|
|
||||||
|
|
||||||
/***** MAC address *****/
|
/***** End form to create *****/
|
||||||
HTM_TD_Begin ("class=\"LM\"");
|
Frm_EndFormTable (Btn_CREATE_BUTTON);
|
||||||
MAC_MACnumToMACstr (Roo_EditingRoom->MACnum,MACstr);
|
|
||||||
HTM_INPUT_TEXT ("MAC",MAC_LENGTH_MAC_ADDRESS,MACstr,
|
|
||||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
|
||||||
"size=\"8\" class=\"INPUT_%s\"",
|
|
||||||
The_GetSuffix ());
|
|
||||||
HTM_TD_End ();
|
|
||||||
|
|
||||||
HTM_TR_End ();
|
|
||||||
|
|
||||||
/***** End table and send button *****/
|
|
||||||
HTM_TABLE_End ();
|
|
||||||
Btn_PutButton (Btn_CREATE_BUTTON,Txt_Create);
|
|
||||||
|
|
||||||
/***** End form *****/
|
|
||||||
Frm_EndForm ();
|
|
||||||
|
|
||||||
/***** End fieldset *****/
|
|
||||||
HTM_FIELDSET_End ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
|
@ -171,87 +171,70 @@ void RubCri_GetCriterionDataByCod (struct RubCri_Criterion *Criterion)
|
||||||
static void RubCri_PutFormNewCriterion (struct Rub_Rubrics *Rubrics,
|
static void RubCri_PutFormNewCriterion (struct Rub_Rubrics *Rubrics,
|
||||||
unsigned MaxCriInd)
|
unsigned MaxCriInd)
|
||||||
{
|
{
|
||||||
extern const char *Txt_Actions[ActLst_NUM_ACTIONS];
|
|
||||||
extern const char *Txt_Create;
|
|
||||||
RubCri_ValueRange_t ValueRange;
|
RubCri_ValueRange_t ValueRange;
|
||||||
|
|
||||||
/***** Begin fieldset *****/
|
/***** Begin form to create *****/
|
||||||
HTM_FIELDSET_Begin (NULL);
|
Frm_BeginFormTable (ActNewRubCri,NULL,Rub_PutPars,Rubrics);
|
||||||
HTM_LEGEND (Txt_Actions[ActNewRubCri]);
|
|
||||||
|
|
||||||
/***** Begin form *****/
|
/***** Table heading *****/
|
||||||
Frm_BeginForm (ActNewRubCri);
|
RubCri_PutTableHeadingForCriteria (RubCri_DONT_PUT_COLUMN_FOR_ICONS,
|
||||||
Rub_PutPars (Rubrics);
|
RubCri_DONT_PUT_COLUMNS_FOR_SCORE);
|
||||||
|
|
||||||
/***** Begin table *****/
|
/***** Begin row *****/
|
||||||
HTM_TABLE_BeginWidePadding (2);
|
HTM_TR_Begin (NULL);
|
||||||
|
|
||||||
/***** Table heading *****/
|
/***** Index *****/
|
||||||
RubCri_PutTableHeadingForCriteria (RubCri_DONT_PUT_COLUMN_FOR_ICONS,
|
HTM_TD_Begin ("class=\"RT\"");
|
||||||
RubCri_DONT_PUT_COLUMNS_FOR_SCORE);
|
Lay_WriteIndex (MaxCriInd + 1,"BIG_INDEX");
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Begin row *****/
|
/***** Title *****/
|
||||||
HTM_TR_Begin (NULL);
|
HTM_TD_Begin ("class=\"LT\"");
|
||||||
|
HTM_INPUT_TEXT ("Title",RubCri_MAX_CHARS_TITLE,Rubrics->Criterion.Title,
|
||||||
|
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||||
|
"id=\"Title\""
|
||||||
|
" class=\"TITLE_DESCRIPTION_WIDTH INPUT_%s\""
|
||||||
|
" required=\"required\"",
|
||||||
|
The_GetSuffix ());
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Index *****/
|
/***** Link *****/
|
||||||
HTM_TD_Begin ("class=\"RT\"");
|
HTM_TD_Begin ("class=\"LT\"");
|
||||||
Lay_WriteIndex (MaxCriInd + 1,"BIG_INDEX");
|
Rsc_ShowClipboardToChangeLink (NULL);
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Title *****/
|
/***** Minimum and maximum values of the criterion *****/
|
||||||
HTM_TD_Begin ("class=\"LT\"");
|
for (ValueRange = (RubCri_ValueRange_t) 0;
|
||||||
HTM_INPUT_TEXT ("Title",RubCri_MAX_CHARS_TITLE,Rubrics->Criterion.Title,
|
ValueRange <= (RubCri_ValueRange_t) (RubCri_NUM_VALUES - 1);
|
||||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
ValueRange++)
|
||||||
"id=\"Title\""
|
{
|
||||||
" class=\"TITLE_DESCRIPTION_WIDTH INPUT_%s\""
|
HTM_TD_Begin ("class=\"RT\"");
|
||||||
" required=\"required\"",
|
HTM_INPUT_FLOAT (RubCri_ParValues[ValueRange],
|
||||||
The_GetSuffix ());
|
0.0,DBL_MAX,RubCri_SCORE_STEP,
|
||||||
HTM_TD_End ();
|
Rubrics->Criterion.Values[ValueRange],
|
||||||
|
HTM_DONT_SUBMIT_ON_CHANGE,false,
|
||||||
|
" class=\"INPUT_FLOAT INPUT_%s\" required=\"required\"",
|
||||||
|
The_GetSuffix ());
|
||||||
|
HTM_TD_End ();
|
||||||
|
}
|
||||||
|
|
||||||
/***** Link *****/
|
/***** Weight *****/
|
||||||
HTM_TD_Begin ("class=\"LT\"");
|
HTM_TD_Begin ("class=\"RT\"");
|
||||||
Rsc_ShowClipboardToChangeLink (NULL);
|
HTM_INPUT_FLOAT ("Weight",
|
||||||
HTM_TD_End ();
|
RubCri_WEIGHT_MIN,
|
||||||
|
RubCri_WEIGHT_MAX,
|
||||||
|
RubCri_WEIGHT_STEP,
|
||||||
|
Rubrics->Criterion.Weight,
|
||||||
|
HTM_DONT_SUBMIT_ON_CHANGE,false,
|
||||||
|
" class=\"INPUT_FLOAT INPUT_%s\" required=\"required\"",
|
||||||
|
The_GetSuffix ());
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Minimum and maximum values of the criterion *****/
|
/***** End row *****/
|
||||||
for (ValueRange = (RubCri_ValueRange_t) 0;
|
HTM_TR_End ();
|
||||||
ValueRange <= (RubCri_ValueRange_t) (RubCri_NUM_VALUES - 1);
|
|
||||||
ValueRange++)
|
|
||||||
{
|
|
||||||
HTM_TD_Begin ("class=\"RT\"");
|
|
||||||
HTM_INPUT_FLOAT (RubCri_ParValues[ValueRange],
|
|
||||||
0.0,DBL_MAX,RubCri_SCORE_STEP,
|
|
||||||
Rubrics->Criterion.Values[ValueRange],
|
|
||||||
HTM_DONT_SUBMIT_ON_CHANGE,false,
|
|
||||||
" class=\"INPUT_FLOAT INPUT_%s\" required=\"required\"",
|
|
||||||
The_GetSuffix ());
|
|
||||||
HTM_TD_End ();
|
|
||||||
}
|
|
||||||
|
|
||||||
/***** Weight *****/
|
/***** End form to create *****/
|
||||||
HTM_TD_Begin ("class=\"RT\"");
|
Frm_EndFormTable (Btn_CREATE_BUTTON);
|
||||||
HTM_INPUT_FLOAT ("Weight",
|
|
||||||
RubCri_WEIGHT_MIN,
|
|
||||||
RubCri_WEIGHT_MAX,
|
|
||||||
RubCri_WEIGHT_STEP,
|
|
||||||
Rubrics->Criterion.Weight,
|
|
||||||
HTM_DONT_SUBMIT_ON_CHANGE,false,
|
|
||||||
" class=\"INPUT_FLOAT INPUT_%s\" required=\"required\"",
|
|
||||||
The_GetSuffix ());
|
|
||||||
HTM_TD_End ();
|
|
||||||
|
|
||||||
/***** End row *****/
|
|
||||||
HTM_TR_End ();
|
|
||||||
|
|
||||||
/***** End table and send button *****/
|
|
||||||
HTM_TABLE_End ();
|
|
||||||
Btn_PutButton (Btn_CREATE_BUTTON,Txt_Create);
|
|
||||||
|
|
||||||
/***** End form *****/
|
|
||||||
Frm_EndForm ();
|
|
||||||
|
|
||||||
/***** End fieldset *****/
|
|
||||||
HTM_FIELDSET_End ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
92
swad_text.c
92
swad_text.c
|
@ -10975,52 +10975,6 @@ const char *Txt_Duplicate_USERS =
|
||||||
"Duplicates"; // Çeviri lazim!
|
"Duplicates"; // Çeviri lazim!
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const char *Txt_Edit_assignment =
|
|
||||||
#if L==1 // ca
|
|
||||||
"Editar activitat";
|
|
||||||
#elif L==2 // de
|
|
||||||
"Aufgabe bearbeiten";
|
|
||||||
#elif L==3 // en
|
|
||||||
"Edit assignment";
|
|
||||||
#elif L==4 // es
|
|
||||||
"Editar actividad";
|
|
||||||
#elif L==5 // fr
|
|
||||||
"Éditer activité";
|
|
||||||
#elif L==6 // gn
|
|
||||||
"Editar actividad"; // Okoteve traducción
|
|
||||||
#elif L==7 // it
|
|
||||||
"Editare attività";
|
|
||||||
#elif L==8 // pl
|
|
||||||
"Edytuj zadanie";
|
|
||||||
#elif L==9 // pt
|
|
||||||
"Editar atividade";
|
|
||||||
#elif L==10 // tr
|
|
||||||
"Edit assignment"; // Çeviri lazim!
|
|
||||||
#endif
|
|
||||||
|
|
||||||
const char *Txt_Edit_item =
|
|
||||||
#if L==1 // ca
|
|
||||||
"Editar ítem";
|
|
||||||
#elif L==2 // de
|
|
||||||
"Artikel bearbeiten";
|
|
||||||
#elif L==3 // en
|
|
||||||
"Edit item";
|
|
||||||
#elif L==4 // es
|
|
||||||
"Editar ítem";
|
|
||||||
#elif L==5 // fr
|
|
||||||
"Éditer article";
|
|
||||||
#elif L==6 // gn
|
|
||||||
"Editar ítem"; // Okoteve traducción
|
|
||||||
#elif L==7 // it
|
|
||||||
"Editare articolo";
|
|
||||||
#elif L==8 // pl
|
|
||||||
"Edycja przedmiot";
|
|
||||||
#elif L==9 // pt
|
|
||||||
"Editar item";
|
|
||||||
#elif L==10 // tr
|
|
||||||
"Edit item"; // Çeviri lazim!
|
|
||||||
#endif
|
|
||||||
|
|
||||||
const char *Txt_Edit_plain_text =
|
const char *Txt_Edit_plain_text =
|
||||||
#if L==1 // ca
|
#if L==1 // ca
|
||||||
"Editar text sense format";
|
"Editar text sense format";
|
||||||
|
@ -11067,29 +11021,6 @@ const char *Txt_Edit_record_fields =
|
||||||
"Edit record fields"; // Çeviri lazim!
|
"Edit record fields"; // Çeviri lazim!
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const char *Txt_Edit_set_of_questions =
|
|
||||||
#if L==1 // ca
|
|
||||||
"Editar conjunt de preguntes";
|
|
||||||
#elif L==2 // de
|
|
||||||
"Satz von Fragen bearbeiten";
|
|
||||||
#elif L==3 // en
|
|
||||||
"Edit set of questions";
|
|
||||||
#elif L==4 // es
|
|
||||||
"Editar conjunto de preguntas";
|
|
||||||
#elif L==5 // fr
|
|
||||||
"Éditer ensemble de questions";
|
|
||||||
#elif L==6 // gn
|
|
||||||
"Editar conjunto de preguntas"; // Okoteve traducción
|
|
||||||
#elif L==7 // it
|
|
||||||
"Editare set di domande";
|
|
||||||
#elif L==8 // pl
|
|
||||||
"Edycja zestaw pytań";
|
|
||||||
#elif L==9 // pt
|
|
||||||
"Editar conjunto de perguntas";
|
|
||||||
#elif L==10 // tr
|
|
||||||
"Edit set of questions"; // Çeviri lazim!
|
|
||||||
#endif
|
|
||||||
|
|
||||||
const char *Txt_Edit_rich_text =
|
const char *Txt_Edit_rich_text =
|
||||||
#if L==1 // ca
|
#if L==1 // ca
|
||||||
"Editar text enriquit";
|
"Editar text enriquit";
|
||||||
|
@ -33459,6 +33390,29 @@ const char *Txt_Removal_not_allowed =
|
||||||
"Removal not allowed"; // Çeviri lazim!
|
"Removal not allowed"; // Çeviri lazim!
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
const char *Txt_Remove =
|
||||||
|
#if L==1 // ca
|
||||||
|
"Eliminar";
|
||||||
|
#elif L==2 // de
|
||||||
|
"Entfernen";
|
||||||
|
#elif L==3 // en
|
||||||
|
"Remove";
|
||||||
|
#elif L==4 // es
|
||||||
|
"Eliminar";
|
||||||
|
#elif L==5 // fr
|
||||||
|
"Supprimer";
|
||||||
|
#elif L==6 // gn
|
||||||
|
"Pe'a";
|
||||||
|
#elif L==7 // it
|
||||||
|
"Rimuovere";
|
||||||
|
#elif L==8 // pl
|
||||||
|
"Usuń";
|
||||||
|
#elif L==9 // pt
|
||||||
|
"Remover";
|
||||||
|
#elif L==10 // tr
|
||||||
|
"Elemek";
|
||||||
|
#endif
|
||||||
|
|
||||||
const char *Txt_Remove_all_students =
|
const char *Txt_Remove_all_students =
|
||||||
#if L==1 // ca
|
#if L==1 // ca
|
||||||
"Eliminar tots estudiants";
|
"Eliminar tots estudiants";
|
||||||
|
|
|
@ -5837,48 +5837,48 @@ const char *Txt_Actions[ActLst_NUM_ACTIONS] =
|
||||||
,
|
,
|
||||||
[ActChgPrgItm] =
|
[ActChgPrgItm] =
|
||||||
#if L==1 // ca
|
#if L==1 // ca
|
||||||
"Change program item" // Necessita traducció
|
"Canviar ítem del programa"
|
||||||
#elif L==2 // de
|
#elif L==2 // de
|
||||||
"Change program item" // Need Übersetzung
|
"Programmpunkt ändern"
|
||||||
#elif L==3 // en
|
#elif L==3 // en
|
||||||
"Change program item"
|
"Change program item"
|
||||||
#elif L==4 // es
|
#elif L==4 // es
|
||||||
"Cambiar ítem del programa"
|
"Cambiar ítem del programa"
|
||||||
#elif L==5 // fr
|
#elif L==5 // fr
|
||||||
"Change program item" // Besoin de traduction
|
"Changer élément de programme"
|
||||||
#elif L==6 // gn
|
#elif L==6 // gn
|
||||||
"Cambiar ítem del programa" // Okoteve traducción
|
"Emoambue elemento programa"
|
||||||
#elif L==7 // it
|
#elif L==7 // it
|
||||||
"Change program item" // Bisogno di traduzione
|
"Cambiare articolo del programma"
|
||||||
#elif L==8 // pl
|
#elif L==8 // pl
|
||||||
"Change program item" // Potrzebujesz tlumaczenie
|
"Zmień pozycję programu"
|
||||||
#elif L==9 // pt
|
#elif L==9 // pt
|
||||||
"Change program item" // Precisa de tradução
|
"Alterar item do programa"
|
||||||
#elif L==10 // tr
|
#elif L==10 // tr
|
||||||
"Change program item" // Çeviri lazim!
|
"Program öğesini değiştir"
|
||||||
#endif
|
#endif
|
||||||
,
|
,
|
||||||
[ActNewPrgItm] =
|
[ActNewPrgItm] =
|
||||||
#if L==1 // ca
|
#if L==1 // ca
|
||||||
"Crear ítem"
|
"Crear ítem del programa"
|
||||||
#elif L==2 // de
|
#elif L==2 // de
|
||||||
"Artikel eingeben"
|
"Programmpunkt erstellen"
|
||||||
#elif L==3 // en
|
#elif L==3 // en
|
||||||
"Create item"
|
"Create program item"
|
||||||
#elif L==4 // es
|
#elif L==4 // es
|
||||||
"Crear ítem"
|
"Crear ítem del programa"
|
||||||
#elif L==5 // fr
|
#elif L==5 // fr
|
||||||
"Créer article"
|
"Créer élément de programme"
|
||||||
#elif L==6 // gn
|
#elif L==6 // gn
|
||||||
"Crear ítem" // Okoteve traducción
|
"Ojapo elemento programa"
|
||||||
#elif L==7 // it
|
#elif L==7 // it
|
||||||
"Creare articolo"
|
"Creare articolo del programma"
|
||||||
#elif L==8 // pl
|
#elif L==8 // pl
|
||||||
"Utwórz przedmiot"
|
"Utwórz pozycję programu"
|
||||||
#elif L==9 // pt
|
#elif L==9 // pt
|
||||||
"Criar item"
|
"Criar item do programa"
|
||||||
#elif L==10 // tr
|
#elif L==10 // tr
|
||||||
"Create item" // Çeviri lazim!
|
"Program öğesi oluştur"
|
||||||
#endif
|
#endif
|
||||||
,
|
,
|
||||||
[ActReqRemPrgItm] =
|
[ActReqRemPrgItm] =
|
||||||
|
|
Loading…
Reference in New Issue