Skip to content

Commit

Permalink
Fixes form example for case sensitive servers
Browse files Browse the repository at this point in the history
  • Loading branch information
Arul- committed Jul 7, 2020
1 parent 32ad1ed commit fd6eefa
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions public/examples/_016_forms/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,8 @@
$loader->setUseIncludePath(true);

use Luracast\Restler\Data\Validator;
use Luracast\Restler\Restler;
use Luracast\Restler\Defaults;
use Luracast\Restler\Format\HtmlFormat;
use Luracast\Restler\Restler;
use Luracast\Restler\UI\Forms;
use Luracast\Restler\UI\FormStyles;

Expand All @@ -106,10 +105,11 @@
'yeti',
);
$theme = isset($_GET['theme']) ? $_GET['theme'] : $themes[array_rand($themes, 1)];
$style = $theme === 'Foundation5' ? 'Foundation5' : 'Bootstrap3';
HtmlFormat::$data += compact('theme', 'themes', 'style');
$class = 'Luracast\\Restler\\UI\\'.$style.'Form';
$style = $theme === 'foundation5' ? 'Foundation5' : 'Bootstrap3';
$class = 'Luracast\\Restler\\UI\\' . $style . 'Form';
Forms::setStyles(new $class);
$style = strtolower($style);
HtmlFormat::$data += compact('theme', 'themes', 'style');

$r = new Restler();
$r->setSupportedFormats('HtmlFormat');
Expand Down

0 comments on commit fd6eefa

Please sign in to comment.