Exemplo n.º 1
0
function show_update($dbVer)
{
    tpl_open();
    ?>
<h1><?php 
    \pi18n("Update");
    ?>
</h1>
<p><?php 
    \pi18n("Update notice");
    ?>
</p>
<form action="<?php 
    echo \Pasteque\get_current_url();
    ?>
" method="post">
    <?php 
    form_value_hidden("update", "update", $dbVer);
    ?>
    <label for="country"><?php 
    \pi18n("Pays");
    ?>
    <select id="country" name="country">
        <option value="belgique">Belgique</option>
        <option value="france">France</option>
        <option value="luxembourg">Luxembourg</option>
        <option value="united_kingdom">United Kingdom</option>
    </select>
    <?php 
    \Pasteque\form_send();
    ?>
</form>
<?php 
    tpl_close();
}
Exemplo n.º 2
0
function __tpl_report_input($report, $values)
{
    // Export button
    echo "<div id=\"btn\"><a class=\"btn\" href=\"" . \Pasteque\get_report_url($report->getDomain(), $report->getId());
    foreach ($report->getParams() as $param) {
        echo "&" . $param['param'] . "=" . $values[$param['param']];
    }
    echo "\">" . \i18n("Export") . "</a></div>\n";
    echo "<br />\n";
    if (is_array($report->getParams()) && sizeof($report->getParams()) > 0) {
        // Input form
        echo "<form class=\"edit\" action=\"" . \Pasteque\get_current_url() . "\" " . "method=\"post\">";
        foreach ($report->getParams() as $param) {
            $id = $param['param'];
            echo "<div class=\"row\">";
            if ($param['label'] != null && $param['label'] != "" && $param['type'] != "hidden") {
                echo "<label for=\"" . $id . "\">" . $param['label'] . "</label>";
            }
            switch ($param['type']) {
                case DB::DATE:
                    $value = \i18nDate($values[$id]);
                    echo "<input type=\"text\" name=\"" . $id . "\" id=\"" . $id . "\" class=\"dateinput\" value=\"" . $value . "\" />";
                    break;
                case 'hidden':
                    $value = $values[$param['param']];
                    echo "<input type=\"hidden\" name=\"" . $id . "\" id=\"" . $id . "\" value=\"" . $value . "\" />";
                    break;
                default:
                    $value = $values[$param['param']];
                    echo "<input type=\"text\" name=\"" . $id . "\" id=\"" . $id . "\" value=\"" . $value . "\" />";
                    break;
            }
            echo "</div>\n";
        }
        // Send
        echo "<div class=\"row actions\">" . \Pasteque\form_send() . "</div>\n";
        echo "</form>\n";
    }
}
Exemplo n.º 3
0
?>
</th>
				<th><?php 
\pi18n("Quantity");
?>
</th>
				<th></th>
			</tr>
		</thead>
		<tbody id="list">
		</tbody>
	</table>

	<div class="row actions">
		<?php 
\Pasteque\form_send();
?>
	</div>

</form>

<?php 
\Pasteque\init_catalog("catalog", "catalog-picker", "addProduct", $categories, $products);
?>

<script type="text/javascript">

	addProduct = function(productId) {
		var product = catalog.products[productId];
		if (jQuery("#line-" + productId).length > 0) {
			// Add quantity to existing line
Exemplo n.º 4
0
function __tpl_report_input($report, $values)
{
    echo "<div class=\"col-md-12 panel-group\" id=\"options\"" . " role=\"tablist\" aria-multiselectable=\"true\">\n";
    // Export button
    echo "\t<div><a class=\"btn btn-primary\" href=\"" . \Pasteque\get_report_url($report->getDomain(), $report->getId());
    foreach ($report->getParams() as $param) {
        echo "&" . $param['param'] . "=" . $values[$param['param']];
    }
    echo "\">" . \i18n("Export") . "</a></div>\n";
    // Collapsable options
    echo "\t<div class=\"panel panel-default\">\n";
    echo "\t\t<div class=\"panel-heading\" role=\"tab\" id=\"options-heading\">\n";
    echo "\t\t\t<h4 class=\"panel-title\">" . "<a role=\"button\" data-toggle=\"collapse\"" . " data-parent=\"#options\" href=\"#options-collapsed\"" . " aria-expanded=\"false\" aria-controls=\"options-collapsed\">" . "Options</a></h4>\n";
    echo "\t\t</div>\n";
    echo "\t\t<div id=\"options-collapsed\" class=\"panel-collapse collapse\"" . " role=\"tabpanel\" aria-labelledby=\"options-heading\">\n";
    echo "\t\t\t<div class=\"panel-body\">\n";
    if (is_array($report->getParams()) && sizeof($report->getParams()) > 0) {
        // Input form
        echo "\t\t\t<div class=\"col-md-4\">\n";
        echo "\t\t\t\t\t<form class=\"edit\" action=\"" . \Pasteque\get_current_url() . "\" " . "method=\"post\">\n";
        foreach ($report->getParams() as $param) {
            $id = $param['param'];
            switch ($param['type']) {
                case DB::DATE:
                    if ($param['label'] != null && $param['label'] != "" && $param['type'] != "hidden") {
                        echo "\t\t\t\t\t\t<label for=\"" . $id . "\">" . $param['label'] . "</label>\n";
                    }
                    $value = \i18nDate($values[$id]);
                    echo "\t\t\t\t\t\t<div data-date-format=\"yyyy-mm-dd\" class=\"input-group date col-md-6\" id=\"datepicker-" . $id . "\">\n";
                    echo "\t\t\t\t\t\t\t<input type=\"text\"" . " class=\"form-control\" name=\"" . $id . "\" id=\"" . $id . "\" value=\"" . $value . "\">\n";
                    echo "\t\t\t\t\t\t\t<div class=\"input-group-addon\">\n";
                    echo "\t\t\t\t\t\t\t\t<span class=\"glyphicon glyphicon-th\"></span>\n";
                    echo "\t\t\t\t\t\t\t</div>\n";
                    echo "\t\t\t\t\t\t</div>\n";
                    break;
                case 'hidden':
                    $value = $values[$param['param']];
                    echo "\t\t\t<input type=\"hidden\" name=\"" . $id . "\" id=\"" . $id . "\" value=\"" . $value . "\" />";
                    break;
                default:
                    $value = $values[$param['param']];
                    echo "\t\t\t<input type=\"text\" name=\"" . $id . "\" id=\"" . $id . "\" value=\"" . $value . "\" />";
                    break;
            }
        }
        // Send
        echo "\t\t\t\t\t\t<div class=\"row actions\">" . \Pasteque\form_send() . "</div>\n";
        echo "\t\t\t\t\t</form>\n";
        echo "\t\t\t\t</div>\n";
    }
    echo "\t\t\t</div>\n";
    echo "\t\t</div>\n";
    echo "\t</div>\n";
    echo "</div>\n";
}