Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AdminLTE renderer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IML Open Source
AdminLTE renderer
Commits
7df9cd6d
Commit
7df9cd6d
authored
1 year ago
by
Hahn Axel (hahn)
Browse files
Options
Downloads
Patches
Plain Diff
handle checkboxes, radios, hidden
parent
27bf6226
Branches
Branches containing commit
No related tags found
1 merge request
!9
Add textarea
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
public_html/classes/render-adminlte.class.php
+62
-10
62 additions, 10 deletions
public_html/classes/render-adminlte.class.php
with
62 additions
and
10 deletions
public_html/classes/render-adminlte.class.php
+
62
−
10
View file @
7df9cd6d
...
...
@@ -404,13 +404,13 @@ class renderadminlte {
'input'
=>
[
'label'
=>
'Form: input'
,
'description'
=>
'Input form fiels'
,
'method'
=>
'getInput'
,
'method'
=>
'get
Form
Input'
,
'params'
=>
[
'label'
=>
[
'group'
=>
'styling'
,
'description'
=>
'label for the input field'
,
'example_value'
=>
'Enter
your firstname
'
'example_value'
=>
'Enter
something
'
],
'type'
=>
[
'select'
=>
[
'description'
=>
'type or input field'
,
...
...
@@ -455,12 +455,12 @@ class renderadminlte {
'prepend'
=>
[
'group'
=>
'styling'
,
'description'
=>
'optional: content on input start'
,
'example_value'
=>
'
+
'
'example_value'
=>
''
],
'append'
=>
[
'group'
=>
'styling'
,
'description'
=>
'optional: content on input end'
,
'example_value'
=>
'
:-)
'
'example_value'
=>
''
],
'name'
=>
[
'group'
=>
'content'
,
...
...
@@ -474,6 +474,44 @@ class renderadminlte {
],
]
],
// ------------------------------------------------------------
'textarea'
=>
[
'label'
=>
'Form: textarea'
,
'description'
=>
'textarea or html editor'
,
'method'
=>
'getFormTextarea'
,
'params'
=>
[
'label'
=>
[
'group'
=>
'styling'
,
'description'
=>
'label for the input field'
,
'example_value'
=>
'Enter text'
],
'type'
=>
[
'select'
=>
[
'description'
=>
'type or input field'
,
'group'
=>
'styling'
,
'values'
=>
[
''
=>
'text'
,
'html'
=>
'html editor'
,
]
],
],
'class'
=>
[
'group'
=>
'styling'
,
'description'
=>
'optional: css classes'
,
'example_value'
=>
'myclass'
],
'name'
=>
[
'group'
=>
'content'
,
'description'
=>
'name attribute'
,
'example_value'
=>
'textdata'
],
'value'
=>
[
'group'
=>
'content'
,
'description'
=>
'Value'
,
'example_value'
=>
'Here is some text...'
],
]
],
];
}
/**
...
...
@@ -1246,11 +1284,25 @@ class renderadminlte {
}
}
return
$this
->
getHorizontalFormElement
(
$sPrepend
.
$this
->
_tag
(
'input'
,
$aElement
,
''
,
false
)
.
$sAppend
,
$sLabel
,
$sFormid
);
// return data
switch
(
$aElement
[
'type'
]){
case
'checkbox'
:
case
'radio'
:
$aElement
[
'class'
]
=
str_replace
(
'form-control '
,
'form-check-input'
,
$aElement
[
'class'
]);
return
$this
->
_tag
(
'div'
,
[
'class'
=>
'form-check'
],
$this
->
_tag
(
'input'
,
$aElement
,
''
,
false
)
.
$this
->
_tag
(
'label'
,
[
'for'
=>
$sFormid
,
'label'
=>
$sLabel
],
''
)
);
break
;
case
'hidden'
:
return
$this
->
_tag
(
'input'
,
$aElement
,
''
,
false
);
break
;
default
:
return
$this
->
getHorizontalFormElement
(
$sPrepend
.
$this
->
_tag
(
'input'
,
$aElement
,
''
,
false
)
.
$sAppend
,
$sLabel
,
$sFormid
);
}
}
/**
...
...
@@ -1258,7 +1310,7 @@ class renderadminlte {
* @param type $aOptions hash with keys for all options
* styling:
* - type - field type: [none]|html
* content
* content
* - label - label tag
* - name - name attribute for sending form
* - value - value in
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment