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
567da241
Commit
567da241
authored
Jun 26, 2011
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added Form::open_multipart and tweaked Upload_of rule.
parent
dc01b3c2
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
1 deletion
+15
-1
form.php
system/form.php
+14
-1
upload_of.php
system/validation/rules/upload_of.php
+1
-0
No files found.
system/form.php
View file @
567da241
...
@@ -50,6 +50,20 @@ class Form {
...
@@ -50,6 +50,20 @@ class Form {
return
$html
.
PHP_EOL
;
return
$html
.
PHP_EOL
;
}
}
/**
* Open a HTML form that accepts file uploads.
*
* @param string $action
* @param string $method
* @param array $attributes
* @return string
*/
public
static
function
open_multipart
(
$action
=
null
,
$method
=
'POST'
,
$attributes
=
array
())
{
$attributes
[
'enctype'
]
=
'multipart/form-data'
;
return
static
::
open
(
$action
,
$method
,
$attributes
);
}
/**
/**
* Close a HTML form.
* Close a HTML form.
*
*
...
@@ -100,7 +114,6 @@ class Form {
...
@@ -100,7 +114,6 @@ class Form {
public
static
function
label
(
$name
,
$value
,
$attributes
=
array
())
public
static
function
label
(
$name
,
$value
,
$attributes
=
array
())
{
{
static
::
$labels
[]
=
$name
;
static
::
$labels
[]
=
$name
;
return
'<label for="'
.
$name
.
'"'
.
HTML
::
attributes
(
$attributes
)
.
'>'
.
HTML
::
entities
(
$value
)
.
'</label>'
.
PHP_EOL
;
return
'<label for="'
.
$name
.
'"'
.
HTML
::
attributes
(
$attributes
)
.
'>'
.
HTML
::
entities
(
$value
)
.
'</label>'
.
PHP_EOL
;
}
}
...
...
system/validation/rules/upload_of.php
View file @
567da241
<?php
namespace
System\Validation\Rules
;
<?php
namespace
System\Validation\Rules
;
use
System\File
;
use
System\Input
;
use
System\Input
;
use
System\Validation\Rule
;
use
System\Validation\Rule
;
...
...
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