Commit c33ba2ec authored by Clément OUDOT's avatar Clément OUDOT
Browse files

Load hidden fields in DOM only if they have a value (#375)

parent 8efab2dc
......@@ -10,9 +10,15 @@
<p id="timer" class="text-error"><lang en="Automaticaly accept in 5 seconds" fr="Acceptation automatique dans 5 secondes"/></p>
<form id="form" action="#" method="<TMPL_VAR NAME="FORM_METHOD">" class="login">
<TMPL_VAR NAME="HIDDEN_INPUTS">
<TMPL_IF NAME="AUTH_URL">
<input type="hidden" name="url" value="<TMPL_VAR NAME="AUTH_URL">" />
</TMPL_IF>
<TMPL_IF NAME="CHOICE_VALUE">
<input type="hidden" id="authKey" name="<TMPL_VAR NAME="CHOICE_PARAM">" value="<TMPL_VAR NAME="CHOICE_VALUE">" />
</TMPL_IF>
<TMPL_IF NAME="CONFIRMKEY">
<input type="hidden" id="confirm" name="confirm" value="<TMPL_VAR NAME="CONFIRMKEY">" />
</TMPL_IF>
<div id="content-all-info">
<TMPL_VAR NAME="MSG">
</div>
......
......@@ -10,7 +10,9 @@
<p id="timer" class="text-error"><lang en="You'll be redirected in 10 seconds" fr="Vous allez &ecirc;tre redirig&eacute;(e) automatiquement dans 10 secondes"/></p>
<form id="form" action="<TMPL_VAR NAME="URL">" method="<TMPL_VAR NAME="FORM_METHOD">" class="login">
<TMPL_VAR NAME="HIDDEN_INPUTS">
<TMPL_IF NAME="CHOICE_VALUE">
<input type="hidden" id="authKey" name="<TMPL_VAR NAME="CHOICE_PARAM">" value="<TMPL_VAR NAME="CHOICE_VALUE">" />
</TMPL_IF>
<div id="content-all-info">
<TMPL_VAR NAME="MSG">
</div>
......
......@@ -11,7 +11,9 @@
<TMPL_IF NAME="DISPLAY_FORM">
<form action="#" method="post" class="login">
<TMPL_IF NAME="CHOICE_VALUE">
<input type="hidden" id="authKey" name="<TMPL_VAR NAME="CHOICE_PARAM">" value="<TMPL_VAR NAME="CHOICE_VALUE">" />
</TMPL_IF>
<div id="content-all-info">
<table>
<tr>
......@@ -34,8 +36,12 @@
<TMPL_IF NAME="DISPLAY_RESEND_FORM">
<form action="#" method="post" class="login">
<TMPL_IF NAME="CHOICE_VALUE">
<input type="hidden" id="authKey" name="<TMPL_VAR NAME="CHOICE_PARAM">" value="<TMPL_VAR NAME="CHOICE_VALUE">" />
</TMPL_IF>
<TMPL_IF NAME="MAIL">
<input type="hidden" value="<TMPL_VAR NAME="MAIL">" name="mail">
</TMPL_IF>
<div id="content-all-info">
<p>
<lang en="A password reset request was already issued on " fr="Une demande de réinitialisation de mot de passe a déjà été faite le " />
......@@ -63,8 +69,12 @@
<TMPL_IF NAME="DISPLAY_PASSWORD_FORM">
<form action="#" method="post" class="password">
<TMPL_IF NAME="CHOICE_VALUE">
<input type="hidden" id="authKey" name="<TMPL_VAR NAME="CHOICE_PARAM">" value="<TMPL_VAR NAME="CHOICE_VALUE">" />
</TMPL_IF>
<TMPL_IF NAME="MAIL_TOKEN">
<input type="hidden" id="mail_token" name="mail_token" value="<TMPL_VAR NAME="MAIL_TOKEN">" />
</TMPL_IF>
<div id="content-all-info">
<table>
<tr><th><lang en="New password" fr="Nouveau mot de passe" /></th>
......
......@@ -10,7 +10,12 @@
<p class="text-error"><lang en="New message(s)" fr="Nouveaux messages"/></p>
<form action="#" method="post" class="login">
<TMPL_VAR NAME="HIDDEN_INPUTS">
<TMPL_IF NAME="CHOICE_VALUE">
<input type="hidden" id="authKey" name="<TMPL_VAR NAME="CHOICE_PARAM">" value="<TMPL_VAR NAME="CHOICE_VALUE">" />
</TMPL_IF>
<TMPL_IF NAME="AUTH_URL">
<input type="hidden" name="url" value="<TMPL_VAR NAME="AUTH_URL">" />
</TMPL_IF>
<div id="content-all-info">
<TMPL_VAR NAME="NOTIFICATION">
</div>
......
<div id="password">
<form action="#" method="post" class="password">
<TMPL_VAR NAME="HIDDEN_INPUTS">
<TMPL_IF NAME="CHOICE_VALUE">
<input type="hidden" id="authKey" name="<TMPL_VAR NAME="CHOICE_PARAM">" value="<TMPL_VAR NAME="CHOICE_VALUE">" />
<TMPL_VAR NAME="HIDDEN_INPUTS">
</TMPL_IF>
<TMPL_IF NAME="AUTH_URL">
<input type="hidden" name="url" value="<TMPL_VAR NAME="AUTH_URL">" />
</TMPL_IF>
<h3><lang en="Change your password" fr="Changez votre mot de passe" /></h3>
<table>
<TMPL_IF NAME="LOGIN">
......
......@@ -8,9 +8,15 @@
<form id="form" action="#" method="<TMPL_VAR NAME="FORM_METHOD">" class="login">
<TMPL_VAR NAME="HIDDEN_INPUTS">
<TMPL_IF NAME="AUTH_URL">
<input type="hidden" name="url" value="<TMPL_VAR NAME="AUTH_URL">" />
</TMPL_IF>
<TMPL_IF NAME="CHOICE_VALUE">
<input type="hidden" id="authKey" name="<TMPL_VAR NAME="CHOICE_PARAM">" value="<TMPL_VAR NAME="CHOICE_VALUE">" />
</TMPL_IF>
<TMPL_IF NAME="CONFIRMKEY">
<input type="hidden" id="confirm" name="confirm" value="<TMPL_VAR NAME="CONFIRMKEY">" />
</TMPL_IF>
<TMPL_VAR NAME="MSG">
<p id="timer"><lang en="Automaticaly accept in 5 seconds" fr="Acceptation automatique dans 5 secondes"/></p>
<table><tbody><tr><td>
......
......@@ -8,7 +8,9 @@
<form id="form" action="<TMPL_VAR NAME="URL">" method="<TMPL_VAR NAME="FORM_METHOD">" class="login">
<TMPL_VAR NAME="HIDDEN_INPUTS">
<TMPL_IF NAME="CHOICE_VALUE">
<input type="hidden" id="authKey" name="<TMPL_VAR NAME="CHOICE_PARAM">" value="<TMPL_VAR NAME="CHOICE_VALUE">" />
</TMPL_IF>
<TMPL_VAR NAME="MSG">
<p id="timer"><lang en="You'll be redirected in 10 seconds" fr="Vous allez &ecirc;tre redirig&eacute;(e) automatiquement dans 10 secondes"/></p>
<table><tbody><tr><td>
......
......@@ -10,7 +10,9 @@
<form action="#" method="post" class="login">
<TMPL_IF NAME="CHOICE_VALUE">
<input type="hidden" id="authKey" name="<TMPL_VAR NAME="CHOICE_PARAM">" value="<TMPL_VAR NAME="CHOICE_VALUE">" />
</TMPL_IF>
<h3><lang en="Forgot your password?" fr="Mot de passe oubli&eacute; ?"/></h3>
......@@ -34,8 +36,12 @@
<form action="#" method="post" class="login">
<TMPL_IF NAME="CHOICE_VALUE">
<input type="hidden" id="authKey" name="<TMPL_VAR NAME="CHOICE_PARAM">" value="<TMPL_VAR NAME="CHOICE_VALUE">" />
</TMPL_IF>
<TMPL_IF NAME="MAIL">
<input type="hidden" value="<TMPL_VAR NAME="MAIL">" name="mail">
</TMPL_IF>
<h3><lang en="Resend confirmation mail?" fr="Renvoyer le mail de confirmation ?"/></h3>
......@@ -65,8 +71,12 @@
<TMPL_IF NAME="DISPLAY_PASSWORD_FORM">
<div id="password">
<form action="#" method="post" class="password">
<TMPL_IF NAME="CHOICE_VALUE">
<input type="hidden" id="authKey" name="<TMPL_VAR NAME="CHOICE_PARAM">" value="<TMPL_VAR NAME="CHOICE_VALUE">" />
</TMPL_IF>
<TMPL_IF NAME="MAIL_TOKEN">
<input type="hidden" id="mail_token" name="mail_token" value="<TMPL_VAR NAME="MAIL_TOKEN">" />
</TMPL_IF>
<h3><lang en="Change your password" fr="Changez votre mot de passe" /></h3>
<table>
<tr><th><lang en="New password" fr="Nouveau mot de passe" /></th>
......
......@@ -10,8 +10,12 @@
<form action="#" method="post" class="login">
<TMPL_VAR NAME="HIDDEN_INPUTS">
<TMPL_IF NAME="CHOICE_VALUE">
<input type="hidden" id="authKey" name="<TMPL_VAR NAME="CHOICE_PARAM">" value="<TMPL_VAR NAME="CHOICE_VALUE">" />
</TMPL_IF>
<TMPL_IF NAME="AUTH_URL">
<input type="hidden" name="url" value="<TMPL_VAR NAME="AUTH_URL">" />
</TMPL_IF>
<h3><lang en="New message(s)" fr="Nouveaux messages"/>&nbsp;:</h3>
<table>
<tr><td>
......
<div id="password">
<form action="#" method="post" class="password">
<input type="hidden" id="authKey" name="<TMPL_VAR NAME="CHOICE_PARAM">" value="<TMPL_VAR NAME="CHOICE_VALUE">" />
<TMPL_VAR NAME="HIDDEN_INPUTS">
<TMPL_IF NAME="CHOICE_VALUE">
<input type="hidden" id="authKey" name="<TMPL_VAR NAME="CHOICE_PARAM">" value="<TMPL_VAR NAME="CHOICE_VALUE">" />
</TMPL_IF>
<TMPL_IF NAME="AUTH_URL">
<input type="hidden" name="url" value="<TMPL_VAR NAME="AUTH_URL">" />
</TMPL_IF>
<h3><lang en="Change your password" fr="Changez votre mot de passe" /></h3>
<table>
<TMPL_IF NAME="LOGIN">
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment