Skip to content

darookee/uikit-bundle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RUiKitBundle

Use UiKit-Forms in Symfony2

Installation

First you need to add r/uikit-bundle to composer.json:

{
    "require": {
        "r/uikit-bundle": "dev-master"
    }
}

You also need to add RUiKitBundle to your AppKernel.php

// app/AppKernel.php
// ...
class AppKernel extends Kernel
{
    // ...
    public function registerBundles()
    {
        $bundles = array(
            // ...
            new R\UiKitBundle\RUiKitBundle(),
        );
        // ...
        return $bundles
    }
    // ...
}

After that you have to let twig know about the form template

# ...
twig:
    # ...
    form:
        resources:
            - 'RUiKitBundle::uikit-form.html.twig'
# ...

You have to include the UiKit Stylesheets and JavaScripts for yourself. Essentially you also just could download the uikit-form.html.twig and use it witout installing this bundle, note that you have to chnage the date and time widgets to not use the localizeddateformat function and supply you own format for the uikit-date- and -timepicker.

The UiKit Components you need to include at least are these

  • form-select
  • form-password
  • form-file
  • form-advanced
  • placeholder
  • autocomplete
  • datepicker
  • timepicker

About

UiKit Form-Elements for Symfony2

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published