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
e9de47fd
Commit
e9de47fd
authored
May 14, 2015
by
Scott
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow hidden form fields to have extra attributes
parent
fc634ce0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
7 deletions
+28
-7
account.php
qa-include/pages/account.php
+16
-4
qa-theme-base.php
qa-include/qa-theme-base.php
+12
-3
No files found.
qa-include/pages/account.php
View file @
e9de47fd
...
...
@@ -280,8 +280,14 @@
),
'hidden'
=>
array
(
'dosaveprofile'
=>
'1'
,
'code'
=>
qa_get_form_security_code
(
'account'
),
'dosaveprofile'
=>
array
(
'tags'
=>
'name="dosaveprofile"'
,
'value'
=>
'1'
,
),
'code'
=>
array
(
'tags'
=>
'name="code"'
,
'value'
=>
qa_get_form_security_code
(
'account'
),
),
),
);
...
...
@@ -421,8 +427,14 @@
),
'hidden'
=>
array
(
'dochangepassword'
=>
'1'
,
'code'
=>
qa_get_form_security_code
(
'password'
),
'dochangepassword'
=>
array
(
'tags'
=>
'name="dochangepassword"'
,
'value'
=>
'1'
,
),
'code'
=>
array
(
'tags'
=>
'name="code"'
,
'value'
=>
qa_get_form_security_code
(
'password'
),
),
),
);
...
...
qa-include/qa-theme-base.php
View file @
e9de47fd
...
...
@@ -1197,9 +1197,18 @@ class qa_html_theme_base
public
function
form_hidden_elements
(
$hidden
)
{
if
(
!
empty
(
$hidden
))
{
foreach
(
$hidden
as
$name
=>
$value
)
$this
->
output
(
'<input type="hidden" name="'
.
$name
.
'" value="'
.
$value
.
'"/>'
);
if
(
empty
(
$hidden
))
return
;
foreach
(
$hidden
as
$name
=>
$value
)
{
if
(
is_array
(
$value
))
{
// new method of outputting tags
$this
->
output
(
'<input '
.@
$value
[
'tags'
]
.
' type="hidden" value="'
.@
$value
[
'value'
]
.
'"/>'
);
}
else
{
// old method
$this
->
output
(
'<input name="'
.
$name
.
'" type="hidden" value="'
.
$value
.
'"/>'
);
}
}
}
...
...
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