Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
syncEnrollments
Project
Project
Details
Activity
Releases
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
Yeray Santana Hualde
syncEnrollments
Commits
23e86c70
Commit
23e86c70
authored
Aug 08, 2011
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor the form class comments.
parent
f6aecf70
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
form.php
system/form.php
+2
-4
No files found.
system/form.php
View file @
23e86c70
...
...
@@ -22,8 +22,8 @@ class Form {
{
$attributes
[
'action'
]
=
HTML
::
entities
(
URL
::
to
(((
is_null
(
$action
))
?
Request
::
uri
()
:
$action
),
$https
));
//
If the request method is PUT or DELETE, we'll default the request method to POST
//
since the request method is being spoofed by the form
.
//
PUT and DELETE methods are spoofed using a hidden field containing the request method.
//
Since, HTML does not support PUT and DELETE on forms, we will use POST
.
$attributes
[
'method'
]
=
(
$method
==
'PUT'
or
$method
==
'DELETE'
)
?
'POST'
:
$method
;
if
(
!
array_key_exists
(
'accept-charset'
,
$attributes
))
...
...
@@ -33,8 +33,6 @@ class Form {
$html
=
'<form'
.
HTML
::
attributes
(
$attributes
)
.
'>'
;
// If the request method is PUT or DELETE, create a hidden input element with the
// request method in it since HTML forms do not support these two methods.
if
(
$method
==
'PUT'
or
$method
==
'DELETE'
)
{
$html
.=
PHP_EOL
.
static
::
input
(
'hidden'
,
'REQUEST_METHOD'
,
$method
);
...
...
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