diff --git a/bureau/admin/dom_edit.inc.php b/bureau/admin/dom_edit.inc.php index e0eea424..872ce44a 100644 --- a/bureau/admin/dom_edit.inc.php +++ b/bureau/admin/dom_edit.inc.php @@ -126,6 +126,17 @@ $dom->unlock(); function check_type_selected() { if ( $('input[name=type]:radio:checked').val() ) { // there is a value + var ll = $('input[name=type]:radio:checked').val(); + var tt = $('#t_'+ll); + if ( tt.length == 0 ) { + // this element do not exist, so OK + return true; + } + if ( tt.val() == '' ) { + alert(""); + return false; + } + return true; } alert(""); diff --git a/bureau/admin/dom_edit.php b/bureau/admin/dom_edit.php index 0fe133f3..13c20fa3 100644 --- a/bureau/admin/dom_edit.php +++ b/bureau/admin/dom_edit.php @@ -72,16 +72,19 @@ function dnsoff() { } function destruction_alert() { - // On ne se pose pas de question si le DNS est deja sur NON - if (!=1) { - return true; - } - if (document.forms["fdns"].email[1].checked) { - if ( confirm('') ) { - return false; - } else { - return true; - } + // On ne se pose pas de question si le DNS est deja sur NON + if (!=1) { + return true; + } + if (document.forms["fdns"].email[1].checked) { + if ( confirm("") ) { + return true; + } else { + return false; + } + } else { + return true; + } }

diff --git a/bureau/admin/dom_editdns.php b/bureau/admin/dom_editdns.php index 12353058..eb6a884e 100644 --- a/bureau/admin/dom_editdns.php +++ b/bureau/admin/dom_editdns.php @@ -58,6 +58,6 @@ $dom->unlock(); // XXX: we assume the cron job is at every 5 minutes print strtr(_("The modifications will take effect at %time. Server time is %now."), array('%now' => date('H:i:s', $t), '%time' => date('H:i:s', ($t-($t%300)+300)))); ?>

- +