Assembla home | Assembla project page
 

Changeset 125

Show
Ignore:
Timestamp:
11/14/06 16:15:46 (2 years ago)
Author:
moensch
Message:

Added configuration option to enable that all userorders are automtically set to paid if the user has enough credit. This is not yet implemented in the frontend.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/com_mls_catering/admin.mls_catering.html.php

    r118 r125  
    12481248                                <td width="80%"><?php echo $lists["search_default"]; ?></td> 
    12491249                        </tr> 
     1250                        <tr> 
     1251                                <td width="20%" valign="top" align="right"><?php echo $l->m("automatically_pay"); ?>:</td> 
     1252                                <td width="80%"><input type="checkbox" name="autopay" value="1"<?php if($confarr["autopay"] == 1) { echo " checked"; } ?>/></td> 
     1253                        </tr> 
     1254                        <tr> 
     1255                                <td width="20%" valign="top" align="right"><?php echo $l->m("not_enough_credit"); ?>:</td> 
     1256                                <td width="80%"><?php echo $lists["autopay_action"]; ?></td> 
     1257                        </tr> 
    12501258                </table> 
    12511259                <input type="hidden" name="option" value="<?php echo $option; ?>" /> 
  • trunk/com_mls_catering/admin.mls_catering.php

    r119 r125  
    13791379        $config .= "\$cnf_mls_catering[\"currency\"] = \"".$_POST["currency"]."\";\n"; 
    13801380        $config .= "\$cnf_mls_catering[\"search_default\"] = \"".$_POST["search_default"]."\";\n"; 
     1381        if($_POST["autopay"] == 0) { 
     1382                $config .= "\$cnf_mls_catering[\"autopay\"] = 0;\n"; 
     1383        } else { 
     1384                $config .= "\$cnf_mls_catering[\"autopay\"] = 1;\n"; 
     1385        } 
     1386        $config .= "\$cnf_mls_catering[\"autopay_action\"] = \"".$_POST["autopay_action"]."\";\n"; 
    13811387        $config .= "?>"; 
    13821388 
     
    14041410        $lists["search_default"] = mosHTML::selectList($opts,'search_default','class="inputbox"','value','text',$confarr["search_default"]); 
    14051411         
     1412        /** Autopay action **/ 
     1413        $opts = array(); 
     1414        $opts[] = mosHTML::makeOption('warn',$l->m("display_warning")); 
     1415        $opts[] = mosHTML::makeOption('stop',$l->m("prevent_ordering")); 
     1416        $lists["autopay_action"] = mosHTML::selectList($opts,'autopay_action','class="inputbox"','value','text',$confarr["autopay_action"]); 
     1417         
    14061418        HTML_MLS_catering_config::editConfig($confarr, $lists, $option, $act); 
    14071419} 
  • trunk/com_mls_catering/lang/english.php

    r118 r125  
    190190                "userid" => "User ID", 
    191191                "barcode" => "Barcode", 
    192                 "search_default" => "Default focus field on search page"); 
     192                "search_default" => "Default focus field on search page", 
     193                "automatically_pay" => "Automatically pay for items ordered in the frontend if user has enough credit", 
     194                "not_enough_credit" => "If user has not enough credit", 
     195                "display_warning" => "Display warning only", 
     196                "prevent_ordering" => "Prevent user from ordering"); 
    193197 
    194198?>