Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
taskonsite-архив-перенесен
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Packages
Packages
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dmitry Korolev
taskonsite-архив-перенесен
Commits
feb22f88
Commit
feb22f88
authored
Oct 25, 2016
by
Олег Гиммельшпах
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#1442: Ошибка скачки файла
parent
565f35ab
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
common/modules/bids/models/BidFile.php
common/modules/bids/models/BidFile.php
+1
-1
frontend/web/js/upload-files.js
frontend/web/js/upload-files.js
+2
-1
No files found.
common/modules/bids/models/BidFile.php
View file @
feb22f88
...
...
@@ -53,7 +53,7 @@ class BidFile extends \common\components\ActiveRecordModel
[[
'bid_id'
],
'required'
],
[[
'bid_id'
],
'integer'
],
[[
'filename'
],
'string'
,
'max'
=>
100
],
[[
'file'
],
'file'
,
'skipOnEmpty'
=>
true
,
'extensions'
=>
'
png, jpg, jpeg, gif, xls, xlsx, doc, docx, pdf
'
,
'maxFiles'
=>
4
],
[[
'file'
],
'file'
,
'skipOnEmpty'
=>
true
,
'extensions'
=>
'
xls, doc, docx, xlsx, png, jpeg, gif, bmp, jpg, zip, rar, tar, pptx, ppt
'
,
'maxFiles'
=>
4
],
[[
'bid_id'
],
'exist'
,
'skipOnError'
=>
true
,
'targetClass'
=>
Bid
::
className
(),
'targetAttribute'
=>
[
'bid_id'
=>
'id'
]],
];
}
...
...
frontend/web/js/upload-files.js
View file @
feb22f88
...
...
@@ -8,8 +8,9 @@ $(document).ready(function() {
url
:
"
/bids/bid/upload-files
"
,
maxFiles
:
4
,
addRemoveLinks
:
true
,
acceptedFiles
:
'
.xls,.doc,.docx,.xlsx,.png,.jpeg,.gif,.bmp,
jpg,.zip,.rar,.tar
'
,
acceptedFiles
:
'
.xls,.doc,.docx,.xlsx,.png,.jpeg,.gif,.bmp,
.jpg,.zip,.rar,.tar,.pptx,.ppt
'
,
dictRemoveFile
:
'
Удалить
'
,
dictInvalidFileType
:
'
Приложенный файл не может быть загружен в целях безопасности. Пожалуйста, приложите файл в другом формате (Word, Pdf, PowerPoint, Excel).
'
,
success
:
function
(
first
,
response
)
{
$
(
'
#files-zone
'
).
append
(
'
<input type="hidden" name="Bid[file][]" value="
'
+
response
.
filename
+
'
" />
'
);
...
...
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