diff --git a/js/swad15.111.js b/js/swad15.111.js
index 2ae166346..13aa5537c 100644
--- a/js/swad15.111.js
+++ b/js/swad15.111.js
@@ -20,6 +20,8 @@
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see .
*/
+"use strict";
+
// Global variable (string) used to write HTML
var Gbl_HTMLContent;
diff --git a/swad_action.c b/swad_action.c
index 6789096be..0384674d7 100644
--- a/swad_action.c
+++ b/swad_action.c
@@ -4311,36 +4311,52 @@ char *Act_GetActionTextFromDB (long ActCod,char *Txt)
/******************************** Start a form *******************************/
/*****************************************************************************/
-void Act_FormStart (Act_Action_t NextAction)
- {
- Gbl.NumForm++; // Initialized to -1. The first time it is incremented, it will be equal to 0
- sprintf (Gbl.FormId,"form_%d",Gbl.NumForm);
- Act_FormStartInternal (NextAction,true,Gbl.FormId,NULL); // Do put now parameter location (if no open session)
- }
-
void Act_FormGoToStart (Act_Action_t NextAction)
{
- Gbl.NumForm++; // Initialized to -1. The first time it is incremented, it will be equal to 0
- sprintf (Gbl.FormId,"form_%d",Gbl.NumForm);
- Act_FormStartInternal (NextAction,false,Gbl.FormId,NULL); // Do not put now parameter location
+ Gbl.Form.Num++; // Initialized to -1. The first time it is incremented, it will be equal to 0
+ sprintf (Gbl.Form.Id,"form_%d",Gbl.Form.Num);
+ Act_FormStartInternal (NextAction,false,Gbl.Form.Id,NULL); // Do not put now parameter location
+ }
+
+void Act_FormStart (Act_Action_t NextAction)
+ {
+ Gbl.Form.Num++; // Initialized to -1. The first time it is incremented, it will be equal to 0
+ sprintf (Gbl.Form.Id,"form_%d",Gbl.Form.Num);
+ Act_FormStartInternal (NextAction,true,Gbl.Form.Id,NULL); // Do put now parameter location (if no open session)
+ }
+
+void Act_FormStartUnique (Act_Action_t NextAction)
+ {
+ Gbl.Form.Num++; // Initialized to -1. The first time it is incremented, it will be equal to 0
+ sprintf (Gbl.Form.UniqueId,"form_%s_%d",
+ Gbl.UniqueNameEncrypted,Gbl.Form.Num);
+ Act_FormStartInternal (NextAction,true,Gbl.Form.UniqueId,NULL); // Do put now parameter location (if no open session)
}
void Act_FormStartAnchor (Act_Action_t NextAction,const char *Anchor)
{
- Gbl.NumForm++; // Initialized to -1. The first time it is incremented, it will be equal to 0
- sprintf (Gbl.FormId,"form_%d",Gbl.NumForm);
- Act_FormStartInternal (NextAction,true,Gbl.FormId,Anchor); // Do put now parameter location (if no open session)
+ Gbl.Form.Num++; // Initialized to -1. The first time it is incremented, it will be equal to 0
+ sprintf (Gbl.Form.Id,"form_%d",Gbl.Form.Num);
+ Act_FormStartInternal (NextAction,true,Gbl.Form.Id,Anchor); // Do put now parameter location (if no open session)
+ }
+
+void Act_FormStartUniqueAnchor (Act_Action_t NextAction,const char *Anchor)
+ {
+ Gbl.Form.Num++; // Initialized to -1. The first time it is incremented, it will be equal to 0
+ sprintf (Gbl.Form.UniqueId,"form_%s_%d",
+ Gbl.UniqueNameEncrypted,Gbl.Form.Num);
+ Act_FormStartInternal (NextAction,true,Gbl.Form.UniqueId,Anchor); // Do put now parameter location (if no open session)
}
void Act_FormStartId (Act_Action_t NextAction,const char *Id)
{
- Gbl.NumForm++; // Initialized to -1. The first time it is incremented, it will be equal to 0
+ Gbl.Form.Num++; // Initialized to -1. The first time it is incremented, it will be equal to 0
Act_FormStartInternal (NextAction,true,Id,NULL); // Do put now parameter location (if no open session)
}
void Act_FormStartIdAnchor (Act_Action_t NextAction,const char *Id,const char *Anchor)
{
- Gbl.NumForm++; // Initialized to -1. The first time it is incremented, it will be equal to 0
+ Gbl.Form.Num++; // Initialized to -1. The first time it is incremented, it will be equal to 0
Act_FormStartInternal (NextAction,true,Id,Anchor); // Do put now parameter location (if no open session)
}
@@ -4350,7 +4366,7 @@ static void Act_FormStartInternal (Act_Action_t NextAction,bool PutParameterLoca
extern const char *Txt_STR_LANG_ID[1+Txt_NUM_LANGUAGES];
char Params[256+256+Ses_LENGTH_SESSION_ID+256];
- if (!Gbl.InsideForm)
+ if (!Gbl.Form.Inside)
{
/* Start form */
fprintf (Gbl.F.Out,"