* @return the string containing the form
*/
function to_form() {
- $res = "<form action=\"{$_SERVER['REQUEST_URI']}\" method=\"post\">\n"
+ $res = "<form action=\"{$_SERVER['REQUEST_URI']}\" method=\"post\" onsubmit=\"return del_onsubmit()\">\n"
. "<table class=\"bicol\" width=\"100%\">\n";
$pair = true;
. " <input type=\"submit\" name=\"emails[apply]\" value=\"Apply changes\" /></td>\n"
. "</tr>\n";
+ $res .= "</table>\n</form>\n";
+
$val = 'your email ...';
- $res .= "<tr><td colspan=\"2\">\n"
+
+ $res .= "<form action=\"{$_SERVER['REQUEST_URI']}\" method=\"post\">\n"
+ . "<table class=\"bicol\" width=\"100%\">\n"
+ . "<tr><td colspan=\"2\">\n"
. " <input type=\"text\" name=\"emails[new]\" size=\"60\" value='$val' "
. "onfocus=\"text_onfocus(this,'$val')\" onblur=\"text_onblur(this,'$val')\" />\n"
. " <input type=\"submit\" name=\"emails[add]\" value=\"Add\" /></td>\n"
- . "</td></tr>\n";
+ . "</td></tr>\n"
+ . "</table>\n</form>\n";
- $res .= "</table>\n</form>\n";
-
return $res;
}
return false;
}
+function del_onsubmit() {
+ return window.confirm("Voulez vous réellement supprimer cette adresse mail ?");
+}
+
/********** ORDER FORM FUNCTIONS **********/
function order_up() {