Пример #1
0
 public function form_content()
 {
     $ret = '<form method="get">';
     $ret .= '<div class="row">';
     $ret .= FormLib::standardItemFields();
     $ret .= FormLib::standardDateFields();
     $ret .= '</div>';
     $ret .= '<div class="row">';
     $ret .= '<div class="form-group col-sm-5 form-inline">';
     $ret .= '<label>Customer Type</label> ';
     $ret .= '<select name="memtype" class="form-control">';
     $dbc = $this->connection;
     $dbc->selectDB($this->config->get('OP_DB'));
     $types = new MemtypeModel($dbc);
     foreach ($types->find() as $t) {
         $ret .= sprintf('<option value="%d">%s</option>', $t->memtype(), $t->memDesc());
     }
     $ret .= '</select>';
     $ret .= ' <button type="submit" class="btn btn-default">Submit</button>';
     $ret .= '</div>';
     $ret .= '</div>';
     return $ret;
 }
Пример #2
0
    public function form_content()
    {
        ob_start();
        ?>
        <form method="get" action="<?php 
        echo $_SERVER['PHP_SELF'];
        ?>
">
        <div class="row">
            <?php 
        echo FormLib::standardItemFields();
        ?>
            <?php 
        echo FormLib::standardDateFields();
        ?>
        </div>
        <div class="row form-horizontal">
            <div class="form-group">
                <label class="col-sm-2 control-label">Sum movement by?</label>
                <div class="col-sm-2">
                    <select name="sort" class="form-control">
                        <option>PLU</option>
                        <option>Date</option>
                        <option>Department</option>
                        <option>Weekday</option>
                    </select> 
                </div>
                <label class="col-sm-1 control-label">Store</label>
                <div class="col-sm-2">
                    <?php 
        $s = FormLib::storePicker();
        echo $s['html'];
        ?>
                </div>
                <label class="col-sm-2 control-label">
                    <input type="checkbox" name="excel" value="csv" />
                    Excel
                </label>
            </div>
        </div>
        <p>
            <button type="submit" class="btn btn-default btn-core">Get Report</button>
            <button type="reset" class="btn btn-default btn-reset">Reset Form</button>
        </p>
        </form>
        <?php 
        return ob_get_clean();
    }
Пример #3
0
    public function form_content()
    {
        ob_start();
        ?>
<form method=get action=TrendsReport.php class="form">
<div class="row">
    <?php 
        echo FormLib::standardItemFields();
        ?>
    <?php 
        echo FormLib::standardDateFields();
        ?>
</div>
<p>
    <button type="submit" class="btn btn-default">Submit</button>
</p>
</form>
        <?php 
        $this->add_script($this->config->URL . 'item/autocomplete.js');
        $ws = $this->config->URL . 'ws/';
        $this->add_onload_command("bindAutoComplete('#brand-field', '{$ws}', 'brand');\n");
        $this->add_onload_command("bindAutoComplete('#upc-field', '{$ws}', 'item');\n");
        return ob_get_clean();
    }