mirror of https://github.com/acanas/swad-core.git
Version19.48
This commit is contained in:
parent
353dc63f92
commit
2f0d018c6b
55
swad_HTML.c
55
swad_HTML.c
|
@ -63,6 +63,7 @@ static unsigned HTM_DIV_NestingLevel = 0;
|
||||||
static unsigned HTM_UL_NestingLevel = 0;
|
static unsigned HTM_UL_NestingLevel = 0;
|
||||||
static unsigned HTM_LI_NestingLevel = 0;
|
static unsigned HTM_LI_NestingLevel = 0;
|
||||||
static unsigned HTM_A_NestingLevel = 0;
|
static unsigned HTM_A_NestingLevel = 0;
|
||||||
|
static unsigned HTM_TEXTAREA_NestingLevel = 0;
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/***************************** Private prototypes ****************************/
|
/***************************** Private prototypes ****************************/
|
||||||
|
@ -84,6 +85,8 @@ static void HTM_LI_BeginWithoutAttr (void);
|
||||||
|
|
||||||
static void HTM_A_BeginWithoutAttr (void);
|
static void HTM_A_BeginWithoutAttr (void);
|
||||||
|
|
||||||
|
static void HTM_TEXTAREA_BeginWithoutAttr (void);
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/******************************* Start/end table *****************************/
|
/******************************* Start/end table *****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -704,6 +707,58 @@ void HTM_A_End (void)
|
||||||
HTM_A_NestingLevel--;
|
HTM_A_NestingLevel--;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/********************************* Text areas ********************************/
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
void HTM_TEXTAREA_Begin (const char *fmt,...)
|
||||||
|
{
|
||||||
|
va_list ap;
|
||||||
|
int NumBytesPrinted;
|
||||||
|
char *Attr;
|
||||||
|
|
||||||
|
if (fmt)
|
||||||
|
{
|
||||||
|
if (fmt[0])
|
||||||
|
{
|
||||||
|
va_start (ap,fmt);
|
||||||
|
NumBytesPrinted = vasprintf (&Attr,fmt,ap);
|
||||||
|
va_end (ap);
|
||||||
|
|
||||||
|
if (NumBytesPrinted < 0) // If memory allocation wasn't possible,
|
||||||
|
// or some other error occurs,
|
||||||
|
// vasprintf will return -1
|
||||||
|
Lay_NotEnoughMemoryExit ();
|
||||||
|
|
||||||
|
/***** Print HTML *****/
|
||||||
|
fprintf (Gbl.F.Out,"<textarea %s>",Attr);
|
||||||
|
|
||||||
|
free ((void *) Attr);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
HTM_TEXTAREA_BeginWithoutAttr ();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
HTM_TEXTAREA_BeginWithoutAttr ();
|
||||||
|
|
||||||
|
HTM_TEXTAREA_NestingLevel++;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void HTM_TEXTAREA_BeginWithoutAttr (void)
|
||||||
|
{
|
||||||
|
fprintf (Gbl.F.Out,"<textarea>");
|
||||||
|
}
|
||||||
|
|
||||||
|
void HTM_TEXTAREA_End (void)
|
||||||
|
{
|
||||||
|
if (HTM_TEXTAREA_NestingLevel == 0) // No TEXTAREA open
|
||||||
|
Ale_ShowAlert (Ale_ERROR,"Trying to close unopened TEXTAREA.");
|
||||||
|
|
||||||
|
fprintf (Gbl.F.Out,"</textarea>");
|
||||||
|
|
||||||
|
HTM_TEXTAREA_NestingLevel--;
|
||||||
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/********************************** Images ***********************************/
|
/********************************** Images ***********************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
|
@ -83,6 +83,9 @@ void HTM_LI_End (void);
|
||||||
void HTM_A_Begin (const char *fmt,...);
|
void HTM_A_Begin (const char *fmt,...);
|
||||||
void HTM_A_End (void);
|
void HTM_A_End (void);
|
||||||
|
|
||||||
|
void HTM_TEXTAREA_Begin (const char *fmt,...);
|
||||||
|
void HTM_TEXTAREA_End (void);
|
||||||
|
|
||||||
void HTM_IMG (const char *URL,const char *Icon,const char *Title,
|
void HTM_IMG (const char *URL,const char *Icon,const char *Title,
|
||||||
const char *fmt,...);
|
const char *fmt,...);
|
||||||
|
|
||||||
|
|
|
@ -1547,11 +1547,10 @@ void Agd_RequestCreatOrEditEvent (void)
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
HTM_TD_Begin ("class=\"LT\"");
|
HTM_TD_Begin ("class=\"LT\"");
|
||||||
fprintf (Gbl.F.Out,"<textarea id=\"Txt\" name=\"Txt\""
|
HTM_TEXTAREA_Begin ("id=\"Txt\" name=\"Txt\" cols=\"60\" rows=\"10\"");
|
||||||
" cols=\"60\" rows=\"10\">");
|
|
||||||
if (!ItsANewEvent)
|
if (!ItsANewEvent)
|
||||||
fprintf (Gbl.F.Out,"%s",Txt);
|
fprintf (Gbl.F.Out,"%s",Txt);
|
||||||
fprintf (Gbl.F.Out,"</textarea>");
|
HTM_TEXTAREA_End ();
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
HTM_TR_End ();
|
HTM_TR_End ();
|
||||||
|
|
|
@ -459,10 +459,9 @@ static void Ann_PutSubjectMessage (const char *Field,const char *Label,
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
HTM_TD_Begin ("class=\"LT\"");
|
HTM_TD_Begin ("class=\"LT\"");
|
||||||
fprintf (Gbl.F.Out,"<textarea id=\"%s\" name=\"%s\""
|
HTM_TEXTAREA_Begin ("id=\"%s\" name=\"%s\" cols=\"75\" rows=\"%u\"",
|
||||||
" cols=\"75\" rows=\"%u\">"
|
Field,Field,Rows);
|
||||||
"</textarea>",
|
HTM_TEXTAREA_End ();
|
||||||
Field,Field,Rows);
|
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
HTM_TR_End ();
|
HTM_TR_End ();
|
||||||
|
|
|
@ -1208,11 +1208,10 @@ void Asg_RequestCreatOrEditAsg (void)
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
HTM_TD_Begin ("class=\"LT\"");
|
HTM_TD_Begin ("class=\"LT\"");
|
||||||
fprintf (Gbl.F.Out,"<textarea id=\"Txt\" name=\"Txt\""
|
HTM_TEXTAREA_Begin ("id=\"Txt\" name=\"Txt\" cols=\"60\" rows=\"10\"");
|
||||||
" cols=\"60\" rows=\"10\">");
|
|
||||||
if (!ItsANewAssignment)
|
if (!ItsANewAssignment)
|
||||||
fprintf (Gbl.F.Out,"%s",Txt);
|
fprintf (Gbl.F.Out,"%s",Txt);
|
||||||
fprintf (Gbl.F.Out,"</textarea>");
|
HTM_TEXTAREA_End ();
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
HTM_TR_End ();
|
HTM_TR_End ();
|
||||||
|
|
|
@ -1154,11 +1154,10 @@ void Att_RequestCreatOrEditAttEvent (void)
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
HTM_TD_Begin ("class=\"LT\"");
|
HTM_TD_Begin ("class=\"LT\"");
|
||||||
fprintf (Gbl.F.Out,"<textarea id=\"Txt\" name=\"Txt\""
|
HTM_TEXTAREA_Begin ("id=\"Txt\" name=\"Txt\" cols=\"60\" rows=\"5\"");
|
||||||
" cols=\"60\" rows=\"5\">");
|
|
||||||
if (!ItsANewAttEvent)
|
if (!ItsANewAttEvent)
|
||||||
fprintf (Gbl.F.Out,"%s",Description);
|
fprintf (Gbl.F.Out,"%s",Description);
|
||||||
fprintf (Gbl.F.Out,"</textarea>");
|
HTM_TEXTAREA_End ();
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
HTM_TR_End ();
|
HTM_TR_End ();
|
||||||
|
@ -2138,11 +2137,12 @@ static void Att_WriteRowUsrToCallTheRoll (unsigned NumUsr,
|
||||||
/***** Student's comment: write form or text */
|
/***** Student's comment: write form or text */
|
||||||
HTM_TD_Begin ("class=\"DAT_SMALL LT COLOR%u\"",Gbl.RowEvenOdd);
|
HTM_TD_Begin ("class=\"DAT_SMALL LT COLOR%u\"",Gbl.RowEvenOdd);
|
||||||
if (ICanEditStdComment) // Show with form
|
if (ICanEditStdComment) // Show with form
|
||||||
fprintf (Gbl.F.Out,"<textarea name=\"CommentStd%ld\""
|
{
|
||||||
" cols=\"40\" rows=\"3\">"
|
HTM_TEXTAREA_Begin ("name=\"CommentStd%ld\" cols=\"40\" rows=\"3\"",
|
||||||
"%s"
|
UsrDat->UsrCod);
|
||||||
"</textarea>",
|
fprintf (Gbl.F.Out,"%s",CommentStd);
|
||||||
UsrDat->UsrCod,CommentStd);
|
HTM_TEXTAREA_End ();
|
||||||
|
}
|
||||||
else // Show without form
|
else // Show without form
|
||||||
{
|
{
|
||||||
Str_ChangeFormat (Str_FROM_HTML,Str_TO_RIGOROUS_HTML,
|
Str_ChangeFormat (Str_FROM_HTML,Str_TO_RIGOROUS_HTML,
|
||||||
|
@ -2154,11 +2154,12 @@ static void Att_WriteRowUsrToCallTheRoll (unsigned NumUsr,
|
||||||
/***** Teacher's comment: write form, text or nothing */
|
/***** Teacher's comment: write form, text or nothing */
|
||||||
HTM_TD_Begin ("class=\"DAT_SMALL LT COLOR%u\"",Gbl.RowEvenOdd);
|
HTM_TD_Begin ("class=\"DAT_SMALL LT COLOR%u\"",Gbl.RowEvenOdd);
|
||||||
if (ICanEditTchComment) // Show with form
|
if (ICanEditTchComment) // Show with form
|
||||||
fprintf (Gbl.F.Out,"<textarea name=\"CommentTch%ld\""
|
{
|
||||||
" cols=\"40\" rows=\"3\">"
|
HTM_TEXTAREA_Begin ("name=\"CommentTch%ld\" cols=\"40\" rows=\"3\"",
|
||||||
"%s"
|
UsrDat->UsrCod);
|
||||||
"</textarea>",
|
fprintf (Gbl.F.Out,"%s",CommentTch);
|
||||||
UsrDat->UsrCod,CommentTch);
|
HTM_TEXTAREA_End ();
|
||||||
|
}
|
||||||
else if (Att->CommentTchVisible) // Show without form
|
else if (Att->CommentTchVisible) // Show without form
|
||||||
{
|
{
|
||||||
Str_ChangeFormat (Str_FROM_HTML,Str_TO_RIGOROUS_HTML,
|
Str_ChangeFormat (Str_FROM_HTML,Str_TO_RIGOROUS_HTML,
|
||||||
|
|
|
@ -386,13 +386,12 @@ static void Ctr_Configuration (bool PrintView)
|
||||||
{
|
{
|
||||||
HTM_DIV_Begin ("class=\"CM\"");
|
HTM_DIV_Begin ("class=\"CM\"");
|
||||||
Frm_StartForm (ActChgCtrPhoAtt);
|
Frm_StartForm (ActChgCtrPhoAtt);
|
||||||
fprintf (Gbl.F.Out,"<textarea id=\"AttributionArea\""
|
HTM_TEXTAREA_Begin ("id=\"AttributionArea\" name=\"Attribution\" rows=\"2\""
|
||||||
" name=\"Attribution\" rows=\"2\""
|
" onchange=\"document.getElementById('%s').submit();\"",
|
||||||
" onchange=\"document.getElementById('%s').submit();\">",
|
Gbl.Form.Id);
|
||||||
Gbl.Form.Id);
|
|
||||||
if (PhotoAttribution)
|
if (PhotoAttribution)
|
||||||
fprintf (Gbl.F.Out,"%s",PhotoAttribution);
|
fprintf (Gbl.F.Out,"%s",PhotoAttribution);
|
||||||
fprintf (Gbl.F.Out,"</textarea>");
|
HTM_TEXTAREA_End ();
|
||||||
Frm_EndForm ();
|
Frm_EndForm ();
|
||||||
HTM_DIV_End ();
|
HTM_DIV_End ();
|
||||||
}
|
}
|
||||||
|
|
|
@ -487,15 +487,18 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - *
|
||||||
En OpenSWAD:
|
En OpenSWAD:
|
||||||
ps2pdf source.ps destination.pdf
|
ps2pdf source.ps destination.pdf
|
||||||
*/
|
*/
|
||||||
#define Log_PLATFORM_VERSION "SWAD 19.47.1 (2019-10-31)"
|
#define Log_PLATFORM_VERSION "SWAD 19.48 (2019-10-31)"
|
||||||
#define CSS_FILE "swad19.47.css"
|
#define CSS_FILE "swad19.47.css"
|
||||||
#define JS_FILE "swad19.39.js"
|
#define JS_FILE "swad19.39.js"
|
||||||
/*
|
/*
|
||||||
// TODO: Hacer un nuevo rol en los TFG: tutor externo (profesor de áreas no vinculadas con el centro, profesionales de empresas, etc.)
|
// TODO: Hacer un nuevo rol en los TFG: tutor externo (profesor de áreas no vinculadas con el centro, profesionales de empresas, etc.)
|
||||||
// TODO: Impedir la creación y edición de proyectos si no son editables.
|
// TODO: Impedir la creación y edición de proyectos si no son editables.
|
||||||
|
// TODO: Importante: filtrar proyectos por usuarios (igual que en trabajos o en asistencia)
|
||||||
|
|
||||||
|
Version 19.48: Oct 31, 2019 Code refactoring in HTML textarea. (246038 lines)
|
||||||
|
Version 19.47.2: Oct 31, 2019 Removed obsolete function to activate results in match questions. (246009 lines)
|
||||||
Version 19.47.1: Oct 31, 2019 Removed obsolete messages. (246033 lines)
|
Version 19.47.1: Oct 31, 2019 Removed obsolete messages. (246033 lines)
|
||||||
Version 19.47: Oct 31, 2019 Return to old way to activate showing of results in match question. (246230 lines)
|
Version 19.47: Oct 31, 2019 Return to old way to activate results in match questions. (246230 lines)
|
||||||
Version 19.46.10: Oct 31, 2019 Code refactoring in HTML images. (246196 lines)
|
Version 19.46.10: Oct 31, 2019 Code refactoring in HTML images. (246196 lines)
|
||||||
Version 19.46.9: Oct 30, 2019 Code refactoring in HTML images. (246241 lines)
|
Version 19.46.9: Oct 30, 2019 Code refactoring in HTML images. (246241 lines)
|
||||||
Version 19.46.8: Oct 30, 2019 Code refactoring in HTML images. (246244 lines)
|
Version 19.46.8: Oct 30, 2019 Code refactoring in HTML images. (246244 lines)
|
||||||
|
|
|
@ -296,13 +296,12 @@ static void Cty_Configuration (bool PrintView)
|
||||||
{
|
{
|
||||||
HTM_DIV_Begin ("class=\"CM\"");
|
HTM_DIV_Begin ("class=\"CM\"");
|
||||||
Frm_StartForm (ActChgCtyMapAtt);
|
Frm_StartForm (ActChgCtyMapAtt);
|
||||||
fprintf (Gbl.F.Out,"<textarea name=\"Attribution\""
|
HTM_TEXTAREA_Begin ("name=\"Attribution\" cols=\"50\" rows=\"2\""
|
||||||
" cols=\"50\" rows=\"2\""
|
" onchange=\"document.getElementById('%s').submit();\"",
|
||||||
" onchange=\"document.getElementById('%s').submit();\">",
|
Gbl.Form.Id);
|
||||||
Gbl.Form.Id);
|
|
||||||
if (MapAttribution)
|
if (MapAttribution)
|
||||||
fprintf (Gbl.F.Out,"%s",MapAttribution);
|
fprintf (Gbl.F.Out,"%s",MapAttribution);
|
||||||
fprintf (Gbl.F.Out,"</textarea>");
|
HTM_TEXTAREA_End ();
|
||||||
Frm_EndForm ();
|
Frm_EndForm ();
|
||||||
HTM_DIV_End ();
|
HTM_DIV_End ();
|
||||||
}
|
}
|
||||||
|
|
|
@ -929,9 +929,8 @@ static void Enr_PutAreaToEnterUsrsIDs (void)
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
HTM_TD_Begin ("class=\"LT\"");
|
HTM_TD_Begin ("class=\"LT\"");
|
||||||
fprintf (Gbl.F.Out,"<textarea id=\"UsrsIDs\" name=\"UsrsIDs\""
|
HTM_TEXTAREA_Begin ("id=\"UsrsIDs\" name=\"UsrsIDs\" cols=\"60\" rows=\"10\"");
|
||||||
" cols=\"60\" rows=\"10\">"
|
HTM_TEXTAREA_End ();
|
||||||
"</textarea>");
|
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
HTM_TR_End ();
|
HTM_TR_End ();
|
||||||
|
|
69
swad_exam.c
69
swad_exam.c
|
@ -1312,11 +1312,12 @@ static void Exa_ShowExamAnnouncement (long ExaCod,
|
||||||
|
|
||||||
HTM_TD_Begin ("class=\"%s LT\"",StyleNormal);
|
HTM_TD_Begin ("class=\"%s LT\"",StyleNormal);
|
||||||
if (TypeViewExamAnnouncement == Exa_FORM_VIEW)
|
if (TypeViewExamAnnouncement == Exa_FORM_VIEW)
|
||||||
fprintf (Gbl.F.Out,"<textarea id=\"Place\" name=\"Place\""
|
{
|
||||||
" cols=\"40\" rows=\"4\">"
|
HTM_TEXTAREA_Begin ("id=\"Place\" name=\"Place\" cols=\"40\" rows=\"4\"");
|
||||||
"%s"
|
fprintf (Gbl.F.Out,"%s",
|
||||||
"</textarea>",
|
|
||||||
Gbl.ExamAnns.ExaDat.Place);
|
Gbl.ExamAnns.ExaDat.Place);
|
||||||
|
HTM_TEXTAREA_End ();
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Str_ChangeFormat (Str_FROM_HTML,Str_TO_RIGOROUS_HTML,
|
Str_ChangeFormat (Str_FROM_HTML,Str_TO_RIGOROUS_HTML,
|
||||||
|
@ -1338,11 +1339,11 @@ static void Exa_ShowExamAnnouncement (long ExaCod,
|
||||||
|
|
||||||
HTM_TD_Begin ("class=\"%s LT\"",StyleNormal);
|
HTM_TD_Begin ("class=\"%s LT\"",StyleNormal);
|
||||||
if (TypeViewExamAnnouncement == Exa_FORM_VIEW)
|
if (TypeViewExamAnnouncement == Exa_FORM_VIEW)
|
||||||
fprintf (Gbl.F.Out,"<textarea id=\"ExamMode\" name=\"ExamMode\""
|
{
|
||||||
" cols=\"40\" rows=\"2\">"
|
HTM_TEXTAREA_Begin ("id=\"ExamMode\" name=\"ExamMode\" cols=\"40\" rows=\"2\"");
|
||||||
"%s"
|
fprintf (Gbl.F.Out,"%s",Gbl.ExamAnns.ExaDat.Mode);
|
||||||
"</textarea>",
|
HTM_TEXTAREA_End ();
|
||||||
Gbl.ExamAnns.ExaDat.Mode);
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Str_ChangeFormat (Str_FROM_HTML,Str_TO_RIGOROUS_HTML,
|
Str_ChangeFormat (Str_FROM_HTML,Str_TO_RIGOROUS_HTML,
|
||||||
|
@ -1364,11 +1365,11 @@ static void Exa_ShowExamAnnouncement (long ExaCod,
|
||||||
|
|
||||||
HTM_TD_Begin ("class=\"%s LT\"",StyleNormal);
|
HTM_TD_Begin ("class=\"%s LT\"",StyleNormal);
|
||||||
if (TypeViewExamAnnouncement == Exa_FORM_VIEW)
|
if (TypeViewExamAnnouncement == Exa_FORM_VIEW)
|
||||||
fprintf (Gbl.F.Out,"<textarea id=\"Structure\" name=\"Structure\""
|
{
|
||||||
" cols=\"40\" rows=\"8\">"
|
HTM_TEXTAREA_Begin ("id=\"Structure\" name=\"Structure\" cols=\"40\" rows=\"8\"");
|
||||||
"%s"
|
fprintf (Gbl.F.Out,"%s",Gbl.ExamAnns.ExaDat.Structure);
|
||||||
"</textarea>",
|
HTM_TEXTAREA_End ();
|
||||||
Gbl.ExamAnns.ExaDat.Structure);
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Str_ChangeFormat (Str_FROM_HTML,Str_TO_RIGOROUS_HTML,
|
Str_ChangeFormat (Str_FROM_HTML,Str_TO_RIGOROUS_HTML,
|
||||||
|
@ -1390,11 +1391,11 @@ static void Exa_ShowExamAnnouncement (long ExaCod,
|
||||||
|
|
||||||
HTM_TD_Begin ("class=\"%s LT\"",StyleNormal);
|
HTM_TD_Begin ("class=\"%s LT\"",StyleNormal);
|
||||||
if (TypeViewExamAnnouncement == Exa_FORM_VIEW)
|
if (TypeViewExamAnnouncement == Exa_FORM_VIEW)
|
||||||
fprintf (Gbl.F.Out,"<textarea id=\"DocRequired\" name=\"DocRequired\""
|
{
|
||||||
" cols=\"40\" rows=\"2\">"
|
HTM_TEXTAREA_Begin ("id=\"DocRequired\" name=\"DocRequired\" cols=\"40\" rows=\"2\"");
|
||||||
"%s"
|
fprintf (Gbl.F.Out,"%s",Gbl.ExamAnns.ExaDat.DocRequired);
|
||||||
"</textarea>",
|
HTM_TEXTAREA_End ();
|
||||||
Gbl.ExamAnns.ExaDat.DocRequired);
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Str_ChangeFormat (Str_FROM_HTML,Str_TO_RIGOROUS_HTML,
|
Str_ChangeFormat (Str_FROM_HTML,Str_TO_RIGOROUS_HTML,
|
||||||
|
@ -1416,11 +1417,11 @@ static void Exa_ShowExamAnnouncement (long ExaCod,
|
||||||
|
|
||||||
HTM_TD_Begin ("class=\"%s LT\"",StyleNormal);
|
HTM_TD_Begin ("class=\"%s LT\"",StyleNormal);
|
||||||
if (TypeViewExamAnnouncement == Exa_FORM_VIEW)
|
if (TypeViewExamAnnouncement == Exa_FORM_VIEW)
|
||||||
fprintf (Gbl.F.Out,"<textarea id=\"MatRequired\" name=\"MatRequired\""
|
{
|
||||||
" cols=\"40\" rows=\"4\">"
|
HTM_TEXTAREA_Begin ("id=\"MatRequired\" name=\"MatRequired\" cols=\"40\" rows=\"4\"");
|
||||||
"%s"
|
fprintf (Gbl.F.Out,"%s",Gbl.ExamAnns.ExaDat.MatRequired);
|
||||||
"</textarea>",
|
HTM_TEXTAREA_End ();
|
||||||
Gbl.ExamAnns.ExaDat.MatRequired);
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Str_ChangeFormat (Str_FROM_HTML,Str_TO_RIGOROUS_HTML,
|
Str_ChangeFormat (Str_FROM_HTML,Str_TO_RIGOROUS_HTML,
|
||||||
|
@ -1442,11 +1443,11 @@ static void Exa_ShowExamAnnouncement (long ExaCod,
|
||||||
|
|
||||||
HTM_TD_Begin ("class=\"%s LT\"",StyleNormal);
|
HTM_TD_Begin ("class=\"%s LT\"",StyleNormal);
|
||||||
if (TypeViewExamAnnouncement == Exa_FORM_VIEW)
|
if (TypeViewExamAnnouncement == Exa_FORM_VIEW)
|
||||||
fprintf (Gbl.F.Out,"<textarea id=\"MatAllowed\" name=\"MatAllowed\""
|
{
|
||||||
" cols=\"40\" rows=\"4\">"
|
HTM_TEXTAREA_Begin ("id=\"MatAllowed\" name=\"MatAllowed\" cols=\"40\" rows=\"4\"");
|
||||||
"%s"
|
fprintf (Gbl.F.Out,"%s",Gbl.ExamAnns.ExaDat.MatAllowed);
|
||||||
"</textarea>",
|
HTM_TEXTAREA_End ();
|
||||||
Gbl.ExamAnns.ExaDat.MatAllowed);
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Str_ChangeFormat (Str_FROM_HTML,Str_TO_RIGOROUS_HTML,
|
Str_ChangeFormat (Str_FROM_HTML,Str_TO_RIGOROUS_HTML,
|
||||||
|
@ -1468,11 +1469,11 @@ static void Exa_ShowExamAnnouncement (long ExaCod,
|
||||||
|
|
||||||
HTM_TD_Begin ("class=\"%s LT\"",StyleNormal);
|
HTM_TD_Begin ("class=\"%s LT\"",StyleNormal);
|
||||||
if (TypeViewExamAnnouncement == Exa_FORM_VIEW)
|
if (TypeViewExamAnnouncement == Exa_FORM_VIEW)
|
||||||
fprintf (Gbl.F.Out,"<textarea id=\"OtherInfo\" name=\"OtherInfo\""
|
{
|
||||||
" cols=\"40\" rows=\"5\">"
|
HTM_TEXTAREA_Begin ("id=\"OtherInfo\" name=\"OtherInfo\" cols=\"40\" rows=\"5\"");
|
||||||
"%s"
|
fprintf (Gbl.F.Out,"%s",Gbl.ExamAnns.ExaDat.OtherInfo);
|
||||||
"</textarea>",
|
HTM_TEXTAREA_End ();
|
||||||
Gbl.ExamAnns.ExaDat.OtherInfo);
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Str_ChangeFormat (Str_FROM_HTML,Str_TO_RIGOROUS_HTML,
|
Str_ChangeFormat (Str_FROM_HTML,Str_TO_RIGOROUS_HTML,
|
||||||
|
|
|
@ -3931,10 +3931,8 @@ static void For_WriteFormForumPst (bool IsReply,const char *Subject)
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
HTM_TD_Begin ("class=\"LT\"");
|
HTM_TD_Begin ("class=\"LT\"");
|
||||||
fprintf (Gbl.F.Out,"<textarea id=\"Content\" name=\"Content\""
|
HTM_TEXTAREA_Begin ("id=\"Content\" name=\"Content\" class=\"MSG_CONTENT\" rows=\"10\"");
|
||||||
" class=\"MSG_CONTENT\""
|
HTM_TEXTAREA_End ();
|
||||||
" rows=\"10\">"
|
|
||||||
"</textarea>");
|
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
HTM_TR_End ();
|
HTM_TR_End ();
|
||||||
|
|
|
@ -1166,11 +1166,10 @@ static void Gam_PutFormsEditionGame (struct Game *Game,bool ItsANewGame)
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
HTM_TD_Begin ("class=\"LT\"");
|
HTM_TD_Begin ("class=\"LT\"");
|
||||||
fprintf (Gbl.F.Out,"<textarea id=\"Txt\" name=\"Txt\""
|
HTM_TEXTAREA_Begin ("id=\"Txt\" name=\"Txt\" cols=\"60\" rows=\"10\"");
|
||||||
" cols=\"60\" rows=\"10\">");
|
|
||||||
if (!ItsANewGame)
|
if (!ItsANewGame)
|
||||||
fprintf (Gbl.F.Out,"%s",Txt);
|
fprintf (Gbl.F.Out,"%s",Txt);
|
||||||
fprintf (Gbl.F.Out,"</textarea>");
|
HTM_TEXTAREA_End ();
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
HTM_TR_End ();
|
HTM_TR_End ();
|
||||||
|
|
14
swad_info.c
14
swad_info.c
|
@ -2081,10 +2081,9 @@ void Inf_EditPlainTxtInfo (void)
|
||||||
/***** Edition area *****/
|
/***** Edition area *****/
|
||||||
HTM_DIV_Begin ("class=\"CM\"");
|
HTM_DIV_Begin ("class=\"CM\"");
|
||||||
Lay_HelpPlainEditor ();
|
Lay_HelpPlainEditor ();
|
||||||
fprintf (Gbl.F.Out,"<textarea name=\"Txt\" cols=\"80\" rows=\"20\">"
|
HTM_TEXTAREA_Begin ("name=\"Txt\" cols=\"80\" rows=\"20\"");
|
||||||
"%s"
|
fprintf (Gbl.F.Out,"%s",TxtHTML);
|
||||||
"</textarea>",
|
HTM_TEXTAREA_End ();
|
||||||
TxtHTML);
|
|
||||||
HTM_DIV_End ();
|
HTM_DIV_End ();
|
||||||
|
|
||||||
/***** Send button and end box *****/
|
/***** Send button and end box *****/
|
||||||
|
@ -2132,10 +2131,9 @@ void Inf_EditRichTxtInfo (void)
|
||||||
/***** Edition area *****/
|
/***** Edition area *****/
|
||||||
HTM_DIV_Begin ("class=\"CM\"");
|
HTM_DIV_Begin ("class=\"CM\"");
|
||||||
Lay_HelpRichEditor ();
|
Lay_HelpRichEditor ();
|
||||||
fprintf (Gbl.F.Out,"<textarea name=\"Txt\" cols=\"80\" rows=\"20\">"
|
HTM_TEXTAREA_Begin ("name=\"Txt\" cols=\"80\" rows=\"20\"");
|
||||||
"%s"
|
fprintf (Gbl.F.Out,"%s",TxtHTML);
|
||||||
"</textarea>",
|
HTM_TEXTAREA_End ();
|
||||||
TxtHTML);
|
|
||||||
HTM_DIV_End ();
|
HTM_DIV_End ();
|
||||||
|
|
||||||
/***** Send button and end box *****/
|
/***** Send button and end box *****/
|
||||||
|
|
30
swad_match.c
30
swad_match.c
|
@ -163,7 +163,6 @@ static void Mch_ShowFormColumns (struct Match *Match);
|
||||||
static void Mch_PutParamNumCols (unsigned NumCols);
|
static void Mch_PutParamNumCols (unsigned NumCols);
|
||||||
|
|
||||||
static void Mch_ShowMatchTitle (struct Match *Match);
|
static void Mch_ShowMatchTitle (struct Match *Match);
|
||||||
// static void Mch_ShowFormViewResult (struct Match *Match);
|
|
||||||
static void Mch_PutCheckboxResult (struct Match *Match);
|
static void Mch_PutCheckboxResult (struct Match *Match);
|
||||||
static void Mch_ShowQuestionAndAnswersTch (struct Match *Match);
|
static void Mch_ShowQuestionAndAnswersTch (struct Match *Match);
|
||||||
static void Mch_WriteAnswersMatchResult (struct Match *Match,
|
static void Mch_WriteAnswersMatchResult (struct Match *Match,
|
||||||
|
@ -2118,10 +2117,8 @@ static void Mch_ShowLeftColumnTch (struct Match *Match)
|
||||||
Mch_PutMatchControlButtons (Match);
|
Mch_PutMatchControlButtons (Match);
|
||||||
|
|
||||||
/***** Put forms to choice which projects to show *****/
|
/***** Put forms to choice which projects to show *****/
|
||||||
/* 1st. row */
|
|
||||||
Set_StartSettingsHead ();
|
Set_StartSettingsHead ();
|
||||||
Mch_ShowFormColumns (Match);
|
Mch_ShowFormColumns (Match);
|
||||||
// Mch_ShowFormViewResult (Match);
|
|
||||||
Set_EndSettingsHead ();
|
Set_EndSettingsHead ();
|
||||||
|
|
||||||
/***** Write button to request viewing results *****/
|
/***** Write button to request viewing results *****/
|
||||||
|
@ -2404,33 +2401,6 @@ static void Mch_PutParamNumCols (unsigned NumCols) // Number of columns
|
||||||
Par_PutHiddenParamUnsigned ("NumCols",NumCols);
|
Par_PutHiddenParamUnsigned ("NumCols",NumCols);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
|
||||||
/******************* Put form to select if show results **********************/
|
|
||||||
/*****************************************************************************/
|
|
||||||
/*
|
|
||||||
static void Mch_ShowFormViewResult (struct Match *Match)
|
|
||||||
{
|
|
||||||
extern const char *Txt_View_results;
|
|
||||||
|
|
||||||
***** Begin selector *****
|
|
||||||
Set_StartOneSettingSelector ();
|
|
||||||
HTM_DIV_Begin ("class=\"%s\"",(Match->Status.ShowQstResults) ? "PREF_ON" :
|
|
||||||
"PREF_OFF");
|
|
||||||
|
|
||||||
***** Begin form *****
|
|
||||||
Frm_StartForm (ActChgVisResMchQst);
|
|
||||||
Mch_PutParamMchCod (Match->MchCod); // Current match being played
|
|
||||||
|
|
||||||
Ico_PutSettingIconLink ("poll-h.svg",Txt_View_results);
|
|
||||||
|
|
||||||
***** End form *****
|
|
||||||
Frm_EndForm ();
|
|
||||||
|
|
||||||
***** End selector *****
|
|
||||||
HTM_DIV_End ();
|
|
||||||
Set_EndOneSettingSelector ();
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/***************** Put checkbox to select if show results ********************/
|
/***************** Put checkbox to select if show results ********************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
|
@ -496,10 +496,9 @@ static void Msg_WriteFormUsrsIDsOrNicksOtherRecipients (void)
|
||||||
HTM_TR_Begin (NULL);
|
HTM_TR_Begin (NULL);
|
||||||
|
|
||||||
HTM_TD_Begin ("colspan=\"%u\" class=\"LM\"",ColSpan);
|
HTM_TD_Begin ("colspan=\"%u\" class=\"LM\"",ColSpan);
|
||||||
fprintf (Gbl.F.Out,"<textarea id=\"OtherRecipients\" name=\"OtherRecipients\""
|
HTM_TEXTAREA_Begin ("id=\"OtherRecipients\" name=\"OtherRecipients\""
|
||||||
" class=\"MSG_RECIPIENTS\" rows=\"2\""
|
" class=\"MSG_RECIPIENTS\" rows=\"2\" placeholder=\"%s\"",
|
||||||
" placeholder=\"%s\">",
|
Txt_nicks_emails_or_IDs_separated_by_commas);
|
||||||
Txt_nicks_emails_or_IDs_separated_by_commas);
|
|
||||||
if (Gbl.Usrs.ListOtherRecipients[0])
|
if (Gbl.Usrs.ListOtherRecipients[0])
|
||||||
fprintf (Gbl.F.Out,"%s",Gbl.Usrs.ListOtherRecipients);
|
fprintf (Gbl.F.Out,"%s",Gbl.Usrs.ListOtherRecipients);
|
||||||
else if (Gbl.Usrs.Other.UsrDat.UsrCod > 0) // If there is a recipient
|
else if (Gbl.Usrs.Other.UsrDat.UsrCod > 0) // If there is a recipient
|
||||||
|
@ -507,7 +506,7 @@ static void Msg_WriteFormUsrsIDsOrNicksOtherRecipients (void)
|
||||||
// write @nickname of original sender
|
// write @nickname of original sender
|
||||||
if (Nck_GetNicknameFromUsrCod (Gbl.Usrs.Other.UsrDat.UsrCod,Nickname))
|
if (Nck_GetNicknameFromUsrCod (Gbl.Usrs.Other.UsrDat.UsrCod,Nickname))
|
||||||
fprintf (Gbl.F.Out,"@%s",Nickname);
|
fprintf (Gbl.F.Out,"@%s",Nickname);
|
||||||
fprintf (Gbl.F.Out,"</textarea>");
|
HTM_TEXTAREA_End ();
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
HTM_TR_End ();
|
HTM_TR_End ();
|
||||||
|
@ -544,8 +543,8 @@ static void Msg_WriteFormSubjectAndContentMsgToUsrs (char Content[Cns_MAX_BYTES_
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
HTM_TD_Begin ("class=\"LM\"");
|
HTM_TD_Begin ("class=\"LM\"");
|
||||||
fprintf (Gbl.F.Out,"<textarea id=\"MsgSubject\" name=\"Subject\""
|
HTM_TEXTAREA_Begin ("id=\"MsgSubject\" name=\"Subject\""
|
||||||
" class=\"MSG_SUBJECT\" rows=\"2\">");
|
" class=\"MSG_SUBJECT\" rows=\"2\"");
|
||||||
|
|
||||||
/* If message is a reply ==> get original message */
|
/* If message is a reply ==> get original message */
|
||||||
if (MsgCod > 0) // It's a reply
|
if (MsgCod > 0) // It's a reply
|
||||||
|
@ -578,7 +577,9 @@ static void Msg_WriteFormSubjectAndContentMsgToUsrs (char Content[Cns_MAX_BYTES_
|
||||||
/* Write subject */
|
/* Write subject */
|
||||||
if (!SubjectAndContentComeFromForm)
|
if (!SubjectAndContentComeFromForm)
|
||||||
fprintf (Gbl.F.Out,"Re: ");
|
fprintf (Gbl.F.Out,"Re: ");
|
||||||
fprintf (Gbl.F.Out,"%s</textarea>",Gbl.Msg.Subject);
|
fprintf (Gbl.F.Out,"%s",Gbl.Msg.Subject);
|
||||||
|
|
||||||
|
HTM_TEXTAREA_End ();
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
HTM_TR_End ();
|
HTM_TR_End ();
|
||||||
|
@ -594,8 +595,8 @@ static void Msg_WriteFormSubjectAndContentMsgToUsrs (char Content[Cns_MAX_BYTES_
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
HTM_TD_Begin ("class=\"LM\"");
|
HTM_TD_Begin ("class=\"LM\"");
|
||||||
fprintf (Gbl.F.Out,"<textarea id=\"MsgContent\" name=\"Content\""
|
HTM_TEXTAREA_Begin ("id=\"MsgContent\" name=\"Content\""
|
||||||
" class=\"MSG_CONTENT\" rows=\"20\">");
|
" class=\"MSG_CONTENT\" rows=\"20\"");
|
||||||
|
|
||||||
/* Start textarea with a '\n', that will be not visible in textarea.
|
/* Start textarea with a '\n', that will be not visible in textarea.
|
||||||
When Content is "\nLorem ipsum" (a white line before "Lorem ipsum"),
|
When Content is "\nLorem ipsum" (a white line before "Lorem ipsum"),
|
||||||
|
@ -612,7 +613,9 @@ static void Msg_WriteFormSubjectAndContentMsgToUsrs (char Content[Cns_MAX_BYTES_
|
||||||
else // It's not a reply
|
else // It's not a reply
|
||||||
{
|
{
|
||||||
/* End message subject */
|
/* End message subject */
|
||||||
fprintf (Gbl.F.Out,"%s</textarea>",Gbl.Msg.Subject);
|
fprintf (Gbl.F.Out,"%s",Gbl.Msg.Subject);
|
||||||
|
|
||||||
|
HTM_TEXTAREA_End ();
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
HTM_TR_End ();
|
HTM_TR_End ();
|
||||||
|
@ -629,8 +632,8 @@ static void Msg_WriteFormSubjectAndContentMsgToUsrs (char Content[Cns_MAX_BYTES_
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
HTM_TD_Begin ("class=\"LM\"");
|
HTM_TD_Begin ("class=\"LM\"");
|
||||||
fprintf (Gbl.F.Out,"<textarea id=\"MsgContent\" name=\"Content\""
|
HTM_TEXTAREA_Begin ("id=\"MsgContent\" name=\"Content\""
|
||||||
" class=\"MSG_CONTENT\" rows=\"20\">");
|
" class=\"MSG_CONTENT\" rows=\"20\"");
|
||||||
|
|
||||||
/* Start textarea with a '\n', that will be not visible in textarea.
|
/* Start textarea with a '\n', that will be not visible in textarea.
|
||||||
When Content is "\nLorem ipsum" (a white line before "Lorem ipsum"),
|
When Content is "\nLorem ipsum" (a white line before "Lorem ipsum"),
|
||||||
|
@ -638,7 +641,8 @@ static void Msg_WriteFormSubjectAndContentMsgToUsrs (char Content[Cns_MAX_BYTES_
|
||||||
by "Lorem", without the white line */
|
by "Lorem", without the white line */
|
||||||
fprintf (Gbl.F.Out,"\n%s",Content);
|
fprintf (Gbl.F.Out,"\n%s",Content);
|
||||||
}
|
}
|
||||||
fprintf (Gbl.F.Out,"</textarea>");
|
|
||||||
|
HTM_TEXTAREA_End ();
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
HTM_TR_End ();
|
HTM_TR_End ();
|
||||||
|
|
|
@ -113,9 +113,9 @@ void Not_ShowFormNotice (void)
|
||||||
Hlp_MESSAGES_Notices,Box_NOT_CLOSABLE);
|
Hlp_MESSAGES_Notices,Box_NOT_CLOSABLE);
|
||||||
|
|
||||||
/***** Message body *****/
|
/***** Message body *****/
|
||||||
fprintf (Gbl.F.Out,"<textarea name=\"Content\" cols=\"30\" rows=\"10\""
|
HTM_TEXTAREA_Begin ("name=\"Content\" cols=\"30\" rows=\"10\""
|
||||||
" autofocus=\"autofocus\" required=\"required\">"
|
" autofocus=\"autofocus\" required=\"required\"");
|
||||||
"</textarea>");
|
HTM_TEXTAREA_End ();
|
||||||
|
|
||||||
/***** Send button and end box *****/
|
/***** Send button and end box *****/
|
||||||
Box_EndBoxWithButton (Btn_CREATE_BUTTON,Txt_Create_notice);
|
Box_EndBoxWithButton (Btn_CREATE_BUTTON,Txt_Create_notice);
|
||||||
|
|
|
@ -3459,11 +3459,11 @@ static void Prj_EditOneProjectTxtArea (const char *Id,
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
HTM_TD_Begin ("class=\"LT\"");
|
HTM_TD_Begin ("class=\"LT\"");
|
||||||
fprintf (Gbl.F.Out,"<textarea id=\"%s\" name=\"%s\" cols=\"60\" rows=\"%u\"",
|
HTM_TEXTAREA_Begin ("id=\"%s\" name=\"%s\" cols=\"60\" rows=\"%u\"%s",
|
||||||
Id,Id,NumRows);
|
Id,Id,NumRows,Required ? " required=\"required\"" :
|
||||||
if (Required)
|
"");
|
||||||
fprintf (Gbl.F.Out," required=\"required\"");
|
fprintf (Gbl.F.Out,"%s",TxtField);
|
||||||
fprintf (Gbl.F.Out,">%s</textarea>",TxtField);
|
HTM_TEXTAREA_End ();
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
HTM_TR_End ();
|
HTM_TR_End ();
|
||||||
|
|
|
@ -1826,13 +1826,13 @@ static void Rec_ShowCrsRecord (Rec_CourseRecordViewType_t TypeOfView,
|
||||||
HTM_TD_Begin ("class=\"REC_C2_BOT REC_DAT_BOLD LT COLOR%u\"",Gbl.RowEvenOdd);
|
HTM_TD_Begin ("class=\"REC_C2_BOT REC_DAT_BOLD LT COLOR%u\"",Gbl.RowEvenOdd);
|
||||||
if (ICanEditThisField) // Show with form
|
if (ICanEditThisField) // Show with form
|
||||||
{
|
{
|
||||||
fprintf (Gbl.F.Out,"<textarea name=\"Field%ld\" rows=\"%u\""
|
HTM_TEXTAREA_Begin ("name=\"Field%ld\" rows=\"%u\""
|
||||||
" class=\"REC_C2_BOT_INPUT\">",
|
" class=\"REC_C2_BOT_INPUT\"",
|
||||||
Gbl.Crs.Records.LstFields.Lst[NumField].FieldCod,
|
Gbl.Crs.Records.LstFields.Lst[NumField].FieldCod,
|
||||||
Gbl.Crs.Records.LstFields.Lst[NumField].NumLines);
|
Gbl.Crs.Records.LstFields.Lst[NumField].NumLines);
|
||||||
if (ThisFieldHasText)
|
if (ThisFieldHasText)
|
||||||
fprintf (Gbl.F.Out,"%s",row[0]);
|
fprintf (Gbl.F.Out,"%s",row[0]);
|
||||||
fprintf (Gbl.F.Out,"</textarea>");
|
HTM_TEXTAREA_End ();
|
||||||
}
|
}
|
||||||
else // Show without form
|
else // Show without form
|
||||||
{
|
{
|
||||||
|
@ -3573,11 +3573,12 @@ static void Rec_ShowComments (struct UsrData *UsrDat,
|
||||||
if (ShowData)
|
if (ShowData)
|
||||||
{
|
{
|
||||||
if (ICanEdit)
|
if (ICanEdit)
|
||||||
fprintf (Gbl.F.Out,"<textarea id=\"Comments\" name=\"Comments\""
|
{
|
||||||
" rows=\"4\" class=\"REC_C2_BOT_INPUT\">"
|
HTM_TEXTAREA_Begin ("id=\"Comments\" name=\"Comments\""
|
||||||
"%s"
|
" rows=\"4\" class=\"REC_C2_BOT_INPUT\"");
|
||||||
"</textarea>",
|
fprintf (Gbl.F.Out,"%s",UsrDat->Comments);
|
||||||
UsrDat->Comments);
|
HTM_TEXTAREA_End ();
|
||||||
|
}
|
||||||
else if (UsrDat->Comments[0])
|
else if (UsrDat->Comments[0])
|
||||||
{
|
{
|
||||||
Str_ChangeFormat (Str_FROM_HTML,Str_TO_RIGOROUS_HTML, // Convert from HTML to rigorous HTML
|
Str_ChangeFormat (Str_FROM_HTML,Str_TO_RIGOROUS_HTML, // Convert from HTML to rigorous HTML
|
||||||
|
|
|
@ -1937,11 +1937,10 @@ void Svy_RequestCreatOrEditSvy (void)
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
HTM_TD_Begin ("class=\"LT\"");
|
HTM_TD_Begin ("class=\"LT\"");
|
||||||
fprintf (Gbl.F.Out,"<textarea id=\"Txt\" name=\"Txt\""
|
HTM_TEXTAREA_Begin ("id=\"Txt\" name=\"Txt\" cols=\"60\" rows=\"10\"");
|
||||||
" cols=\"60\" rows=\"10\">");
|
|
||||||
if (!ItsANewSurvey)
|
if (!ItsANewSurvey)
|
||||||
fprintf (Gbl.F.Out,"%s",Txt);
|
fprintf (Gbl.F.Out,"%s",Txt);
|
||||||
fprintf (Gbl.F.Out,"</textarea>");
|
HTM_TEXTAREA_End ();
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
HTM_TR_End ();
|
HTM_TR_End ();
|
||||||
|
@ -2731,10 +2730,9 @@ static void Svy_ShowFormEditOneQst (long SvyCod,struct SurveyQuestion *SvyQst,
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
HTM_TD_Begin ("class=\"LT\"");
|
HTM_TD_Begin ("class=\"LT\"");
|
||||||
fprintf (Gbl.F.Out,"<textarea id=\"Txt\" name=\"Txt\" cols=\"60\" rows=\"4\">"
|
HTM_TEXTAREA_Begin ("id=\"Txt\" name=\"Txt\" cols=\"60\" rows=\"4\"");
|
||||||
"%s"
|
fprintf (Gbl.F.Out,"%s",Txt);
|
||||||
"</textarea>",
|
HTM_TEXTAREA_End ();
|
||||||
Txt);
|
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
HTM_TR_End ();
|
HTM_TR_End ();
|
||||||
|
@ -2788,12 +2786,11 @@ static void Svy_ShowFormEditOneQst (long SvyCod,struct SurveyQuestion *SvyQst,
|
||||||
|
|
||||||
/* Answer text */
|
/* Answer text */
|
||||||
HTM_TD_Begin ("class=\"RT\"");
|
HTM_TD_Begin ("class=\"RT\"");
|
||||||
fprintf (Gbl.F.Out,"<textarea id=\"AnsStr%u\" name=\"AnsStr%u\""
|
HTM_TEXTAREA_Begin ("id=\"AnsStr%u\" name=\"AnsStr%u\" cols=\"50\" rows=\"1\"",
|
||||||
" cols=\"50\" rows=\"1\">",
|
NumAns,NumAns);
|
||||||
NumAns,NumAns);
|
|
||||||
if (SvyQst->AnsChoice[NumAns].Text)
|
if (SvyQst->AnsChoice[NumAns].Text)
|
||||||
fprintf (Gbl.F.Out,"%s",SvyQst->AnsChoice[NumAns].Text);
|
fprintf (Gbl.F.Out,"%s",SvyQst->AnsChoice[NumAns].Text);
|
||||||
fprintf (Gbl.F.Out,"</textarea>");
|
HTM_TEXTAREA_End ();
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
HTM_TR_End ();
|
HTM_TR_End ();
|
||||||
|
|
47
swad_test.c
47
swad_test.c
|
@ -5157,26 +5157,25 @@ static void Tst_PutFormEditOneQst (char Stem[Cns_MAX_BYTES_TEXT + 1],
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
HTM_TD_Begin ("class=\"LT\"");
|
HTM_TD_Begin ("class=\"LT\"");
|
||||||
fprintf (Gbl.F.Out,"<textarea id=\"Stem\" name=\"Stem\""
|
HTM_TEXTAREA_Begin ("id=\"Stem\" name=\"Stem\" class=\"STEM_TEXTAREA\""
|
||||||
" class=\"STEM_TEXTAREA\" rows=\"5\" required=\"required\">"
|
" rows=\"5\" required=\"required\"");
|
||||||
"%s"
|
fprintf (Gbl.F.Out,"%s",Stem);
|
||||||
"</textarea><br />",
|
HTM_TEXTAREA_End ();
|
||||||
Stem);
|
fprintf (Gbl.F.Out,"<br />");
|
||||||
Tst_PutFormToEditQstMedia (&Gbl.Test.Media,-1,
|
Tst_PutFormToEditQstMedia (&Gbl.Test.Media,-1,
|
||||||
false);
|
false);
|
||||||
|
|
||||||
/***** Feedback *****/
|
/***** Feedback *****/
|
||||||
fprintf (Gbl.F.Out,"<label class=\"%s\">"
|
fprintf (Gbl.F.Out,"<label class=\"%s\">"
|
||||||
"%s (%s):<br />"
|
"%s (%s):<br />",
|
||||||
"<textarea name=\"Feedback\""
|
|
||||||
" class=\"STEM_TEXTAREA\" rows=\"2\">",
|
|
||||||
The_ClassFormInBox[Gbl.Prefs.Theme],
|
The_ClassFormInBox[Gbl.Prefs.Theme],
|
||||||
Txt_Feedback,Txt_optional);
|
Txt_Feedback,Txt_optional);
|
||||||
|
HTM_TEXTAREA_Begin ("name=\"Feedback\" class=\"STEM_TEXTAREA\" rows=\"2\"");
|
||||||
if (Feedback)
|
if (Feedback)
|
||||||
if (Feedback[0])
|
if (Feedback[0])
|
||||||
fprintf (Gbl.F.Out,"%s",Feedback);
|
fprintf (Gbl.F.Out,"%s",Feedback);
|
||||||
fprintf (Gbl.F.Out,"</textarea>"
|
HTM_TEXTAREA_End ();
|
||||||
"</label>");
|
fprintf (Gbl.F.Out,"</label>");
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
HTM_TR_End ();
|
HTM_TR_End ();
|
||||||
|
@ -5363,15 +5362,12 @@ static void Tst_PutFormEditOneQst (char Stem[Cns_MAX_BYTES_TEXT + 1],
|
||||||
" style=\"display:none;\""); // Answer does not have content ==> Hide column
|
" style=\"display:none;\""); // Answer does not have content ==> Hide column
|
||||||
|
|
||||||
/* Answer text */
|
/* Answer text */
|
||||||
fprintf (Gbl.F.Out,"<textarea name=\"AnsStr%u\""
|
HTM_TEXTAREA_Begin ("name=\"AnsStr%u\" class=\"ANSWER_TEXTAREA\" rows=\"5\"%s",
|
||||||
" class=\"ANSWER_TEXTAREA\" rows=\"5\"",
|
NumOpt,OptionsDisabled ? " disabled=\"disabled\"" :
|
||||||
NumOpt);
|
"");
|
||||||
if (OptionsDisabled)
|
|
||||||
fprintf (Gbl.F.Out," disabled=\"disabled\"");
|
|
||||||
fprintf (Gbl.F.Out,">");
|
|
||||||
if (AnswerHasContent)
|
if (AnswerHasContent)
|
||||||
fprintf (Gbl.F.Out,"%s",Gbl.Test.Answer.Options[NumOpt].Text);
|
fprintf (Gbl.F.Out,"%s",Gbl.Test.Answer.Options[NumOpt].Text);
|
||||||
fprintf (Gbl.F.Out,"</textarea>");
|
HTM_TEXTAREA_End ();
|
||||||
|
|
||||||
/* Media */
|
/* Media */
|
||||||
Tst_PutFormToEditQstMedia (&Gbl.Test.Answer.Options[NumOpt].Media,
|
Tst_PutFormToEditQstMedia (&Gbl.Test.Answer.Options[NumOpt].Media,
|
||||||
|
@ -5379,19 +5375,16 @@ static void Tst_PutFormEditOneQst (char Stem[Cns_MAX_BYTES_TEXT + 1],
|
||||||
OptionsDisabled);
|
OptionsDisabled);
|
||||||
|
|
||||||
/* Feedback */
|
/* Feedback */
|
||||||
fprintf (Gbl.F.Out,"<label class=\"%s\">%s (%s):<br />"
|
fprintf (Gbl.F.Out,"<label class=\"%s\">%s (%s):<br />",
|
||||||
"<textarea name=\"FbStr%u\""
|
The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Feedback,Txt_optional);
|
||||||
" class=\"ANSWER_TEXTAREA\" rows=\"2\"",
|
HTM_TEXTAREA_Begin ("name=\"FbStr%u\" class=\"ANSWER_TEXTAREA\" rows=\"2\"%s",
|
||||||
The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Feedback,Txt_optional,
|
NumOpt,OptionsDisabled ? " disabled=\"disabled\"" :
|
||||||
NumOpt);
|
"");
|
||||||
if (OptionsDisabled)
|
|
||||||
fprintf (Gbl.F.Out," disabled=\"disabled\"");
|
|
||||||
fprintf (Gbl.F.Out,">");
|
|
||||||
if (Gbl.Test.Answer.Options[NumOpt].Feedback)
|
if (Gbl.Test.Answer.Options[NumOpt].Feedback)
|
||||||
if (Gbl.Test.Answer.Options[NumOpt].Feedback[0])
|
if (Gbl.Test.Answer.Options[NumOpt].Feedback[0])
|
||||||
fprintf (Gbl.F.Out,"%s",Gbl.Test.Answer.Options[NumOpt].Feedback);
|
fprintf (Gbl.F.Out,"%s",Gbl.Test.Answer.Options[NumOpt].Feedback);
|
||||||
fprintf (Gbl.F.Out,"</textarea>"
|
HTM_TEXTAREA_End ();
|
||||||
"</label>");
|
fprintf (Gbl.F.Out,"</label>");
|
||||||
|
|
||||||
/* End of right column */
|
/* End of right column */
|
||||||
HTM_DIV_End ();
|
HTM_DIV_End ();
|
||||||
|
|
|
@ -509,11 +509,11 @@ static void TsI_ImportQuestionsFromXMLBuffer (const char *XMLBuffer)
|
||||||
|
|
||||||
/***** Print XML tree *****/
|
/***** Print XML tree *****/
|
||||||
HTM_DIV_Begin ("class=\"TEST_FILE_CONTENT\"");
|
HTM_DIV_Begin ("class=\"TEST_FILE_CONTENT\"");
|
||||||
fprintf (Gbl.F.Out,"<textarea title=\"%s\" cols=\"60\" rows=\"5\""
|
HTM_TEXTAREA_Begin ("title=\"%s\" cols=\"60\" rows=\"5\""
|
||||||
" spellcheck=\"false\" readonly>",
|
" spellcheck=\"false\" readonly",
|
||||||
Txt_XML_file_content);
|
Txt_XML_file_content);
|
||||||
XML_PrintTree (RootElem);
|
XML_PrintTree (RootElem);
|
||||||
fprintf (Gbl.F.Out,"</textarea>");
|
HTM_TEXTAREA_End ();
|
||||||
HTM_DIV_End ();
|
HTM_DIV_End ();
|
||||||
|
|
||||||
/***** Get questions from XML tree and print them *****/
|
/***** Get questions from XML tree and print them *****/
|
||||||
|
|
|
@ -2366,14 +2366,13 @@ static void TL_PutTextarea (const char *Placeholder,const char *ClassTextArea)
|
||||||
Frm_SetUniqueId (IdDivImgButton);
|
Frm_SetUniqueId (IdDivImgButton);
|
||||||
|
|
||||||
/***** Textarea to write the content *****/
|
/***** Textarea to write the content *****/
|
||||||
fprintf (Gbl.F.Out,"<textarea name=\"Content\" rows=\"1\" maxlength=\"%u\""
|
HTM_TEXTAREA_Begin ("name=\"Content\" rows=\"1\" maxlength=\"%u\""
|
||||||
" placeholder=\"%s…\""
|
" placeholder=\"%s…\" class=\"%s\""
|
||||||
" class=\"%s\""
|
" onfocus=\"expandTextarea(this,'%s','6');\"",
|
||||||
" onfocus=\"expandTextarea(this,'%s','6');\">"
|
TL_MAX_CHARS_IN_POST,
|
||||||
"</textarea>",
|
Placeholder,ClassTextArea,
|
||||||
TL_MAX_CHARS_IN_POST,
|
IdDivImgButton);
|
||||||
Placeholder,ClassTextArea,
|
HTM_TEXTAREA_End ();
|
||||||
IdDivImgButton);
|
|
||||||
|
|
||||||
/***** Start concealable div *****/
|
/***** Start concealable div *****/
|
||||||
HTM_DIV_Begin ("id=\"%s\" style=\"display:none;\"",IdDivImgButton);
|
HTM_DIV_Begin ("id=\"%s\" style=\"display:none;\"",IdDivImgButton);
|
||||||
|
|
Loading…
Reference in New Issue