Fix for error and min/max refback displayed in edit form
authorRoland Häder <roland@mxchange.org>
Sun, 12 Oct 2008 00:55:28 +0000 (00:55 +0000)
committerRoland Häder <roland@mxchange.org>
Sun, 12 Oct 2008 00:55:28 +0000 (00:55 +0000)
inc/databases.php
inc/language/refback_de.php
inc/modules/member/what-refback.php
templates/de/html/member/member_refback_edit.tpl

index b994f3e..4959600 100644 (file)
@@ -113,7 +113,7 @@ define('USAGE_BASE', "usage");
 define('SERVER_URL', "http://www.mxchange.org");
 
 // This current patch level
-define('CURR_SVN_REVISION', "495");
+define('CURR_SVN_REVISION', "496");
 
 // Take a prime number which is long (if you know a longer one please try it out!)
 define('_PRIME', 591623);
index c0a2936..2852c8e 100644 (file)
@@ -63,6 +63,9 @@ define('MEMBER_REFBACK_EDIT_TITLE', "Ref-Back f&uuml;r ausgew&auml;hltes Mitglie
 define('MEMBER_REFBACK_DELETED_SUBMIT', "Nicht m&ouml;glich");
 define('MEMBER_REFBACK_DELETED_TITLE', "Einstellen von Ref-Back ist f&uuml;r gel&ouml;schte Mitglieder nicht m&ouml;glich.");
 define('MEMBER_REFBACK_DISABLED', "Refback ist administrativ deaktiviert. Bitte nutze die Referal-&Uuml;bersicht links im Men&uuml;.");
+define('MEMBER_REFBACK_MIN_MAX_NOTE_1', "<strong>Hinweis:</strong> Sie k&ouml;nnen derzeit zwischen <u>");
+define('MEMBER_REFBACK_MIN_MAX_NOTE_2', "</u> und <u>");
+define('MEMBER_REFBACK_MIN_MAX_NOTE_3', "</u> Prozent, inklusive, Refback einstellen.");
 
 // Error messages for members
 define('MEMBER_REFBACK_ERROR_MESSAGE', "Fehler beim Einstellen des Ref-Backs. Fehlermeldung:<br />\n<span class=\"data\">%s</span>");
index db6fdcd..90d3ad7 100644 (file)
@@ -60,7 +60,7 @@ if ((isset($_POST['edit'])) && (isset($_POST['id']))) {
        // Okay, has the user entered some values?
        if (isset($_POST['percents'])) {
                // Validate percents
-               if (($_POST['percents'] >= $_CONFIG['refback_min_percents']) || ($_POST['percents'] == 0)) && ($_POST['percents'] <= $_CONFIG['refback_max_percents'])) {
+               if ((($_POST['percents'] >= $_CONFIG['refback_min_percents']) || ($_POST['percents'] == 0)) && ($_POST['percents'] <= $_CONFIG['refback_max_percents'])) {
                        // Change ref-back for this direct id
                        $status = REFBACK_CHANGE_MEMBER_PERCENTS($_POST['id'], $_POST['percents']);
 
@@ -88,6 +88,8 @@ if ((isset($_POST['edit'])) && (isset($_POST['id']))) {
 
                // Translate comma
                $content['refback'] = TRANSLATE_COMMA($content['refback']);
+               $content['max']     = $_CONFIG['refback_max_percents'];
+               $content['min']     = $_CONFIG['refback_min_percents'];
 
                // Load form for editing
                LOAD_TEMPLATE("member_refback_edit", false, $content);
index d5264fb..a146b2b 100644 (file)
@@ -25,3 +25,7 @@
 </tr>
 </table>
 </form>
+
+<div class="member_note">
+       {--MEMBER_REFBACK_MIN_MAX_NOTE_1--}$content[min]{--MEMBER_REFBACK_MIN_MAX_NOTE_2--}$content[min]{--MEMBER_REFBACK_MIN_MAX_NOTE_3--}
+</div>