<?php
$gridpanel = new \Barebone\HTML\TGridPanel(480, 260);
$gridpanel->css('background-image','url(/images/background.png)');
// place the title elements in the gridpanel
$title = new Barebone\HTML\TInput('text');
$gridpanel->place($title, 10, 10);
$formbox = new Barebone\HTML\TFormbox(new Barebone\HTML\TLabel('Label kan ook'), $title);
$gridpanel->place($formbox, 220, 100);
$formbox = new Barebone\HTML\TFormbox(new Barebone\HTML\TLabel('Label kan ook'), $title);
$gridpanel->place($formbox, 10, 100);
$gridpanel->place(new Barebone\HTML\TSelect(), 50, 50);
$gridpanel->place(new Barebone\HTML\TLabel('The background is just as an example'), 10, 230);
$gridpanel->place(new Barebone\HTML\TImage('/images/edit.png', 'EDIT', ['style'=>'width:32px']), 280, 220);
// create api button, set target, set route create action in controller that match the route
$gridpanel->place(new Barebone\HTML\TAPIButton('API Button 1 (ajax enabled)', '#target-div', '/showcase/presentation/response_api_button/'), 250, 160);
$gridpanel->place(new Barebone\HTML\TAPIButton('API Button 2 (ajax enabled)', '#target-div', '/showcase/presentation/response_api_button2/'), 280, 30);
$this->view->gridpanel = $gridpanel;