sentora / sentora-core

Sentora is a web hosting control panel written in PHP for *NIX
GNU General Public License v3.0
653 stars 444 forks source link

SMTP Password field is wrong type. #208

Closed ghost closed 9 months ago

ghost commented 8 years ago

SMTP Pass field is textarea instead of input with password type.

Change:

<textarea cols="30" rows="1" name="smtp_password"></textarea>

To:

<input type="password" name="smtp_password" placeholder="Type your smtp password here">
TGates71 commented 8 years ago

Unfortunately, due to the way it is coded and the way it renders the input lines from the database, it cannot be changed in the manner you describe. Will look into it some more.

TGates71 commented 8 years ago

In this file: https://github.com/sentora/sentora-core/blob/master/modules/sentoraconfig/code/controller.ext.php Between line 51 and 52 add:

                if (strpos(ctrl_options::OutputSettingTextArea($rowsettings['so_name_vc']),'smtp_password') !== false) {
                    $fieldhtml = '<input type="password" name="smtp_password" value="'.$rowsettings['so_value_tx'].'">';
                }

It should look like this when done:

                }
                if (strpos(ctrl_options::OutputSettingTextArea($rowsettings['so_name_vc']),'smtp_password') !== false) {
                    $fieldhtml = '<input type="password" name="smtp_password" value="'.$rowsettings['so_value_tx'].'">';
                }
                array_push($res, array('cleanname' => ui_language::translate($rowsettings['so_cleanname_vc']),

Give it a test. Update pushed to master: https://github.com/sentora/sentora-core/blob/master/modules/sentoraconfig/code/controller.ext.php

Dukecitysolutions commented 10 months ago

@TGates71 , @MBlagui , Any updates on this?

TGates71 commented 9 months ago

Was completed 9 years ago.