diff --git a/html/install.php b/html/install.php index efa5aadcd..821df7a8c 100644 --- a/html/install.php +++ b/html/install.php @@ -260,13 +260,15 @@ if (isset($_POST['save_config'])) { // If conx successfull save the file or display it // ----- if ( $err == 0 && $cnx !== false ) { - echo '

'._('Important').'

'; - echo '

',_("Voici l'utilisateur et mot de passe de l'utilisateur administrateur de Noalyss , " + echo '
'; + echo '

'._('Important').'

'; + echo '

',_("Voici l'utilisateur et mot de passe de l'utilisateur administrateur de Noalyss , " . " il a tous les droits et a accès à tout." . " Connectez-vous avec ses identifiants et changer le mot de passe dans préférence (en haut à droit)"), - "

"; - echo '

'._('Utilisateur administrateur'),' ',' ',$cadmin,'','

'; - echo '

',_('Mot de passe'),' '.$cpassword_admin.' ','

'; + "

"; + echo '

'._('Utilisateur administrateur'),' ',' ',$cadmin,'','

'; + echo '

',_('Mot de passe'),' '.$cpassword_admin.' ','

'; + echo ''; // Create the db if (is_writable(NOALYSS_INCLUDE)) { $url=config_file_create($_POST,1,$os); diff --git a/include/lib/config_file.php b/include/lib/config_file.php index 3f7c7e62a..b70da1715 100644 --- a/include/lib/config_file.php +++ b/include/lib/config_file.php @@ -94,6 +94,7 @@ function config_file_form($p_array=null) $ichost=new IText("chost",$chost); $icadmin=new IText('cadmin',$cadmin); + $icadmin->set_require(true); /* * For version MONO */ @@ -109,6 +110,7 @@ function config_file_form($p_array=null) $icpassword_admin=new IText('cpassword_admin'); $icpassword_admin->value=$cpassword_admin; + $icpassword_admin->set_require(true); require NOALYSS_TEMPLATE.'/template_config_form.php'; } diff --git a/include/lib/itext.class.php b/include/lib/itext.class.php index 0b813aa46..e74c23805 100644 --- a/include/lib/itext.class.php +++ b/include/lib/itext.class.php @@ -36,6 +36,7 @@ class IText extends HtmlInput $this->extra=""; $this->style=' class="input_text" '; $this->autofocus=false; + $this->require=false; } /*!\brief show the html input of the widget*/ public function input($p_name=null,$p_value=null) @@ -48,11 +49,12 @@ class IText extends HtmlInput $t= 'title="'.$this->title.'" '; $autofocus=($this->autofocus)?" autofocus ":""; $this->value=str_replace('"','',$this->value); + $require=($this->require)?"required":""; if ( ! isset ($this->css_size)) { $r= sprintf(' + Size="%s" %s %s %s %s> ',$this->style, $this->id, $this->name, @@ -62,11 +64,12 @@ class IText extends HtmlInput $this->size, $this->javascript, $this->extra, - $autofocus + $autofocus, + $require ); } else { $r= sprintf(' + style="width:%s;" %s %s %s %s> ',$this->style, $this->id, $this->name, @@ -76,7 +79,8 @@ class IText extends HtmlInput $this->css_size, $this->javascript, $this->extra, - $autofocus + $autofocus, + $require ); } @@ -115,6 +119,10 @@ class IText extends HtmlInput return $r; } + function set_require($p_boolean) + { + $this->require=$p_boolean; + } static public function test_me() { }