├── CHANGELOG.md ├── README.md ├── src ├── plugins │ └── content │ │ └── jtf │ │ ├── tmpl │ │ ├── extended │ │ │ ├── language │ │ │ │ ├── en-GB │ │ │ │ │ └── en-GB.jtf_theme.ini │ │ │ │ └── de-DE │ │ │ │ │ └── de-DE.jtf_theme.ini │ │ │ ├── fields.bs3.xml │ │ │ ├── fields.xml │ │ │ ├── fields.uikit.xml │ │ │ └── fields.uikit3.xml │ │ ├── muster │ │ │ ├── subforms │ │ │ │ ├── subform.uikit.xml │ │ │ │ ├── subform.uikit3.xml │ │ │ │ ├── subform.xml │ │ │ │ └── subform.bs3.xml │ │ │ └── language │ │ │ │ ├── de-DE │ │ │ │ └── de-DE.jtf_theme.ini │ │ │ │ └── en-GB │ │ │ │ └── en-GB.jtf_theme.ini │ │ └── default │ │ │ ├── fields.xml │ │ │ ├── fields.bs3.xml │ │ │ ├── fields.uikit.xml │ │ │ └── fields.uikit3.xml │ │ ├── assets │ │ ├── js │ │ │ ├── plz.js │ │ │ ├── scrollToError.js │ │ │ ├── file.min.js │ │ │ ├── showon.js │ │ │ ├── system │ │ │ │ └── subform-repeatable.js │ │ │ └── file.js │ │ ├── css │ │ │ ├── file.min.css │ │ │ └── file.css │ │ └── language │ │ │ ├── en-GB │ │ │ └── en-GB.jtf_global.ini │ │ │ └── de-DE │ │ │ └── de-DE.jtf_global.ini │ │ ├── layouts │ │ ├── joomla │ │ │ └── form │ │ │ │ ├── field │ │ │ │ ├── file │ │ │ │ │ ├── icon.php │ │ │ │ │ ├── icon.bs3.php │ │ │ │ │ ├── icon.uikit.php │ │ │ │ │ └── icon.uikit3.php │ │ │ │ ├── note.uikit.php │ │ │ │ ├── note.uikit3.php │ │ │ │ ├── note.bs3.php │ │ │ │ ├── subform │ │ │ │ │ ├── repeatable │ │ │ │ │ │ ├── section.php │ │ │ │ │ │ ├── section.bs3.php │ │ │ │ │ │ ├── section.uikit.php │ │ │ │ │ │ ├── section.uikit3.php │ │ │ │ │ │ ├── section-byfieldsets.php │ │ │ │ │ │ └── section-byfieldsets.uikit3.php │ │ │ │ │ ├── repeatable.php │ │ │ │ │ ├── repeatable.bs3.php │ │ │ │ │ ├── repeatable.uikit.php │ │ │ │ │ └── repeatable.uikit3.php │ │ │ │ ├── combo.uikit.php │ │ │ │ ├── submit.php │ │ │ │ ├── note.php │ │ │ │ ├── combo.php │ │ │ │ ├── combo.bs3.php │ │ │ │ ├── tel.php │ │ │ │ ├── color │ │ │ │ │ ├── simple.bs3.php │ │ │ │ │ ├── advanced.bs3.php │ │ │ │ │ ├── advanced.uikit3.php │ │ │ │ │ └── advanced.uikit.php │ │ │ │ ├── radio.php │ │ │ │ ├── checkboxes.php │ │ │ │ └── file.php │ │ │ │ ├── renderfield │ │ │ │ ├── icon_prepend.uikit.php │ │ │ │ ├── icon_prepend.php │ │ │ │ ├── icon_prepend.uikit3.php │ │ │ │ └── icon_prepend.bs3.php │ │ │ │ └── renderfield.php │ │ └── jtf │ │ │ ├── form.php │ │ │ └── message │ │ │ └── plain.php │ │ ├── script.php │ │ ├── libraries │ │ ├── joomla │ │ │ └── form │ │ │ │ ├── fields │ │ │ │ ├── combo.php │ │ │ │ ├── frwk.php │ │ │ │ ├── note.php │ │ │ │ ├── submit.php │ │ │ │ └── plz.php │ │ │ │ └── rules │ │ │ │ ├── PlzRule.php │ │ │ │ ├── SubformRule.php │ │ │ │ └── FileRule.php │ │ └── jtf │ │ │ ├── Input │ │ │ └── Files.php │ │ │ ├── Frameworks │ │ │ ├── Bs3.php │ │ │ ├── Bs4.php │ │ │ ├── Joomla.php │ │ │ ├── Uikit3.php │ │ │ └── Uikit.php │ │ │ └── Form │ │ │ └── Form.php │ │ └── jtf.xml └── administrator │ └── language │ ├── en-GB │ ├── en-GB.plg_content_jtf.ini │ └── en-GB.plg_content_jtf.sys.ini │ └── de-DE │ ├── de-DE.plg_content_jtf.ini │ └── de-DE.plg_content_jtf.sys.ini ├── update.xml ├── jorobo.dist.ini ├── composer.json ├── .gitignore └── RoboFile.php /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | * Initial commit *2017-09-23* 4 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # plg_content_jtf 2 | Neue Version vom JT-Formulator 3 | -------------------------------------------------------------------------------- /src/plugins/content/jtf/tmpl/extended/language/en-GB/en-GB.jtf_theme.ini: -------------------------------------------------------------------------------- 1 | ; 2 | JTF_NAME_DESC="Please enter a surname." 3 | JTF_NAME_LABEL="Surname" 4 | -------------------------------------------------------------------------------- /src/plugins/content/jtf/tmpl/extended/language/de-DE/de-DE.jtf_theme.ini: -------------------------------------------------------------------------------- 1 | ; 2 | JTF_NAME_DESC="Bitte einen Nachnamen eingeben." 3 | JTF_NAME_LABEL="Nachname" 4 | -------------------------------------------------------------------------------- /src/plugins/content/jtf/assets/js/plz.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @package Joomla.Plugin 3 | * @subpackage Content.Jtf 4 | * 5 | * @author Guido De Gobbis 6 | * @copyright (c) 2017 JoomTools.de - All rights reserved. 7 | * @license GNU General Public License version 3 or later 8 | **/ 9 | jQuery(document).ready(function () { 10 | document.formvalidator.setHandler('plz', function (value) { 11 | regex = /^\d{5}$/; 12 | return regex.test(value); 13 | }); 14 | }); 15 | -------------------------------------------------------------------------------- /update.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | JT - Formulator 5 | 6 | jtf 7 | plugin 8 | content 9 | site 10 | 3.0.0-rc20 11 | 12 | https://github.com/JoomTools/plg_content_jtf/releases/download/3.0.0-rc20/plg_content_jtf-3.0.0-rc20.zip 13 | 14 | Guido De Gobbis 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/plugins/content/jtf/assets/css/file.min.css: -------------------------------------------------------------------------------- 1 | .dragarea{position:relative;background-color:#fafbfc;border:1px dashed #999;box-sizing:border-box;padding:5% 0;transition:all .2s ease 0s;width:100%;text-align:center}.dregarea-content{z-index:-1}.dragarea .upload-icon{font-size:48px;width:auto;height:auto;margin:0;line-height:175%;color:#999;transition:all .2s}.dragarea.hover{border-color:#666;background-color:#eee}.dragarea p.lead,.dragarea.hover .upload-icon{color:#666}.upload-list ul li{list-style:none}.legacy-uploader input[type=file]{position:absolute;top:0;left:0;right:0;bottom:0;width:100%!important;height:100%!important;z-index:1;opacity:0;cursor:pointer} -------------------------------------------------------------------------------- /src/plugins/content/jtf/layouts/joomla/form/field/file/icon.php: -------------------------------------------------------------------------------- 1 | 7 | * @copyright (c) 2017 JoomTools.de - All rights reserved. 8 | * @license GNU General Public License version 3 or later 9 | */ 10 | 11 | defined('JPATH_BASE') or die; 12 | 13 | extract($displayData); 14 | 15 | /** 16 | * Layout variables 17 | * --------------------- 18 | * @var string $icon Icon class. 19 | */ 20 | 21 | ?> 22 | 23 | 24 | -------------------------------------------------------------------------------- /src/plugins/content/jtf/assets/js/scrollToError.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @package Joomla.Plugin 3 | * @subpackage Content.Jtf 4 | * 5 | * @author Guido De Gobbis 6 | * @copyright (c) 2017 JoomTools.de - All rights reserved. 7 | * @license GNU General Public License version 3 or later 8 | **/ 9 | jQuery(function ($) { 10 | $("body").on('DOMSubtreeModified', "#system-message-container", function () { 11 | var error = $(this).find('alert-error'); 12 | if (undefined !== error) { 13 | $('html, body').animate({ 14 | scrollTop: $(this).offset().top - 100 15 | }, 500, 'linear'); 16 | } 17 | }); 18 | }); 19 | -------------------------------------------------------------------------------- /src/plugins/content/jtf/layouts/joomla/form/field/file/icon.bs3.php: -------------------------------------------------------------------------------- 1 | 7 | * @copyright (c) 2017 JoomTools.de - All rights reserved. 8 | * @license GNU General Public License version 3 or later 9 | */ 10 | 11 | defined('JPATH_BASE') or die; 12 | 13 | extract($displayData); 14 | 15 | /** 16 | * Layout variables 17 | * --------------------- 18 | * @var string $icon Icon class. 19 | */ 20 | 21 | ?> 22 | 23 | 24 | -------------------------------------------------------------------------------- /src/plugins/content/jtf/layouts/joomla/form/field/file/icon.uikit.php: -------------------------------------------------------------------------------- 1 | 7 | * @copyright (c) 2017 JoomTools.de - All rights reserved. 8 | * @license GNU General Public License version 3 or later 9 | */ 10 | 11 | defined('JPATH_BASE') or die; 12 | 13 | extract($displayData); 14 | 15 | /** 16 | * Layout variables 17 | * --------------------- 18 | * @var string $icon Icon class. 19 | */ 20 | 21 | ?> 22 | 23 | 24 | -------------------------------------------------------------------------------- /src/plugins/content/jtf/layouts/joomla/form/field/file/icon.uikit3.php: -------------------------------------------------------------------------------- 1 | 7 | * @copyright (c) 2017 JoomTools.de - All rights reserved. 8 | * @license GNU General Public License version 3 or later 9 | */ 10 | 11 | defined('JPATH_BASE') or die; 12 | 13 | extract($displayData); 14 | 15 | /** 16 | * Layout variables 17 | * --------------------- 18 | * @var string $icon Icon class. 19 | */ 20 | 21 | ?> 22 | 23 | 24 | -------------------------------------------------------------------------------- /jorobo.dist.ini: -------------------------------------------------------------------------------- 1 | extension = jtf 2 | version = 3.0.0-rc20 3 | source = src 4 | target = zip 5 | 6 | [github] 7 | remote = origin 8 | branch = linux 9 | owner = JoomTools 10 | repository = plg_content_jtf 11 | changelog_source = commits 12 | 13 | [ftp] 14 | host = 15 | port = 21 16 | user = 17 | password = 18 | ssl = false 19 | target = / 20 | 21 | [header] 22 | files = php 23 | exclude = 24 | text = " 25 | /** 26 | * @package Joomla.Plugin 27 | * @subpackage Content.Jtf 28 | * 29 | * @author Guido De Gobbis 30 | * @copyright (c) ##YEAR## JoomTools.de - All rights reserved. 31 | * @license GNU General Public License version 3 or later 32 | */ 33 | " 34 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name" : "JoomTools/plg_content_jtf", 3 | "description": "Plugin to create individual forms", 4 | "license" : "GPL-3+", 5 | "require" : { 6 | "php": ">=5.6" 7 | }, 8 | "repositories": [ 9 | { 10 | "type": "vcs", 11 | "url": "https://github.com/degobbis/jorobo" 12 | } 13 | ], 14 | "require-dev": { 15 | "codeception/codeception": "~2.1", 16 | "joomla-projects/joomla-browser": "v3.4.8.2", 17 | "consolidation/robo": "~0.6", 18 | "joomla-projects/robo": "dev-master", 19 | "joomla-projects/selenium-server-standalone": "v2.52.0", 20 | "fzaninotto/faker": "^1.5", 21 | "joomla-projects/jorobo": "dev-gdg-dev" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/plugins/content/jtf/layouts/joomla/form/renderfield/icon_prepend.uikit.php: -------------------------------------------------------------------------------- 1 | 7 | * @copyright (c) 2017 JoomTools.de - All rights reserved. 8 | * @license GNU General Public License version 3 or later 9 | */ 10 | 11 | defined('JPATH_BASE') or die; 12 | 13 | extract($displayData); 14 | 15 | /** 16 | * Layout variables 17 | * --------------------- 18 | * @var string $icon Icon class. 19 | * @var string $input The input field html code. 20 | */ 21 | 22 | ?> 23 |
24 | 25 | 26 |
27 | 28 | -------------------------------------------------------------------------------- /src/plugins/content/jtf/layouts/joomla/form/renderfield/icon_prepend.php: -------------------------------------------------------------------------------- 1 | 7 | * @copyright (c) 2017 JoomTools.de - All rights reserved. 8 | * @license GNU General Public License version 3 or later 9 | */ 10 | 11 | defined('JPATH_BASE') or die; 12 | 13 | extract($displayData); 14 | 15 | /** 16 | * Layout variables 17 | * --------------------- 18 | * @var string $icon Icon class. 19 | * @var string $input The input field html code. 20 | */ 21 | 22 | ?> 23 |
24 | 25 | 26 | 27 | 28 |
29 | -------------------------------------------------------------------------------- /src/plugins/content/jtf/layouts/joomla/form/renderfield/icon_prepend.uikit3.php: -------------------------------------------------------------------------------- 1 | 7 | * @copyright (c) 2017 JoomTools.de - All rights reserved. 8 | * @license GNU General Public License version 3 or later 9 | */ 10 | 11 | defined('JPATH_BASE') or die; 12 | 13 | extract($displayData); 14 | 15 | /** 16 | * Layout variables 17 | * --------------------- 18 | * @var string $icon Icon class. 19 | * @var string $input The input field html code. 20 | */ 21 | 22 | ?> 23 |
24 | 25 | 26 |
27 | 28 | -------------------------------------------------------------------------------- /src/plugins/content/jtf/layouts/joomla/form/renderfield/icon_prepend.bs3.php: -------------------------------------------------------------------------------- 1 | 7 | * @copyright (c) 2017 JoomTools.de - All rights reserved. 8 | * @license GNU General Public License version 3 or later 9 | */ 10 | 11 | defined('JPATH_BASE') or die; 12 | 13 | extract($displayData); 14 | 15 | /** 16 | * Layout variables 17 | * --------------------- 18 | * @var string $icon Icon class. 19 | * @var string $input The input field html code. 20 | */ 21 | 22 | ?> 23 |
24 | 25 | 26 | 27 | 28 |
29 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Builds 2 | build 3 | releases 4 | 5 | # OSX 6 | .DS_Store 7 | ._* 8 | .Spotlight-V100 9 | .Trashes 10 | 11 | # Windows 12 | Thumbs.db 13 | Desktop.ini 14 | 15 | # PHPStorm 16 | .idea/ 17 | 18 | # Sublime Text 19 | *.sublime* 20 | 21 | # Eclipse 22 | .buildpath 23 | .project 24 | .settings 25 | 26 | # Temp files 27 | *.tmp 28 | *.bak 29 | *.swp 30 | *~.nib 31 | *~ 32 | 33 | # Phing 34 | build.properties 35 | phing-latest.phar 36 | 37 | # Github pages and Jekyll files 38 | /_site/ 39 | /Gemfile 40 | /Gemfile.lock 41 | 42 | # composer 43 | composer.phar 44 | vendor/* 45 | 46 | # Robo 47 | robo.phar 48 | RoboFile.ini 49 | 50 | # Test related files 51 | tests/acceptance.suite.yml 52 | tests/*/*Tester.php 53 | tests/_support/_generated/*TesterActions.php 54 | tests/joomla-cms3* 55 | tests/_output* 56 | selenium-server-standalone.jar 57 | codecept.phar 58 | selenium.log 59 | tests/cache 60 | 61 | # Package building related 62 | /dist 63 | jorobo.ini 64 | auth.json 65 | -------------------------------------------------------------------------------- /src/plugins/content/jtf/assets/css/file.css: -------------------------------------------------------------------------------- 1 | .dragarea { 2 | position: relative; 3 | background-color: #fafbfc; 4 | border: 1px dashed #999; 5 | box-sizing: border-box; 6 | padding: 5% 0; 7 | transition: all 0.2s ease 0s; 8 | width: 100%; 9 | text-align: center; 10 | } 11 | .dregarea-content { 12 | z-index: -1; 13 | } 14 | 15 | .dragarea .upload-icon { 16 | font-size: 48px; 17 | width: auto; 18 | height: auto; 19 | margin: 0; 20 | line-height: 175%; 21 | color: #999; 22 | transition: all .2s; 23 | } 24 | 25 | .dragarea.hover { 26 | border-color: #666; 27 | background-color: #eee; 28 | } 29 | 30 | .dragarea.hover .upload-icon, 31 | .dragarea p.lead { 32 | color: #666; 33 | } 34 | .upload-list ul li{ 35 | list-style: none; 36 | } 37 | .legacy-uploader input[type='file'] { 38 | position: absolute; 39 | top: 0; 40 | left: 0; 41 | right: 0; 42 | bottom: 0; 43 | width: 100% !important; 44 | height: 100% !important; 45 | z-index: 1; 46 | opacity: 0; 47 | cursor: pointer; 48 | } -------------------------------------------------------------------------------- /src/plugins/content/jtf/tmpl/muster/subforms/subform.uikit.xml: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | 11 | 12 | 24 | 25 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/plugins/content/jtf/tmpl/muster/subforms/subform.uikit3.xml: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | 12 | 13 | 25 | 26 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /src/plugins/content/jtf/tmpl/muster/subforms/subform.xml: -------------------------------------------------------------------------------- 1 | 2 |
6 | 7 | 15 | 16 | 29 | 30 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /src/administrator/language/en-GB/en-GB.plg_content_jtf.ini: -------------------------------------------------------------------------------- 1 | ; 2 | JTF_XML_EXCLUDE_OPTION_LABEL="Ausschluß" 3 | JTF_XML_EXCLUDE_OPTION_DESC="Hier können Komponenten eingetragen werden, die in Konflikt mit dem JT-Formulator stehen. Der JT-Formulator wird dann nicht ausgeführt. Jede Komponente muss in einer eigenen Zeile stehen." 4 | JTF_XML_FRAMEWORK_LABEL="Framework" 5 | JTF_XML_FRAMEWORK_DESC="Das gewünschte Framework auswählen" 6 | JTF_XML_FRAMEWORK_VALUE_CORE="Joomla Core (BootStrap v2)" 7 | JTF_XML_FRAMEWORK_VALUE_BS3="BootStrap v3" 8 | JTF_XML_FRAMEWORK_VALUE_BS4="BootStrap v4" 9 | JTF_XML_CAPTCHA_VALUE_UIKIT2="UIKit v2" 10 | JTF_XML_CAPTCHA_VALUE_UIKIT3="UIKit v3" 11 | JTF_XML_DEBUG_LABEL="Debug" 12 | JTF_XML_DEBUG_DESC="Debug aktivieren" 13 | JTF_XML_FILLOUT_LABEL="Mind. Ausfüllzeit (sek.)" 14 | JTF_XML_FILLOUT_DESC="Die Zeit in Sekundedn, die ein Besucher beim Ausfüllen des Formulares mindestens benötigen muss um nicht als Spambot zu gelten.
Kann im Pluginaufruf überschreiben werden mit filloutTime=INT." 15 | 16 | JTF_SET_ATTACHMENT="## No directory listings\nIndexIgnore *\n## Can be commented out if causes errors, see notes above.\nOptions +FollowSymlinks\nOptions -Indexes\nHeader set Content-Disposition attachment" 17 | 18 | JTF_CAN_NOT_LOAD="JT - Formulator wird nicht zusammen mit '%s' ausgeführt." 19 | -------------------------------------------------------------------------------- /src/administrator/language/de-DE/de-DE.plg_content_jtf.ini: -------------------------------------------------------------------------------- 1 | ; 2 | JTF_XML_EXCLUDE_OPTION_LABEL="Ausschluß" 3 | JTF_XML_EXCLUDE_OPTION_DESC="Hier können Komponenten eingetragen werden, die in Konflikt mit dem JT-Formulator stehen. Der JT-Formulator wird dann nicht ausgeführt. Jede Komponente muss in einer eigenen Zeile stehen." 4 | JTF_XML_FRAMEWORK_LABEL="Framework" 5 | JTF_XML_FRAMEWORK_DESC="Das gewünschte Framework auswählen" 6 | JTF_XML_FRAMEWORK_VALUE_CORE="Joomla Core (BootStrap v2)" 7 | JTF_XML_FRAMEWORK_VALUE_BS3="BootStrap v3" 8 | JTF_XML_FRAMEWORK_VALUE_BS4="BootStrap v4" 9 | JTF_XML_CAPTCHA_VALUE_UIKIT2="UIKit v2" 10 | JTF_XML_CAPTCHA_VALUE_UIKIT3="UIKit v3" 11 | JTF_XML_DEBUG_LABEL="Debug" 12 | JTF_XML_DEBUG_DESC="Debug aktivieren" 13 | JTF_XML_FILLOUT_LABEL="Mind. Ausfüllzeit (sek.)" 14 | JTF_XML_FILLOUT_DESC="Die Zeit in Sekundedn, die ein Besucher beim Ausfüllen des Formulares mindestens benötigen muss um nicht als Spambot zu gelten.
Kann im Pluginaufruf überschreiben werden mit filloutTime=INT." 15 | 16 | JTF_SET_ATTACHMENT_HTACCESS="## No directory listings\nIndexIgnore *\n## Can be commented out if causes errors, see notes above.\nOptions +FollowSymlinks\nOptions -Indexes\nHeader set Content-Disposition attachment" 17 | 18 | JTF_CAN_NOT_LOAD="JT - Formulator wird nicht zusammen mit '%s' ausgeführt." 19 | -------------------------------------------------------------------------------- /src/plugins/content/jtf/layouts/joomla/form/field/note.uikit.php: -------------------------------------------------------------------------------- 1 | 7 | * @copyright (c) 2017 JoomTools.de - All rights reserved. 8 | * @license GNU General Public License version 3 or later 9 | */ 10 | 11 | defined('JPATH_BASE') or die; 12 | 13 | extract($displayData); 14 | 15 | /** 16 | * Layout variables 17 | * ----------------- 18 | * @var string $class Classes for the input. 19 | * @var string $close Set close icon for the notice. 20 | * @var string $description Description of the field. 21 | * @var string $label Label of the field. 22 | * @var string $heading Heading h1-h6. 23 | */ 24 | 25 | // Including fallback code for HTML5 non supported browsers. 26 | JHtml::_('jquery.framework'); 27 | JHtml::_('script', 'system/html5fallback.js', array('version' => 'auto', 'relative' => true)); 28 | 29 | $class = !empty($class) ? ' class="' . $class . '"' : ''; 30 | 31 | if (!empty($close)) 32 | { 33 | $html[] = ''; 34 | } 35 | 36 | $html[] = !empty($label) ? '<' . $heading . '>' . $label . '' : ''; 37 | $html[] = !empty($description) ? $description : ''; 38 | 39 | ?> 40 | data-uk-alert> 41 | 42 | 43 | -------------------------------------------------------------------------------- /src/plugins/content/jtf/layouts/joomla/form/field/note.uikit3.php: -------------------------------------------------------------------------------- 1 | 7 | * @copyright (c) 2017 JoomTools.de - All rights reserved. 8 | * @license GNU General Public License version 3 or later 9 | */ 10 | 11 | defined('JPATH_BASE') or die; 12 | 13 | extract($displayData); 14 | 15 | /** 16 | * Layout variables 17 | * ----------------- 18 | * @var string $class Classes for the input. 19 | * @var string $close Set close icon for the notice. 20 | * @var string $description Description of the field. 21 | * @var string $label Label of the field. 22 | * @var string $heading Heading h1-h6. 23 | */ 24 | 25 | // Including fallback code for HTML5 non supported browsers. 26 | JHtml::_('jquery.framework'); 27 | JHtml::_('script', 'system/html5fallback.js', array('version' => 'auto', 'relative' => true)); 28 | 29 | $class = !empty($class) ? ' class="' . $class . '"' : ''; 30 | 31 | if (!empty($close)) 32 | { 33 | $html[] = ''; 34 | } 35 | 36 | $html[] = !empty($label) ? '<' . $heading . '>' . $label . '' : ''; 37 | $html[] = !empty($description) ? $description : ''; 38 | 39 | ?> 40 | data-uk-alert> 41 | 42 | 43 | -------------------------------------------------------------------------------- /src/plugins/content/jtf/layouts/joomla/form/field/note.bs3.php: -------------------------------------------------------------------------------- 1 | 7 | * @copyright (c) 2017 JoomTools.de - All rights reserved. 8 | * @license GNU General Public License version 3 or later 9 | */ 10 | 11 | defined('JPATH_BASE') or die; 12 | 13 | extract($displayData); 14 | 15 | /** 16 | * Layout variables 17 | * ----------------- 18 | * @var string $buttonclass Classes special for the button. 19 | * @var string $class Classes for the input. 20 | * @var string $description Description of the field. 21 | * @var string $label Label of the field. 22 | */ 23 | 24 | // Including fallback code for HTML5 non supported browsers. 25 | JHtml::_('jquery.framework'); 26 | JHtml::_('script', 'system/html5fallback.js', array('version' => 'auto', 'relative' => true)); 27 | 28 | $role = ' role="alert"'; 29 | $class = !empty($class) ? ' class="' . $class . '"' : ''; 30 | $close = $close == 'true' ? 'alert' : $close; 31 | 32 | if (!empty($close)) 33 | { 34 | $html[] = ''; 37 | } 38 | 39 | $html[] = !empty($label) ? '<' . $heading . '>' . $label . '' : ''; 40 | $html[] = !empty($description) ? $description : ''; 41 | 42 | ?> 43 | > 44 | 45 | 46 | -------------------------------------------------------------------------------- /src/administrator/language/de-DE/de-DE.plg_content_jtf.sys.ini: -------------------------------------------------------------------------------- 1 | ; 2 | JTF_XML_NAME="Inhalt - JT - Formulator" 3 | JTF_XML_DESC="Die möglichen Feldtypen für die XML sind hier:
http://docs.joomla.org/Standard_form_field_types

Welche Form der Validierung der Felder existiert, kann hier nachgeschlagen werden:
http://docs.joomla.org/Server-side_form_validation" 4 | JTF_XML_CAPTCHA_LABEL="Captcha anzeigen" 5 | JTF_XML_CAPTCHA_DESC="Hier kann eingestellt werden, ob das Formular zusätzlich durch ein Captcha abgesichert werden soll." 6 | JTF_XML_CAPTCHA_VALUE_JOOMLA="Joomla! Captcha-Funktion verwenden." 7 | JTF_XML_FILE_PATH_LABEL="Upload-Ordner" 8 | JTF_XML_FILE_PATH_DESC="Hier kann der Ordner angegeben werden, in dem das Verzeichnis 'uploads', für hochgeladene Dateien, erstellt werden soll. Die Dateien werden nicht als Anhang, sonder im E-Mail-Body als Downloadlink mitgeteilt, weshalb sich der Pfad innerhalb des Joomla-ROOT befinden muss.
Standard ist JOOMLAROOT/uploads" 9 | JTF_XML_FILE_CLEAR_LABEL="Uploads bereinigen" 10 | JTF_XML_FILE_CLEAR_DESC="Hier kann angegeben werden, nach wieviel Tagen die hochgeladenen Dateien wieder gelöscht werden sollen.
0 = niemals löschen." 11 | JTF_XML_ERROR_CLASS_LABEL="Fehler-Classe" 12 | JTF_XML_ERROR_CLASS_DESC="Wenn das Formular abgesand wird und Werte fehlerhaft sind, oder Pflichtfelder nicht ausgefüllt wurden, werden Sie mit dieser Classe markiert." 13 | -------------------------------------------------------------------------------- /src/administrator/language/en-GB/en-GB.plg_content_jtf.sys.ini: -------------------------------------------------------------------------------- 1 | ; 2 | JTF_XML_NAME="Content - JT - Formulator" 3 | JTF_XML_DESC="Die möglichen Feldtypen für die XML sind hier:
http://docs.joomla.org/Standard_form_field_types

Welche Form der Validierung der Felder existiert, kann hier nachgeschlagen werden:
http://docs.joomla.org/Server-side_form_validation" 4 | JTF_XML_CAPTCHA_LABEL="Captcha anzeigen" 5 | JTF_XML_CAPTCHA_DESC="Hier kann eingestellt werden, ob das Formular zusätzlich durch ein Captcha abgesichert werden soll." 6 | JTF_XML_CAPTCHA_VALUE_JOOMLA="Joomla! Captcha-Funktion verwenden." 7 | JTF_XML_FILE_PATH_LABEL="Upload-Ordner" 8 | JTF_XML_FILE_PATH_DESC="Hier kann der Ordner angegeben werden, in dem das Verzeichnis 'uploads', für hochgeladene Dateien, erstellt werden soll. Die Dateien werden nicht als Anhang, sonder im E-Mail-Body als Downloadlink mitgeteilt, weshalb sich der Pfad innerhalb des Joomla-ROOT befinden muss.
Standard ist JOOMLAROOT/uploads" 9 | JTF_XML_FILE_CLEAR_LABEL="Uploads bereinigen" 10 | JTF_XML_FILE_CLEAR_DESC="Hier kann angegeben werden, nach wieviel Tagen die hochgeladenen Dateien wieder gelöscht werden sollen.
0 = niemals löschen." 11 | JTF_XML_ERROR_CLASS_LABEL="Fehler-Classe" 12 | JTF_XML_ERROR_CLASS_DESC="Wenn das Formular abgesand wird und Werte fehlerhaft sind, oder Pflichtfelder nicht ausgefüllt wurden, werden Sie mit dieser Classe markiert." 13 | -------------------------------------------------------------------------------- /src/plugins/content/jtf/tmpl/muster/subforms/subform.bs3.xml: -------------------------------------------------------------------------------- 1 | 2 |
7 | 8 | 17 | 18 | 19 | 20 | 21 | 22 | 29 | 30 | 42 | 43 | 51 | 52 | 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /src/plugins/content/jtf/script.php: -------------------------------------------------------------------------------- 1 | 7 | * @copyright 2017 JoomTools.de - All rights reserved. 8 | * @license GNU General Public License version 3 or later 9 | */ 10 | 11 | defined('_JEXEC') or die; 12 | 13 | /** 14 | * Script file of Joomla CMS 15 | * 16 | * @since 1.6.4 17 | */ 18 | class PlgContentJtfInstallerScript 19 | { 20 | /** 21 | * Extension script constructor. 22 | * 23 | * @since 3.0.0 24 | */ 25 | public function __construct() 26 | { 27 | // Define the minumum versions to be supported. 28 | $this->minimumJoomla = '3.8'; 29 | $this->minimumPhp = '7.0'; 30 | } 31 | 32 | /** 33 | * Function to act prior to installation process begins 34 | * 35 | * @param string $action Which action is happening (install|uninstall|discover_install|update) 36 | * @param JInstaller $installer The class calling this method 37 | * 38 | * @return boolean True on success 39 | * 40 | * @since 3.0.0 41 | */ 42 | public function preflight($action, $installer) 43 | { 44 | if ($action === 'update') 45 | { 46 | jimport('joomla.filesystem.folder'); 47 | 48 | $error = false; 49 | $pluginPath = JPATH_PLUGINS . '/content/jtf'; 50 | $deletes = []; 51 | $deletes[] = $pluginPath . '/assets'; 52 | $deletes[] = $pluginPath . '/layouts'; 53 | $deletes[] = $pluginPath . '/libraries'; 54 | $deletes[] = $pluginPath . '/tmpl'; 55 | 56 | foreach ($deletes as $delete) 57 | { 58 | if (is_dir($delete)) 59 | { 60 | JFolder::delete($delete); 61 | } 62 | } 63 | } 64 | 65 | return true; 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /src/plugins/content/jtf/layouts/joomla/form/field/subform/repeatable/section.php: -------------------------------------------------------------------------------- 1 | 7 | * @copyright (c) 2017 JoomTools.de - All rights reserved. 8 | * @license GNU General Public License version 3 or later 9 | */ 10 | 11 | defined('_JEXEC') or die; 12 | 13 | /** 14 | * Make thing clear 15 | * 16 | * @var JForm $form The form instance for render the section 17 | * @var string $basegroup The base group name 18 | * @var string $group Current group name 19 | * @var array $buttons Array of the buttons that will be rendered 20 | */ 21 | extract($displayData); 22 | $subformClass = !empty($form->getAttribute('class')) ? ' ' . $form->getAttribute('class') : ''; 23 | ?> 24 | 25 |
26 | 27 | getGroup('') as $field) : ?> 28 | renderField(); ?> 29 | 30 | 31 |
32 |
33 | 34 | 35 | 36 |
37 |
38 | 39 |
40 | -------------------------------------------------------------------------------- /src/plugins/content/jtf/layouts/joomla/form/field/subform/repeatable/section.bs3.php: -------------------------------------------------------------------------------- 1 | 7 | * @copyright (c) 2017 JoomTools.de - All rights reserved. 8 | * @license GNU General Public License version 3 or later 9 | */ 10 | 11 | defined('_JEXEC') or die; 12 | 13 | /** 14 | * Make thing clear 15 | * 16 | * @var JForm $form The form instance for render the section 17 | * @var string $basegroup The base group name 18 | * @var string $group Current group name 19 | * @var array $buttons Array of the buttons that will be rendered 20 | */ 21 | extract($displayData); 22 | $subformClass = !empty($form->getAttribute('class')) ? ' ' . $form->getAttribute('class') : ''; 23 | ?> 24 | 25 |
26 | 27 | getGroup('') as $field) : ?> 28 | renderField(); ?> 29 | 30 | 31 | 44 | 45 |
46 | -------------------------------------------------------------------------------- /src/plugins/content/jtf/layouts/joomla/form/field/subform/repeatable/section.uikit.php: -------------------------------------------------------------------------------- 1 | 7 | * @copyright (c) 2017 JoomTools.de - All rights reserved. 8 | * @license GNU General Public License version 3 or later 9 | */ 10 | 11 | defined('_JEXEC') or die; 12 | 13 | /** 14 | * Make thing clear 15 | * 16 | * @var JForm $form The form instance for render the section 17 | * @var string $basegroup The base group name 18 | * @var string $group Current group name 19 | * @var array $buttons Array of the buttons that will be rendered 20 | */ 21 | extract($displayData); 22 | $subformClass = !empty($form->getAttribute('class')) ? ' ' . $form->getAttribute('class') : ''; 23 | ?> 24 |
26 | getGroup('') as $field) : ?> 27 | renderField(); ?> 28 | 29 | 30 |
31 |
32 | 33 | 34 | 35 |
36 |
37 | 38 |
39 | -------------------------------------------------------------------------------- /src/plugins/content/jtf/layouts/joomla/form/field/subform/repeatable/section.uikit3.php: -------------------------------------------------------------------------------- 1 | 7 | * @copyright (c) 2017 JoomTools.de - All rights reserved. 8 | * @license GNU General Public License version 3 or later 9 | */ 10 | 11 | defined('_JEXEC') or die; 12 | 13 | /** 14 | * Make thing clear 15 | * 16 | * @var JForm $form The form instance for render the section 17 | * @var string $basegroup The base group name 18 | * @var string $group Current group name 19 | * @var array $buttons Array of the buttons that will be rendered 20 | */ 21 | extract($displayData); 22 | $subformClass = !empty($form->getAttribute('class')) ? ' ' . $form->getAttribute('class') : ''; 23 | ?> 24 |
26 | getGroup('') as $field) : ?> 27 | renderField(); ?> 28 | 29 | 30 |
31 |
32 | 33 | 34 | 35 |
36 |
37 | 38 |
39 | -------------------------------------------------------------------------------- /src/plugins/content/jtf/tmpl/default/fields.xml: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 | 14 | 25 | 35 | 45 |
46 |
49 | 60 | 61 | 62 |
63 |
-------------------------------------------------------------------------------- /src/plugins/content/jtf/libraries/joomla/form/fields/combo.php: -------------------------------------------------------------------------------- 1 | 7 | * @copyright (c) 2017 JoomTools.de - All rights reserved. 8 | * @license GNU General Public License version 3 or later 9 | */ 10 | 11 | defined('JPATH_PLATFORM') or die; 12 | 13 | JFormHelper::loadFieldClass('list'); 14 | 15 | /** 16 | * Form Field class for the Joomla Platform. 17 | * Implements a combo box field. 18 | * 19 | * @since 11.1 20 | */ 21 | class JFormFieldCombo extends JFormFieldList 22 | { 23 | /** 24 | * The form field type. 25 | * 26 | * @var string 27 | * @since 11.1 28 | */ 29 | protected $type = 'Combo'; 30 | 31 | /** 32 | * Name of the layout being used to render the field 33 | * 34 | * @var string 35 | * @since 3.7.3 36 | */ 37 | protected $layout = 'joomla.form.field.combo'; 38 | 39 | /** 40 | * Method to get the field input markup for a combo box field. 41 | * 42 | * @return string The field input markup. 43 | * 44 | * @since 11.1 45 | */ 46 | protected function getInput() 47 | { 48 | if (empty($this->layout)) 49 | { 50 | throw new UnexpectedValueException(sprintf('%s has no layout assigned.', $this->name)); 51 | } 52 | 53 | return $this->getRenderer($this->layout)->render($this->getLayoutData()); 54 | } 55 | 56 | /** 57 | * Method to get the data to be passed to the layout for rendering. 58 | * 59 | * @return array 60 | * 61 | * @since 3.7.3 62 | */ 63 | protected function getLayoutData() 64 | { 65 | $data = parent::getLayoutData(); 66 | 67 | // Get the field options. 68 | $options = $this->getOptions(); 69 | 70 | $extraData = array( 71 | 'options' => $options, 72 | ); 73 | 74 | return array_merge($data, $extraData); 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /src/plugins/content/jtf/tmpl/default/fields.bs3.xml: -------------------------------------------------------------------------------- 1 | 2 |
6 |
7 | 16 | 26 | 35 | 45 |
46 |
49 | 59 | 60 | 61 |
62 |
-------------------------------------------------------------------------------- /src/plugins/content/jtf/tmpl/default/fields.uikit.xml: -------------------------------------------------------------------------------- 1 | 2 |
5 |
6 | 16 | 27 | 37 | 47 |
48 |
51 | 61 | 62 | 63 |
64 |
-------------------------------------------------------------------------------- /RoboFile.php: -------------------------------------------------------------------------------- 1 | stopOnFail(false); 34 | } 35 | 36 | /** 37 | * Build the joomla extension package 38 | * 39 | * @param array $params Additional params 40 | * 41 | * @return void 42 | */ 43 | public function build($params = ['dev' => false]) 44 | { 45 | if (!file_exists('jorobo.ini')) 46 | { 47 | $this->_copy('jorobo.dist.ini', 'jorobo.ini'); 48 | } 49 | 50 | //$this->taskBuild($params)->run(); 51 | (new \Joomla\Jorobo\Tasks\Build($params))->run(); 52 | } 53 | 54 | /** 55 | * Update copyright headers for this project. (Set the text up in the jorobo.ini) 56 | * 57 | * @return void 58 | */ 59 | public function headers() 60 | { 61 | (new \Joomla\Jorobo\Tasks\CopyrightHeader())->run(); 62 | } 63 | 64 | /** 65 | * Symlink projectfiles from source into target 66 | * 67 | * @param string $target Absolute path to Joomla! root 68 | * 69 | * @return void 70 | */ 71 | public function map($target) 72 | { 73 | //$this->taskMap($target)->run(); 74 | (new \Joomla\Jorobo\Tasks\Map($target))->run(); 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /src/plugins/content/jtf/layouts/joomla/form/field/combo.uikit.php: -------------------------------------------------------------------------------- 1 | 7 | * @copyright (c) 2017 JoomTools.de - All rights reserved. 8 | * @license GNU General Public License version 3 or later 9 | */ 10 | 11 | defined('JPATH_BASE') or die; 12 | 13 | extract($displayData); 14 | 15 | // Including fallback code for HTML5 non supported browsers. 16 | JHtml::_('jquery.framework'); 17 | JHtml::_('script', 'system/html5fallback.js', array('version' => 'auto', 'relative' => true)); 18 | JHtml::_('script', 'system/core.js', array('version' => 'auto', 'relative' => true)); 19 | JHtml::_('script', 'plugins/content/jtf/assets/js/combo.uikit.js', array('version' => 'auto')); 20 | 21 | $attr = !empty($class) ? ' class="combobox ' . $class . '"' : ' class="combobox"'; 22 | $attr .= !empty($size) ? ' size="' . $size . '"' : ''; 23 | $attr .= !empty($readonly) ? ' readonly' : ''; 24 | $attr .= !empty($disabled) ? ' disabled' : ''; 25 | $attr .= !empty($required) ? ' required aria-required="true"' : ''; 26 | 27 | // Initialize JavaScript field attributes. 28 | $attr .= !empty($onchange) ? ' onchange="' . $onchange . '"' : ''; 29 | 30 | ?> 31 |
32 | 37 | autocomplete="off"/> 38 |
39 | 42 |
43 | 48 |
49 |
50 |
51 | -------------------------------------------------------------------------------- /src/plugins/content/jtf/layouts/joomla/form/field/subform/repeatable/section-byfieldsets.php: -------------------------------------------------------------------------------- 1 | 7 | * @copyright (c) 2017 JoomTools.de - All rights reserved. 8 | * @license GNU General Public License version 3 or later 9 | */ 10 | 11 | defined('_JEXEC') or die; 12 | 13 | /** 14 | * Make thing clear 15 | * 16 | * @var JForm $form The form instance for render the section 17 | * @var string $basegroup The base group name 18 | * @var string $group Current group name 19 | * @var array $buttons Array of the buttons that will be rendered 20 | */ 21 | extract($displayData); 22 | 23 | ?> 24 | 25 |
26 | 27 |
28 |
29 | 30 | 31 | 32 |
33 |
34 | 35 |
36 | getFieldsets() as $fieldset) : ?> 37 |
38 | label)) : ?> 39 | label); ?> 40 | 41 | getFieldset($fieldset->name) as $field) : ?> 42 | renderField(); ?> 43 | 44 |
45 | 46 |
47 |
48 | -------------------------------------------------------------------------------- /src/plugins/content/jtf/libraries/joomla/form/fields/frwk.php: -------------------------------------------------------------------------------- 1 | 7 | * @copyright (c) 2017 JoomTools.de - All rights reserved. 8 | * @license GNU General Public License version 3 or later 9 | */ 10 | 11 | defined('JPATH_PLATFORM') or die; 12 | 13 | JLoader::registerNamespace('Jtf', JPATH_PLUGINS . '/content/jtf/libraries/jtf', false, false, 'psr4'); 14 | JLoader::discover('Jtf\Frameworks\Framework',JPATH_PLUGINS . '/content/jtf/libraries/jtf/Frameworks'); 15 | JFormHelper::loadFieldClass('list'); 16 | 17 | /** 18 | * Form Field class for the Joomla Platform. 19 | * Supports a generic list of options. 20 | * 21 | * @since 11.1 22 | */ 23 | class JFormFieldFrwk extends JFormFieldList 24 | { 25 | /** 26 | * The form field type. 27 | * 28 | * @var string 29 | * @since 11.1 30 | */ 31 | protected $type = 'Frwk'; 32 | 33 | /** 34 | * Method to get the field options. 35 | * 36 | * @return array The field option objects. 37 | * 38 | * @since 3.7.0 39 | */ 40 | protected function getOptions() 41 | { 42 | $frwkPath = JPATH_PLUGINS . '/content/jtf/libraries/jtf/Frameworks'; 43 | $frwk = JFolder::files($frwkPath); 44 | 45 | $options = array(); 46 | 47 | foreach ($frwk as $file) 48 | { 49 | $fileName = JFile::stripExt($file); 50 | 51 | if ($fileName == 'Helper') 52 | { 53 | continue; 54 | } 55 | 56 | $framework = 'Jtf\\Frameworks\\Framework' . ucfirst($fileName); 57 | $fileRealName = $framework::$name; 58 | 59 | $tmp = array( 60 | 'value' => strtolower($fileName), 61 | 'text' => $fileRealName, 62 | ); 63 | 64 | // Add the option object to the result set. 65 | $options[] = (object) $tmp; 66 | 67 | } 68 | 69 | // Merge any additional options in the XML definition. 70 | $options = array_merge(parent::getOptions(), $options); 71 | 72 | return $options; 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /src/plugins/content/jtf/tmpl/default/fields.uikit3.xml: -------------------------------------------------------------------------------- 1 | 2 |
5 |
6 | 17 | 29 | 40 | 51 |
52 |
55 | 66 | 67 | 68 |
69 |
-------------------------------------------------------------------------------- /src/plugins/content/jtf/libraries/joomla/form/fields/note.php: -------------------------------------------------------------------------------- 1 | 7 | * @copyright (c) 2017 JoomTools.de - All rights reserved. 8 | * @license GNU General Public License version 3 or later 9 | */ 10 | 11 | defined('JPATH_PLATFORM') or die; 12 | 13 | /** 14 | * Form Field class for the Joomla Platform. 15 | * Supports a one line text field. 16 | * 17 | * @link http://www.w3.org/TR/html-markup/input.text.html#input.text 18 | * @since 11.1 19 | */ 20 | class JFormFieldNote extends JFormField 21 | { 22 | /** 23 | * The form field type. 24 | * 25 | * @var string 26 | * @since 11.1 27 | */ 28 | protected $type = 'Note'; 29 | 30 | /** 31 | * Name of the layout being used to render the field 32 | * 33 | * @var string 34 | * @since 3.7.3 35 | */ 36 | protected $layout = 'joomla.form.field.note'; 37 | 38 | /** 39 | * Method to get the field label markup. 40 | * 41 | * @return string The field label markup. 42 | * 43 | * @since 11.1 44 | */ 45 | protected function getLabel() 46 | { 47 | return ''; 48 | } 49 | 50 | /** 51 | * Method to get the field input markup. 52 | * 53 | * @return string The field input markup. 54 | * 55 | * @since 11.1 56 | */ 57 | protected function getInput() 58 | { 59 | if (empty($this->layout)) 60 | { 61 | throw new UnexpectedValueException(sprintf('%s has no layout assigned.', $this->name)); 62 | } 63 | 64 | return $this->getRenderer($this->layout)->render($this->getLayoutData()); 65 | } 66 | 67 | /** 68 | * Method to get the data to be passed to the layout for rendering. 69 | * 70 | * @return array 71 | * 72 | * @since 3.7.3 73 | */ 74 | protected function getLayoutData() 75 | { 76 | $data = parent::getLayoutData(); 77 | 78 | if (empty($data['label']) && empty($data['description'])) 79 | { 80 | return ''; 81 | } 82 | 83 | $heading = $this->element['heading'] ? (string) $this->element['heading'] : 'h4'; 84 | $close = (string) $this->element['close']; 85 | 86 | $extraData = array( 87 | 'heading' => $heading, 88 | 'close' => $close, 89 | ); 90 | 91 | return array_merge($data, $extraData); 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /src/plugins/content/jtf/layouts/joomla/form/renderfield.php: -------------------------------------------------------------------------------- 1 | 7 | * @copyright (c) 2017 JoomTools.de - All rights reserved. 8 | * @license GNU General Public License version 3 or later 9 | */ 10 | 11 | defined('JPATH_BASE') or die; 12 | 13 | extract($displayData); 14 | 15 | /** 16 | * Layout variables 17 | * --------------------- 18 | * @var array $options Optional parameters. 19 | * @var string $label he html code for the label (not required if $options['hiddenLabel'] is true). 20 | * @var string $input The input field html code. 21 | */ 22 | 23 | if (!empty($options['showonEnabled'])) 24 | { 25 | JHtml::_('jquery.framework'); 26 | JHtml::_('script', 'jui/cms.js', array('version' => 'auto', 'relative' => true)); 27 | JHtml::_('script', 'plugins/content/jtf/assets/js/showon.js', array('version' => 'auto')); 28 | } 29 | 30 | $container = array(); 31 | $gridlabel = ''; 32 | $gridfield = ''; 33 | 34 | if (!empty($options['gridgroup'])) 35 | { 36 | $container[] = ' class="' . $options['gridgroup'] . '"'; 37 | } 38 | 39 | if (!empty($options['rel'])) 40 | { 41 | $container[] = $options['rel']; 42 | } 43 | 44 | if (!empty($options['hiddenLabel'])) 45 | { 46 | $options['gridlabel'] = !empty($options['gridlabel']) 47 | ? $options['gridlabel'] . ' jtfhp' 48 | : 'jtfhp'; 49 | } 50 | 51 | if (!empty($options['gridlabel'])) 52 | { 53 | $gridlabel = ' class="' . $options['gridlabel'] . '"'; 54 | } 55 | 56 | if (!empty($options['gridfield'])) 57 | { 58 | $gridfield = ' class="' . $options['gridfield'] . '"'; 59 | } 60 | ?> 61 | > 62 | 63 | 64 | 65 | 66 | > 67 | 68 | 69 | 70 | > 71 | 72 | sublayout('icon_prepend', 75 | array( 76 | 'icon' => $options['icon'], 77 | 'input' => $input, 78 | ) 79 | ); 80 | 81 | } 82 | else 83 | { 84 | echo $input; 85 | } ?> 86 | 87 | 88 | 89 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /src/plugins/content/jtf/libraries/joomla/form/rules/PlzRule.php: -------------------------------------------------------------------------------- 1 | 7 | * @copyright (c) 2017 JoomTools.de - All rights reserved. 8 | * @license GNU General Public License version 3 or later 9 | */ 10 | 11 | namespace Joomla\CMS\Form\Rule; 12 | 13 | defined('JPATH_PLATFORM') or die; 14 | 15 | use Joomla\Registry\Registry; 16 | use Joomla\CMS\Form\Form; 17 | use Joomla\CMS\Form\FormRule; 18 | 19 | /** 20 | * Form Rule class for the Joomla Platform. 21 | * 22 | * @since 11.1 23 | */ 24 | class PlzRule extends FormRule 25 | { 26 | /** 27 | * The regular expression to use in testing a form field value. 28 | * 29 | * @var string 30 | * @since 11.1 31 | */ 32 | protected $regex = '^\d{5}$'; 33 | 34 | /** 35 | * Method to test the value. 36 | * 37 | * @param \SimpleXMLElement $element The SimpleXMLElement object representing the `` tag for the form field object. 38 | * @param mixed $value The form field value to validate. 39 | * @param string $group The field name group control value. This acts as as an array container for the field. 40 | * For example if the field has name="foo" and the group value is set to "bar" then the 41 | * full field name would end up being "bar[foo]". 42 | * @param Registry $input An optional Registry object with the entire data set to validate against the entire form. 43 | * @param Form $form The form object for which the field is being tested. 44 | * 45 | * @return boolean True if the value is valid, false otherwise. 46 | * 47 | * @since 11.1 48 | */ 49 | public function test(\SimpleXMLElement $element, $value, $group = null, Registry $input = null, Form $form = null) 50 | { 51 | // If the field is empty and not required, the field is valid. 52 | $required = ((string) $element['required'] == 'true' || (string) $element['required'] == 'required'); 53 | 54 | if (!$required && empty($value)) 55 | { 56 | return true; 57 | } 58 | 59 | // Test the value against the regular expression. 60 | if (!parent::test($element, $value, $group, $input, $form)) 61 | { 62 | return false; 63 | } 64 | 65 | return true; 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /src/plugins/content/jtf/assets/js/file.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @package Joomla.Plugin 3 | * @subpackage Content.Jtf 4 | * 5 | * @author Guido De Gobbis 6 | * @copyright (c) 2017 JoomTools.de - All rights reserved. 7 | * @license GNU General Public License version 3 or later 8 | **/ 9 | jQuery(document).ready(function(a){a.fn.jtfUploadFile=function(e){for(var t=this.find(".dragarea"),i=this.find(".allowedExt"),r=a("#"+e.id),n=this.find(".upload-list"),l=a('label[for="'+e.id+'"'),o=r.attr("accept").split(","),d=e.uploadMaxSize,s=Joomla.JText._("JTF_UPLOAD_ALLOWED_FILES_EXT",""),u=Joomla.JText._("JTF_UPLOAD_ERROR_MESSAGE_SIZE",""),p=Joomla.JText._("JTF_UPLOAD_ERROR_FILE_NOT_ALLOWED",""),f=0,g="",v="";f=t&&rUpload: ",e.name," (",E(e.size,!0),")"):o+="

Error: "+e.name+" - "+p+"

";s>d&&(o+="

Error: "+E(s,!0)+" - "+u+"

"),o?(l.addClass("invalid").attr("aria-invalid",!0),t.addClass("invalid").attr("aria-invalid",!0),r.addClass("invalid").attr("aria-invalid",!0),document.formvalidator.setHandler("file",function(){return!1})):(l.removeClass("invalid").attr("aria-invalid",!1),t.removeClass("invalid").attr("aria-invalid",!1),r.removeClass("invalid").attr("aria-invalid",!1),document.formvalidator.setHandler("file",function(){return!0})),n.html(o+'
    '+i.join("")+"
")}v=v.replace(/,/g," ."),g=g.replace(/,/g," "),i.html(s+v),r.on("drag dragstart dragend dragover dragenter dragleave change",function(a){a.preventDefault(),a.stopPropagation()}).on("dragenter dragover",function(a){t.addClass("hover")}).on("dragleave dragend drop",function(a){t.removeClass("hover")}).on("change",function(a){B(a.originalEvent.target.files)})},a(".uploader-wrapper").each(function(){a(this).jtfUploadFile({id:a(this).find('.legacy-uploader input[type="file"]').attr("id"),uploadMaxSize:a(this).find('.legacy-uploader input[type="hidden"]').attr("value")})})}); -------------------------------------------------------------------------------- /src/plugins/content/jtf/layouts/joomla/form/field/subform/repeatable/section-byfieldsets.uikit3.php: -------------------------------------------------------------------------------- 1 | 7 | * @copyright (c) 2017 JoomTools.de - All rights reserved. 8 | * @license GNU General Public License version 3 or later 9 | */ 10 | 11 | defined('_JEXEC') or die; 12 | 13 | /** 14 | * Make thing clear 15 | * 16 | * @var JForm $form The form instance for render the section 17 | * @var string $basegroup The base group name 18 | * @var string $group Current group name 19 | * @var array $buttons Array of the buttons that will be rendered 20 | */ 21 | extract($displayData); 22 | 23 | ?> 24 | 25 |
27 | 28 | getFieldsets() as $fieldset) : 29 | $fieldsetClass = !empty($fieldset->class) ? ' class="' . $fieldset->class . '"' : ''; 30 | $legendClass = !empty($fieldset->legendClasses) ? ' class="' . $fieldset->legendClasses . '"' : ''; ?> 31 | 32 | > 33 | 34 | label)) : ?> 35 | >label)); ?> 36 | 37 | 38 | description)) : ?> 39 |

description)); ?>

40 | 41 | 42 | getFieldset($fieldset->name) as $field) 43 | { 44 | echo $field->renderField(); 45 | } 46 | ?> 47 | 48 | 49 | 50 | 51 |
52 |
53 | 54 | 57 | 58 | 59 | 60 | 63 | 64 | 65 | 66 | 69 | 70 |
71 |
72 | 73 | 74 |
75 | -------------------------------------------------------------------------------- /src/plugins/content/jtf/libraries/joomla/form/fields/submit.php: -------------------------------------------------------------------------------- 1 | 7 | * @copyright (c) 2017 JoomTools.de - All rights reserved. 8 | * @license GNU General Public License version 3 or later 9 | */ 10 | 11 | defined('JPATH_PLATFORM') or die; 12 | 13 | /** 14 | * Form Field class for the Joomla Platform. 15 | * Supports a submit button. 16 | * 17 | * @since 11.1 18 | */ 19 | class JFormFieldSubmit extends JFormField 20 | { 21 | /** 22 | * The form field type. 23 | * 24 | * @var string 25 | * @since 11.1 26 | */ 27 | protected $type = 'Submit'; 28 | 29 | /** 30 | * Name of the layout being used to render the field 31 | * 32 | * @var string 33 | * @since 3.7.0 34 | */ 35 | protected $layout = 'joomla.form.field.submit'; 36 | 37 | 38 | /** 39 | * Method to get the field label markup. 40 | * 41 | * @return string The field label markup. 42 | * 43 | * @since 11.1 44 | */ 45 | protected function getLabel() 46 | { 47 | $data = parent::getLayoutData(); 48 | 49 | if ($data['label'] == $this->fieldname) 50 | { 51 | $data['label'] = JText::_('JSUBMIT'); 52 | } 53 | 54 | // Here mainly for B/C with old layouts. This can be done in the layouts directly 55 | $labelData = array( 56 | 'text' => $data['label'], 57 | 'description' => null, 58 | 'for' => $data['id'], 59 | 'required' => false, 60 | 'classes' => explode(' ', $data['labelclass']), 61 | 'position' => false, 62 | ); 63 | 64 | return $this->getRenderer($this->renderLabelLayout)->render($labelData); 65 | } 66 | 67 | /** 68 | * Method to get the field input markup. 69 | * 70 | * @return string The field input markup. 71 | * 72 | * @since 3.2 73 | */ 74 | protected function getInput() 75 | { 76 | if (empty($this->layout)) 77 | { 78 | throw new UnexpectedValueException(sprintf('%s has no layout assigned.', $this->name)); 79 | } 80 | 81 | return $this->getRenderer($this->layout)->render($this->getLayoutData()); 82 | } 83 | 84 | /** 85 | * Method to get the data to be passed to the layout for rendering. 86 | * 87 | * @return array 88 | * 89 | * @since 3.7.0 90 | */ 91 | protected function getLayoutData() 92 | { 93 | $data = parent::getLayoutData(); 94 | 95 | if ($data['label'] == $this->fieldname) 96 | { 97 | $data['label'] = JText::_('JSUBMIT'); 98 | } 99 | 100 | return $data; 101 | } 102 | } 103 | -------------------------------------------------------------------------------- /src/plugins/content/jtf/tmpl/muster/language/de-DE/de-DE.jtf_theme.ini: -------------------------------------------------------------------------------- 1 | ; 2 | JTF_FIELDSET_DEFAULT_DESC="Eine Auswahl üblicher Formularfelder" 3 | JTF_FIELDSET_DEFAULT_LABEL="Standardfelder" 4 | JTF_FIELDSET_SPECIAL_DESC="Eine Auswahl besonderer Formularfelder" 5 | JTF_FIELDSET_SPECIAL_LABEL="Zusatzfelder" 6 | 7 | JTF_NOTE_DESC="Dies ist ein Notizfeld für eine einfache Textausgabe." 8 | JTF_NOTE_LABEL="Notizfeld Überschrift (optional)" 9 | 10 | JTF_LIST_DESC="Listenfeld Beschreibung" 11 | JTF_LIST_LABEL="Listenfeld" 12 | JTF_OPTION_NONE="Bitte Auswahl treffen" 13 | JTF_OPTION1="Option1" 14 | JTF_OPTION2="Option2" 15 | JTF_OPTION3="Option3" 16 | 17 | JTF_CHK_DESC="Checkboxen Beschreibung" 18 | JTF_CHK_LABEL="Checkboxen" 19 | 20 | JTF_CHK_INLINE_DESC="Checkboxen inline Beschreibung" 21 | JTF_CHK_INLINE_LABEL="Checkboxen inline" 22 | 23 | JTF_RADIO_DESC="Radioboxen Beschreibung" 24 | JTF_RADIO_LABEL="Radioboxen" 25 | 26 | JTF_RADIO_INLINE_DESC="Radioboxen inline Beschreibung" 27 | JTF_RADIO_INLINE_LABEL="Radioboxen inline" 28 | 29 | JTF_SHW_SWITCH_DESC="Schalter um Formularfelder anzuzeigen oder auszublenden" 30 | JTF_SHW_SWITCH_LABEL="Showon-Schalter" 31 | 32 | JTF_SHW_TXT_DESC="Dieses Feld wird nur angezeigt, wenn der Showon-Schalter auf An steht" 33 | JTF_SHW_TXT_LABEL="Textfeld (Showon gesteuert)" 34 | 35 | JTF_TXT_DESC="Textfeld Beschreibung" 36 | JTF_TXT_LABEL="Textfeld" 37 | 38 | JTF_EMAIL_DESC="E-Mail-Feld Beschreibung" 39 | JTF_EMAIL_LABEL="E-Mail-Feld" 40 | 41 | JTF_TEL_DESC="Telefonnummer Beschreibung" 42 | JTF_TEL_LABEL="Telefonnummer" 43 | 44 | JTF_PLZ_DESC="Postleitzahl Beschreibung" 45 | JTF_PLZ_LABEL="Postleitzahl" 46 | 47 | JTF_MESSAGE_DESC="Textarea Beschreibung" 48 | JTF_MESSAGE_LABEL="Textarea" 49 | 50 | JTF_CAL_DESC="Kalender-Feld Beschreibung" 51 | JTF_CAL_LABEL="Datum" 52 | 53 | JTF_COLOR_SIMPLE_DESC="Einfaches Farbfeld Beschreibung" 54 | JTF_COLOR_SIMPLE_LABEL="Einfaches Farbfeld" 55 | 56 | JTF_COLOR_DESC="Farbfeld Beschreibung" 57 | JTF_COLOR_LABEL="Farbfeld" 58 | 59 | JTF_EDITOR_TINYMCE_DESC="Editor Beschreibung" 60 | JTF_EDITOR_TINYMCE_LABEL="Editor" 61 | 62 | JTF_COMBO_DESC="Combobox Beschreibung (funktioniert nur mit Bootstrap)" 63 | JTF_COMBO_LABEL="Combobox" 64 | 65 | JTF_CATEGORY_DESC="Kategorieliste Beschreibung" 66 | JTF_CATEGORY_LABEL="Kategorieliste" 67 | 68 | JTF_FILE_DESC="Dateiupload Beschreibung" 69 | JTF_FILE_LABEL="Dateiupload" 70 | JTF_DRAG_FILE_HERE="Dateien zum Hochladen hier hereinziehen und ablegen" 71 | JTF_SELECT_FILE="Oder eine Datei auswählen" 72 | 73 | JTF_SUBFORM_SHOWON_DESC="Schalter um das Subform anzuzeigen" 74 | JTF_SUBFORM_SHOWON_LABEL="Subform anzeigen" 75 | 76 | JTF_SUBFORM_DESC="Mehrfach Subform" 77 | JTF_SUBFORM_LABEL="Mehrfach Subform" 78 | -------------------------------------------------------------------------------- /src/plugins/content/jtf/tmpl/muster/language/en-GB/en-GB.jtf_theme.ini: -------------------------------------------------------------------------------- 1 | ; 2 | JTF_FIELDSET_DEFAULT_DESC="Eine Auswahl üblicher Formularfelder" 3 | JTF_FIELDSET_DEFAULT_LABEL="Standardfelder" 4 | JTF_FIELDSET_SPECIAL_DESC="Eine Auswahl besonderer Formularfelder" 5 | JTF_FIELDSET_SPECIAL_LABEL="Zusatzfelder" 6 | 7 | JTF_NOTE_DESC="Dies ist ein Notizfeld für eine einfache Textausgabe." 8 | JTF_NOTE_LABEL="Notizfeld Überschrift (optional)" 9 | 10 | JTF_LIST_DESC="Listenfeld Beschreibung" 11 | JTF_LIST_LABEL="Listenfeld" 12 | JTF_OPTION_NONE="Bitte Auswahl treffen" 13 | JTF_OPTION1="Option1" 14 | JTF_OPTION2="Option2" 15 | JTF_OPTION3="Option3" 16 | 17 | JTF_CHK_DESC="Checkboxen Beschreibung" 18 | JTF_CHK_LABEL="Checkboxen" 19 | 20 | JTF_CHK_INLINE_DESC="Checkboxen inline Beschreibung" 21 | JTF_CHK_INLINE_LABEL="Checkboxen inline" 22 | 23 | JTF_RADIO_DESC="Radioboxen Beschreibung" 24 | JTF_RADIO_LABEL="Radioboxen" 25 | 26 | JTF_RADIO_INLINE_DESC="Radioboxen inline Beschreibung" 27 | JTF_RADIO_INLINE_LABEL="Radioboxen inline" 28 | 29 | JTF_SHW_SWITCH_DESC="Schalter um Formularfelder anzuzeigen oder auszublenden" 30 | JTF_SHW_SWITCH_LABEL="Showon-Schalter" 31 | 32 | JTF_SHW_TXT_DESC="Dieses Feld wird nur angezeigt, wenn der Showon-Schalter auf An steht" 33 | JTF_SHW_TXT_LABEL="Textfeld (Showon gesteuert)" 34 | 35 | JTF_TXT_DESC="Textfeld Beschreibung" 36 | JTF_TXT_LABEL="Textfeld" 37 | 38 | JTF_EMAIL_DESC="E-Mail-Feld Beschreibung" 39 | JTF_EMAIL_LABEL="E-Mail-Feld" 40 | 41 | JTF_TEL_DESC="Telefonnummer Beschreibung" 42 | JTF_TEL_LABEL="Telefonnummer" 43 | 44 | JTF_PLZ_DESC="Postleitzahl Beschreibung" 45 | JTF_PLZ_LABEL="Postleitzahl" 46 | 47 | JTF_MESSAGE_DESC="Textarea Beschreibung" 48 | JTF_MESSAGE_LABEL="Textarea" 49 | 50 | JTF_CAL_DESC="Description of a calendar field" 51 | JTF_CAL_LABEL="Date" 52 | 53 | JTF_COLOR_SIMPLE_DESC="Einfaches Farbfeld Beschreibung" 54 | JTF_COLOR_SIMPLE_LABEL="Einfaches Farbfeld" 55 | 56 | JTF_COLOR_DESC="Farbfeld Beschreibung" 57 | JTF_COLOR_LABEL="Farbfeld" 58 | 59 | JTF_EDITOR_TINYMCE_DESC="Editor Beschreibung" 60 | JTF_EDITOR_TINYMCE_LABEL="Editor" 61 | 62 | JTF_COMBO_DESC="Combobox Beschreibung (funktioniert nur mit Bootstrap)" 63 | JTF_COMBO_LABEL="Combobox" 64 | 65 | JTF_CATEGORY_DESC="Kategorieliste Beschreibung" 66 | JTF_CATEGORY_LABEL="Kategorieliste" 67 | 68 | JTF_FILE_DESC="Dateiupload Beschreibung" 69 | JTF_FILE_LABEL="Dateiupload" 70 | JTF_DRAG_FILE_HERE="Dateien zum Hochladen hier hereinziehen und ablegen" 71 | JTF_SELECT_FILE="Oder eine Datei auswählen" 72 | 73 | JTF_SUBFORM_SHOWON_DESC="Schalter um das Subform anzuzeigen" 74 | JTF_SUBFORM_SHOWON_LABEL="Subform anzeigen" 75 | 76 | JTF_SUBFORM_DESC="Mehrfach Subform" 77 | JTF_SUBFORM_LABEL="Mehrfach Subform" 78 | -------------------------------------------------------------------------------- /src/plugins/content/jtf/tmpl/extended/fields.bs3.xml: -------------------------------------------------------------------------------- 1 | 2 |
6 |
7 | 16 | 17 | 18 | 19 | 20 | 28 | 36 | 45 | 53 | 61 | 69 |
70 |
73 | 83 | 84 | 85 |
86 |
-------------------------------------------------------------------------------- /src/plugins/content/jtf/tmpl/extended/fields.xml: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 | 14 | 15 | 16 | 17 | 18 | 27 | 36 | 46 | 55 | 64 | 72 |
73 |
76 | 86 | 87 | 88 |
89 |
-------------------------------------------------------------------------------- /src/plugins/content/jtf/layouts/joomla/form/field/submit.php: -------------------------------------------------------------------------------- 1 | 7 | * @copyright (c) 2017 JoomTools.de - All rights reserved. 8 | * @license GNU General Public License version 3 or later 9 | */ 10 | 11 | defined('JPATH_BASE') or die; 12 | 13 | extract($displayData); 14 | 15 | /** 16 | * Layout variables 17 | * ----------------- 18 | * @var string $autocomplete Autocomplete attribute for the field. 19 | * @var boolean $autofocus Is autofocus enabled? 20 | * @var string $buttonclass Classes special for the button. 21 | * @var string $buttonicon Classes special for the button to set an icon. 22 | * @var string $class Classes for the input. 23 | * @var string $description Description of the field. 24 | * @var boolean $disabled Is this field disabled? 25 | * @var string $group Group the field belongs to. section in form XML. 26 | * @var boolean $hidden Is this field hidden in the form? 27 | * @var string $hint Placeholder for the field. 28 | * @var string $id DOM id of the field. 29 | * @var string $label Label of the field. 30 | * @var string $labelclass Classes to apply to the label. 31 | * @var boolean $multiple Does this field support multiple values? 32 | * @var string $name Name of the input field. 33 | * @var string $onchange Onchange attribute for the field. 34 | * @var string $onclick Onclick attribute for the field. 35 | * @var string $pattern Pattern (Reg Ex) of value of the form field. 36 | * @var boolean $readonly Is this field read only? 37 | * @var boolean $repeat Allows extensions to duplicate elements. 38 | * @var boolean $required Is this field required? 39 | * @var integer $size Size attribute of the input. 40 | * @var boolean $spellcheck Spellcheck state for the form field. 41 | * @var string $validate Validation rules to apply. 42 | * @var string $value Value attribute of the field. 43 | * @var array $options Options available for this field. 44 | */ 45 | 46 | // Including fallback code for HTML5 non supported browsers. 47 | JHtml::_('jquery.framework'); 48 | JHtml::_('script', 'system/html5fallback.js', array('version' => 'auto', 'relative' => true)); 49 | ?> 50 | 58 | -------------------------------------------------------------------------------- /src/plugins/content/jtf/libraries/joomla/form/rules/SubformRule.php: -------------------------------------------------------------------------------- 1 | ` tag for the form field object. 28 | * @param mixed $value The form field value to validate. 29 | * @param string $group The field name group control value. This acts as as an array container for the field. 30 | * For example if the field has name="foo" and the group value is set to "bar" then the 31 | * full field name would end up being "bar[foo]". 32 | * @param Registry $input An optional Registry object with the entire data set to validate against the entire form. 33 | * @param Form $form The form object for which the field is being tested. 34 | * 35 | * @return boolean True if the value is valid, false otherwise. 36 | * 37 | * @since JTF 3.0.0 38 | */ 39 | public function test(\SimpleXMLElement $element, $value, $group = null, Registry $input = null, Form $form = null) 40 | { 41 | // Get the form field object. 42 | $field = $form->getField($element['name'], $group); 43 | 44 | if (!($field instanceof \JFormFieldSubform)) 45 | { 46 | throw new \UnexpectedValueException(sprintf('%s is no subform field.', $element['name'])); 47 | } 48 | 49 | $subForm = $field->loadSubForm(); 50 | 51 | // Multiple values: Validate every row. 52 | if ($field->multiple) 53 | { 54 | foreach ($value as $row) 55 | { 56 | if ($subForm->validate($row) === false) 57 | { 58 | // Pass the first error that occurred on the subform validation. 59 | $errors = $subForm->getErrors(); 60 | 61 | if (!empty($errors[0])) 62 | { 63 | return $errors[0]; 64 | } 65 | 66 | return false; 67 | } 68 | } 69 | } 70 | // Single value. 71 | else 72 | { 73 | if ($subForm->validate($value) === false) 74 | { 75 | // Pass the first error that occurred on the subform validation. 76 | $errors = $subForm->getErrors(); 77 | 78 | if (!empty($errors[0])) 79 | { 80 | return $errors[0]; 81 | } 82 | 83 | return false; 84 | } 85 | } 86 | 87 | return true; 88 | } 89 | } -------------------------------------------------------------------------------- /src/plugins/content/jtf/assets/language/en-GB/en-GB.jtf_global.ini: -------------------------------------------------------------------------------- 1 | ; 2 | JTF_FIELD_ERROR="Invalid field: %s" 3 | JTF_FILE_FIELD_ERROR="Invalid field: %s
The field is empty or the maximum upload size has been exceeded!" 4 | JTF_THEME_ERROR="No template named '%s' could be found!" 5 | JTF_FORM_XML_FILE_ERROR="No formfile named '%s' could be found in template '%s'!" 6 | JTF_EMAIL_THANKS="Thank you for your E-Mail!" 7 | JTF_EMAIL_SUBJECT="E-Mail inquiry from %s" 8 | JTF_CAPTCHA_NOSCRIPT="For the use of this form a security check is necessary, which works only with activated Javascript. Without the input of this security question the form can not be sent!

This is a protection mechanism against spam messages!
" 9 | JTF_FILE_TIMEOUT="* Will be automatically deleted after %s days!" 10 | 11 | JTF_CAPTCHA_DESC="" 12 | JTF_CAPTCHA_LABEL="Security check" 13 | 14 | JTF_REQUIRED_FIELDS_LABEL="All fields with * are required." 15 | JTF_ANREDE_DESC="Please select a salutation." 16 | JTF_ANREDE_LABEL="Salutation" 17 | JTF_ANREDE_OPTION_NONE="Make a selection" 18 | JTF_ANREDE_OPTION_HERR="Sir" 19 | JTF_ANREDE_OPTION_FRAU="Mrs" 20 | JTF_VNAME_DESC="Please insert your Forname." 21 | JTF_VNAME_LABEL="Forname" 22 | JTF_NAME_DESC="Please insert your Forname and Surename" 23 | JTF_NAME_LABEL="Name" 24 | JTF_TEL_DESC="The phone number can be entered in the international,
and national format.

These characters are allowed: Numbers 0 to 9 and . + / - ( ) ." 25 | JTF_TEL_LABEL="Phone number" 26 | JTF_EMAIL_DESC="E-Mail for contact" 27 | JTF_EMAIL_LABEL="E-Mail" 28 | JTF_MESSAGE_DESC="Insert your message here." 29 | JTF_MESSAGE_LABEL="Message" 30 | JTF_SUBJECT_DESC="Enter a subject for the E-Mail." 31 | JTF_SUBJECT_LABEL="Subject" 32 | JTF_MESSAGE_INTRO="E-Mail request from:" 33 | 34 | JTF_UPLOAD_ERROR_MESSAGE_SIZE="Maximum upload size %s exceeded!" 35 | JTF_UPLOAD_ERROR_FILE_NOT_ALLOWED="File not allowed!" 36 | JTF_UPLOAD_ALLOWED_FILES_EXT="Allowed extension: ." 37 | JTF_DRAG_FILE_HERE="Drag and drop files here for uploading" 38 | JTF_DRAG_FILE_HERE_NOSCRIPT="Without javascript, uploading by dragging and dropping does not work!" 39 | JTF_SELECT_FILE="Or click to select a file" 40 | 41 | JTF_CONSENT_FORM="Agreement" 42 | JTF_PRIVACY_POLICY_LABEL="I accept the privacy policy." 43 | JTF_PRIVACY_POLICY_OPTION_ACCEPT="I've read the privacy policy.
I agree that my contact details will be stored permanently for contact and further questions." 44 | 45 | JTF_SUBMIT_BUTTON="Send E-Mail" 46 | -------------------------------------------------------------------------------- /src/plugins/content/jtf/layouts/joomla/form/field/note.php: -------------------------------------------------------------------------------- 1 | 7 | * @copyright (c) 2017 JoomTools.de - All rights reserved. 8 | * @license GNU General Public License version 3 or later 9 | */ 10 | 11 | defined('JPATH_BASE') or die; 12 | 13 | extract($displayData); 14 | 15 | /** 16 | * Layout variables 17 | * ----------------- 18 | * @var string $autocomplete Autocomplete attribute for the field. 19 | * @var boolean $autofocus Is autofocus enabled? 20 | * @var string $buttonclass Classes special for the button. 21 | * @var string $buttonicon Classes special for the button to set an icon. 22 | * @var string $class Classes for the input. 23 | * @var string $description Description of the field. 24 | * @var boolean $disabled Is this field disabled? 25 | * @var string $group Group the field belongs to. section in form XML. 26 | * @var boolean $hidden Is this field hidden in the form? 27 | * @var string $hint Placeholder for the field. 28 | * @var string $id DOM id of the field. 29 | * @var string $label Label of the field. 30 | * @var string $labelclass Classes to apply to the label. 31 | * @var boolean $multiple Does this field support multiple values? 32 | * @var string $name Name of the input field. 33 | * @var string $onchange Onchange attribute for the field. 34 | * @var string $onclick Onclick attribute for the field. 35 | * @var string $pattern Pattern (Reg Ex) of value of the form field. 36 | * @var boolean $readonly Is this field read only? 37 | * @var boolean $repeat Allows extensions to duplicate elements. 38 | * @var boolean $required Is this field required? 39 | * @var integer $size Size attribute of the input. 40 | * @var boolean $spellcheck Spellcheck state for the form field. 41 | * @var string $validate Validation rules to apply. 42 | * @var string $value Value attribute of the field. 43 | * @var string $frwk Framework. 44 | */ 45 | 46 | // Including fallback code for HTML5 non supported browsers. 47 | JHtml::_('jquery.framework'); 48 | JHtml::_('script', 'system/html5fallback.js', array('version' => 'auto', 'relative' => true)); 49 | 50 | $class = !empty($class) ? ' class="' . $class . '"' : ''; 51 | $close = $close == 'true' ? 'alert' : $close; 52 | 53 | if (!empty($close)) 54 | { 55 | $html[] = ''; 56 | } 57 | 58 | $html[] = !empty($label) ? '<' . $heading . '>' . $label . '' : ''; 59 | $html[] = !empty($description) ? $description : ''; 60 | 61 | ?> 62 | > 63 | 64 | 65 | -------------------------------------------------------------------------------- /src/plugins/content/jtf/libraries/joomla/form/fields/plz.php: -------------------------------------------------------------------------------- 1 | 7 | * @copyright (c) 2017 JoomTools.de - All rights reserved. 8 | * @license GNU General Public License version 3 or later 9 | */ 10 | 11 | defined('JPATH_PLATFORM') or die; 12 | //jimport('joomla.form.helper'); 13 | 14 | /** 15 | * Form Field class for the Joomla Platform. 16 | * Supports a one line text field. 17 | * 18 | * @link http://www.w3.org/TR/html-markup/input.text.html#input.text 19 | * @since 11.1 20 | */ 21 | class JFormFieldPlz extends JFormField 22 | { 23 | /** 24 | * The form field type. 25 | * 26 | * @var string 27 | * @since 11.1 28 | */ 29 | protected $type = 'Plz'; 30 | 31 | /** 32 | * Method to get the field input markup. 33 | * 34 | * @return string The field input markup. 35 | * 36 | * @since 11.1 37 | */ 38 | protected function getInput() 39 | { 40 | // Translate placeholder text 41 | $hint = $this->translateHint ? JText::_($this->hint) : $this->hint; 42 | 43 | // Initialize some field attributes. 44 | $size = !empty($this->size) ? ' size="' . $this->size . '"' : ''; 45 | $maxLength = ' maxlength="5"'; 46 | $class = !empty($this->class) ? ' class="validate-plz ' . $this->class . '"' : ' class="validate-plz"'; 47 | $readonly = $this->readonly ? ' readonly' : ''; 48 | $disabled = $this->disabled ? ' disabled' : ''; 49 | $required = $this->required ? ' required aria-required="true"' : ''; 50 | $hint = $hint ? ' placeholder="' . $hint . '"' : ''; 51 | $autocomplete = !$this->autocomplete ? ' autocomplete="off"' : ' autocomplete="' . $this->autocomplete . '"'; 52 | $autocomplete = $autocomplete == ' autocomplete="on"' ? '' : $autocomplete; 53 | $autofocus = $this->autofocus ? ' autofocus' : ''; 54 | $spellcheck = $this->spellcheck ? '' : ' spellcheck="false"'; 55 | $pattern = !empty($this->pattern) ? ' pattern="' . $this->pattern . '"' : ''; 56 | $inputmode = !empty($this->inputmode) ? ' inputmode="' . $this->inputmode . '"' : ''; 57 | $dirname = !empty($this->dirname) ? ' dirname="' . $this->dirname . '"' : ''; 58 | 59 | // Initialize JavaScript field attributes. 60 | $onchange = !empty($this->onchange) ? ' onchange="' . $this->onchange . '"' : ''; 61 | 62 | // Including fallback code for HTML5 non supported browsers. 63 | JHtml::_('jquery.framework'); 64 | JHtml::_('script', 'system/html5fallback.js', false, true); 65 | JHtml::_('script', 'plugins/content/jtf/assets/js/plz.js', array('version' => 'auto')); 66 | 67 | return ''; 70 | 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /src/plugins/content/jtf/jtf.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | JTF_XML_NAME 4 | ##DATE## 5 | Guido De Gobbis 6 | support@joomtools.de 7 | www.joomtools.de 8 | Copyright (C) ##YEAR## JoomTools.de. All rights reserved. 9 | GPL v3 10 | ##VERSION## 11 | JTF_XML_DESC 12 | 13 | 14 | ##FILES## 15 | 16 | 17 | 18 | ##LANGUAGE_FILES## 19 | 20 | 21 | script.php 22 | 23 | 24 | 25 |
26 | 27 | 34 | 35 | 42 | 43 | 44 | 45 | 46 | 55 | 56 | 62 | 63 | 72 | 73 | 79 | 80 | 87 | 88 | 89 | 90 | 91 |
92 |
93 |
94 | 95 | 96 | https://raw.githubusercontent.com/JoomTools/plg_content_jtf/master/update.xml 97 | 98 |
99 | -------------------------------------------------------------------------------- /src/plugins/content/jtf/assets/language/de-DE/de-DE.jtf_global.ini: -------------------------------------------------------------------------------- 1 | ; 2 | JTF_FIELD_ERROR="Ungültiges Feld: %s" 3 | JTF_FILE_FIELD_ERROR="Ungültiges Feld: %s
Das Feld ist leer oder die Maximale Hochladegröße wurde überschritten!" 4 | JTF_THEME_ERROR="Es konnte kein Template mit dem Namen '%s' gefunden werden!" 5 | JTF_FORM_XML_FILE_ERROR="Es konnte keine Formulardatei '%s' im Template '%s' gefunden werden!" 6 | JTF_EMAIL_THANKS="Danke für die E-Mail!" 7 | JTF_EMAIL_SUBJECT="E-Mail-Anfrage von %s" 8 | JTF_CAPTCHA_NOSCRIPT="Für die Verwendung dieses Formulares ist eine Sicherheitsabfrage nötig, die nur mit eingeschaltetem Javascript funktioniert. Ohne die Eingabe dieser Sicherheitsabfrage kann das Formular nicht abgeschickt werden!

Dies ist ein Schutzmechanismus gegen SPAM-Nachrichten!
" 9 | JTF_FILE_TIMEOUT="* Wird nach %s Tagen automatisch gelöscht!" 10 | 11 | JTF_CAPTCHA_DESC="" 12 | JTF_CAPTCHA_LABEL="Sicherheitsabfrage" 13 | 14 | JTF_REQUIRED_FIELDS_LABEL="Alle mit * markierten Felder werden benötigt um eine E-Mail zu senden." 15 | JTF_ANREDE_DESC="Bitte eine Anrede auswählen." 16 | JTF_ANREDE_LABEL="Anrede" 17 | JTF_ANREDE_OPTION_NONE="Auswahl treffen" 18 | JTF_ANREDE_OPTION_HERR="Herr" 19 | JTF_ANREDE_OPTION_FRAU="Frau" 20 | JTF_VNAME_DESC="Bitte einen Vornamen eingeben." 21 | JTF_VNAME_LABEL="Vorname" 22 | JTF_NAME_DESC="Bitte vollständigen Namen eingeben (Vor- und Nachname)" 23 | JTF_NAME_LABEL="Name" 24 | JTF_TEL_DESC="Die Telefonnummer kann im internationelen,
sowie im nationalen Format eingegeben werden.

Diese Zeichen sind erlaubt: Zahlen 0 bis 9 sowie . + / - ( ) ." 25 | JTF_TEL_LABEL="Telefonnummer" 26 | JTF_EMAIL_DESC="E-Mail für Kontakt" 27 | JTF_EMAIL_LABEL="E-Mail" 28 | JTF_MESSAGE_DESC="Nachricht hier eingeben." 29 | JTF_MESSAGE_LABEL="Nachricht" 30 | JTF_SUBJECT_DESC="Einen Betreff für die E-Mail eingeben." 31 | JTF_SUBJECT_LABEL="Betreff" 32 | JTF_MESSAGE_INTRO="E-Mail-Anfrage von:" 33 | 34 | JTF_UPLOAD_ERROR_MESSAGE_SIZE="Maximale Hochladegröße von %s überschritten!" 35 | JTF_UPLOAD_ERROR_FILE_NOT_ALLOWED="Datei nicht erlaubt!" 36 | JTF_UPLOAD_ALLOWED_FILES_EXT="Erlaubte Dateiendungen: ." 37 | JTF_DRAG_FILE_HERE="Dateien zum Hochladen hier hereinziehen und ablegen" 38 | JTF_DRAG_FILE_HERE_NOSCRIPT="Ohne Javascript funktioniert das Hochladen, durch hier hereinziehen und ablegen, nicht!" 39 | JTF_SELECT_FILE="Oder klicken, um eine Datei auswählen" 40 | 41 | JTF_CONSENT_FORM="Einverständniserklärung" 42 | JTF_PRIVACY_POLICY_LABEL="Zustimmung" 43 | JTF_PRIVACY_POLICY_OPTION_ACCEPT="* Ich stimme zu, dass meine personenbezogenen Daten aus dieser Übermittlung, gemäß der Datenschutzerklärung gespeichert, verarbeitet und genutzt werden dürfen." 44 | 45 | JTF_SUBMIT_BUTTON="E-Mail senden" 46 | -------------------------------------------------------------------------------- /src/plugins/content/jtf/tmpl/extended/fields.uikit.xml: -------------------------------------------------------------------------------- 1 | 2 |
5 |
6 | 18 | 19 | 20 | 21 | 22 | 32 | 42 | 53 | 63 | 73 | 83 |
84 |
87 | 97 | 98 | 99 |
100 |
-------------------------------------------------------------------------------- /src/plugins/content/jtf/layouts/jtf/form.php: -------------------------------------------------------------------------------- 1 | 7 | * @copyright (c) 2017 JoomTools.de - All rights reserved. 8 | * @license GNU General Public License version 3 or later 9 | */ 10 | 11 | defined('_JEXEC') or die; 12 | 13 | extract($displayData); 14 | 15 | /** 16 | * Layout variables 17 | * ----------------- 18 | * @var string $id Form attribute id and name. 19 | * @var \JForm $form JForm object instance. 20 | * @var string $enctype Set form attribute enctype, if file field is set. 21 | * @var string $formClass Classes for the form. 22 | * @var string $frwkCss Css styles needed for selected css-framework. 23 | */ 24 | 25 | JHtml::_('behavior.keepalive'); 26 | JHtml::_('behavior.formvalidator'); 27 | JHtml::_('script', 'plugins/content/jtf/assets/js/scrollToError.js', array('version' => 'auto')); 28 | 29 | $invalidColor = '#ff0000'; 30 | $invalidBackgroundColor = '#f2dede'; 31 | 32 | JFactory::getDocument()->addStyleDeclaration( 33 | ".invalid:not(label) { 34 | border-color: " . $invalidColor . " !important; 35 | background-color: " . $invalidBackgroundColor . " !important; 36 | } 37 | .invalid { color: " . $invalidColor . " !important; } 38 | .inline { display: inline-block !important; }" 39 | . $frwkCss 40 | ); 41 | 42 | ?> 43 |
44 |
" 47 | method="post" 48 | class="" 49 | 50 | > 51 | 52 |

53 | 54 | getFieldsets() as $fieldset) : 55 | $fieldsetClass = !empty($fieldset->class) 56 | ? ' class="' . $fieldset->class . '"' : ''; 57 | $fieldsetLabelClass = !empty($fieldset->labelClass) 58 | ? ' class="' . $fieldset->labelClass . '"' : ''; 59 | $fieldsetDescClass = !empty($fieldset->descClass) 60 | ? ' class="' . $fieldset->descClass . '"' : ''; ?> 61 | 62 | > 63 | 64 | label) 65 | && strlen($legend = trim(JText::_($fieldset->label))) 66 | ) : ?> 67 | > 68 | 69 | 70 | description) 71 | && strlen($desc = trim(JText::_($fieldset->description))) 72 | ) : ?> 73 | >

74 | 75 | 76 | framework[0], array('uikit', 'uikit3'))) : ?> 77 |
78 | 79 | getFieldset($fieldset->name) as $field) 80 | { 81 | echo $field->renderField(); 82 | } 83 | ?> 84 | framework[0], array('uikit', 'uikit3'))) : ?> 85 |
86 | 87 | 88 | 89 | 95 | 96 | 97 |
98 | -------------------------------------------------------------------------------- /src/plugins/content/jtf/tmpl/extended/fields.uikit3.xml: -------------------------------------------------------------------------------- 1 | 2 |
5 |
6 | 18 | 19 | 20 | 21 | 22 | 32 | 42 | 53 | 63 | 73 | 85 |
86 |
89 | 100 | 101 | 102 |
103 |
-------------------------------------------------------------------------------- /src/plugins/content/jtf/layouts/joomla/form/field/combo.php: -------------------------------------------------------------------------------- 1 | 7 | * @copyright (c) 2017 JoomTools.de - All rights reserved. 8 | * @license GNU General Public License version 3 or later 9 | */ 10 | 11 | defined('JPATH_BASE') or die; 12 | 13 | extract($displayData); 14 | 15 | /** 16 | * Layout variables 17 | * ----------------- 18 | * @var string $autocomplete Autocomplete attribute for the field. 19 | * @var boolean $autofocus Is autofocus enabled? 20 | * @var string $class Classes for the input. 21 | * @var string $description Description of the field. 22 | * @var boolean $disabled Is this field disabled? 23 | * @var string $group Group the field belongs to. section in form XML. 24 | * @var boolean $hidden Is this field hidden in the form? 25 | * @var string $hint Placeholder for the field. 26 | * @var string $id DOM id of the field. 27 | * @var string $label Label of the field. 28 | * @var string $labelclass Classes to apply to the label. 29 | * @var boolean $multiple Does this field support multiple values? 30 | * @var string $name Name of the input field. 31 | * @var string $onchange Onchange attribute for the field. 32 | * @var string $onclick Onclick attribute for the field. 33 | * @var string $pattern Pattern (Reg Ex) of value of the form field. 34 | * @var boolean $readonly Is this field read only? 35 | * @var boolean $repeat Allows extensions to duplicate elements. 36 | * @var boolean $required Is this field required? 37 | * @var integer $size Size attribute of the input. 38 | * @var boolean $spellcheck Spellcheck state for the form field. 39 | * @var string $validate Validation rules to apply. 40 | * @var string $value Value attribute of the field. 41 | * @var array $options Options available for this field. 42 | */ 43 | 44 | // Including fallback code for HTML5 non supported browsers. 45 | JHtml::_('jquery.framework'); 46 | JHtml::_('script', 'system/html5fallback.js', array('version' => 'auto', 'relative' => true)); 47 | JHtml::_('behavior.combobox'); 48 | 49 | $attr = !empty($class) ? ' class="combobox ' . $class . '"' : ' class="combobox"'; 50 | $attr .= !empty($size) ? ' size="' . $size . '"' : ''; 51 | $attr .= !empty($readonly) ? ' readonly' : ''; 52 | $attr .= !empty($disabled) ? ' disabled' : ''; 53 | $attr .= !empty($required) ? ' required aria-required="true"' : ''; 54 | 55 | // Initialize JavaScript field attributes. 56 | $attr .= !empty($onchange) ? ' onchange="' . $onchange . '"' : ''; 57 | 58 | ?> 59 |
60 | 65 | autocomplete="off" /> 66 |
67 | 70 | 75 |
76 |
77 | -------------------------------------------------------------------------------- /src/plugins/content/jtf/layouts/joomla/form/field/combo.bs3.php: -------------------------------------------------------------------------------- 1 | 7 | * @copyright (c) 2017 JoomTools.de - All rights reserved. 8 | * @license GNU General Public License version 3 or later 9 | */ 10 | 11 | defined('JPATH_BASE') or die; 12 | 13 | extract($displayData); 14 | 15 | /** 16 | * Layout variables 17 | * ----------------- 18 | * @var string $autocomplete Autocomplete attribute for the field. 19 | * @var boolean $autofocus Is autofocus enabled? 20 | * @var string $class Classes for the input. 21 | * @var string $description Description of the field. 22 | * @var boolean $disabled Is this field disabled? 23 | * @var string $group Group the field belongs to. section in form XML. 24 | * @var boolean $hidden Is this field hidden in the form? 25 | * @var string $hint Placeholder for the field. 26 | * @var string $id DOM id of the field. 27 | * @var string $label Label of the field. 28 | * @var string $labelclass Classes to apply to the label. 29 | * @var boolean $multiple Does this field support multiple values? 30 | * @var string $name Name of the input field. 31 | * @var string $onchange Onchange attribute for the field. 32 | * @var string $onclick Onclick attribute for the field. 33 | * @var string $pattern Pattern (Reg Ex) of value of the form field. 34 | * @var boolean $readonly Is this field read only? 35 | * @var boolean $repeat Allows extensions to duplicate elements. 36 | * @var boolean $required Is this field required? 37 | * @var integer $size Size attribute of the input. 38 | * @var boolean $spellcheck Spellcheck state for the form field. 39 | * @var string $validate Validation rules to apply. 40 | * @var string $value Value attribute of the field. 41 | * @var array $options Options available for this field. 42 | */ 43 | 44 | // Including fallback code for HTML5 non supported browsers. 45 | JHtml::_('jquery.framework'); 46 | JHtml::_('script', 'system/html5fallback.js', array('version' => 'auto', 'relative' => true)); 47 | JHtml::_('behavior.combobox'); 48 | 49 | $attr = !empty($class) ? ' class="combobox ' . $class . '"' : ' class="combobox"'; 50 | $attr .= !empty($size) ? ' size="' . $size . '"' : ''; 51 | $attr .= !empty($readonly) ? ' readonly' : ''; 52 | $attr .= !empty($disabled) ? ' disabled' : ''; 53 | $attr .= !empty($required) ? ' required aria-required="true"' : ''; 54 | 55 | // Initialize JavaScript field attributes. 56 | $attr .= !empty($onchange) ? ' onchange="' . $onchange . '"' : ''; 57 | 58 | ?> 59 |
60 | 65 | autocomplete="off" /> 66 |
67 | 70 | 75 |
76 |
77 | -------------------------------------------------------------------------------- /src/plugins/content/jtf/layouts/joomla/form/field/subform/repeatable.php: -------------------------------------------------------------------------------- 1 | 7 | * @copyright (c) 2017 JoomTools.de - All rights reserved. 8 | * @license GNU General Public License version 3 or later 9 | */ 10 | 11 | defined('_JEXEC') or die; 12 | 13 | use Jtf\Frameworks\FrameworkHelper; 14 | 15 | /** 16 | * Make thing clear 17 | * 18 | * @var JForm $tmpl The Empty form for template 19 | * @var array $forms Array of JForm instances for render the rows 20 | * @var bool $multiple The multiple state for the form field 21 | * @var int $min Count of minimum repeating in multiple mode 22 | * @var int $max Count of maximum repeating in multiple mode 23 | * @var string $fieldname The field name 24 | * @var string $control The forms control 25 | * @var string $label The field label 26 | * @var string $description The field description 27 | * @var array $buttons Array of the buttons that will be rendered 28 | * @var bool $groupByFieldset Whether group the subform fields by it`s fieldset 29 | */ 30 | extract($displayData); 31 | 32 | // Add script 33 | if ($multiple) 34 | { 35 | JHtml::_('jquery.ui', array('core', 'sortable')); 36 | JHtml::_('script', 'system/subform-repeatable.js', array('version' => 'auto', 'relative' => true)); 37 | } 38 | 39 | $sublayout = empty($groupByFieldset) ? 'section' : 'section-byfieldsets'; ?> 40 | 41 |
42 |
43 |
47 |
48 |
49 | 50 |
51 |
52 |
53 | $form) : 55 | $form = FrameworkHelper::setFrameworkClasses($form); 56 | echo $this->sublayout($sublayout, 57 | array( 58 | 'form' => $form, 59 | 'basegroup' => $fieldname, 60 | 'group' => $fieldname . $k, 61 | 'buttons' => $buttons) 62 | ); 63 | endforeach; 64 | ?> 65 |
66 | 67 | 79 | 80 |
81 |
82 |
83 | -------------------------------------------------------------------------------- /src/plugins/content/jtf/layouts/joomla/form/field/subform/repeatable.bs3.php: -------------------------------------------------------------------------------- 1 | 7 | * @copyright (c) 2017 JoomTools.de - All rights reserved. 8 | * @license GNU General Public License version 3 or later 9 | */ 10 | 11 | defined('_JEXEC') or die; 12 | 13 | use Jtf\Frameworks\FrameworkHelper; 14 | 15 | /** 16 | * Make thing clear 17 | * 18 | * @var JForm $tmpl The Empty form for template 19 | * @var array $forms Array of JForm instances for render the rows 20 | * @var bool $multiple The multiple state for the form field 21 | * @var int $min Count of minimum repeating in multiple mode 22 | * @var int $max Count of maximum repeating in multiple mode 23 | * @var string $fieldname The field name 24 | * @var string $control The forms control 25 | * @var string $label The field label 26 | * @var string $description The field description 27 | * @var array $buttons Array of the buttons that will be rendered 28 | * @var bool $groupByFieldset Whether group the subform fields by it`s fieldset 29 | */ 30 | extract($displayData); 31 | 32 | // Add script 33 | if ($multiple) 34 | { 35 | JHtml::_('jquery.ui', array('core', 'sortable')); 36 | JHtml::_('script', 'system/subform-repeatable.js', array('version' => 'auto', 'relative' => true)); 37 | } 38 | 39 | $sublayout = empty($groupByFieldset) ? 'section' : 'section-byfieldsets'; ?> 40 | 41 |
42 |
43 |
47 | 52 |
53 | $form) : 55 | $form = FrameworkHelper::setFrameworkClasses($form); 56 | echo $this->sublayout($sublayout, 57 | array( 58 | 'form' => $form, 59 | 'basegroup' => $fieldname, 60 | 'group' => $fieldname . $k, 61 | 'buttons' => $buttons) 62 | ); 63 | endforeach; 64 | ?> 65 |
66 | 67 | 78 | 79 |
80 |
81 |
82 | -------------------------------------------------------------------------------- /src/plugins/content/jtf/libraries/joomla/form/rules/FileRule.php: -------------------------------------------------------------------------------- 1 | 7 | * @copyright (c) 2017 JoomTools.de - All rights reserved. 8 | * @license GNU General Public License version 3 or later 9 | */ 10 | 11 | namespace Joomla\CMS\Form\Rule; 12 | 13 | defined('JPATH_PLATFORM') or die; 14 | 15 | use Joomla\CMS\Form\Form; 16 | use Joomla\CMS\Form\FormRule; 17 | use Joomla\Registry\Registry; 18 | 19 | /** 20 | * Form Rule class for the Joomla Platform. 21 | * 22 | * @since 11.1 23 | */ 24 | class FileRule extends FormRule 25 | { 26 | /** 27 | * Method to test the value. 28 | * 29 | * @param \SimpleXMLElement $element The SimpleXMLElement object representing the `` tag for the form field object. 30 | * @param mixed $value The form field value to validate. 31 | * @param string $group The field name group control value. This acts as as an array container for the field. 32 | * For example if the field has name="foo" and the group value is set to "bar" then the 33 | * full field name would end up being "bar[foo]". 34 | * @param Registry $input An optional Registry object with the entire data set to validate against the entire form. 35 | * @param Form $form The form object for which the field is being tested. 36 | * 37 | * @return boolean True if the value is valid, false otherwise. 38 | * 39 | * @since 11.1 40 | */ 41 | public function test(\SimpleXMLElement $element, $value, $group = null, Registry $input = null, Form $form = null) 42 | { 43 | $return = true; 44 | $required = ((string) $element['required'] == 'true' || (string) $element['required'] == 'required'); 45 | $value = (array) $value; 46 | $maxFileSize = $value['max_file_size']; 47 | $sumSize = 0; 48 | 49 | unset($value['max_file_size']); 50 | 51 | 52 | if (!$required && empty($value)) 53 | { 54 | return true; 55 | } 56 | 57 | $accept = (string) $element['accept']; 58 | 59 | if (!$accept) 60 | { 61 | return true; 62 | } 63 | 64 | $acceptFileType = array(); 65 | $acceptFileMime = array(); 66 | $accept = explode(',', (string) $element['accept']); 67 | 68 | foreach ($accept as $type) 69 | { 70 | if (strpos($type, '.') !== false) 71 | { 72 | $acceptFileType[] = ltrim($type, '.'); 73 | } 74 | elseif (strpos($type, '/') !== false) 75 | { 76 | $acceptFileMime[] = trim(str_replace('*', '.*', $type)); 77 | } 78 | } 79 | 80 | $allowedType = implode('|', $acceptFileType); 81 | $allowedMime = implode('|', $acceptFileMime); 82 | 83 | foreach ($value as $key => $file) 84 | { 85 | $test = false; 86 | 87 | if ($allowedMime) 88 | { 89 | $test = preg_match('@^(' . $allowedMime . ')$@i', $file->type); 90 | } 91 | 92 | if (!$test && $allowedType) 93 | { 94 | $test = preg_match('/\.(?:' . $allowedType . ')$/i', $file->name); 95 | } 96 | 97 | if (!$test) 98 | { 99 | $return = false; 100 | } 101 | 102 | $sumSize += $file->size; 103 | } 104 | 105 | if ($sumSize > $maxFileSize) 106 | { 107 | $message = \JText::_($element['label']); 108 | $message = \JText::sprintf('JTF_FILE_FIELD_ERROR', $message); 109 | 110 | return new \UnexpectedValueException($message); 111 | 112 | } 113 | 114 | return $return; 115 | } 116 | } 117 | -------------------------------------------------------------------------------- /src/plugins/content/jtf/layouts/joomla/form/field/tel.php: -------------------------------------------------------------------------------- 1 | 7 | * @copyright (c) 2017 JoomTools.de - All rights reserved. 8 | * @license GNU General Public License version 3 or later 9 | */ 10 | 11 | defined('JPATH_BASE') or die; 12 | 13 | extract($displayData); 14 | 15 | /** 16 | * Layout variables 17 | * ----------------- 18 | * @var string $autocomplete Autocomplete attribute for the field. 19 | * @var boolean $autofocus Is autofocus enabled? 20 | * @var string $class Classes for the input. 21 | * @var string $description Description of the field. 22 | * @var boolean $disabled Is this field disabled? 23 | * @var string $group Group the field belongs to. section in form XML. 24 | * @var boolean $hidden Is this field hidden in the form? 25 | * @var string $hint Placeholder for the field. 26 | * @var string $id DOM id of the field. 27 | * @var string $label Label of the field. 28 | * @var string $labelclass Classes to apply to the label. 29 | * @var boolean $multiple Does this field support multiple values? 30 | * @var string $name Name of the input field. 31 | * @var string $onchange Onchange attribute for the field. 32 | * @var string $onclick Onclick attribute for the field. 33 | * @var string $pattern Pattern (Reg Ex) of value of the form field. 34 | * @var boolean $readonly Is this field read only? 35 | * @var boolean $repeat Allows extensions to duplicate elements. 36 | * @var boolean $required Is this field required? 37 | * @var integer $size Size attribute of the input. 38 | * @var boolean $spellcheck Spellcheck state for the form field. 39 | * @var string $validate Validation rules to apply. 40 | * @var string $value Value attribute of the field. 41 | * @var array $checkedOptions Options that will be set as checked. 42 | * @var boolean $hasValue Has this field a value assigned? 43 | * @var array $options Options available for this field. 44 | * @var array $inputType Options available for this field. 45 | * @var string $accept File types that are accepted. 46 | * @var integer $maxLength The maximum length that the field shall accept. 47 | */ 48 | 49 | // Including fallback code for HTML5 non supported browsers. 50 | JHtml::_('jquery.framework'); 51 | JHtml::_('script', 'system/html5fallback.js', false, true); 52 | 53 | $autocomplete = !$autocomplete ? ' autocomplete="off"' : ' autocomplete="' . $autocomplete . '"'; 54 | $autocomplete = $autocomplete == ' autocomplete="on"' ? '' : $autocomplete; 55 | 56 | $attributes = array( 57 | !empty($size) ? 'size="' . $size . '"' : '', 58 | $disabled ? 'disabled' : '', 59 | $readonly ? 'readonly' : '', 60 | strlen($hint) ? 'placeholder="' . $hint . '"' : '', 61 | $autocomplete, 62 | $autofocus ? ' autofocus' : '', 63 | $spellcheck ? '' : 'spellcheck="false"', 64 | $onchange ? ' onchange="' . $onchange . '"' : '', 65 | !empty($maxLength) ? $maxLength : '', 66 | $required ? 'required aria-required="true"' : '', 67 | ); 68 | ?> 69 | id="" value="" /> 74 | -------------------------------------------------------------------------------- /src/plugins/content/jtf/assets/js/showon.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @package Joomla.Plugin 3 | * @subpackage Content.Jtf 4 | * 5 | * @author Guido De Gobbis 6 | * @copyright (c) 2017 JoomTools.de - All rights reserved. 7 | * @license GNU General Public License version 3 or later 8 | **/ 9 | jQuery(function ($) { 10 | "use strict"; 11 | 12 | $.fn.isOnScreen = function() 13 | { 14 | var win = $(window); 15 | 16 | var viewport = { 17 | top : win.scrollTop(), 18 | left : win.scrollLeft() 19 | }; 20 | viewport.right = viewport.left + win.width(); 21 | viewport.bottom = viewport.top + win.height(); 22 | 23 | var bounds = this.offset(); 24 | bounds.right = bounds.left + this.outerWidth(); 25 | bounds.bottom = bounds.top + this.outerHeight(); 26 | 27 | return (!(viewport.right < bounds.left || viewport.left > bounds.right || viewport.bottom < bounds.top || viewport.top > bounds.bottom)); 28 | }; 29 | 30 | $.fn.toggleNovalidate = function (activate) { 31 | if (activate > 0) { 32 | $(this).removeNovalidate(); 33 | } 34 | else { 35 | $(this).setNovalidate(); 36 | } 37 | }; 38 | 39 | $.fn.setNovalidate = function () { 40 | if (!$(this).hasClass('novalidate')) { 41 | $(this).addClass('novalidate').attr('disabled', 'disabled'); 42 | } 43 | }; 44 | 45 | $.fn.removeNovalidate = function () { 46 | if ($(this).hasClass('novalidate')) { 47 | $(this).removeClass('novalidate').removeAttr('disabled'); 48 | } 49 | }; 50 | 51 | $('[data-showon]').each(function (index, elm) { 52 | var $elm = $(elm), 53 | 54 | dataShowon = $.parseJSON($elm.attr('data-showon')), 55 | dataShowonId = dataShowon[0].field, 56 | dataShowonValues = dataShowon[0].values, 57 | 58 | $setter = $('[name^="' + dataShowonId + '"]'), 59 | setterVal = $setter.val(), 60 | isCheckbox = $setter.is('[type="checkbox"]'), 61 | isSelect = $setter.is('select'), 62 | isRadio = $setter.is('[type="radio"]'); 63 | 64 | if (isRadio) { 65 | setterVal = $setter.filter(':checked').val(); 66 | } 67 | 68 | if (isSelect) { 69 | setterVal = $setter.val(); 70 | } 71 | 72 | if (setterVal === undefined) { 73 | setterVal = 0; 74 | } 75 | 76 | $elm.hide(); 77 | $elm.find('input').setNovalidate(); 78 | $elm.find('select').setNovalidate(); 79 | $elm.find('textarea').setNovalidate(); 80 | $elm.find('fieldset').setNovalidate(); 81 | 82 | if ($.inArray(setterVal.toString(), dataShowonValues) != -1) { 83 | if ((isCheckbox && $setter.prop('checked')) || (isSelect && $setter.prop('selected')) || isRadio) { 84 | $elm.find('input').removeNovalidate(); 85 | $elm.find('select').removeNovalidate(); 86 | $elm.find('textarea').removeNovalidate(); 87 | $elm.find('fieldset').removeNovalidate(); 88 | $elm.show(); 89 | } 90 | } 91 | 92 | $setter.on('change', function () { 93 | var toggler = 0, 94 | setterVal = $(this).filter(':checked').val(); 95 | 96 | if (isSelect) { 97 | setterVal = $setter.val(); 98 | } 99 | 100 | if (setterVal === undefined) { 101 | setterVal = 0; 102 | } 103 | 104 | if ($.inArray(setterVal.toString(), dataShowonValues) != -1) { 105 | toggler = 1 106 | } 107 | 108 | $elm.find('input').toggleNovalidate(toggler); 109 | $elm.find('select').toggleNovalidate(toggler); 110 | $elm.find('textarea').toggleNovalidate(toggler); 111 | $elm.find('fieldset').toggleNovalidate(toggler); 112 | 113 | if (toggler == 1) { 114 | $elm.show(400); 115 | } 116 | else { 117 | $elm.hide(400); 118 | } 119 | }); 120 | 121 | }); 122 | }); 123 | -------------------------------------------------------------------------------- /src/plugins/content/jtf/layouts/joomla/form/field/subform/repeatable.uikit.php: -------------------------------------------------------------------------------- 1 | 7 | * @copyright (c) 2017 JoomTools.de - All rights reserved. 8 | * @license GNU General Public License version 3 or later 9 | */ 10 | 11 | defined('_JEXEC') or die; 12 | 13 | use Jtf\Frameworks\FrameworkHelper; 14 | 15 | /** 16 | * Make thing clear 17 | * 18 | * @var JForm $tmpl The Empty form for template 19 | * @var array $forms Array of JForm instances for render the rows 20 | * @var bool $multiple The multiple state for the form field 21 | * @var int $min Count of minimum repeating in multiple mode 22 | * @var int $max Count of maximum repeating in multiple mode 23 | * @var string $fieldname The field name 24 | * @var string $control The forms control 25 | * @var string $label The field label 26 | * @var string $description The field description 27 | * @var array $buttons Array of the buttons that will be rendered 28 | * @var bool $groupByFieldset Whether group the subform fields by it`s fieldset 29 | */ 30 | extract($displayData); 31 | 32 | // Add script 33 | if ($multiple) 34 | { 35 | JHtml::_('jquery.ui', array('core', 'sortable')); 36 | JHtml::_('script', 'system/subform-repeatable.js', array('version' => 'auto', 'relative' => true)); 37 | } 38 | 39 | $sublayout = empty($groupByFieldset) ? 'section' : 'section-byfieldsets'; ?> 40 | 41 |
42 |
46 |
47 |
48 | 49 | 50 |
51 |
52 |
53 |
54 | $form) : 56 | $form = FrameworkHelper::setFrameworkClasses($form); 57 | echo $this->sublayout($sublayout, 58 | array( 59 | 'form' => $form, 60 | 'basegroup' => $fieldname, 61 | 'group' => $fieldname . $k, 62 | 'buttons' => $buttons) 63 | ); 64 | endforeach; ?> 65 |
66 |
67 | 68 | 79 | 80 |
81 |
82 | -------------------------------------------------------------------------------- /src/plugins/content/jtf/layouts/joomla/form/field/subform/repeatable.uikit3.php: -------------------------------------------------------------------------------- 1 | 7 | * @copyright (c) 2017 JoomTools.de - All rights reserved. 8 | * @license GNU General Public License version 3 or later 9 | */ 10 | 11 | defined('_JEXEC') or die; 12 | 13 | use Jtf\Frameworks\FrameworkHelper; 14 | 15 | /** 16 | * Make thing clear 17 | * 18 | * @var JForm $tmpl The Empty form for template 19 | * @var array $forms Array of JForm instances for render the rows 20 | * @var bool $multiple The multiple state for the form field 21 | * @var int $min Count of minimum repeating in multiple mode 22 | * @var int $max Count of maximum repeating in multiple mode 23 | * @var string $fieldname The field name 24 | * @var string $control The forms control 25 | * @var string $label The field label 26 | * @var string $description The field description 27 | * @var array $buttons Array of the buttons that will be rendered 28 | * @var bool $groupByFieldset Whether group the subform fields by it`s fieldset 29 | */ 30 | extract($displayData); 31 | 32 | // Add script 33 | if ($multiple) 34 | { 35 | JHtml::_('jquery.ui', array('core', 'sortable')); 36 | JHtml::_('script', 'system/subform-repeatable.js', array('version' => 'auto', 'relative' => true)); 37 | } 38 | 39 | $sublayout = empty($groupByFieldset) ? 'section' : 'section-byfieldsets'; ?> 40 | 41 |
42 |
46 |
47 |
48 | 49 | 50 |
51 |
52 |
53 |
54 | $form) : 56 | $form = FrameworkHelper::setFrameworkClasses($form); 57 | echo $this->sublayout($sublayout, 58 | array( 59 | 'form' => $form, 60 | 'basegroup' => $fieldname, 61 | 'group' => $fieldname . $k, 62 | 'buttons' => $buttons) 63 | ); 64 | endforeach; ?> 65 |
66 |
67 | 68 | 79 | 80 |
81 |
82 | -------------------------------------------------------------------------------- /src/plugins/content/jtf/libraries/jtf/Input/Files.php: -------------------------------------------------------------------------------- 1 | filter = $options['filter']; 44 | } 45 | else 46 | { 47 | $this->filter = new Filter\InputFilter; 48 | } 49 | 50 | // Set the data source. 51 | $this->data = & $_FILES; 52 | 53 | // Set the options for the class. 54 | $this->options = $options; 55 | } 56 | 57 | /** 58 | * Gets a value from the input data. 59 | * 60 | * @param string $name The name of the input property (usually the name of the files INPUT tag) to get. 61 | * @param mixed $default The default value to return if the named property does not exist. 62 | * @param string $filter The filter to apply to the value. 63 | * 64 | * @return mixed The filtered input value. 65 | * 66 | * @see \Joomla\Filter\InputFilter::clean() 67 | * @since 1.0 68 | */ 69 | public function get($name, $default = null, $filter = 'cmd') 70 | { 71 | if (isset($this->data[$name])) 72 | { 73 | $results = $this->decodeData( 74 | array( 75 | $this->data[$name]['name'], 76 | $this->data[$name]['type'], 77 | $this->data[$name]['tmp_name'], 78 | $this->data[$name]['error'], 79 | $this->data[$name]['size'] 80 | ) 81 | ); 82 | 83 | return $results; 84 | } 85 | 86 | return $default; 87 | } 88 | 89 | /** 90 | * Method to decode a data array. 91 | * 92 | * @param array $data The data array to decode. 93 | * 94 | * @return array 95 | * 96 | * @since 1.0 97 | */ 98 | protected function decodeData(array $data) 99 | { 100 | $result = array(); 101 | 102 | if (is_array($data[0])) 103 | { 104 | if(!ArrayHelper::isAssociative($data[0]) && empty($data[0][0])) 105 | { 106 | return array(); 107 | } 108 | 109 | foreach ($data[0] as $k => $v) 110 | { 111 | $result[$k] = $this->decodeData(array($data[0][$k], $data[1][$k], $data[2][$k], $data[3][$k], $data[4][$k])); 112 | } 113 | 114 | return $result; 115 | } 116 | 117 | return array('name' => $data[0], 'type' => $data[1], 'tmp_name' => $data[2], 'error' => $data[3], 'size' => $data[4]); 118 | } 119 | 120 | /** 121 | * Sets a value. 122 | * 123 | * @param string $name The name of the input property to set. 124 | * @param mixed $value The value to assign to the input property. 125 | * 126 | * @return void 127 | * 128 | * @since 1.0 129 | */ 130 | public function set($name, $value) 131 | { 132 | // Restricts the usage of parent's set method. 133 | } 134 | } 135 | -------------------------------------------------------------------------------- /src/plugins/content/jtf/layouts/joomla/form/field/color/simple.bs3.php: -------------------------------------------------------------------------------- 1 | section in form XML. 23 | * @var boolean $hidden Is this field hidden in the form? 24 | * @var string $hint Placeholder for the field. 25 | * @var string $id DOM id of the field. 26 | * @var string $label Label of the field. 27 | * @var string $labelclass Classes to apply to the label. 28 | * @var boolean $multiple Does this field support multiple values? 29 | * @var string $name Name of the input field. 30 | * @var string $onchange Onchange attribute for the field. 31 | * @var string $onclick Onclick attribute for the field. 32 | * @var string $pattern Pattern (Reg Ex) of value of the form field. 33 | * @var boolean $readonly Is this field read only? 34 | * @var boolean $repeat Allows extensions to duplicate elements. 35 | * @var boolean $required Is this field required? 36 | * @var integer $size Size attribute of the input. 37 | * @var boolean $spellchec Spellcheck state for the form field. 38 | * @var string $validate Validation rules to apply. 39 | * @var string $value Value attribute of the field. 40 | * @var array $checkedOptions Options that will be set as checked. 41 | * @var boolean $hasValue Has this field a value assigned? 42 | * @var array $options Options available for this field. 43 | * @var array $checked Is this field checked? 44 | * @var array $position Is this field checked? 45 | * @var array $control Is this field checked? 46 | */ 47 | 48 | $class = ' class="' . trim('simplecolors chzn-done ' . $class) . '"'; 49 | $disabled = $disabled ? ' disabled' : ''; 50 | $readonly = $readonly ? ' readonly' : ''; 51 | 52 | // Include jQuery 53 | JHtml::_('jquery.framework'); 54 | JHtml::_('script', 'system/html5fallback.js', array('version' => 'auto', 'relative' => true, 'conditional' => 'lt IE 9')); 55 | JHtml::_('script', 'jui/jquery.simplecolors.min.js', array('version' => 'auto', 'relative' => true)); 56 | JHtml::_('stylesheet', 'jui/jquery.simplecolors.css', array('version' => 'auto', 'relative' => true)); 57 | JHtml::_('script', 'system/color-field-init.min.js', array('version' => 'auto', 'relative' => true)); 58 | JFactory::getDocument()->addStyleDeclaration('.simplecolors-panel{z-index:99;}'); 59 | ?> 60 | 70 | -------------------------------------------------------------------------------- /src/plugins/content/jtf/libraries/jtf/Frameworks/Bs3.php: -------------------------------------------------------------------------------- 1 | 7 | * @copyright (c) 2017 JoomTools.de - All rights reserved. 8 | * @license GNU General Public License version 3 or later 9 | */ 10 | 11 | namespace Jtf\Frameworks; 12 | 13 | defined('_JEXEC') or die('Restricted access'); 14 | 15 | /** 16 | * Class FrameworkBs3 set basic css for used framework 17 | * 18 | * Pattern for basic field classes 19 | * 20 | * Define basic classes for field type 'muster' 21 | * $classes['class']['muster'] = array( 22 | * 23 | * Set a default class for the field, addition to the manifest attribute 'class'. 24 | * For fields such as radio or checkboxes, the class is set to the enclosing tag. 25 | * 'field' => array('defaultclass'), 26 | * 27 | * Set this to define defaults for options for fields such as radio or checkboxes 28 | * 'options' => array( 29 | * 'labelclass' => array('labelclass'), 30 | * 'class' => array('optionclass'), 31 | * ), 32 | * 33 | * Set this to define defaults for the button of fields such as calendar 34 | * 'buttons' => array( 35 | * 'class' => 'uk-button uk-button-small', 36 | * 'icon' => 'uk-icon-calendar', 37 | * ), 38 | * ); 39 | * 40 | * @since 3.0 41 | **/ 42 | class FrameworkBs3 43 | { 44 | public static $name = 'Bootsrap v3'; 45 | 46 | private $classes; 47 | 48 | public function __construct($formclass = array(), $orientation = null) 49 | { 50 | $inline = false; 51 | $classes = array(); 52 | $classes['css'] = ''; 53 | 54 | $classes['class']['form'] = $formclass; 55 | array_unshift($classes['class']['form'], 'form-validate'); 56 | 57 | switch ($orientation) 58 | { 59 | case 'inline': 60 | $inline = true; 61 | $classes['class']['form'][] = 'form-inline'; 62 | break; 63 | 64 | case 'horizontal': 65 | $classes['class']['form'][] = 'form-horizontal'; 66 | 67 | case 'stacked': 68 | default: 69 | break; 70 | } 71 | 72 | $classes['class']['form'] = array_unique($classes['class']['form']); 73 | $classes['class']['default'][] = 'form-control'; 74 | $classes['class']['gridgroup'][] = 'form-group'; 75 | $classes['class']['gridlabel'][] = 'control-label'; 76 | 77 | $classes['class']['calendar'] = array( 78 | 'field' => array('form-control'), 79 | 'buttons' => array( 80 | 'class' => 'btn btn-secondary', 81 | 'icon' => 'glyphicon glyphicon-calendar', 82 | ), 83 | ); 84 | 85 | $classes['class']['checkbox'] = array( 86 | 'field' => array('checkbox'), 87 | ); 88 | 89 | $classes['class']['checkboxes'] = array( 90 | 'field' => array('checkboxes'), 91 | 'options' => array( 92 | 'labelclass' => array('checkbox'), 93 | ), 94 | ); 95 | 96 | $classes['class']['radio'] = array( 97 | 'options' => array( 98 | 'labelclass' => array('radio'), 99 | ), 100 | ); 101 | 102 | $classes['class']['textarea'] = array( 103 | 'field' => array('form-control'), 104 | ); 105 | 106 | $classes['class']['file'] = array( 107 | 'uploadicon' => 'glyphicon glyphicon-upload', 108 | 'buttons' => array( 109 | 'class' => 'btn btn-success', 110 | 'icon' => 'glyphicon glyphicon-copy', 111 | ), 112 | ); 113 | 114 | $classes['class']['submit'] = array( 115 | 'buttons' => array( 116 | 'class' => 'btn', 117 | ), 118 | ); 119 | 120 | if ($inline) 121 | { 122 | $classes['class']['checkboxes']['field'][] = 'checkbox-inline'; 123 | $classes['class']['radio']['field'][] = 'radio-inline'; 124 | } 125 | 126 | $this->classes = $classes; 127 | } 128 | 129 | public function getClasses() 130 | { 131 | return $this->classes['class']; 132 | } 133 | 134 | public function getCss() 135 | { 136 | return $this->classes['css']; 137 | } 138 | } 139 | -------------------------------------------------------------------------------- /src/plugins/content/jtf/layouts/joomla/form/field/radio.php: -------------------------------------------------------------------------------- 1 | 7 | * @copyright (c) 2017 JoomTools.de - All rights reserved. 8 | * @license GNU General Public License version 3 or later 9 | */ 10 | 11 | defined('JPATH_BASE') or die; 12 | 13 | extract($displayData); 14 | 15 | /** 16 | * Layout variables 17 | * ----------------- 18 | * @var string $autocomplete Autocomplete attribute for the field. 19 | * @var boolean $autofocus Is autofocus enabled? 20 | * @var string $class Classes for the input. 21 | * @var string $description Description of the field. 22 | * @var boolean $disabled Is this field disabled? 23 | * @var string $group Group the field belongs to. section in form XML. 24 | * @var boolean $hidden Is this field hidden in the form? 25 | * @var string $hint Placeholder for the field. 26 | * @var string $id DOM id of the field. 27 | * @var string $label Label of the field. 28 | * @var string $labelclass Classes to apply to the label. 29 | * @var boolean $multiple Does this field support multiple values? 30 | * @var string $name Name of the input field. 31 | * @var string $onchange Onchange attribute for the field. 32 | * @var string $onclick Onclick attribute for the field. 33 | * @var string $pattern Pattern (Reg Ex) of value of the form field. 34 | * @var boolean $readonly Is this field read only? 35 | * @var boolean $repeat Allows extensions to duplicate elements. 36 | * @var boolean $required Is this field required? 37 | * @var integer $size Size attribute of the input. 38 | * @var boolean $spellcheck Spellcheck state for the form field. 39 | * @var string $validate Validation rules to apply. 40 | * @var string $value Value attribute of the field. 41 | * @var array $options Options available for this field. 42 | */ 43 | 44 | // Including fallback code for HTML5 non supported browsers. 45 | JHtml::_('jquery.framework'); 46 | JHtml::_('script', 'system/html5fallback.js', array('version' => 'auto', 'relative' => true)); 47 | 48 | /** 49 | * The format of the input tag to be filled in using sprintf. 50 | * %1 - id 51 | * %2 - name 52 | * %3 - value 53 | * %4 = any other attributes 54 | */ 55 | $format = ''; 56 | 57 | // The alt option for JText::alt 58 | $alt = preg_replace('/[^a-zA-Z0-9_\-]/', '_', $name); 59 | $class = !empty($class) ? ' class="' . trim($class) . '"' : ''; 60 | ?> 61 |
62 | 63 | 64 | > 65 | 66 | 67 | $option) : ?> 68 | value === $value) ? 'checked="checked"' : ''; 71 | $optionClass = !empty($option->class) ? 'class="' . $option->class . '"' : ''; 72 | $optionLabelClass = !empty($option->labelclass) ? ' class="' . $option->labelclass . '"' : ''; 73 | $disabled = !empty($option->disable) || ($disabled && !$checked) ? 'disabled' : ''; 74 | 75 | // Initialize some JavaScript option attributes. 76 | $onclick = !empty($option->onclick) ? 'onclick="' . $option->onclick . '"' : ''; 77 | $onchange = !empty($option->onchange) ? 'onchange="' . $option->onchange . '"' : ''; 78 | $oid = $id . $i; 79 | $ovalue = htmlspecialchars($option->value, ENT_COMPAT, 'UTF-8'); 80 | $attributes = array_filter(array($checked, $optionClass, $disabled, $onchange, $onclick)); 81 | ?> 82 | 83 | 84 | 85 | 86 | 90 | 91 | 92 |
93 | -------------------------------------------------------------------------------- /src/plugins/content/jtf/libraries/jtf/Frameworks/Bs4.php: -------------------------------------------------------------------------------- 1 | 7 | * @copyright (c) 2017 JoomTools.de - All rights reserved. 8 | * @license GNU General Public License version 3 or later 9 | */ 10 | 11 | namespace Jtf\Frameworks; 12 | 13 | defined('_JEXEC') or die('Restricted access'); 14 | 15 | /** 16 | * Class FrameworkBs4 set basic css for used framework 17 | * 18 | * Pattern for basic field classes 19 | * 20 | * Define basic classes for field type 'muster' 21 | * $classes['class']['muster'] = array( 22 | * 23 | * Set a default class for the field, addition to the manifest attribute 'class'. 24 | * For fields such as radio or checkboxes, the class is set to the enclosing tag. 25 | * 'field' => array('defaultclass'), 26 | * 27 | * Set this to define defaults for options for fields such as radio or checkboxes 28 | * 'options' => array( 29 | * 'labelclass' => array('labelclass'), 30 | * 'class' => array('optionclass'), 31 | * ), 32 | * 33 | * Set this to define defaults for the button of fields such as calendar 34 | * 'buttons' => array( 35 | * 'class' => 'uk-button uk-button-small', 36 | * 'icon' => 'uk-icon-calendar', 37 | * ), 38 | * ); 39 | * 40 | * @since 3.0 41 | **/ 42 | class FrameworkBs4 43 | { 44 | public static $name = 'Bootsrap v4'; 45 | 46 | private $classes; 47 | 48 | public function __construct($formclass = array(), $orientation = null) 49 | { 50 | $inline = false; 51 | $classes = array(); 52 | $classes['css'] = ''; 53 | 54 | $classes['class']['form'] = $formclass; 55 | array_unshift($classes['class']['form'], 'form-validate'); 56 | 57 | switch ($orientation) 58 | { 59 | case 'inline': 60 | $inline = true; 61 | $classes['class']['form'][] = 'form-inline'; 62 | break; 63 | 64 | case 'horizontal': 65 | $classes['class']['form'][] = 'form-horizontal'; 66 | $classes['class']['gridgroup'][] = 'row'; 67 | $classes['class']['gridlabel'][] = 'col-form-label'; 68 | 69 | case 'stacked': 70 | default: 71 | break; 72 | } 73 | 74 | $classes['class']['form'] = array_unique($classes['class']['form']); 75 | $classes['class']['default'][] = 'input'; 76 | $classes['class']['gridgroup'][] = 'form-group'; 77 | $classes['class']['gridfield'][] = 'form-control'; 78 | 79 | $classes['class']['calendar'] = array( 80 | 'buttons' => array( 81 | 'class' => 'btn', 82 | 'icon' => 'icon-calendar', 83 | ), 84 | ); 85 | 86 | $classes['class']['checkbox'] = array( 87 | 'field' => array('form-check'), 88 | 'options' => array( 89 | 'class' => array('form-check-input'), 90 | 'labelclass' => array('form-check-label'), 91 | ), 92 | ); 93 | 94 | $classes['class']['checkboxes'] = array( 95 | 'field' => array('form-check'), 96 | 'options' => array( 97 | 'class' => array('form-check-input'), 98 | 'labelclass' => array('form-check-label'), 99 | ), 100 | ); 101 | 102 | $classes['class']['radio'] = array( 103 | 'field' => array('form-check'), 104 | 'options' => array( 105 | 'class' => array('form-check-input'), 106 | 'labelclass' => array('form-check-label'), 107 | ), 108 | ); 109 | 110 | $classes['class']['file'] = array( 111 | 'field' => array('form-control-file'), 112 | 'uploadicon' => 'icon-upload', 113 | 'buttons' => array( 114 | 'class' => 'btn btn-success', 115 | 'icon' => 'icon-copy', 116 | ), 117 | ); 118 | 119 | $classes['class']['submit'] = array( 120 | 'buttons' => array( 121 | 'class' => 'btn', 122 | ), 123 | ); 124 | 125 | if ($inline) 126 | { 127 | $classes['class']['checkboxes']['field'][] = 'form-check-inline'; 128 | $classes['class']['radio']['field'][] = 'form-check-inline'; 129 | } 130 | 131 | $this->classes = $classes; 132 | } 133 | 134 | public function getClasses() 135 | { 136 | return $this->classes['class']; 137 | } 138 | 139 | public function getCss() 140 | { 141 | return $this->classes['css']; 142 | } 143 | } 144 | -------------------------------------------------------------------------------- /src/plugins/content/jtf/layouts/joomla/form/field/checkboxes.php: -------------------------------------------------------------------------------- 1 | 7 | * @copyright (c) 2017 JoomTools.de - All rights reserved. 8 | * @license GNU General Public License version 3 or later 9 | */ 10 | 11 | defined('JPATH_BASE') or die; 12 | 13 | extract($displayData); 14 | 15 | /** 16 | * Layout variables 17 | * ----------------- 18 | * @var string $autocomplete Autocomplete attribute for the field. 19 | * @var boolean $autofocus Is autofocus enabled? 20 | * @var string $class Classes for the input. 21 | * @var string $description Description of the field. 22 | * @var boolean $disabled Is this field disabled? 23 | * @var string $group Group the field belongs to. section in form XML. 24 | * @var boolean $hidden Is this field hidden in the form? 25 | * @var string $hint Placeholder for the field. 26 | * @var string $id DOM id of the field. 27 | * @var string $label Label of the field. 28 | * @var string $labelclass Classes to apply to the label. 29 | * @var boolean $multiple Does this field support multiple values? 30 | * @var string $name Name of the input field. 31 | * @var string $onchange Onchange attribute for the field. 32 | * @var string $onclick Onclick attribute for the field. 33 | * @var string $pattern Pattern (Reg Ex) of value of the form field. 34 | * @var boolean $readonly Is this field read only? 35 | * @var boolean $repeat Allows extensions to duplicate elements. 36 | * @var boolean $required Is this field required? 37 | * @var integer $size Size attribute of the input. 38 | * @var boolean $spellcheck Spellcheck state for the form field. 39 | * @var string $validate Validation rules to apply. 40 | * @var string $value Value attribute of the field. 41 | * @var array $checkedOptions Options that will be set as checked. 42 | * @var boolean $hasValue Has this field a value assigned? 43 | * @var array $options Options available for this field. 44 | */ 45 | 46 | // Including fallback code for HTML5 non supported browsers. 47 | JHtml::_('jquery.framework'); 48 | JHtml::_('script', 'system/html5fallback.js', array('version' => 'auto', 'relative' => true)); 49 | 50 | /** 51 | * The format of the input tag to be filled in using sprintf. 52 | * %1 - id 53 | * %2 - name 54 | * %3 - value 55 | * %4 = any other attributes 56 | */ 57 | $format = ''; 58 | 59 | // The alt option for JText::alt 60 | $alt = preg_replace('/[^a-zA-Z0-9_\-]/', '_', $name); 61 | $class = !empty($class) ? ' class="' . trim($class) . '"' : ''; 62 | ?> 63 | 64 |
65 | 66 | > 67 | 68 | $option) : ?> 69 | value, $checkedOptions) ? 'checked' : ''; 72 | 73 | // In case there is no stored value, use the option's default state. 74 | $checked = (!$hasValue && $option->checked) ? 'checked' : $checked; 75 | $optionClass = !empty($option->class) ? 'class="' . $option->class . '"' : ''; 76 | $optionLabelClass = !empty($option->labelclass) ? ' class="' . $option->labelclass . '"' : ''; 77 | $disabled = !empty($option->disable) || $disabled ? 'disabled' : ''; 78 | 79 | // Initialize some JavaScript option attributes. 80 | $onclick = !empty($option->onclick) ? 'onclick="' . $option->onclick . '"' : ''; 81 | $onchange = !empty($option->onchange) ? 'onchange="' . $option->onchange . '"' : ''; 82 | 83 | $oid = $id . $i; 84 | $value = htmlspecialchars($option->value, ENT_COMPAT, 'UTF-8'); 85 | $attributes = array_filter(array($checked, $optionClass, $disabled, $onchange, $onclick)); 86 | ?> 87 | 88 | 91 | 92 |
93 | -------------------------------------------------------------------------------- /src/plugins/content/jtf/libraries/jtf/Frameworks/Joomla.php: -------------------------------------------------------------------------------- 1 | 7 | * @copyright (c) 2017 JoomTools.de - All rights reserved. 8 | * @license GNU General Public License version 3 or later 9 | */ 10 | 11 | namespace Jtf\Frameworks; 12 | 13 | defined('_JEXEC') or die('Restricted access'); 14 | 15 | /** 16 | * Class FrameworkJoomla set basic css for used framework 17 | * 18 | * Pattern for basic field classes 19 | * 20 | * Define basic classes for field type 'muster' 21 | * $classes['class']['muster'] = array( 22 | * 23 | * Set a default class for the field, addition to the manifest attribute 'class'. 24 | * For fields such as radio or checkboxes, the class is set to the enclosing tag. 25 | * 'field' => array('defaultclass'), 26 | * 27 | * Set this to define defaults for options for fields such as radio or checkboxes 28 | * 'options' => array( 29 | * 'labelclass' => array('labelclass'), 30 | * 'class' => array('optionclass'), 31 | * ), 32 | * 33 | * Set this to define defaults for the button of fields such as calendar 34 | * 'buttons' => array( 35 | * 'class' => 'uk-button uk-button-small', 36 | * 'icon' => 'uk-icon-calendar', 37 | * ), 38 | * ); 39 | * 40 | * @since 3.0 41 | **/ 42 | class FrameworkJoomla 43 | { 44 | public static $name = 'Joomla Core (Bootstrap v2)'; 45 | 46 | private $classes; 47 | 48 | public function __construct($formclass = array(), $orientation = null) 49 | { 50 | $inline = false; 51 | $classes = array(); 52 | $classes['css'] = ''; 53 | 54 | $classes['class']['form'] = $formclass; 55 | array_unshift($classes['class']['form'], 'form-validate'); 56 | 57 | switch ($orientation) 58 | { 59 | case 'inline': 60 | $inline = true; 61 | $classes['class']['form'][] = 'form-inline'; 62 | $classes['class']['gridgroup'][] = 'inline'; 63 | $classes['class']['gridlabel'][] = 'inline'; 64 | $classes['class']['gridfield'][] = 'inline'; 65 | break; 66 | 67 | case 'horizontal': 68 | $classes['class']['form'][] = 'form-horizontal'; 69 | $classes['class']['gridgroup'][] = 'row'; 70 | // $classes['class']['gridlabel'][] = 'span3'; 71 | // $classes['class']['gridfield'][] = 'span9'; 72 | 73 | case 'stacked': 74 | default: 75 | break; 76 | } 77 | 78 | $classes['class']['form'] = array_unique($classes['class']['form']); 79 | $classes['class']['default'][] = 'input'; 80 | $classes['class']['gridgroup'][] = 'control-group'; 81 | 82 | if (!$inline) 83 | { 84 | $classes['class']['gridlabel'][] = 'control-label'; 85 | $classes['class']['gridfield'][] = 'controls'; 86 | } 87 | 88 | $classes['class']['note'] = array( 89 | 'buttons' => array( 90 | 'class' => 'close', 91 | 'icon' => '×', 92 | ), 93 | ); 94 | 95 | $classes['class']['calendar'] = array( 96 | 'buttons' => array( 97 | 'class' => 'btn btn-secondary', 98 | 'icon' => 'icon-calendar', 99 | ), 100 | ); 101 | 102 | $classes['class']['checkbox'] = array( 103 | 'field' => array('checkbox'), 104 | ); 105 | 106 | $classes['class']['checkboxes'] = array( 107 | 'field' => array('checkboxes'), 108 | 'options' => array( 109 | 'labelclass' => array('checkbox'), 110 | ), 111 | ); 112 | 113 | $classes['class']['radio'] = array( 114 | 'options' => array( 115 | 'labelclass' => array('radio'), 116 | ), 117 | ); 118 | 119 | $classes['class']['file'] = array( 120 | 'uploadicon' => 'icon-upload', 121 | 'buttons' => array( 122 | 'class' => 'btn btn-success', 123 | 'icon' => 'icon-copy', 124 | ), 125 | ); 126 | 127 | $classes['class']['submit'] = array( 128 | 'buttons' => array( 129 | 'class' => 'btn', 130 | ), 131 | ); 132 | 133 | if ($inline) 134 | { 135 | $classes['class']['checkboxes']['field'][] = 'inline'; 136 | $classes['class']['radio']['field'][] = 'inline'; 137 | } 138 | 139 | $this->classes = $classes; 140 | } 141 | 142 | public function getClasses() 143 | { 144 | return $this->classes['class']; 145 | } 146 | 147 | public function getCss() 148 | { 149 | return $this->classes['css']; 150 | } 151 | } 152 | -------------------------------------------------------------------------------- /src/plugins/content/jtf/layouts/joomla/form/field/color/advanced.bs3.php: -------------------------------------------------------------------------------- 1 | section in form XML. 23 | * @var boolean $hidden Is this field hidden in the form? 24 | * @var string $hint Placeholder for the field. 25 | * @var string $id DOM id of the field. 26 | * @var string $label Label of the field. 27 | * @var string $labelclass Classes to apply to the label. 28 | * @var boolean $multiple Does this field support multiple values? 29 | * @var string $name Name of the input field. 30 | * @var string $onchange Onchange attribute for the field. 31 | * @var string $onclick Onclick attribute for the field. 32 | * @var string $pattern Pattern (Reg Ex) of value of the form field. 33 | * @var boolean $readonly Is this field read only? 34 | * @var boolean $repeat Allows extensions to duplicate elements. 35 | * @var boolean $required Is this field required? 36 | * @var integer $size Size attribute of the input. 37 | * @var boolean $spellchec Spellcheck state for the form field. 38 | * @var string $validate Validation rules to apply. 39 | * @var string $value Value attribute of the field. 40 | * @var array $checkedOptions Options that will be set as checked. 41 | * @var boolean $hasValue Has this field a value assigned? 42 | * @var array $options Options available for this field. 43 | * @var array $checked Is this field checked? 44 | * @var array $position Is this field checked? 45 | * @var array $control Is this field checked? 46 | */ 47 | 48 | if ($validate !== 'color' && in_array($format, array('rgb', 'rgba'), true)) 49 | { 50 | $alpha = ($format === 'rgba'); 51 | $placeholder = $alpha ? 'rgba(0, 0, 0, 0.5)' : 'rgb(0, 0, 0)'; 52 | } 53 | else 54 | { 55 | $placeholder = '#rrggbb'; 56 | } 57 | 58 | $inputclass = ($keywords && ! in_array($format, array('rgb', 'rgba'), true)) ? ' keywords' : ' ' . $format; 59 | $class = ' class="' . trim('minicolors ' . $class) . ($validate === 'color' ? '' : $inputclass) . '"'; 60 | $control = $control ? ' data-control="' . $control . '"' : ''; 61 | $format = $format ? ' data-format="' . $format . '"' : ''; 62 | $keywords = $keywords ? ' data-keywords="' . $keywords . '"' : ''; 63 | $validate = $validate ? ' data-validate="' . $validate . '"' : ''; 64 | $disabled = $disabled ? ' disabled' : ''; 65 | $readonly = $readonly ? ' readonly' : ''; 66 | $hint = strlen($hint) ? ' placeholder="' . htmlspecialchars($hint, ENT_COMPAT, 'UTF-8') . '"' : ' placeholder="' . $placeholder . '"'; 67 | $autocomplete = ! $autocomplete ? ' autocomplete="off"' : ''; 68 | 69 | // Force LTR input value in RTL, due to display issues with rgba/hex colors 70 | $direction = $lang->isRtl() ? ' dir="ltr" style="text-align:right"' : ''; 71 | 72 | // Including fallback code for HTML5 non supported browsers. 73 | JHtml::_('jquery.framework'); 74 | JHtml::_('script', 'system/html5fallback.js', array('version' => 'auto', 'relative' => true, 'conditional' => 'lt IE 9')); 75 | JHtml::_('script', 'jui/jquery.minicolors.min.js', array('version' => 'auto', 'relative' => true)); 76 | JHtml::_('stylesheet', 'jui/jquery.minicolors.css', array('version' => 'auto', 'relative' => true)); 77 | JHtml::_('script', 'system/color-field-adv-init.min.js', array('version' => 'auto', 'relative' => true)); 78 | JFactory::getDocument()->addStyleDeclaration('.minicolors-theme-bootstrap .hex{width:auto;height:auto;}'); 79 | 80 | ?> 81 | /> 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | -------------------------------------------------------------------------------- /src/plugins/content/jtf/layouts/joomla/form/field/color/advanced.uikit3.php: -------------------------------------------------------------------------------- 1 | 7 | * @copyright (c) 2017 JoomTools.de - All rights reserved. 8 | * @license GNU General Public License version 3 or later 9 | */ 10 | 11 | defined('JPATH_BASE') or die; 12 | 13 | extract($displayData); 14 | 15 | /** 16 | * Layout variables 17 | * ----------------- 18 | * @var string $autocomplete Autocomplete attribute for the field. 19 | * @var boolean $autofocus Is autofocus enabled? 20 | * @var string $class Classes for the input. 21 | * @var string $description Description of the field. 22 | * @var boolean $disabled Is this field disabled? 23 | * @var string $group Group the field belongs to. section in form XML. 24 | * @var boolean $hidden Is this field hidden in the form? 25 | * @var string $hint Placeholder for the field. 26 | * @var string $id DOM id of the field. 27 | * @var string $label Label of the field. 28 | * @var string $labelclass Classes to apply to the label. 29 | * @var boolean $multiple Does this field support multiple values? 30 | * @var string $name Name of the input field. 31 | * @var string $onchange Onchange attribute for the field. 32 | * @var string $onclick Onclick attribute for the field. 33 | * @var string $pattern Pattern (Reg Ex) of value of the form field. 34 | * @var boolean $readonly Is this field read only? 35 | * @var boolean $repeat Allows extensions to duplicate elements. 36 | * @var boolean $required Is this field required? 37 | * @var integer $size Size attribute of the input. 38 | * @var boolean $spellchec Spellcheck state for the form field. 39 | * @var string $validate Validation rules to apply. 40 | * @var string $value Value attribute of the field. 41 | * @var array $checkedOptions Options that will be set as checked. 42 | * @var boolean $hasValue Has this field a value assigned? 43 | * @var array $options Options available for this field. 44 | * @var array $checked Is this field checked? 45 | * @var array $position Is this field checked? 46 | * @var array $control Is this field checked? 47 | */ 48 | 49 | if ($validate !== 'color' && in_array($format, array('rgb', 'rgba'), true)) 50 | { 51 | $alpha = ($format === 'rgba'); 52 | $placeholder = $alpha ? 'rgba(0, 0, 0, 0.5)' : 'rgb(0, 0, 0)'; 53 | } 54 | else 55 | { 56 | $placeholder = '#rrggbb'; 57 | } 58 | 59 | $inputclass = ($keywords && ! in_array($format, array('rgb', 'rgba'), true)) ? ' keywords' : ' ' . $format; 60 | $class = ' class="' . trim('minicolors ' . $class) . ($validate === 'color' ? '' : $inputclass) . '"'; 61 | $control = $control ? ' data-control="' . $control . '"' : ''; 62 | $format = $format ? ' data-format="' . $format . '"' : ''; 63 | $keywords = $keywords ? ' data-keywords="' . $keywords . '"' : ''; 64 | $validate = $validate ? ' data-validate="' . $validate . '"' : ''; 65 | $disabled = $disabled ? ' disabled' : ''; 66 | $readonly = $readonly ? ' readonly' : ''; 67 | $hint = strlen($hint) ? ' placeholder="' . htmlspecialchars($hint, ENT_COMPAT, 'UTF-8') . '"' : ' placeholder="' . $placeholder . '"'; 68 | $autocomplete = ! $autocomplete ? ' autocomplete="off"' : ''; 69 | 70 | // Force LTR input value in RTL, due to display issues with rgba/hex colors 71 | $direction = $lang->isRtl() ? ' dir="ltr" style="text-align:right"' : ''; 72 | 73 | // Including fallback code for HTML5 non supported browsers. 74 | JHtml::_('jquery.framework'); 75 | JHtml::_('script', 'system/html5fallback.js', array('version' => 'auto', 'relative' => true, 'conditional' => 'lt IE 9')); 76 | JHtml::_('script', 'jui/jquery.minicolors.min.js', array('version' => 'auto', 'relative' => true)); 77 | JHtml::_('stylesheet', 'jui/jquery.minicolors.css', array('version' => 'auto', 'relative' => true)); 78 | JHtml::_('script', 'system/color-field-adv-init.min.js', array('version' => 'auto', 'relative' => true)); 79 | JFactory::getDocument()->addStyleDeclaration( 80 | '.minicolors.minicolors-theme-bootstrap.minicolors-position-default input{padding-left: 40px;}' 81 | ); 82 | ?> 83 | /> 85 | -------------------------------------------------------------------------------- /src/plugins/content/jtf/layouts/joomla/form/field/color/advanced.uikit.php: -------------------------------------------------------------------------------- 1 | 7 | * @copyright (c) 2017 JoomTools.de - All rights reserved. 8 | * @license GNU General Public License version 3 or later 9 | */ 10 | 11 | defined('JPATH_BASE') or die; 12 | 13 | extract($displayData); 14 | 15 | /** 16 | * Layout variables 17 | * ----------------- 18 | * @var string $autocomplete Autocomplete attribute for the field. 19 | * @var boolean $autofocus Is autofocus enabled? 20 | * @var string $class Classes for the input. 21 | * @var string $description Description of the field. 22 | * @var boolean $disabled Is this field disabled? 23 | * @var string $group Group the field belongs to. section in form XML. 24 | * @var boolean $hidden Is this field hidden in the form? 25 | * @var string $hint Placeholder for the field. 26 | * @var string $id DOM id of the field. 27 | * @var string $label Label of the field. 28 | * @var string $labelclass Classes to apply to the label. 29 | * @var boolean $multiple Does this field support multiple values? 30 | * @var string $name Name of the input field. 31 | * @var string $onchange Onchange attribute for the field. 32 | * @var string $onclick Onclick attribute for the field. 33 | * @var string $pattern Pattern (Reg Ex) of value of the form field. 34 | * @var boolean $readonly Is this field read only? 35 | * @var boolean $repeat Allows extensions to duplicate elements. 36 | * @var boolean $required Is this field required? 37 | * @var integer $size Size attribute of the input. 38 | * @var boolean $spellchec Spellcheck state for the form field. 39 | * @var string $validate Validation rules to apply. 40 | * @var string $value Value attribute of the field. 41 | * @var array $checkedOptions Options that will be set as checked. 42 | * @var boolean $hasValue Has this field a value assigned? 43 | * @var array $options Options available for this field. 44 | * @var array $checked Is this field checked? 45 | * @var array $position Is this field checked? 46 | * @var array $control Is this field checked? 47 | */ 48 | 49 | if ($validate !== 'color' && in_array($format, array('rgb', 'rgba'), true)) 50 | { 51 | $alpha = ($format === 'rgba'); 52 | $placeholder = $alpha ? 'rgba(0, 0, 0, 0.5)' : 'rgb(0, 0, 0)'; 53 | } 54 | else 55 | { 56 | $placeholder = '#rrggbb'; 57 | } 58 | 59 | $inputclass = ($keywords && ! in_array($format, array('rgb', 'rgba'), true)) ? ' keywords' : ' ' . $format; 60 | $class = ' class="' . trim('minicolors ' . $class) . ($validate === 'color' ? '' : $inputclass) . '"'; 61 | $control = $control ? ' data-control="' . $control . '"' : ''; 62 | $format = $format ? ' data-format="' . $format . '"' : ''; 63 | $keywords = $keywords ? ' data-keywords="' . $keywords . '"' : ''; 64 | $validate = $validate ? ' data-validate="' . $validate . '"' : ''; 65 | $disabled = $disabled ? ' disabled' : ''; 66 | $readonly = $readonly ? ' readonly' : ''; 67 | $hint = strlen($hint) ? ' placeholder="' . htmlspecialchars($hint, ENT_COMPAT, 'UTF-8') . '"' : ' placeholder="' . $placeholder . '"'; 68 | $autocomplete = ! $autocomplete ? ' autocomplete="off"' : ''; 69 | 70 | // Force LTR input value in RTL, due to display issues with rgba/hex colors 71 | $direction = $lang->isRtl() ? ' dir="ltr" style="text-align:right"' : ''; 72 | 73 | // Including fallback code for HTML5 non supported browsers. 74 | JHtml::_('jquery.framework'); 75 | JHtml::_('script', 'system/html5fallback.js', array('version' => 'auto', 'relative' => true, 'conditional' => 'lt IE 9')); 76 | JHtml::_('script', 'jui/jquery.minicolors.min.js', array('version' => 'auto', 'relative' => true)); 77 | JHtml::_('stylesheet', 'jui/jquery.minicolors.css', array('version' => 'auto', 'relative' => true)); 78 | JHtml::_('script', 'system/color-field-adv-init.min.js', array('version' => 'auto', 'relative' => true)); 79 | JFactory::getDocument()->addStyleDeclaration( 80 | '.minicolors.minicolors-theme-bootstrap.minicolors-position-default input{padding-left: 30px !important;}' 81 | ); 82 | ?> 83 | /> 85 | -------------------------------------------------------------------------------- /src/plugins/content/jtf/libraries/jtf/Frameworks/Uikit3.php: -------------------------------------------------------------------------------- 1 | 7 | * @copyright (c) 2017 JoomTools.de - All rights reserved. 8 | * @license GNU General Public License version 3 or later 9 | */ 10 | 11 | namespace Jtf\Frameworks; 12 | 13 | defined('_JEXEC') or die('Restricted access'); 14 | 15 | /** 16 | * Class FrameworkUikit3 set basic css for used framework 17 | * 18 | * Pattern for basic field classes 19 | * 20 | * Define basic classes for field type 'muster' 21 | * $classes['class']['muster'] = array( 22 | * 23 | * Set a default class for the field, addition to the manifest attribute 'class'. 24 | * For fields such as radio or checkboxes, the class is set to the enclosing tag. 25 | * 'field' => array('defaultclass'), 26 | * 27 | * Set this to define defaults for options for fields such as radio or checkboxes 28 | * 'options' => array( 29 | * 'labelclass' => array('labelclass'), 30 | * 'class' => array('optionclass'), 31 | * ), 32 | * 33 | * Set this to define defaults for the button of fields such as calendar 34 | * 'buttons' => array( 35 | * 'class' => 'uk-button uk-button-small', 36 | * 'icon' => 'uk-icon-calendar', 37 | * ), 38 | * ); 39 | * 40 | * @since 3.0 41 | **/ 42 | class FrameworkUikit3 43 | { 44 | public static $name = 'UIKit v3'; 45 | 46 | private $classes; 47 | 48 | public function __construct($formclass = array(), $orientation = null) 49 | { 50 | $inline = false; 51 | $classes = array(); 52 | $classes['css'] = ''; 53 | 54 | $classes['class']['form'] = $formclass; 55 | array_unshift($classes['class']['form'], 'uk-form', 'form-validate'); 56 | 57 | switch ($orientation) 58 | { 59 | case 'inline': 60 | $inline = true; 61 | break; 62 | 63 | case 'stacked': 64 | $classes['class']['form'][] = 'uk-form-stacked'; 65 | break; 66 | 67 | case 'horizontal': 68 | $classes['class']['form'][] = 'uk-form-horizontal'; 69 | 70 | default: 71 | break; 72 | } 73 | 74 | $classes['class']['form'] = array_unique($classes['class']['form']); 75 | $classes['class']['legend'][] = 'uk-legend'; 76 | $classes['class']['default'][] = 'uk-input'; 77 | $classes['class']['gridgroup'][] = 'uk-form-row uk-margin'; 78 | 79 | if (!$inline) 80 | { 81 | $classes['class']['gridlabel'][] = 'uk-form-label'; 82 | $classes['class']['gridfield'][] = 'uk-form-controls'; 83 | } 84 | 85 | $classes['class']['fieldset'] = array( 86 | 'field' => array( 87 | 'uk-fieldset', 88 | 'uk-margin-bottom' 89 | ), 90 | 'label' => array('uk-legend'), 91 | 'desc' => array('uk-fieldset-desc'), 92 | ); 93 | 94 | $classes['class']['calendar'] = array( 95 | 'field' => array( 96 | 'uk-input', 97 | ), 98 | 'buttons' => array( 99 | 'class' => 'uk-button-default', 100 | 'icon' => 'calendar', 101 | ), 102 | ); 103 | 104 | $classes['class']['checkboxes'] = array( 105 | 'field' => array('checkboxes'), 106 | 'options' => array( 107 | 'class' => array('uk-checkbox'), 108 | ), 109 | ); 110 | 111 | $classes['class']['radio'] = array( 112 | 'options' => array( 113 | 'class' => array('uk-radio'), 114 | ), 115 | ); 116 | 117 | $classes['class']['textarea'] = array( 118 | 'field' => array('uk-textarea'), 119 | ); 120 | 121 | $classes['class']['list'] = array( 122 | 'field' => array('uk-select'), 123 | ); 124 | 125 | $classes['class']['category'] = array( 126 | 'field' => array('uk-select'), 127 | ); 128 | 129 | $classes['class']['file'] = array( 130 | 'uploadicon' => 'upload; ratio: 2', 131 | 'buttons' => array( 132 | 'class' => 'uk-button uk-button-success', 133 | 'icon' => 'copy', 134 | ), 135 | ); 136 | 137 | $classes['class']['submit'] = array( 138 | 'buttons' => array( 139 | 'class' => 'uk-button uk-button-default', 140 | ), 141 | ); 142 | 143 | if ($inline) 144 | { 145 | $classes['class']['checkboxes']['field'][] = 'uk-display-inline'; 146 | $classes['class']['radio']['field'][] = 'uk-display-inline'; 147 | } 148 | 149 | $this->classes = $classes; 150 | } 151 | 152 | public function getClasses() 153 | { 154 | return $this->classes['class']; 155 | } 156 | 157 | public function getCss() 158 | { 159 | return $this->classes['css']; 160 | } 161 | } 162 | -------------------------------------------------------------------------------- /src/plugins/content/jtf/libraries/jtf/Frameworks/Uikit.php: -------------------------------------------------------------------------------- 1 | 7 | * @copyright (c) 2017 JoomTools.de - All rights reserved. 8 | * @license GNU General Public License version 3 or later 9 | */ 10 | 11 | namespace Jtf\Frameworks; 12 | 13 | defined('_JEXEC') or die('Restricted access'); 14 | 15 | /** 16 | * Class FrameworkUikit set basic css for used framework 17 | * 18 | * Pattern for basic field classes 19 | * 20 | * Define basic classes for field type 'muster' 21 | * $classes['class']['muster'] = array( 22 | * 23 | * Set a default class for the field, addition to the manifest attribute 'class'. 24 | * For fields such as radio or checkboxes, the class is set to the enclosing tag. 25 | * 'field' => array('defaultclass'), 26 | * 27 | * Set this to define defaults for options for fields such as radio or checkboxes 28 | * 'options' => array( 29 | * 'labelclass' => array('labelclass'), 30 | * 'class' => array('optionclass'), 31 | * ), 32 | * 33 | * Set this to define defaults for the button of fields such as calendar 34 | * 'buttons' => array( 35 | * 'class' => 'uk-button uk-button-small', 36 | * 'icon' => 'uk-icon-calendar', 37 | * ), 38 | * ); 39 | * 40 | * @since 3.0 41 | **/ 42 | class FrameworkUikit 43 | { 44 | public static $name = 'UIKit v2'; 45 | 46 | private $classes; 47 | 48 | public function __construct($formclass = array(), $orientation = null) 49 | { 50 | $inline = false; 51 | $classes = array(); 52 | $classes['css'] = '.uk-form-icon:not(.uk-form-icon-flip)>select { padding-left: 40px !important; }'; 53 | 54 | $classes['class']['form'] = $formclass; 55 | array_unshift($classes['class']['form'], 'uk-form', 'form-validate'); 56 | 57 | switch ($orientation) 58 | { 59 | case 'inline': 60 | $inline = true; 61 | break; 62 | 63 | case 'stacked': 64 | $classes['class']['form'][] = 'uk-form-stacked'; 65 | break; 66 | 67 | case 'horizontal': 68 | $classes['class']['form'][] = 'uk-form-horizontal'; 69 | 70 | default: 71 | break; 72 | } 73 | 74 | $classes['class']['form'] = array_unique($classes['class']['form']); 75 | $classes['class']['default'][] = 'uk-input'; 76 | $classes['class']['gridgroup'][] = 'uk-form-row'; 77 | 78 | if (!$inline) 79 | { 80 | $classes['class']['gridlabel'][] = 'uk-form-label'; 81 | $classes['class']['gridfield'][] = 'uk-form-controls'; 82 | } 83 | 84 | $classes['class']['fieldset'] = array( 85 | 'field' => array( 86 | 'uk-fieldset', 87 | 'uk-margin-bottom' 88 | ), 89 | 'label' => array('uk-legend'), 90 | 'desc' => array('uk-fieldset-desc'), 91 | ); 92 | 93 | $classes['class']['note'] = array( 94 | 'buttons' => array( 95 | 'class' => 'uk-alert-close uk-close', 96 | 'icon' => '', 97 | ), 98 | ); 99 | 100 | $classes['class']['calendar'] = array( 101 | 'buttons' => array( 102 | 'class' => 'uk-button', 103 | 'icon' => 'uk-icon-calendar', 104 | ), 105 | ); 106 | 107 | $classes['class']['checkboxes'] = array( 108 | 'field' => array('checkboxes'), 109 | 'options' => array( 110 | 'class' => array('uk-checkbox'), 111 | ), 112 | ); 113 | 114 | $classes['class']['radio'] = array( 115 | 'options' => array( 116 | 'class' => array('uk-radio'), 117 | ), 118 | ); 119 | 120 | $classes['class']['textarea'] = array( 121 | 'field' => array('uk-textarea'), 122 | ); 123 | 124 | $classes['class']['list'] = array( 125 | 'field' => array('uk-select'), 126 | ); 127 | 128 | $classes['class']['file'] = array( 129 | 'uploadicon' => 'uk-icon-upload', 130 | 'buttons' => array( 131 | 'class' => 'uk-button uk-button-success', 132 | 'icon' => 'uk-icon-copy', 133 | ), 134 | ); 135 | 136 | $classes['class']['submit'] = array( 137 | 'buttons' => array( 138 | 'class' => 'uk-button uk-button-default', 139 | ), 140 | ); 141 | 142 | if ($inline) 143 | { 144 | $classes['class']['checkboxes']['field'][] = 'uk-display-inline'; 145 | $classes['class']['radio']['field'][] = 'uk-display-inline'; 146 | } 147 | 148 | $this->classes = $classes; 149 | } 150 | 151 | public function getClasses() 152 | { 153 | return $this->classes['class']; 154 | } 155 | 156 | public function getCss() 157 | { 158 | return $this->classes['css']; 159 | } 160 | } 161 | -------------------------------------------------------------------------------- /src/plugins/content/jtf/assets/js/system/subform-repeatable.js: -------------------------------------------------------------------------------- 1 | (function($){"use strict";$.subformRepeatable=function(container,options){this.$container=$(container);if(this.$container.data("subformRepeatable")){return self}this.$container.data("subformRepeatable",self);this.options=$.extend({},$.subformRepeatable.defaults,options);this.template="";this.prepareTemplate();this.$containerRows=this.options.rowsContainer?this.$container.find(this.options.rowsContainer):this.$container;this.lastRowNum=this.$containerRows.find(this.options.repeatableElement).length;var self=this;this.$container.on("click",this.options.btAdd,function(e){e.preventDefault();var after=$(this).parents(self.options.repeatableElement);if(!after.length){after=null}self.addRow(after)});this.$container.on("click",this.options.btRemove,function(e){e.preventDefault();var $row=$(this).parents(self.options.repeatableElement);self.removeRow($row)});if(this.options.btMove){this.$containerRows.sortable({items:this.options.repeatableElement,handle:this.options.btMove,tolerance:"pointer"})}this.$container.trigger("subform-ready")};$.subformRepeatable.prototype.prepareTemplate=function(){if(this.options.rowTemplateSelector){var tmplElement=this.$container.find(this.options.rowTemplateSelector)[0]||{};this.template=$.trim(tmplElement.text||tmplElement.textContent)}else{var row=this.$container.find(this.options.repeatableElement).get(0),$row=$(row).clone();try{this.clearScripts($row)}catch(e){if(window.console){console.log(e)}}this.template=$row.prop("outerHTML")}};$.subformRepeatable.prototype.addRow=function(after){var count=this.$containerRows.find(this.options.repeatableElement).length;if(count>=this.options.maximum){return null}var row=$.parseHTML(this.template);if(after){$(after).after(row)}else{this.$containerRows.append(row)}var $row=$(row);$row.attr("data-new","true");this.fixUniqueAttributes($row,count);try{this.fixScripts($row)}catch(e){if(window.console){console.log(e)}}this.$container.trigger("subform-row-add",$row);return $row};$.subformRepeatable.prototype.removeRow=function($row){var count=this.$containerRows.find(this.options.repeatableElement).length;if(count<=this.options.minimum){return}this.$container.trigger("subform-row-remove",$row);$row.remove()};$.subformRepeatable.prototype.fixUniqueAttributes=function($row,count){this.lastRowNum++;var group=$row.attr("data-group"),basename=$row.attr("data-base-name"),count=count||0,countnew=Math.max(this.lastRowNum,count+1),groupnew=basename+countnew;this.lastRowNum=countnew;$row.attr("data-group",groupnew);var haveName=$row.find("[name]"),ids={};for(var i=0,l=haveName.length;i 7 | * @copyright (c) 2017 JoomTools.de - All rights reserved. 8 | * @license GNU General Public License version 3 or later 9 | */ 10 | 11 | defined('_JEXEC') or die; 12 | 13 | extract($displayData); 14 | 15 | $fieldsets = $form->getXML(); 16 | 17 | foreach ($fieldsets->fieldset as $fieldset) 18 | { 19 | if (!empty($fieldset['name']) && (string) $fieldset['name'] == 'submit') 20 | { 21 | continue; 22 | } 23 | 24 | $fieldsetLabel = (string) $fieldset['label']; 25 | 26 | if (count($fieldset->field)) 27 | { 28 | if (!empty($fieldsetLabel) && strlen($legend = trim(JText::_($fieldsetLabel)))) 29 | { 30 | echo "====================\n"; 31 | echo $legend . "\n"; 32 | } 33 | 34 | echo "====================\n"; 35 | 36 | foreach ($fieldset->field as $field) 37 | { 38 | $label = trim(JText::_((string) $field['label'])); 39 | $value = $form->getValue((string) $field['name']); 40 | $type = (string) $field['type']; 41 | $fileTimeOut = ''; 42 | 43 | if (!empty($field['notmail'])) 44 | { 45 | continue; 46 | } 47 | 48 | if ($type == 'file' && $fileClear > 0) 49 | { 50 | $fileTimeOut .= JText::sprintf('JTF_FILE_TIMEOUT', $fileClear); 51 | } 52 | 53 | if ($type == 'spacer') 54 | { 55 | $label = ' '; 56 | $value = trim(JText::_((string) $field['label'])); 57 | } 58 | 59 | if (empty($value)) 60 | { 61 | // Comment out 'continue', if you want to submit only filled fields 62 | //continue; 63 | } 64 | 65 | if (is_array($value)) 66 | { 67 | if ($type != 'subform') 68 | { 69 | foreach ($value as $_key => $_value) 70 | { 71 | if ($type == 'file') 72 | { 73 | $values[] = $_key . ': ' . $_value . ' *'; 74 | } 75 | else 76 | { 77 | $values[] = strip_tags(trim(JText::_($_value))); 78 | } 79 | } 80 | 81 | if (empty($values)) 82 | { 83 | $values = array(); 84 | } 85 | 86 | $value = implode(", ", $values); 87 | unset($values); 88 | } 89 | } 90 | 91 | echo strip_tags($label) . ": "; 92 | 93 | if (!is_array($value)) 94 | { 95 | echo $value ? strip_tags(JText::_($value)) : '--'; 96 | } 97 | else 98 | { 99 | if ($type == 'subform') 100 | { 101 | $fieldname = (string) $field['name']; 102 | $setTable = false; 103 | $counter = count($value) - 1; 104 | $subForm = $form->getField($fieldname)->loadSubForm(); 105 | $subFormFields = $subForm->getGroup(''); 106 | 107 | if (!empty($value)) 108 | { 109 | $setTable = true; 110 | echo "\n====\n"; 111 | 112 | } 113 | 114 | foreach ($value as $valuesKey => $subValues) 115 | { 116 | foreach ($subFormFields as $subFormField) 117 | { 118 | $subFormType = $subFormField->getAttribute('type'); 119 | $subFormLabel = $subFormField->getAttribute('label'); 120 | $subFormName = $subFormField->getAttribute('name'); 121 | 122 | if (!empty($subFormField->getAttribute('notmail'))) 123 | { 124 | continue; 125 | } 126 | 127 | $subFormValue = $form->getValue($fieldname . '.' . $valuesKey . '.' . $subFormName); 128 | 129 | if ($subFormType == 'file' && $fileTimeOut == '' && $fileClear > 0) 130 | { 131 | $fileTimeOut .= JText::sprintf('JTF_FILE_TIMEOUT', $fileClear); 132 | } 133 | 134 | if (empty($subFormValue)) 135 | { 136 | // Comment out 'continue', if you want to submit only filled fields 137 | //continue; 138 | } 139 | 140 | if (is_array($subFormValue)) 141 | { 142 | foreach ($subFormValue as $_key => $_value) 143 | { 144 | if ($subFormType == 'file') 145 | { 146 | $subFormValues[] = $_key . ': ' . $_value . ' *'; 147 | } 148 | else 149 | { 150 | $subFormValues[] = strip_tags(trim(JText::_($_value))); 151 | } 152 | } 153 | 154 | if (empty($subFormValues)) 155 | { 156 | $subFormValues = array(); 157 | } 158 | 159 | $subFormValue = implode(", ", $subFormValues); 160 | unset($subFormValues); 161 | } 162 | 163 | echo strip_tags(JText::_($subFormLabel)) . ': '; 164 | echo $subFormValue ? strip_tags(JText::_($subFormValue)) : '--'; 165 | echo "\n"; 166 | } 167 | 168 | if ($valuesKey < $counter) 169 | { 170 | echo "\n"; 171 | } 172 | } 173 | 174 | if ($setTable) 175 | { 176 | echo "====\n"; 177 | } 178 | } 179 | else 180 | { 181 | foreach ($value as $_value) 182 | { 183 | echo $_value ? strip_tags($_value) : '--'; 184 | echo "\n"; 185 | } 186 | } 187 | } 188 | 189 | echo "\n"; 190 | echo $fileTimeOut; 191 | } 192 | } 193 | } 194 | -------------------------------------------------------------------------------- /src/plugins/content/jtf/assets/js/file.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @package Joomla.Plugin 3 | * @subpackage Content.Jtf 4 | * 5 | * @author Guido De Gobbis 6 | * @copyright (c) 2017 JoomTools.de - All rights reserved. 7 | * @license GNU General Public License version 3 or later 8 | **/ 9 | 10 | jQuery(document).ready(function ($) { 11 | $.fn.jtfUploadFile = function (optionlist) { 12 | var $dragZone = this.find('.dragarea'), 13 | $allowedExt = this.find('.allowedExt'), 14 | $fileInput = $('#' + optionlist.id), 15 | $uploadList = this.find('.upload-list'), 16 | $label = $('label[for="' + optionlist.id + '"'), 17 | accept = $fileInput.attr('accept').split(','), 18 | maxsize = optionlist.uploadMaxSize, 19 | msgAllowedExt = Joomla.JText._('JTF_UPLOAD_ALLOWED_FILES_EXT', ''), 20 | errorFileSize = Joomla.JText._('JTF_UPLOAD_ERROR_MESSAGE_SIZE', ''), 21 | errorFileType = Joomla.JText._('JTF_UPLOAD_ERROR_FILE_NOT_ALLOWED', ''); 22 | 23 | // Set list of mimetype and file extension 24 | for (var i = 0, acceptedType = '', acceptedExt = '', sep = ''; i < accept.length; ++i) { 25 | var mimeType = mimelite.getType(accept[i].replace(".", "")); 26 | var fileExt = mimelite.getExtension(accept[i].replace(".", "")); 27 | 28 | if (mimeType === null) { 29 | mimeType = mimelite.getTypes(accept[i].replace(".", "")); 30 | } 31 | 32 | if (fileExt === null) { 33 | fileExt = accept[i].replace(".", ""); 34 | } 35 | 36 | if (fileExt !== null) { 37 | sep = acceptedExt ? ',' : ''; 38 | acceptedExt += sep + fileExt; 39 | } 40 | 41 | if (mimeType !== null) { 42 | sep = acceptedType ? ',' : ''; 43 | acceptedType += sep + mimeType; 44 | } 45 | } 46 | 47 | acceptedExt = acceptedExt.replace(/,/g, " ."); 48 | acceptedType = acceptedType.replace(/,/g, " "); 49 | 50 | $allowedExt.html(msgAllowedExt + acceptedExt); 51 | 52 | function allowedFile(fileType) { 53 | if (fileType) { 54 | var patt = new RegExp(fileType); 55 | 56 | if (patt.test(acceptedType)) { 57 | return true; 58 | } 59 | } 60 | 61 | return false; 62 | } 63 | 64 | function getTotalFilesSize(files) { 65 | var size = 0; 66 | 67 | for (var i = 0, f; f = files[i]; i++) { 68 | size += f.size; 69 | } 70 | 71 | return size; 72 | } 73 | 74 | function setInvalid() { 75 | $label.addClass('invalid').attr('aria-invalid', true); 76 | $dragZone.addClass('invalid').attr('aria-invalid', true); 77 | $fileInput.addClass('invalid').attr('aria-invalid', true); 78 | } 79 | 80 | function unsetInvalid() { 81 | $label.removeClass('invalid').attr('aria-invalid', false); 82 | $dragZone.removeClass('invalid').attr('aria-invalid', false); 83 | $fileInput.removeClass('invalid').attr('aria-invalid', false); 84 | } 85 | 86 | function humanReadableSize(bytes, si) { 87 | var thresh = si ? 1000 : 1024; 88 | 89 | if (Math.abs(bytes) < thresh) { 90 | return bytes + ' B'; 91 | } 92 | 93 | var units = si 94 | ? ['kB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'] 95 | : ['KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB', 'ZiB', 'YiB'], 96 | u = -1; 97 | 98 | do { 99 | bytes /= thresh; 100 | ++u; 101 | } 102 | while (Math.abs(bytes) >= thresh && u < units.length - 1); 103 | 104 | return bytes.toFixed(1) + ' ' + units[u]; 105 | } 106 | 107 | function dateiauswahl(files) { 108 | var output = [], 109 | uploadError = '', 110 | uploadsize = getTotalFilesSize(files); 111 | 112 | for (var i = 0, f; f = files[i]; i++) { 113 | if (allowedFile(f.type)) { 114 | output.push('
  • Upload: ', f.name, ' (', 115 | humanReadableSize(f.size, true), ')
  • '); 116 | } else { 117 | uploadError += '

    Error: ' + f.name 118 | + ' - ' + errorFileType + '

    '; 119 | } 120 | } 121 | 122 | if (uploadsize > maxsize) { 123 | uploadError += '

    Error: ' + humanReadableSize(uploadsize, true) 124 | + ' - ' + errorFileSize + '

    '; 125 | } 126 | 127 | if (uploadError) 128 | { 129 | setInvalid(); 130 | document.formvalidator.setHandler('file', function() { 131 | return false; 132 | }); 133 | } else { 134 | unsetInvalid(); 135 | document.formvalidator.setHandler('file', function() { 136 | return true; 137 | }); 138 | } 139 | 140 | $uploadList.html(uploadError + '
      ' + output.join('') + '
    '); 141 | } 142 | 143 | $fileInput.on('drag dragstart dragend dragover dragenter dragleave change', function (e) { 144 | e.preventDefault(); 145 | e.stopPropagation(); 146 | }).on('dragenter dragover', function (e) { 147 | $dragZone.addClass('hover'); 148 | }).on('dragleave dragend drop', function (e) { 149 | $dragZone.removeClass('hover'); 150 | }).on('change', function (e) { 151 | dateiauswahl(e.originalEvent.target.files); 152 | }); 153 | }; 154 | 155 | $('.uploader-wrapper').each(function () { 156 | $(this).jtfUploadFile({ 157 | id: $(this).find('.legacy-uploader input[type="file"]').attr('id'), 158 | uploadMaxSize: $(this).find('.legacy-uploader input[type="hidden"]').attr('value') 159 | }); 160 | }); 161 | }); 162 | -------------------------------------------------------------------------------- /src/plugins/content/jtf/layouts/joomla/form/field/file.php: -------------------------------------------------------------------------------- 1 | 7 | * @copyright (c) 2017 JoomTools.de - All rights reserved. 8 | * @license GNU General Public License version 3 or later 9 | */ 10 | 11 | defined('_JEXEC') or die; 12 | 13 | use Joomla\CMS\Language\Text; 14 | use Joomla\CMS\HTML\HTMLHelper; 15 | 16 | extract($displayData); 17 | 18 | 19 | /** 20 | * Layout variables 21 | * ----------------- 22 | * @var string $autocomplete Autocomplete attribute for the field. 23 | * @var boolean $autofocus Is autofocus enabled? 24 | * @var string $class Classes for the input. 25 | * @var string $description Description of the field. 26 | * @var boolean $disabled Is this field disabled? 27 | * @var string $group Group the field belongs to. section in form XML. 28 | * @var boolean $hidden Is this field hidden in the form? 29 | * @var string $hint Placeholder for the field. 30 | * @var string $id DOM id of the field. 31 | * @var string $label Label of the field. 32 | * @var string $labelclass Classes to apply to the label. 33 | * @var boolean $multiple Does this field support multiple values? 34 | * @var string $name Name of the input field. 35 | * @var string $onchange Onchange attribute for the field. 36 | * @var string $onclick Onclick attribute for the field. 37 | * @var string $pattern Pattern (Reg Ex) of value of the form field. 38 | * @var boolean $readonly Is this field read only? 39 | * @var boolean $repeat Allows extensions to duplicate elements. 40 | * @var boolean $required Is this field required? 41 | * @var integer $size Size attribute of the input. 42 | * @var boolean $spellcheck Spellcheck state for the form field. 43 | * @var string $validate Validation rules to apply. 44 | * @var string $value Value attribute of the field. 45 | * @var array $checkedOptions Options that will be set as checked. 46 | * @var boolean $hasValue Has this field a value assigned? 47 | * @var array $options Options available for this field. 48 | * @var array $inputType Options available for this field. 49 | * @var string $accept File types that are accepted. 50 | * @var integer $maxLength The maximum length that the field shall accept. 51 | * @var integer $uploadmaxsize Limitation for Upload. 52 | */ 53 | 54 | // Including fallback code for HTML5 non supported browsers. 55 | HTMLHelper::_('jquery.framework'); 56 | HTMLHelper::_('script', 'system/html5fallback.js', array('version' => 'auto', 'relative' => true)); 57 | HTMLHelper::_('script', 'plugins/content/jtf/assets/js/lite.min.js', array('version' => 'auto')); 58 | HTMLHelper::_('script', 'plugins/content/jtf/assets/js/file.min.js', array('version' => 'auto')); 59 | HTMLHelper::_('stylesheet', 'plugins/content/jtf/assets/css/file.min.css', array('version' => 'auto')); 60 | 61 | $maxSize = HTMLHelper::_('number.bytes', $uploadmaxsize); 62 | Text::sprintf('JTF_UPLOAD_ERROR_MESSAGE_SIZE', $maxSize, array('jsSafe' => true,'interpretBackSlashes' => true,'script' => true)); 63 | Text::script('JTF_UPLOAD_ERROR_FILE_NOT_ALLOWED', true, true); 64 | Text::script('JTF_UPLOAD_ALLOWED_FILES_EXT', true, true); 65 | 66 | ?> 67 |
    68 |
    69 |
    70 |

    71 | sublayout('icon', array('icon' => $uploadicon)); ?> 72 |

    73 |

    74 | 75 | 76 |

    77 |

    78 | 82 |

    83 |

    84 | 85 |

    86 |

    87 |
    88 |
    89 | 90 | 95 | 96 | 97 | 98 | 99 | 100 | /> 101 |
    102 |
    103 |
    104 |
    105 | 106 | -------------------------------------------------------------------------------- /src/plugins/content/jtf/libraries/jtf/Form/Form.php: -------------------------------------------------------------------------------- 1 | 7 | * @copyright (c) 2017 JoomTools.de - All rights reserved. 8 | * @license GNU General Public License version 3 or later 9 | */ 10 | 11 | namespace Jtf\Form; 12 | 13 | defined('JPATH_PLATFORM') or die; 14 | 15 | use Joomla\Registry\Registry; 16 | 17 | // Add form fields 18 | \JFormHelper::addFieldPath(JPATH_PLUGINS . '/content/jtf/libraries/joomla/form/fields'); 19 | 20 | // Add form rules 21 | \JFormHelper::addRulePath(JPATH_PLUGINS . '/content/jtf/libraries/joomla/form/rules'); 22 | \JLoader::registerNamespace('Joomla\\CMS\\Form\\Rule', JPATH_PLUGINS . '/content/jtf/libraries/joomla/form/rules', false, false, 'psr4'); 23 | 24 | \JLoader::import('joomla.filesystem.path'); 25 | 26 | /** 27 | * Form Class for the Joomla Platform. 28 | * 29 | * This class implements a robust API for constructing, populating, filtering, and validating forms. 30 | * It uses XML definitions to construct form fields and a variety of field and rule classes to 31 | * render and validate the form. 32 | * 33 | * @link http://www.w3.org/TR/html4/interact/forms.html 34 | * @link http://www.w3.org/TR/html5/forms.html 35 | * @since 11.1 36 | */ 37 | class Form extends \Joomla\CMS\Form\Form 38 | { 39 | /** 40 | * Array of layoutPaths. 41 | * 42 | * @var array 43 | * @since 11.1 44 | */ 45 | public $layoutPaths = array(); 46 | 47 | 48 | /** 49 | * Method to instantiate the form object. 50 | * 51 | * @param string $name The name of the form. 52 | * @param array $options An array of form options. 53 | * 54 | * @since 11.1 55 | */ 56 | public function __construct($name, array $options = array()) 57 | { 58 | parent::__construct($name, $options); 59 | } 60 | 61 | /** 62 | * Method to validate form data. 63 | * 64 | * Validation warnings will be pushed into JForm::errors and should be 65 | * retrieved with JForm::getErrors() when validate returns boolean false. 66 | * 67 | * @param array $data An array of field values to validate. 68 | * @param string $group The optional dot-separated form group path on which to filter the 69 | * fields to be validated. 70 | * 71 | * @return boolean True on success. 72 | * 73 | * @since 11.1 74 | */ 75 | public function validate($data, $group = null) 76 | { 77 | // Make sure there is a valid JForm XML document. 78 | if (!($this->xml instanceof \SimpleXMLElement)) 79 | { 80 | return false; 81 | } 82 | 83 | $return = true; 84 | 85 | // Create an input registry object from the data to validate. 86 | $input = new Registry($data); 87 | 88 | // Get the fields for which to validate the data. 89 | $fields = $this->findFieldsByGroup($group); 90 | 91 | if (!$fields) 92 | { 93 | // PANIC! 94 | return false; 95 | } 96 | 97 | // Validate the fields. 98 | foreach ($fields as $field) 99 | { 100 | $value = null; 101 | $name = (string) $field['name']; 102 | 103 | if (!$input->exists($name)) 104 | { 105 | continue; 106 | } 107 | 108 | // Get the group names as strings for ancestor fields elements. 109 | $attrs = $field->xpath('ancestor::fields[@name]/@name'); 110 | $groups = array_map('strval', $attrs ? $attrs : array()); 111 | $group = implode('.', $groups); 112 | 113 | // Get the value from the input data. 114 | if ($group) 115 | { 116 | $value = $input->get($group . '.' . $name); 117 | } 118 | else 119 | { 120 | $value = $input->get($name); 121 | } 122 | 123 | // Validate the field. 124 | $valid = $this->validateField($field, $group, $value, $input); 125 | 126 | // Check for an error. 127 | if ($valid instanceof \Exception) 128 | { 129 | $this->errors[] = $valid; 130 | $return = false; 131 | } 132 | } 133 | 134 | return $return; 135 | } 136 | 137 | /** 138 | * Set the value of an attribute of the form itself 139 | * 140 | * @param string $name Name of the attribute to get 141 | * @param string $value Value to set for the attribute 142 | * 143 | * @return void 144 | * 145 | * @since 3.7 146 | */ 147 | public function setAttribute($name, $value = null) 148 | { 149 | if ($this->xml instanceof \SimpleXMLElement) 150 | { 151 | $attributes = $this->xml->attributes(); 152 | 153 | if (!empty($value)) 154 | { 155 | // Ensure that the attribute exists 156 | if (empty($attributes[$name])) 157 | { 158 | $this->xml->addAttribute($name, trim($value)); 159 | } 160 | else 161 | { 162 | $attributes[$name] = trim($value); 163 | } 164 | } 165 | } 166 | 167 | $this->syncPaths(); 168 | } 169 | 170 | /** 171 | * Return all errors, if any. 172 | * 173 | * @return array Array of error messages or RuntimeException objects. 174 | * 175 | * @since 11.1 176 | */ 177 | public function getErrors() 178 | { 179 | return $this->errors; 180 | } 181 | 182 | /** 183 | * Reset submitted Values 184 | * 185 | * @return void 186 | * 187 | * @since JTF 3.0.0 188 | */ 189 | public function resetData() 190 | { 191 | $this->data = new Registry; 192 | } 193 | } 194 | --------------------------------------------------------------------------------