Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Q
question2answer
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
outils
question2answer
Commits
dcd8b3d8
Commit
dcd8b3d8
authored
Oct 28, 2014
by
Scott
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simpler comment on form_select
parent
6cc7ae37
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
9 deletions
+6
-9
qa-theme-base.php
qa-include/qa-theme-base.php
+6
-9
No files found.
qa-include/qa-theme-base.php
View file @
dcd8b3d8
...
...
@@ -1230,17 +1230,14 @@
$this
->
output
(
'<input '
.@
$field
[
'tags'
]
.
' type="text" value="'
.@
$field
[
'value'
]
.
'" class="qa-form-'
.
$style
.
'-number"/>'
);
}
public
function
form_select
(
$field
,
$style
)
/**
* Parameters received:
* * tags: Optional. Tags or attributes added after the "<select" html tag
* * options: Required. A key-value array containing all the options in the select. This parameter can be an empty array
* which would result in an empty HTML select
* * value: Optional. The selected value from the 'options' parameter
* * match_by: Optional. Possible values are 'key' or 'value'. Defaults to 'value'. Determines if the value set in the 'value'
* parameter is compared to the key or to the value from the 'options' parameter. This parameter has no effect if the 'value'
* parameter is not set
* Output a <select> element. The $field array may contain the following keys:
* options: (required) a key-value array containing all the options in the select.
* tags: any attributes to be added to the select.
* value: the selected value from the 'options' parameter.
* match_by: whether to match the 'value' (default) or 'key' of each option to determine if it is to be selected.
*/
public
function
form_select
(
$field
,
$style
)
{
$this
->
output
(
'<select '
.
(
isset
(
$field
[
'tags'
])
?
$field
[
'tags'
]
:
''
)
.
' class="qa-form-'
.
$style
.
'-select">'
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment