diff --git a/swad_HTML.c b/swad_HTML.c
index f274791c..5975e98e 100644
--- a/swad_HTML.c
+++ b/swad_HTML.c
@@ -833,7 +833,7 @@ void HTM_INPUT_TEXT (const char *Name,unsigned MaxLength,const char *Value,bool
fprintf (Gbl.F.Out," />");
}
-void HTM_INPUT_SEARCH (const char *Name,unsigned MaxLength,const char *Value,bool SubmitOnChange,
+void HTM_INPUT_SEARCH (const char *Name,unsigned MaxLength,const char *Value,
const char *fmt,...)
{
va_list ap;
@@ -864,10 +864,6 @@ void HTM_INPUT_SEARCH (const char *Name,unsigned MaxLength,const char *Value,boo
}
}
- if (SubmitOnChange)
- fprintf (Gbl.F.Out," onchange=\"document.getElementById('%s').submit();\"",
- Gbl.Form.Id);
-
fprintf (Gbl.F.Out," />");
}
diff --git a/swad_HTML.h b/swad_HTML.h
index d82f6531..f71d3617 100644
--- a/swad_HTML.h
+++ b/swad_HTML.h
@@ -91,7 +91,7 @@ void HTM_LABEL_End (void);
void HTM_INPUT_TEXT (const char *Name,unsigned MaxLength,const char *Value,bool SubmitOnChange,
const char *fmt,...);
-void HTM_INPUT_SEARCH (const char *Name,unsigned MaxLength,const char *Value,bool SubmitOnChange,
+void HTM_INPUT_SEARCH (const char *Name,unsigned MaxLength,const char *Value,
const char *fmt,...);
void HTM_INPUT_TEL (const char *Name,const char *Value,bool SubmitOnChange,
const char *fmt,...);
diff --git a/swad_assignment.c b/swad_assignment.c
index 70a8b268..7fae5f68 100644
--- a/swad_assignment.c
+++ b/swad_assignment.c
@@ -413,10 +413,10 @@ static void Asg_ShowOneAssignment (long AsgCod,bool PrintView)
HTM_TD_End ();
/* Assignment folder */
- HTM_TD_Begin ("class=\"DAT LT");
- if (!PrintView)
- fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd);
- fprintf (Gbl.F.Out,"\">");
+ if (PrintView)
+ HTM_TD_Begin ("class=\"DAT LT");
+ else
+ HTM_TD_Begin ("class=\"DAT LT COLOR%u",Gbl.RowEvenOdd);
if (Asg.SendWork == Asg_SEND_WORK)
Asg_WriteAssignmentFolder (&Asg,PrintView);
HTM_TD_End ();
diff --git a/swad_changelog.h b/swad_changelog.h
index 8d7b2e42..85200c8d 100644
--- a/swad_changelog.h
+++ b/swad_changelog.h
@@ -469,6 +469,9 @@ contiene una de las que yo imparto. As
// TODO: En resultados de test y de juegos, en preguntas modificadas se podría mostrar la puntuación obtenida en la pregunta (ahora no sale)
// TODO: Al crear un nuevo juego, debería irse a la pantalla de añadir preguntas (la misma opción que sale cuando pulsas en editar un juego existente)
+// TODO: Refactorize SELECT and OPTION
+// TODO: Refactorize DL, DT, DD
+
/*****************************************************************************/
/****************************** Public constants *****************************/
/*****************************************************************************/
@@ -487,7 +490,7 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - *
En OpenSWAD:
ps2pdf source.ps destination.pdf
*/
-#define Log_PLATFORM_VERSION "SWAD 19.51.18 (2019-11-04)"
+#define Log_PLATFORM_VERSION "SWAD 19.51.19 (2019-11-04)"
#define CSS_FILE "swad19.47.css"
#define JS_FILE "swad19.39.js"
/*
@@ -495,6 +498,7 @@ ps2pdf source.ps destination.pdf
// 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.51.19: Nov 04, 2019 Code refactoring in HTML inputs. (245904 lines)
Version 19.51.18: Nov 04, 2019 Code refactoring in HTML inputs. (245912 lines)
Version 19.51.17: Nov 04, 2019 Code refactoring in HTML inputs. (245887 lines)
Version 19.51.16: Nov 04, 2019 Code refactoring in HTML inputs. (245893 lines)
diff --git a/swad_message.c b/swad_message.c
index 99b62a3c..28a7b2cb 100644
--- a/swad_message.c
+++ b/swad_message.c
@@ -2663,7 +2663,7 @@ void Msg_ShowFormToFilterMsgs (void)
HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
fprintf (Gbl.F.Out,"%s: ",TxtFromTo[Gbl.Msg.TypeOfMessages]);
HTM_INPUT_SEARCH ("FilterFromTo",Usr_MAX_CHARS_FIRSTNAME_OR_SURNAME * 3,
- Gbl.Msg.FilterFromTo,false,
+ Gbl.Msg.FilterFromTo,
"size=\"20\"");
HTM_LABEL_End ();
HTM_TD_End ();
@@ -2673,7 +2673,7 @@ void Msg_ShowFormToFilterMsgs (void)
HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
fprintf (Gbl.F.Out,"%s: ",Txt_MSG_Content);
HTM_INPUT_SEARCH ("FilterContent",Msg_MAX_CHARS_FILTER_CONTENT,
- Gbl.Msg.FilterContent,false,
+ Gbl.Msg.FilterContent,
"size=\"20\"");
HTM_LABEL_End ();
HTM_TD_End ();
diff --git a/swad_search.c b/swad_search.c
index 81ffbb8e..932b5aff 100644
--- a/swad_search.c
+++ b/swad_search.c
@@ -159,7 +159,7 @@ static void Sch_PutFormToSearchWithWhatToSearchAndScope (Act_Action_t Action,Hie
HTM_DIV_End ();
/***** String to find *****/
- Sch_PutInputStringToSearch (NULL);
+ Sch_PutInputStringToSearch ("");
/***** What to search? *****/
HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
@@ -249,17 +249,9 @@ void Sch_PutInputStringToSearch (const char *IdInputText)
/***** String to find *****/
// Input field not required, because it can be hidden (display:none)
- fprintf (Gbl.F.Out,"");
+ HTM_INPUT_SEARCH ("Search",Sch_MAX_CHARS_STRING_TO_FIND,Gbl.Search.Str,
+ "id=\"%s\" size=\"18\" placeholder=\"%s…\"",
+ IdInputText,Txt_Search);
}
/*****************************************************************************/