Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsRepositoryRepositoryUpload file is really necessary ???Upload file is really necessary ???
Previous
 
Next
New Post
1/11/2007 2:02 PM
 

I am not a professional coder. But if you make the following changes in Form.ascx.vb/Private Sub CreateInputForm() and recompile, this seems to work...makes the file upload optional when using the Filelist Template. Should work for other templates but not tested...

Case "FILE"
Dim objFile As New HtmlControls.HtmlInputFile
objFile.ID = "__File"
PlaceHolder.Controls.Add(objFile)
' we're uploading a file for the first time ( ItemID=-1 ) then we need to insert
' a required field validator. If we're editing, we don't because leaving the field blank
' will leave the current file in place
If objRepository.ItemId = -1 Then
Dim controlType As String = oRepositoryBusinessController.GetSkinAttribute(xmlDoc, "FILE", "Required", "true")
Select Case UCase(controlType)
Case "TRUE"
Dim oValidator As New RequiredFieldValidator
oValidator.ControlToValidate = "__File"
oValidator.CssClass = "normalred"
oValidator.ErrorMessage = Localization.GetString("ValidateFile", oRepositoryBusinessController.LocalResourceFile)
oValidator.ID = "__ValFileID"
oValidator.Display = ValidatorDisplay.Static
PlaceHolder.Controls.Add(oValidator)
Case "FALSE"
'Do nothing
End Select
''If oRepositoryBusinessController.GetSkinAttribute(xmlDoc, "FILE", "Required", "true") = "true" Then
''Dim oValidator As New RequiredFieldValidator
''oValidator.ControlToValidate = "__File"
''oValidator.CssClass = "normalred"
''oValidator.ErrorMessage = Localization.GetString("ValidateFile", oRepositoryBusinessController.LocalResourceFile)
''oValidator.ID = "__ValFileID"
''oValidator.Display = ValidatorDisplay.Static
''PlaceHolder.Controls.Add(oValidator)
''End If
Else
If objRepository.FileName <> "" Then
PlaceHolder.Controls.Add(New LiteralControl("
"))
Dim objLabel As New Label
objLabel.Text = oRepositoryBusinessController.ExtractFileName(objRepository.FileName)
objLabel.CssClass = oRepositoryBusinessController.GetSkinAttribute(xmlDoc, "FILE", "CssClass", "normal")
PlaceHolder.Controls.Add(objLabel)
End If
End If

 
New Post
1/11/2007 3:12 PM
 
Technically you don't have to make any code changes. A recompile of the project will fix it.
 
New Post
1/11/2007 3:26 PM
 
Hadn't tried that...
 
New Post
1/11/2007 4:23 PM
 

Mike is correct. I just checked the .zip files ( both the install and source ) for the Repository module 3.1.10 that is prepackaged with DNN 4.4.0 and is available on the project download page. 

- the Install package does NOT have the latest DotNetNuke.Module.Repository.dll

- the Source package DOES have the latest code

Right before DNN 4.0.0 was packaged, we ( the project teams ) were given a deadline for final changes and it looks like I must have cut it too close :).

So, this also explains why I was having such a hard time figuring out a fix to this issue because the fix was already there!.

REMINDER! You need Visual Studio 2003 to recompile the module, you can NOT load the source code version into a Visual Studio 2005 project. If you are unable to recompile the module, send me a private email and I will provide you an updated 3.1.10 dll.

I apologize for the confusion and the lengthy amount of time it has taken to figure out this particular issue. Thanks for your patience.

 
New Post
1/11/2007 4:27 PM
 

btw, it looks like the only fixes that did not make it into the Install package are the following..

1. added ability to enable/disable RequiredFieldValidator for [FILE] tag in forms
2. added ability to specify default text for [SUMMARY] and [DESCRIPTION] tags in forms

so, unless you are specifically having issues with those 2 issues, the .dll in the Install package should be fine. However, if you're reading this thread you most likely will need to either recompile the project in VS2003 or contact me for an updated .dll

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsRepositoryRepositoryUpload file is really necessary ???Upload file is really necessary ???


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out