Feedback module update and bug correction

Begonnen von le Chaland, 15 Januar 2024, 00:49:54

⏪ vorheriges - nächstes ⏩

0 Mitglieder und 1 Gast betrachten dieses Thema.

le Chaland

Hi.

First, i wish to all an happy new year ... 🍾🍹🍸🍻🥂🥤

Now ...

With the french language, the main feedback module form, when configured to require last name, display the same strings for the last and first name : Votre nom

Don't tested in another language as french is mine, sorry 😊
You can test at your side with french if you want ...

Clearly, a bit confusing ...

So i want to submit a patch or update for futures versions ...

1° First, add this line in the french language file :

define("_YOURFIRSTNAME", "Votre prénom");

Or in the english language file :

define("_YOURFIRSTNAME", "Your First Name");

It is needed to add to each language file wich is in use ...

2° After, in the french language file, modify this line for the admin:

define("_REQLNAME", "Nom requis:");

Like this :

define("_REQLNAME", "Nom de famille requis:");

In english, no need. I do not know for other languages.

3° In the files functions.php, check :

    // Automatically required
    echo "<tr valign=\"top\"><td>" . _YOURNAME . ":</td>\n";
    echo "<td><input type=\"text\" name=\"fname\" size=\"35\" value=\"" . mxEntityQuotes($fname) . "\" />" . $req . "</td></tr>\n";
    // Last Name required?
    if ($mxfbcfg['reqlname'] == "1") {
        echo "<tr valign=\"top\"><td>" . _YOURLASTNAME . ":</td>\n";
        echo "<td><input type=\"text\" name=\"lname\" size=\"35\" value=\"" . mxEntityQuotes($lname) . "\" />" . $req . "</td></tr>\n";
    }

And replace with :

// Automatically required
    echo "<tr valign=\"top\"><td>" . _YOURFIRSTNAME . ":</td>\n";
    echo "<td><input type=\"text\" name=\"fname\" size=\"35\" value=\"" . mxEntityQuotes($fname) . "\" />" . $req . "</td></tr>\n";
    // Last Name required?
    if ($mxfbcfg['reqlname'] == "1") {
        echo "<tr valign=\"top\"><td>" . _YOURLASTNAME . ":</td>\n";
        echo "<td><input type=\"text\" name=\"lname\" size=\"35\" value=\"" . mxEntityQuotes($lname) . "\" />" . $req . "</td></tr>\n";
    }

That's all.

Now i let you decide if you agree to keep definitivly the modifications.

Sincerly.