diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..283dcd0
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+composer.lock
+vendor/
+mouf/
\ No newline at end of file
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..e262f81
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,16 @@
+language: php
+matrix:
+ include:
+ - php: 7.2
+ env: PREFER_LOWEST=""
+ - php: 7.1
+ env: PREFER_LOWEST=""
+# - php: 7.1
+# env: PREFER_LOWEST="--prefer-lowest"
+
+before_script:
+- composer update $PREFER_LOWEST --no-interaction
+- mkdir -p build/logs
+script:
+- composer cs-check
+- composer phpstan
diff --git a/README.md b/README.md
index e0efc1a..05e50fc 100644
--- a/README.md
+++ b/README.md
@@ -26,6 +26,7 @@ Bootstrap version | Template version
3.* | 4.0
3.* | 4.1
4.* | 5.0
+4.* | 5.1 (uses Service providers instead of Mouf installer)
Bootstrap menu rendererer
-------------------------
diff --git a/composer.json b/composer.json
index d8777b0..9310e46 100644
--- a/composer.json
+++ b/composer.json
@@ -16,26 +16,30 @@
"homepage" : "http://twitter.github.com/bootstrap/",
"license" : "MIT",
"require" : {
- "mouf/html.utils.weblibrarymanager" : "~3.0",
- "mouf/html.utils.weblibrarymanager.component-installer" : "~2.2",
- "mouf/html.widgets.messageservice" : "~3.0",
- "php" : ">=5.4.0",
- "mouf/html.widgets.menu" : "~3.0",
- "mouf/html.template.templateinterface" : "~2.1"
+ "mouf/html.utils.weblibrarymanager" : "~4.0",
+ "mouf/html.widgets.messageservice" : "~4.0",
+ "php" : ">=7.1",
+ "mouf/html.widgets.menu" : "^4",
+ "mouf/html.template.templateinterface" : "^3"
+ },
+ "require-dev": {
+ "phpstan/phpstan": "^0.10.3",
+ "thecodingmachine/phpstan-strict-rules": "^0.10.3",
+ "squizlabs/php_codesniffer": "^3.3.1"
+ },
+ "conflict": {
+ "mouf/mouf": "~2.0.0"
},
"autoload" : {
"psr-0" : {
"Mouf" : "src/"
}
},
- "extra" : {
- "mouf" : {
- "install" : [{
- "type" : "class",
- "class" : "Mouf\\Html\\Template\\BootstrapTemplateInstaller"
- }
- ],
- "logo" : "icons/logo.png"
- }
- }
+ "scripts": {
+ "cs-check": "phpcs",
+ "cs-fix": "phpcbf",
+ "phpstan": "phpstan analyse src/Mouf -c phpstan.neon --level=5 --no-progress -vvv"
+ },
+ "minimum-stability": "dev",
+ "prefer-stable": true
}
diff --git a/discovery.json b/discovery.json
new file mode 100644
index 0000000..09e4024
--- /dev/null
+++ b/discovery.json
@@ -0,0 +1,3 @@
+{
+ "Interop\\Container\\ServiceProviderInterface": "Mouf\\Html\\Template\\BootstrapTemplateServiceProvider"
+}
diff --git a/phpcs.xml.dist b/phpcs.xml.dist
new file mode 100644
index 0000000..480486b
--- /dev/null
+++ b/phpcs.xml.dist
@@ -0,0 +1,21 @@
+
+
+ Expressive Skeleton coding standard
+
+
+
+
+
+
+
+
+
+ src
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/phpstan.neon b/phpstan.neon
new file mode 100644
index 0000000..5d37516
--- /dev/null
+++ b/phpstan.neon
@@ -0,0 +1,5 @@
+#parameters:
+# ignoreErrors:
+# - "#you should not use the \\$_REQUEST superglobal#"
+includes:
+ - vendor/thecodingmachine/phpstan-strict-rules/phpstan-strict-rules.neon
\ No newline at end of file
diff --git a/src/Mouf/Html/Template/BootstrapTemplate.php b/src/Mouf/Html/Template/BootstrapTemplate.php
index 7336c8c..990a799 100644
--- a/src/Mouf/Html/Template/BootstrapTemplate.php
+++ b/src/Mouf/Html/Template/BootstrapTemplate.php
@@ -23,8 +23,6 @@ class BootstrapTemplate extends BaseTemplate
Renderable::toHtml as toHtmlRenderer;
}
- const TEMPLATE_ROOT_URL = "vendor/mouf/html.template.bootstrap/";
-
/**
* The left menu of the template.
*
@@ -117,23 +115,13 @@ class BootstrapTemplate extends BaseTemplate
*/
protected $containerClass = "container";
- /**
- * Default constructor
- */
- public function __construct()
- {
- parent::__construct();
- //$this->favIconUrl = self::TEMPLATE_ROOT_URL."images/favicon.png";
- //$this->logoUrl = self::TEMPLATE_ROOT_URL."images/logo.png";
- }
-
/**
* Draws the template.
*/
public function toHtml()
{
// Let's register the template renderer in the default renderer.
- $this->getDefaultRenderer()->setTemplateRenderer($this->getTemplateRenderer());
+ $this->getDefaultRenderer()->setTemplateRendererInstanceName($this->getTemplateRendererInstanceName());
header('Content-Type: text/html; charset=utf-8');
//Renderable::toHtml();// __DIR__."/../../../../views/template.php";
@@ -146,7 +134,7 @@ public function toHtml()
* @Property
* @param HtmlElementInterface $left
*/
- public function setLeft(HtmlElementInterface $left)
+ public function setLeft(HtmlElementInterface $left): void
{
$this->left = $left;
}
@@ -157,7 +145,7 @@ public function setLeft(HtmlElementInterface $left)
* @Property
* @param HtmlElementInterface $right
*/
- public function setRight(HtmlElementInterface $right)
+ public function setRight(HtmlElementInterface $right): void
{
$this->right = $right;
}
@@ -168,7 +156,7 @@ public function setRight(HtmlElementInterface $right)
* @Property
* @param HtmlElementInterface $header
*/
- public function setHeader(HtmlElementInterface $header)
+ public function setHeader(HtmlElementInterface $header): void
{
$this->header = $header;
}
@@ -179,7 +167,7 @@ public function setHeader(HtmlElementInterface $header)
* @Property
* @param HtmlElementInterface $footer
*/
- public function setFooter(HtmlElementInterface $footer)
+ public function setFooter(HtmlElementInterface $footer): void
{
$this->footer = $footer;
}
@@ -187,7 +175,7 @@ public function setFooter(HtmlElementInterface $footer)
/**
* The content of the template.
*/
- public function getContent()
+ public function getContent(): ?HtmlElementInterface
{
return $this->content;
}
@@ -195,7 +183,7 @@ public function getContent()
/**
* The left menu of the template.
*/
- public function getLeft()
+ public function getLeft(): ?HtmlElementInterface
{
return $this->left;
}
@@ -203,7 +191,7 @@ public function getLeft()
/**
* The right menu of the template.
*/
- public function getRight()
+ public function getRight(): ?HtmlElementInterface
{
return $this->right;
}
@@ -211,7 +199,7 @@ public function getRight()
/**
* The header of the template.
*/
- public function getHeader()
+ public function getHeader(): ?HtmlElementInterface
{
return $this->header;
}
@@ -219,7 +207,7 @@ public function getHeader()
/**
* The footer of the template.
*/
- public function getFooter()
+ public function getFooter(): ?HtmlElementInterface
{
return $this->footer;
}
@@ -232,7 +220,7 @@ public function getFooter()
* @Property
* @param int $leftColumnSize
*/
- public function setLeftColumnSize($leftColumnSize)
+ public function setLeftColumnSize(int $leftColumnSize): void
{
$this->leftColumnSize = $leftColumnSize;
}
@@ -245,7 +233,7 @@ public function setLeftColumnSize($leftColumnSize)
* @Property
* @param int $rightColumnSize
*/
- public function setRightColumnSize($rightColumnSize)
+ public function setRightColumnSize(int $rightColumnSize): void
{
$this->rightColumnSize = $rightColumnSize;
}
@@ -256,7 +244,7 @@ public function setRightColumnSize($rightColumnSize)
* If you are not using the left column, the size of the column is 0.
*
*/
- public function getLeftColumnSize()
+ public function getLeftColumnSize(): int
{
return $this->leftColumnSize;
}
@@ -267,7 +255,7 @@ public function getLeftColumnSize()
* If you are not using the right column, the size of the column is 0.
*
*/
- public function getRightColumnSize()
+ public function getRightColumnSize(): int
{
return $this->rightColumnSize;
}
@@ -277,7 +265,7 @@ public function getRightColumnSize()
*
* @param bool $wrapLeftSideBarInWell
*/
- public function setWrapLeftSideBarInWell($wrapLeftSideBarInWell)
+ public function setWrapLeftSideBarInWell(bool $wrapLeftSideBarInWell): void
{
$this->wrapLeftSideBarInWell = $wrapLeftSideBarInWell;
}
@@ -287,7 +275,7 @@ public function setWrapLeftSideBarInWell($wrapLeftSideBarInWell)
*
* @param bool $wrapRightSideBarInWell
*/
- public function setWrapRightSideBarInWell($wrapRightSideBarInWell)
+ public function setWrapRightSideBarInWell(bool $wrapRightSideBarInWell): void
{
$this->wrapRightSideBarInWell = $wrapRightSideBarInWell;
}
@@ -296,7 +284,7 @@ public function setWrapRightSideBarInWell($wrapRightSideBarInWell)
* Whether we should or not put the left sidebar in a Bootstrap "well" element.
*
*/
- public function getWrapLeftSideBarInWell()
+ public function getWrapLeftSideBarInWell(): bool
{
return $this->wrapLeftSideBarInWell;
}
@@ -304,7 +292,7 @@ public function getWrapLeftSideBarInWell()
/**
* Whether we should or not put the left sidebar in a Bootstrap "well" element.
*/
- public function getWrapRightSideBarInWell()
+ public function getWrapRightSideBarInWell(): bool
{
return $this->wrapRightSideBarInWell;
}
@@ -313,7 +301,7 @@ public function getWrapRightSideBarInWell()
* The css class applied to the container div.
* @param string $containerClass
*/
- public function setContainerClass($containerClass)
+ public function setContainerClass(string $containerClass): void
{
$this->containerClass = $containerClass;
}
diff --git a/src/Mouf/Html/Template/BootstrapTemplateInstaller.php b/src/Mouf/Html/Template/BootstrapTemplateInstaller.php
deleted file mode 100644
index ebdc5ca..0000000
--- a/src/Mouf/Html/Template/BootstrapTemplateInstaller.php
+++ /dev/null
@@ -1,95 +0,0 @@
-getProperty("content");
- if ($contentProperty->getValue() == null) {
- $contentProperty->setValue($contentBlock);
- }
-
- $leftProperty = $template->getProperty("left");
- if ($leftProperty->getValue() == null) {
- $leftProperty->setValue($leftBlock);
- }
-
- $rightProperty = $template->getProperty("right");
- if ($rightProperty->getValue() == null) {
- $rightProperty->setValue($rightBlock);
- }
-
- $headerProperty = $template->getProperty("header");
- if ($headerProperty->getValue() == null) {
- $headerProperty->setValue($headerBlock);
- }
-
- $footerProperty = $template->getProperty("footer");
- if ($footerProperty->getValue() == null) {
- $footerProperty->setValue($footerBlock);
- }
-
- $webLibraryManager = $moufManager->getInstanceDescriptor('defaultWebLibraryManager');
- if ($webLibraryManager && $template->getProperty('webLibraryManager')->getValue() == null) {
- $template->getProperty('webLibraryManager')->setValue($webLibraryManager);
- }
-
- $bootstrapRenderer = InstallUtils::getOrCreateInstance("bootstrapRenderer", "Mouf\\Html\\Renderer\\FileBasedRenderer", $moufManager);
- $bootstrapRenderer->getProperty("directory")->setValue("vendor/mouf/html.template.bootstrap/src/templates");
- $bootstrapRenderer->getProperty("cacheService")->setValue($moufManager->getInstanceDescriptor("rendererCacheService"));
- $bootstrapRenderer->getProperty("type")->setValue(ChainableRendererInterface::TYPE_TEMPLATE);
- $bootstrapRenderer->getProperty("priority")->setValue(0);
- $template->getProperty("templateRenderer")->setValue($bootstrapRenderer);
- $template->getProperty("defaultRenderer")->setValue($moufManager->getInstanceDescriptor("defaultRenderer"));
-
-
- // Now, let's modify the component.bootstrap component because it does not feature the CSS files:
- $jqueryWebLibrary = InstallUtils::getOrCreateInstance("component.jquery", "Mouf\\Html\\Utils\\WebLibraryManager\\WebLibrary", $moufManager);
- $jqueryWebLibrary->getProperty("jsFiles")->setValue(array("https://code.jquery.com/jquery-3.3.1.slim.min.js"));
-
- $popperWebLibrary = InstallUtils::getOrCreateInstance("component.popper", "Mouf\\Html\\Utils\\WebLibraryManager\\WebLibrary", $moufManager);
- $popperWebLibrary->getProperty("jsFiles")->setValue(array("https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"));
-
- $bootstrapWebLibrary = InstallUtils::getOrCreateInstance("component.bootstrap", "Mouf\\Html\\Utils\\WebLibraryManager\\WebLibrary", $moufManager);
- $bootstrapWebLibrary->getProperty("cssFiles")->setValue(array("https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css"));
- $bootstrapWebLibrary->getProperty("jsFiles")->setValue(array("https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"));
-
- $webLibraryManagers = $webLibraryManager->getProperty('webLibraries')->getValue();
- $webLibraryManagers[] = $jqueryWebLibrary;
- $webLibraryManagers[] = $popperWebLibrary;
- $webLibraryManagers[] = $bootstrapWebLibrary;
- $webLibraryManager->getProperty('webLibraries')->setValue($webLibraryManagers);
-
- // Let's rewrite the MoufComponents.php file to save the component
- $moufManager->rewriteMouf();
- }
-}
diff --git a/src/Mouf/Html/Template/BootstrapTemplateServiceProvider.php b/src/Mouf/Html/Template/BootstrapTemplateServiceProvider.php
new file mode 100644
index 0000000..5127758
--- /dev/null
+++ b/src/Mouf/Html/Template/BootstrapTemplateServiceProvider.php
@@ -0,0 +1,80 @@
+setContent($container->get('block.content'));
+ $bootstrapTemplate->setHeader($container->get('block.header'));
+ $bootstrapTemplate->setFooter($container->get('block.footer'));
+ $bootstrapTemplate->setLeft($container->get('block.left'));
+ $bootstrapTemplate->setRight($container->get('block.right'));
+ $bootstrapTemplate->setWebLibraryManager($webLibraryManager);
+ return $bootstrapTemplate;
+ }
+
+ /**
+ * @Factory(name="bootstrapTemplateRenderer")
+ */
+ public function createTemplateRenderer(CacheInterface $cache, ContainerInterface $container, \Twig_Environment $twig): FileBasedRenderer
+ {
+ return new FileBasedRenderer(__DIR__.'/../../../templates/', $cache, $container, $twig);
+ }
+}
diff --git a/src/Mouf/Html/Template/Menus/BootstrapMenu.php b/src/Mouf/Html/Template/Menus/BootstrapMenu.php
index 70c59c4..7de8fbe 100644
--- a/src/Mouf/Html/Template/Menus/BootstrapMenu.php
+++ b/src/Mouf/Html/Template/Menus/BootstrapMenu.php
@@ -59,67 +59,67 @@ class BootstrapMenu extends Menu
*/
public $stacked;
-// private function renderHtmlMenuItem(MenuItemInterface $menuItem, $level = 0) {
-// if (!$menuItem->isHidden()) {
-
-// $menuItemStyleIcon = $menuItem->getAdditionalStyleByType('Mouf\\Html\\Widgets\\Menu\\MenuItemStyleIcon');
-// if($menuItemStyleIcon) {
-// $img = '
';
-// } else {
-// $img = '';
-// }
-
-
-// $children = $menuItem->getChildren();
-// echo '
';
-// }
-// }
+// private function renderHtmlMenuItem(MenuItemInterface $menuItem, $level = 0) {
+// if (!$menuItem->isHidden()) {
+
+// $menuItemStyleIcon = $menuItem->getAdditionalStyleByType('Mouf\\Html\\Widgets\\Menu\\MenuItemStyleIcon');
+// if($menuItemStyleIcon) {
+// $img = '
';
+// } else {
+// $img = '';
+// }
+
+
+// $children = $menuItem->getChildren();
+// echo '';
+// }
+// }
}
diff --git a/src/Mouf/Html/Template/Menus/BootstrapNavBar.php b/src/Mouf/Html/Template/Menus/BootstrapNavBar.php
index 783c320..cfd3bd1 100644
--- a/src/Mouf/Html/Template/Menus/BootstrapNavBar.php
+++ b/src/Mouf/Html/Template/Menus/BootstrapNavBar.php
@@ -92,7 +92,7 @@ class BootstrapNavBar implements HtmlElementInterface
* @Important
* @param array $children
*/
- public function __construct($children = array())
+ public function __construct(array $children = [])
{
$this->children = $children;
}
@@ -128,6 +128,4 @@ public function setBackground(string $background): void
{
$this->background = $background;
}
-
-
}
diff --git a/src/templates/Mouf/Html/Widgets/Form/CheckboxField.php b/src/templates/Mouf/Html/Widgets/Form/CheckboxField.php
index 61c2afe..4ea9eeb 100644
--- a/src/templates/Mouf/Html/Widgets/Form/CheckboxField.php
+++ b/src/templates/Mouf/Html/Widgets/Form/CheckboxField.php
@@ -4,20 +4,19 @@
/* @var $object Mouf\Html\Widgets\Form\TextField */
$object->getLabel()->addClass('col-lg-4');
$object->getLabel()->addClass('control-label');
- if ($required) {
- $object->getLabel()->addText('*');
- }
+ if ($required) {
+ $object->getLabel()->addText('*');
+ }
$object->getLabel()->toHtml();
?>
- getInput()->toHtml();
- if ($object->getHelpText()) {
- ?>
- getHelpText()->toHtml() ?>
- getHelpText()) {
+ ?>
+ getHelpText()->toHtml() ?>
+
-
+
diff --git a/src/templates/Mouf/Html/Widgets/Form/CheckboxField__compact.php b/src/templates/Mouf/Html/Widgets/Form/CheckboxField__compact.php
index 6819a79..8e1b64c 100644
--- a/src/templates/Mouf/Html/Widgets/Form/CheckboxField__compact.php
+++ b/src/templates/Mouf/Html/Widgets/Form/CheckboxField__compact.php
@@ -1,5 +1,5 @@
- getLabel()->toHtml();
$object->getInput()->toHtml();
diff --git a/src/templates/Mouf/Html/Widgets/Form/CheckboxesField.php b/src/templates/Mouf/Html/Widgets/Form/CheckboxesField.php
index f1428bf..e80e2f2 100644
--- a/src/templates/Mouf/Html/Widgets/Form/CheckboxesField.php
+++ b/src/templates/Mouf/Html/Widgets/Form/CheckboxesField.php
@@ -1,6 +1,7 @@
diff --git a/src/templates/Mouf/Html/Widgets/Form/FileUploaderField.php b/src/templates/Mouf/Html/Widgets/Form/FileUploaderField.php
index ce16137..85f75ba 100644
--- a/src/templates/Mouf/Html/Widgets/Form/FileUploaderField.php
+++ b/src/templates/Mouf/Html/Widgets/Form/FileUploaderField.php
@@ -5,79 +5,75 @@
getLabel()->addClass('col-lg-4');
$object->getLabel()->addClass('control-label');
- if ($required) {
- $object->getLabel()->addText('*');
- }
+ if ($required) {
+ $object->getLabel()->addText('*');
+ }
$object->getLabel()->toHtml();
?>
- getFileUploader()->toHtml();
- if ($object->getHelpText()) {
- ?>
-
getHelpText()->toHtml() ?>
- getHelpText()) {
+ ?>
+
getHelpText()->toHtml() ?>
+ getFileList()) {
- $scriptVals = array();
- ?>
-
- getFileList()) {
+ $scriptVals = array();
+ ?>
+
+ getFileList() as $value) {
if ($value) {
?>
-
- |
- getFileUploader()->inputName.'-'.$i?>">
+ |
+
- (link here)
-
- (link here)
-
+ (link here)
+
+ (link here)
+
-
- |
-
- getFileUploader()->inputName?>" name="has-fileupload-getFileUploader()->inputName?>[]" value="" />
+ |
+
+
- ">remove
- |
-
-
+ ">remove
+
+
+
-
-
-
-
+
+
+
-
+
diff --git a/src/templates/Mouf/Html/Widgets/Form/InputField.php b/src/templates/Mouf/Html/Widgets/Form/InputField.php
index 314725e..b372bc2 100644
--- a/src/templates/Mouf/Html/Widgets/Form/InputField.php
+++ b/src/templates/Mouf/Html/Widgets/Form/InputField.php
@@ -1,6 +1,7 @@
getInput()->getName()?>">
getLabel()->addClass("col-lg-".$labelRatio);
- }
+ if ($inline) {
+ $object->getLabel()->addClass("col-lg-".$labelRatio);
+ }
$object->getLabel()->addClass('control-label');
- if ($object->isRequired()) {
- $object->getLabel()->addText('*');
- }
+ if ($object->isRequired()) {
+ $object->getLabel()->addText('*');
+ }
$object->getLabel()->toHtml();
?>
">
- getInput()->addClass('form-control');
$object->getInput()->toHtml();
- if ($object->getHelpText()) {
- ?>
- getHelpText()->toHtml() ?>
- getHelpText()) {
+ ?>
+ getHelpText()->toHtml() ?>
+
-
+
diff --git a/src/templates/Mouf/Html/Widgets/Form/MultiSelectField.php b/src/templates/Mouf/Html/Widgets/Form/MultiSelectField.php
index 8b2f7fb..3528d36 100644
--- a/src/templates/Mouf/Html/Widgets/Form/MultiSelectField.php
+++ b/src/templates/Mouf/Html/Widgets/Form/MultiSelectField.php
@@ -1,5 +1,6 @@
diff --git a/src/templates/Mouf/Html/Widgets/Form/RadioField.php b/src/templates/Mouf/Html/Widgets/Form/RadioField.php
index b374818..6f2571a 100644
--- a/src/templates/Mouf/Html/Widgets/Form/RadioField.php
+++ b/src/templates/Mouf/Html/Widgets/Form/RadioField.php
@@ -1,12 +1,11 @@
- getInput()->toHtml();
$object->getLabel()->toHtml();
if ($object->getHelpText()) {
?>
- getHelpText()->toHtml() ?>
- getHelpText()->toHtml() ?>
+
diff --git a/src/templates/Mouf/Html/Widgets/Form/RadiosField.php b/src/templates/Mouf/Html/Widgets/Form/RadiosField.php
index 8a76d68..504adab 100644
--- a/src/templates/Mouf/Html/Widgets/Form/RadiosField.php
+++ b/src/templates/Mouf/Html/Widgets/Form/RadiosField.php
@@ -1,5 +1,5 @@
diff --git a/src/templates/Mouf/Html/Widgets/Form/SelectField.php b/src/templates/Mouf/Html/Widgets/Form/SelectField.php
index ce39e51..d91d8ba 100644
--- a/src/templates/Mouf/Html/Widgets/Form/SelectField.php
+++ b/src/templates/Mouf/Html/Widgets/Form/SelectField.php
@@ -1,6 +1,7 @@
getSelect()->getName() ?>">
getLabel()->addClass("col-lg-".$labelRatio);
- }
+ if ($inline) {
+ $object->getLabel()->addClass("col-lg-".$labelRatio);
+ }
$object->getLabel()->addClass('control-label');
- if ($required) {
- $object->getLabel()->addText('*');
- }
+ if ($required) {
+ $object->getLabel()->addText('*');
+ }
$object->getLabel()->toHtml();
?>
">
- getSelect()->addClass('form-control');
$object->getSelect()->toHtml();
- if ($object->getHelpText()) {
- ?>
- getHelpText()->toHtml() ?>
- getHelpText()) {
+ ?>
+ getHelpText()->toHtml() ?>
+
-
+
diff --git a/src/templates/Mouf/Html/Widgets/Form/TextAreaField.php b/src/templates/Mouf/Html/Widgets/Form/TextAreaField.php
index c6fdcb1..23fe186 100644
--- a/src/templates/Mouf/Html/Widgets/Form/TextAreaField.php
+++ b/src/templates/Mouf/Html/Widgets/Form/TextAreaField.php
@@ -1,6 +1,7 @@
getTextarea()->getName() ?>">
getLabel()->addClass("col-lg-".$labelRatio);
- }
+ if ($inline) {
+ $object->getLabel()->addClass("col-lg-".$labelRatio);
+ }
$object->getLabel()->addClass('control-label');
- if ($required) {
- $object->getLabel()->addText('*');
- }
+ if ($required) {
+ $object->getLabel()->addText('*');
+ }
$object->getLabel()->toHtml();
?>
">
- getTextarea()->addClass('form-control');
- if ($object->isRequired()) {
- $object->getTextarea()->setRequired('required');
- }
+ if ($object->isRequired()) {
+ $object->getTextarea()->setRequired('required');
+ }
$object->getTextarea()->toHtml();
- if ($object->getHelpText()) {
- ?>
- getHelpText()->toHtml() ?>
- getHelpText()) {
+ ?>
+ getHelpText()->toHtml() ?>
+
-
+
diff --git a/src/templates/Mouf/Html/Widgets/JqueryFileUpload/JqueryFileUploadField.php b/src/templates/Mouf/Html/Widgets/JqueryFileUpload/JqueryFileUploadField.php
new file mode 100644
index 0000000..e362fae
--- /dev/null
+++ b/src/templates/Mouf/Html/Widgets/JqueryFileUpload/JqueryFileUploadField.php
@@ -0,0 +1,24 @@
+
+getLabel()->addClass('control-label');
+if ($object->isRequired()) {
+ $object->getLabel()->addText('
*');
+}
+ $object->getLabel()->toHtml();
+?>
+
+ getJqueryFileUploadWidget()->toHtml();
+ if ($object->getHelpText()) {
+ ?>
+ getHelpText()->toHtml() ?>
+
+
+
+
\ No newline at end of file