mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Merge branch 'master' into 1.9.x
This commit is contained in:
@@ -30,5 +30,5 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly: AssemblyVersion("1.9.0")]
|
||||
[assembly: AssemblyFileVersion("1.9.0")]
|
||||
[assembly: AssemblyVersion("1.9.1")]
|
||||
[assembly: AssemblyFileVersion("1.9.1")]
|
||||
|
@@ -30,5 +30,5 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly: AssemblyVersion("1.9.0")]
|
||||
[assembly: AssemblyFileVersion("1.9.0")]
|
||||
[assembly: AssemblyVersion("1.9.1")]
|
||||
[assembly: AssemblyFileVersion("1.9.1")]
|
||||
|
@@ -30,5 +30,5 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly: AssemblyVersion("1.9.0")]
|
||||
[assembly: AssemblyFileVersion("1.9.0")]
|
||||
[assembly: AssemblyVersion("1.9.1")]
|
||||
[assembly: AssemblyFileVersion("1.9.1")]
|
||||
|
@@ -30,5 +30,5 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly: AssemblyVersion("1.9.0")]
|
||||
[assembly: AssemblyFileVersion("1.9.0")]
|
||||
[assembly: AssemblyVersion("1.9.1")]
|
||||
[assembly: AssemblyFileVersion("1.9.1")]
|
||||
|
@@ -33,5 +33,5 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly: AssemblyVersion("1.9.0")]
|
||||
[assembly: AssemblyFileVersion("1.9.0")]
|
||||
[assembly: AssemblyVersion("1.9.1")]
|
||||
[assembly: AssemblyFileVersion("1.9.1")]
|
||||
|
@@ -32,8 +32,8 @@ using System.Security;
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly: AssemblyVersion("1.9.0")]
|
||||
[assembly: AssemblyFileVersion("1.9.0")]
|
||||
[assembly: AssemblyVersion("1.9.1")]
|
||||
[assembly: AssemblyFileVersion("1.9.1")]
|
||||
|
||||
// Enable web application to call this assembly in Full Trust
|
||||
[assembly: AllowPartiallyTrustedCallers]
|
||||
|
@@ -33,5 +33,5 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly: AssemblyVersion("1.9.0")]
|
||||
[assembly: AssemblyFileVersion("1.9.0")]
|
||||
[assembly: AssemblyVersion("1.9.1")]
|
||||
[assembly: AssemblyFileVersion("1.9.1")]
|
||||
|
@@ -2,7 +2,7 @@
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.9.0
|
||||
Version: 1.9.1
|
||||
OrchardVersion: 1.9
|
||||
Description: The common module introduces content parts that are going to be used by most content types (common, body, identity).
|
||||
FeatureDescription: Core content parts.
|
||||
|
@@ -2,7 +2,7 @@
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.9.0
|
||||
Version: 1.9.1
|
||||
OrchardVersion: 1.9
|
||||
Description: The containers module introduces container and containable behaviors for content items.
|
||||
FeatureDescription: Container and containable parts to enable parent-child relationships between content items.
|
||||
|
@@ -2,7 +2,7 @@
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.9.0
|
||||
Version: 1.9.1
|
||||
OrchardVersion: 1.9
|
||||
Description: The contents module enables the creation of custom content types.
|
||||
Features:
|
||||
|
@@ -2,7 +2,7 @@
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.9.0
|
||||
Version: 1.9.1
|
||||
OrchardVersion: 1.9
|
||||
Description: The dashboard module is providing the dashboard screen of the admininstration UI of the application.
|
||||
FeatureDescription: Standard admin dashboard.
|
||||
|
@@ -2,7 +2,7 @@
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.9.0
|
||||
Version: 1.9.1
|
||||
OrchardVersion: 1.9
|
||||
Description: The Feeds module is providing RSS feeds to content items.
|
||||
FeatureDescription: RSS feeds for content items.
|
||||
|
@@ -2,7 +2,7 @@
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.9.0
|
||||
Version: 1.9.1
|
||||
OrchardVersion: 1.9
|
||||
Description: The navigation module creates and manages a simple navigation menu for the front-end of the application and allows you to add content items to the admin menu.
|
||||
FeatureDescription: Menu management.
|
||||
|
@@ -30,6 +30,6 @@ using System.Security;
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("1.9.0")]
|
||||
[assembly: AssemblyFileVersion("1.9.0")]
|
||||
[assembly: AssemblyVersion("1.9.1")]
|
||||
[assembly: AssemblyFileVersion("1.9.1")]
|
||||
|
||||
|
@@ -2,7 +2,7 @@
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.9.0
|
||||
Version: 1.9.1
|
||||
OrchardVersion: 1.9
|
||||
Description: The dashboard module is providing the reports screen of the application.
|
||||
FeatureDescription: Reports management.
|
||||
|
@@ -2,7 +2,7 @@
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.9.0
|
||||
Version: 1.9.1
|
||||
OrchardVersion: 1.9
|
||||
Description: The scheduling module enables background task scheduling.
|
||||
FeatureDescription: Scheduled background tasks.
|
||||
|
@@ -2,7 +2,7 @@
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.9.0
|
||||
Version: 1.9.1
|
||||
OrchardVersion: 1.9
|
||||
Description: The settings module creates site settings that other modules can contribute to.
|
||||
FeatureDescription: Site settings.
|
||||
|
@@ -2,7 +2,7 @@
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.9.0
|
||||
Version: 1.9.1
|
||||
OrchardVersion: 1.9
|
||||
Description: The shapes module contains core shape templates and display hooks.
|
||||
FeatureDescription: Core shape templates and display hooks.
|
||||
|
@@ -2,7 +2,7 @@
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.9.0
|
||||
Version: 1.9.1
|
||||
OrchardVersion: 1.9
|
||||
Description: The title module enables content items to have titles.
|
||||
FeatureDescription: Title content part.
|
||||
|
@@ -2,7 +2,7 @@
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.9.0
|
||||
Version: 1.9.1
|
||||
OrchardVersion: 1.9
|
||||
Description: The XmlRpc module enables creation of contents from client applications such as LiveWriter.
|
||||
FeatureDescription: XML-RPC opt-in implementation.
|
||||
|
@@ -2,7 +2,7 @@
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.9.0
|
||||
Version: 1.9.1
|
||||
OrchardVersion: 1.9
|
||||
Description: The Lucene module enables the site to be indexed using Lucene.NET. The index generated by this module can then be used by the search module to provide an integrated full-text search experience to a web site.
|
||||
FeatureDescription: Lucene indexing services.
|
||||
|
@@ -30,6 +30,6 @@ using System.Security;
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("1.9.0")]
|
||||
[assembly: AssemblyFileVersion("1.9.0")]
|
||||
[assembly: AssemblyVersion("1.9.1")]
|
||||
[assembly: AssemblyFileVersion("1.9.1")]
|
||||
|
||||
|
@@ -2,7 +2,7 @@
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.9.0
|
||||
Version: 1.9.1
|
||||
OrchardVersion: 1.9
|
||||
Description: The Markdown module enables rich text contents to be created using the Markdown syntax.
|
||||
FeatureDescription: Markdown editor.
|
||||
|
@@ -26,6 +26,6 @@ using System.Runtime.InteropServices;
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("1.9.0")]
|
||||
[assembly: AssemblyFileVersion("1.9.0")]
|
||||
[assembly: AssemblyVersion("1.9.1")]
|
||||
[assembly: AssemblyFileVersion("1.9.1")]
|
||||
|
||||
|
@@ -2,7 +2,7 @@ Name: Alias
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.9.0
|
||||
Version: 1.9.1
|
||||
OrchardVersion: 1.9
|
||||
Description: Maps friendly urls to specific module actions.
|
||||
FeatureDescription: Maps friendly urls to specific module actions.
|
||||
|
@@ -30,6 +30,6 @@ using System.Security;
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("1.9.0")]
|
||||
[assembly: AssemblyFileVersion("1.9.0")]
|
||||
[assembly: AssemblyVersion("1.9.1")]
|
||||
[assembly: AssemblyFileVersion("1.9.1")]
|
||||
|
||||
|
@@ -2,7 +2,7 @@ Name: AntiSpam
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.9.0
|
||||
Version: 1.9.1
|
||||
OrchardVersion: 1.9
|
||||
Description: Provides anti-spam services to protect your content from malicious submissions.
|
||||
Features:
|
||||
|
@@ -29,6 +29,6 @@ using System.Runtime.InteropServices;
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("1.9.0")]
|
||||
[assembly: AssemblyFileVersion("1.9.0")]
|
||||
[assembly: AssemblyVersion("1.9.1")]
|
||||
[assembly: AssemblyFileVersion("1.9.1")]
|
||||
|
||||
|
@@ -3,7 +3,7 @@ Path: ArchiveLater
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.9.0
|
||||
Version: 1.9.1
|
||||
OrchardVersion: 1.9
|
||||
Description: The ArchiveLater module introduces scheduled archiving functionality.
|
||||
FeatureDescription: Scheduled archiving.
|
||||
|
@@ -30,6 +30,6 @@ using System.Security;
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("1.9.0")]
|
||||
[assembly: AssemblyFileVersion("1.9.0")]
|
||||
[assembly: AssemblyVersion("1.9.1")]
|
||||
[assembly: AssemblyFileVersion("1.9.1")]
|
||||
|
||||
|
@@ -2,7 +2,7 @@
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.9.0
|
||||
Version: 1.9.1
|
||||
OrchardVersion: 1.9
|
||||
Description: Provides a log for recording and viewing back-end changes.
|
||||
Features:
|
||||
|
@@ -2,7 +2,7 @@ Name: Autoroute
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.9.0
|
||||
Version: 1.9.1
|
||||
OrchardVersion: 1.9
|
||||
Description: Description for the module
|
||||
Features:
|
||||
|
@@ -30,6 +30,6 @@ using System.Security;
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("1.9.0")]
|
||||
[assembly: AssemblyFileVersion("1.9.0")]
|
||||
[assembly: AssemblyVersion("1.9.1")]
|
||||
[assembly: AssemblyFileVersion("1.9.1")]
|
||||
|
||||
|
@@ -2,7 +2,7 @@
|
||||
AntiForgery: enabled
|
||||
Author: Microsoft Open Technologies, Inc
|
||||
Website: http://msopentech.com
|
||||
Version: 1.9.0
|
||||
Version: 1.9.1
|
||||
OrchardVersion: 1.9
|
||||
Description: Provides integration of Microsoft Azure Media Services functionality into Orchard.
|
||||
Features:
|
||||
|
@@ -32,6 +32,6 @@ using System.Security;
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("1.9.0")]
|
||||
[assembly: AssemblyFileVersion("1.9.0")]
|
||||
[assembly: AssemblyVersion("1.9.1")]
|
||||
[assembly: AssemblyFileVersion("1.9.1")]
|
||||
|
||||
|
@@ -2,7 +2,7 @@
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.9.0
|
||||
Version: 1.9.1
|
||||
OrchardVersion: 1.9
|
||||
Description: Provides a set of Orchard service implementations targeting Microsoft Azure services.
|
||||
Category: Hosting
|
||||
|
@@ -31,6 +31,6 @@ using System.Security;
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("1.9.0")]
|
||||
[assembly: AssemblyFileVersion("1.9.0")]
|
||||
[assembly: AssemblyVersion("1.9.1")]
|
||||
[assembly: AssemblyFileVersion("1.9.1")]
|
||||
|
||||
|
@@ -2,7 +2,7 @@
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.9.0
|
||||
Version: 1.9.1
|
||||
OrchardVersion: 1.9
|
||||
Description: The Orchard Blogs module is implementing basic blogging features.
|
||||
FeatureDescription: A simple web log.
|
||||
|
@@ -29,6 +29,6 @@ using System.Runtime.InteropServices;
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("1.9.0")]
|
||||
[assembly: AssemblyFileVersion("1.9.0")]
|
||||
[assembly: AssemblyVersion("1.9.1")]
|
||||
[assembly: AssemblyFileVersion("1.9.1")]
|
||||
|
||||
|
@@ -2,7 +2,7 @@
|
||||
AntiForgery: enabled
|
||||
Author: Sébastien Ros
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.9.0
|
||||
Version: 1.9.1
|
||||
OrchardVersion: 1.9
|
||||
Description: Provides an API to cache business data.
|
||||
Features:
|
||||
|
@@ -31,6 +31,6 @@ using System.Security;
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("1.9.0")]
|
||||
[assembly: AssemblyFileVersion("1.9.0")]
|
||||
[assembly: AssemblyVersion("1.9.1")]
|
||||
[assembly: AssemblyFileVersion("1.9.1")]
|
||||
|
||||
|
@@ -2,7 +2,7 @@
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.9.0
|
||||
Version: 1.9.1
|
||||
OrchardVersion: 1.9
|
||||
Description: Tools to create Orchard components.
|
||||
FeatureDescription: Tools to create Orchard components.
|
||||
|
@@ -30,6 +30,6 @@ using System.Security;
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("1.9.0")]
|
||||
[assembly: AssemblyFileVersion("1.9.0")]
|
||||
[assembly: AssemblyVersion("1.9.1")]
|
||||
[assembly: AssemblyFileVersion("1.9.1")]
|
||||
|
||||
|
@@ -2,7 +2,7 @@
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.9.0
|
||||
Version: 1.9.1
|
||||
OrchardVersion: 1.9
|
||||
Description: The comments system implemented by this module can be applied to arbitrary Orchard content types, such as blogs and pages. It includes comment validation and spam protection through the Akismet service.
|
||||
Features:
|
||||
|
@@ -30,5 +30,5 @@ using System.Security;
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("1.9.0")]
|
||||
[assembly: AssemblyFileVersion("1.9.0")]
|
||||
[assembly: AssemblyVersion("1.9.1")]
|
||||
[assembly: AssemblyFileVersion("1.9.1")]
|
||||
|
@@ -2,7 +2,7 @@ Name: Orchard.ContentPermissions
|
||||
AntiForgery: enabled
|
||||
Author: Chris Pyle, S<>bastien Ros
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.9.0
|
||||
Version: 1.9.1
|
||||
OrchardVersion: 1.9
|
||||
Description: Allows item-level front end view permissions.
|
||||
Features:
|
||||
|
@@ -31,5 +31,5 @@ using System.Security;
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("1.9.0")]
|
||||
[assembly: AssemblyFileVersion("1.9.0")]
|
||||
[assembly: AssemblyVersion("1.9.1")]
|
||||
[assembly: AssemblyFileVersion("1.9.1")]
|
||||
|
@@ -2,7 +2,7 @@ Name: Orchard.ContentPicker
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardcontentpicker.codeplex.com
|
||||
Version: 1.9.0
|
||||
Version: 1.9.1
|
||||
OrchardVersion: 1.9
|
||||
Description: UI for selecting Content Items.
|
||||
Features:
|
||||
|
@@ -31,6 +31,6 @@ using System.Security;
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("1.9.0")]
|
||||
[assembly: AssemblyFileVersion("1.9.0")]
|
||||
[assembly: AssemblyVersion("1.9.1")]
|
||||
[assembly: AssemblyFileVersion("1.9.1")]
|
||||
|
||||
|
@@ -2,7 +2,7 @@
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.9.0
|
||||
Version: 1.9.1
|
||||
OrchardVersion: 1.9
|
||||
Description: ContentTypes modules enables the creation and alteration of content types not based on code.
|
||||
Dependencies: Contents
|
||||
|
@@ -30,6 +30,6 @@ using System.Security;
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("1.9.0")]
|
||||
[assembly: AssemblyFileVersion("1.9.0")]
|
||||
[assembly: AssemblyVersion("1.9.1")]
|
||||
[assembly: AssemblyFileVersion("1.9.1")]
|
||||
|
||||
|
@@ -2,7 +2,7 @@ Name: Custom Forms
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardcustomforms.codeplex.com
|
||||
Version: 1.9.0
|
||||
Version: 1.9.1
|
||||
OrchardVersion: 1.9
|
||||
Description: Create custom forms like contact forms or content contributions.
|
||||
Features:
|
||||
|
@@ -31,5 +31,5 @@ using System.Security;
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("1.9.0")]
|
||||
[assembly: AssemblyFileVersion("1.9.0")]
|
||||
[assembly: AssemblyVersion("1.9.1")]
|
||||
[assembly: AssemblyFileVersion("1.9.1")]
|
||||
|
@@ -2,7 +2,7 @@
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.9.0
|
||||
Version: 1.9.1
|
||||
OrchardVersion: 1.9
|
||||
Description: Contains designer tools to ease the Themes development process
|
||||
FeatureName: Shape Tracing
|
||||
|
@@ -31,5 +31,5 @@ using System.Security;
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("1.9.0")]
|
||||
[assembly: AssemblyFileVersion("1.9.0")]
|
||||
[assembly: AssemblyVersion("1.9.1")]
|
||||
[assembly: AssemblyFileVersion("1.9.1")]
|
||||
|
@@ -6,6 +6,7 @@ using Orchard.DynamicForms.Services;
|
||||
using Orchard.Layouts.Services;
|
||||
using Orchard.Localization;
|
||||
using Orchard.Logging;
|
||||
using Orchard.Tokens;
|
||||
using Orchard.UI.Notify;
|
||||
using IController = Orchard.DynamicForms.Services.IController;
|
||||
|
||||
@@ -14,15 +15,18 @@ namespace Orchard.DynamicForms.Controllers {
|
||||
private readonly INotifier _notifier;
|
||||
private readonly ILayoutManager _layoutManager;
|
||||
private readonly IFormService _formService;
|
||||
private readonly ITokenizer _tokenizer;
|
||||
|
||||
public FormController(
|
||||
INotifier notifier,
|
||||
ILayoutManager layoutManager,
|
||||
IFormService formService) {
|
||||
IFormService formService,
|
||||
ITokenizer tokenizer) {
|
||||
|
||||
_notifier = notifier;
|
||||
_layoutManager = layoutManager;
|
||||
_formService = formService;
|
||||
_tokenizer = tokenizer;
|
||||
T = NullLocalizer.Instance;
|
||||
Logger = NullLogger.Instance;
|
||||
}
|
||||
@@ -34,7 +38,7 @@ namespace Orchard.DynamicForms.Controllers {
|
||||
public ActionResult Submit(int contentId, string formName) {
|
||||
var layoutPart = _layoutManager.GetLayout(contentId);
|
||||
var form = _formService.FindForm(layoutPart, formName);
|
||||
var urlReferrer = Request.UrlReferrer != null ? Request.UrlReferrer.ToString() : "~/";
|
||||
var urlReferrer = Request.UrlReferrer != null && Url.IsLocalUrl(Request.UrlReferrer.ToString()) ? Request.UrlReferrer.ToString() : "~/";
|
||||
|
||||
if (form == null) {
|
||||
Logger.Warning("The specified form \"{0}\" could not be found.", formName);
|
||||
@@ -42,7 +46,7 @@ namespace Orchard.DynamicForms.Controllers {
|
||||
return Redirect(urlReferrer);
|
||||
}
|
||||
|
||||
var values = _formService.SubmitForm(form, ValueProvider, ModelState, this);
|
||||
var values = _formService.SubmitForm(layoutPart, form, ValueProvider, ModelState, this);
|
||||
this.TransferFormSubmission(form, values);
|
||||
|
||||
if (!ModelState.IsValid)
|
||||
@@ -51,7 +55,7 @@ namespace Orchard.DynamicForms.Controllers {
|
||||
if(Response.IsRequestBeingRedirected)
|
||||
return new EmptyResult();
|
||||
|
||||
var redirectUrl = !String.IsNullOrWhiteSpace(form.RedirectUrl) ? form.RedirectUrl : urlReferrer;
|
||||
var redirectUrl = !String.IsNullOrWhiteSpace(form.RedirectUrl) ? _tokenizer.Replace(form.RedirectUrl, new { Content = layoutPart.ContentItem }) : urlReferrer;
|
||||
return Redirect(redirectUrl);
|
||||
}
|
||||
|
||||
|
@@ -1,11 +1,19 @@
|
||||
using System.Collections.Generic;
|
||||
using Orchard.DynamicForms.Elements;
|
||||
using Orchard.Forms.Services;
|
||||
using Orchard.Layouts.Framework.Display;
|
||||
using Orchard.Layouts.Framework.Drivers;
|
||||
using Orchard.Layouts.Helpers;
|
||||
using Orchard.Tokens;
|
||||
using DescribeContext = Orchard.Forms.Services.DescribeContext;
|
||||
|
||||
namespace Orchard.DynamicForms.Drivers {
|
||||
public class ButtonElementDriver : FormsElementDriver<Button> {
|
||||
public ButtonElementDriver(IFormManager formManager) : base(formManager) { }
|
||||
private readonly ITokenizer _tokenizer;
|
||||
|
||||
public ButtonElementDriver(IFormManager formManager, ITokenizer tokenizer) : base(formManager) {
|
||||
_tokenizer = tokenizer;
|
||||
}
|
||||
|
||||
protected override IEnumerable<string> FormNames {
|
||||
get { yield return "Button"; }
|
||||
@@ -21,11 +29,16 @@ namespace Orchard.DynamicForms.Drivers {
|
||||
Name: "Text",
|
||||
Title: "Text",
|
||||
Value: "Submit",
|
||||
Classes: new[] { "text", "medium" },
|
||||
Classes: new[] { "text", "medium", "tokenized" },
|
||||
Description: T("The button text.")));
|
||||
|
||||
return form;
|
||||
});
|
||||
}
|
||||
|
||||
protected override void OnDisplaying(Button element, ElementDisplayContext context) {
|
||||
context.ElementShape.ProcessedName = _tokenizer.Replace(element.Name, context.GetTokenData());
|
||||
context.ElementShape.ProcessedText = _tokenizer.Replace(element.Text, context.GetTokenData());
|
||||
}
|
||||
}
|
||||
}
|
@@ -2,6 +2,7 @@
|
||||
using Orchard.Forms.Services;
|
||||
using Orchard.Layouts.Framework.Display;
|
||||
using Orchard.Layouts.Framework.Drivers;
|
||||
using Orchard.Layouts.Helpers;
|
||||
using Orchard.Tokens;
|
||||
using DescribeContext = Orchard.Forms.Services.DescribeContext;
|
||||
|
||||
@@ -65,7 +66,9 @@ namespace Orchard.DynamicForms.Drivers {
|
||||
}
|
||||
|
||||
protected override void OnDisplaying(CheckBox element, ElementDisplayContext context) {
|
||||
context.ElementShape.TokenizedValue = _tokenizer.Replace(element.RuntimeValue, null);
|
||||
context.ElementShape.ProcessedName = _tokenizer.Replace(element.Name, context.GetTokenData());
|
||||
context.ElementShape.ProcessedLabel = _tokenizer.Replace(element.Label, context.GetTokenData());
|
||||
context.ElementShape.ProcessedValue = _tokenizer.Replace(element.RuntimeValue, context.GetTokenData());
|
||||
}
|
||||
}
|
||||
}
|
@@ -2,6 +2,7 @@
|
||||
using Orchard.Forms.Services;
|
||||
using Orchard.Layouts.Framework.Display;
|
||||
using Orchard.Layouts.Framework.Drivers;
|
||||
using Orchard.Layouts.Helpers;
|
||||
using Orchard.Tokens;
|
||||
using DescribeContext = Orchard.Forms.Services.DescribeContext;
|
||||
|
||||
@@ -76,7 +77,9 @@ namespace Orchard.DynamicForms.Drivers {
|
||||
}
|
||||
|
||||
protected override void OnDisplaying(EmailField element, ElementDisplayContext context) {
|
||||
context.ElementShape.TokenizedValue = _tokenizer.Replace(element.RuntimeValue, null);
|
||||
context.ElementShape.ProcessedName = _tokenizer.Replace(element.Name, context.GetTokenData());
|
||||
context.ElementShape.ProcessedLabel = _tokenizer.Replace(element.Label, context.GetTokenData());
|
||||
context.ElementShape.ProcessedValue = _tokenizer.Replace(element.RuntimeValue, context.GetTokenData());
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web.Mvc;
|
||||
using Orchard.DynamicForms.Elements;
|
||||
@@ -7,8 +6,8 @@ using Orchard.DynamicForms.Helpers;
|
||||
using Orchard.Forms.Services;
|
||||
using Orchard.Layouts.Framework.Display;
|
||||
using Orchard.Layouts.Framework.Drivers;
|
||||
using Orchard.Layouts.Helpers;
|
||||
using Orchard.Tokens;
|
||||
using Orchard.Utility.Extensions;
|
||||
using DescribeContext = Orchard.Forms.Services.DescribeContext;
|
||||
|
||||
namespace Orchard.DynamicForms.Drivers {
|
||||
@@ -80,11 +79,13 @@ namespace Orchard.DynamicForms.Drivers {
|
||||
}
|
||||
|
||||
protected override void OnDisplaying(Enumeration element, ElementDisplayContext context) {
|
||||
var tokenizedOptions = _tokenizer.Replace(element.Options).ToArray();
|
||||
var typeName = element.GetType().Name;
|
||||
var displayType = context.DisplayType;
|
||||
var tokenData = context.GetTokenData();
|
||||
|
||||
context.ElementShape.TokenizedOptions = tokenizedOptions;
|
||||
context.ElementShape.ProcessedName = _tokenizer.Replace(element.Name, tokenData);
|
||||
context.ElementShape.ProcessedLabel = _tokenizer.Replace(element.Label, tokenData);
|
||||
context.ElementShape.ProcessedOptions = _tokenizer.Replace(element.Options, tokenData).ToArray();
|
||||
context.ElementShape.Metadata.Alternates.Add(String.Format("Elements_{0}__{1}", typeName, element.InputType));
|
||||
context.ElementShape.Metadata.Alternates.Add(String.Format("Elements_{0}_{1}__{2}", typeName, displayType, element.InputType));
|
||||
}
|
||||
|
@@ -1,7 +1,19 @@
|
||||
using Orchard.DynamicForms.Elements;
|
||||
using Orchard.Layouts.Framework.Display;
|
||||
using Orchard.Layouts.Framework.Drivers;
|
||||
using Orchard.Layouts.Helpers;
|
||||
using Orchard.Tokens;
|
||||
|
||||
namespace Orchard.DynamicForms.Drivers {
|
||||
public class FieldsetElementDriver : ElementDriver<Fieldset> {
|
||||
private readonly ITokenizer _tokenizer;
|
||||
|
||||
public FieldsetElementDriver(ITokenizer tokenizer) {
|
||||
_tokenizer = tokenizer;
|
||||
}
|
||||
|
||||
protected override void OnDisplaying(Fieldset element, ElementDisplayContext context) {
|
||||
context.ElementShape.ProcessedLegend = _tokenizer.Replace(element.Legend, context.GetTokenData());
|
||||
}
|
||||
}
|
||||
}
|
@@ -10,9 +10,10 @@ using Orchard.DynamicForms.Services;
|
||||
using Orchard.Forms.Services;
|
||||
using Orchard.Layouts.Framework.Display;
|
||||
using Orchard.Layouts.Framework.Drivers;
|
||||
using Orchard.Layouts.Framework.Elements;
|
||||
using Orchard.Layouts.Helpers;
|
||||
using Orchard.Layouts.Services;
|
||||
using Orchard.Tokens;
|
||||
using DescribeContext = Orchard.Forms.Services.DescribeContext;
|
||||
|
||||
namespace Orchard.DynamicForms.Drivers {
|
||||
public class FormElementDriver : FormsElementDriver<Form> {
|
||||
@@ -20,19 +21,22 @@ namespace Orchard.DynamicForms.Drivers {
|
||||
private readonly IFormService _formService;
|
||||
private readonly ICurrentControllerAccessor _currentControllerAccessor;
|
||||
private readonly ICultureAccessor _cultureAccessor;
|
||||
private readonly ITokenizer _tokenizer;
|
||||
|
||||
public FormElementDriver(
|
||||
IFormManager formManager,
|
||||
IContentDefinitionManager contentDefinitionManager,
|
||||
IFormService formService,
|
||||
ICurrentControllerAccessor currentControllerAccessor,
|
||||
ICultureAccessor cultureAccessor)
|
||||
ICultureAccessor cultureAccessor,
|
||||
ITokenizer tokenizer)
|
||||
|
||||
: base(formManager) {
|
||||
_contentDefinitionManager = contentDefinitionManager;
|
||||
_formService = formService;
|
||||
_currentControllerAccessor = currentControllerAccessor;
|
||||
_cultureAccessor = cultureAccessor;
|
||||
_tokenizer = tokenizer;
|
||||
}
|
||||
|
||||
protected override IEnumerable<string> FormNames {
|
||||
@@ -145,6 +149,10 @@ namespace Orchard.DynamicForms.Drivers {
|
||||
foreach (var child in element.Elements.Flatten().Where(x => x is FormElement).Cast<FormElement>()) {
|
||||
child.FormBindingContentType = element.CreateContent == true ? element.FormBindingContentType : default(string);
|
||||
}
|
||||
|
||||
// Set tokenized properties.
|
||||
var tokenData = context.GetTokenData();
|
||||
context.ElementShape.ProcessedAction = _tokenizer.Replace(element.Action, tokenData);
|
||||
}
|
||||
|
||||
private static bool IsFormBindingContentType(ContentTypeDefinition contentTypeDefinition) {
|
||||
|
@@ -3,6 +3,7 @@ using Orchard.DynamicForms.Elements;
|
||||
using Orchard.Forms.Services;
|
||||
using Orchard.Layouts.Framework.Display;
|
||||
using Orchard.Layouts.Framework.Drivers;
|
||||
using Orchard.Layouts.Helpers;
|
||||
using Orchard.Tokens;
|
||||
using DescribeContext = Orchard.Forms.Services.DescribeContext;
|
||||
|
||||
@@ -34,7 +35,8 @@ namespace Orchard.DynamicForms.Drivers {
|
||||
}
|
||||
|
||||
protected override void OnDisplaying(HiddenField element, ElementDisplayContext context) {
|
||||
context.ElementShape.TokenizedValue = _tokenizer.Replace(element.Value, null);
|
||||
context.ElementShape.ProcessedName = _tokenizer.Replace(element.Name, context.GetTokenData());
|
||||
context.ElementShape.ProcessedValue = _tokenizer.Replace(element.Value, context.GetTokenData());
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,11 +1,19 @@
|
||||
using System.Collections.Generic;
|
||||
using Orchard.DynamicForms.Elements;
|
||||
using Orchard.Forms.Services;
|
||||
using Orchard.Layouts.Framework.Display;
|
||||
using Orchard.Layouts.Framework.Drivers;
|
||||
using Orchard.Layouts.Helpers;
|
||||
using Orchard.Tokens;
|
||||
using DescribeContext = Orchard.Forms.Services.DescribeContext;
|
||||
|
||||
namespace Orchard.DynamicForms.Drivers {
|
||||
public class LabelElementDriver : FormsElementDriver<Label> {
|
||||
public LabelElementDriver(IFormManager formManager) : base(formManager) {}
|
||||
private readonly ITokenizer _tokenizer;
|
||||
|
||||
public LabelElementDriver(IFormManager formManager, ITokenizer tokenizer) : base(formManager) {
|
||||
_tokenizer = tokenizer;
|
||||
}
|
||||
|
||||
protected override IEnumerable<string> FormNames {
|
||||
get { yield return "Label"; }
|
||||
@@ -20,17 +28,22 @@ namespace Orchard.DynamicForms.Drivers {
|
||||
Id: "LabelText",
|
||||
Name: "LabelText",
|
||||
Title: "Text",
|
||||
Classes: new[] { "text", "large" },
|
||||
Classes: new[] { "text", "large", "tokenized" },
|
||||
Description: T("The label text.")),
|
||||
_LabelFor: shape.Textbox(
|
||||
Id: "LabelFor",
|
||||
Name: "LabelFor",
|
||||
Title: "For",
|
||||
Classes: new[] { "text", "large" },
|
||||
Classes: new[] { "text", "large", "tokenized" },
|
||||
Description: T("The name of the field this label is for.")));
|
||||
|
||||
return form;
|
||||
});
|
||||
}
|
||||
|
||||
protected override void OnDisplaying(Label element, ElementDisplayContext context) {
|
||||
context.ElementShape.ProcessedText = _tokenizer.Replace(element.Text, context.GetTokenData());
|
||||
context.ElementShape.ProcessedFor = _tokenizer.Replace(element.For, context.GetTokenData());
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,11 +1,18 @@
|
||||
using Orchard.DynamicForms.Elements;
|
||||
using Orchard.Forms.Services;
|
||||
using Orchard.Layouts.Framework.Display;
|
||||
using Orchard.Layouts.Framework.Drivers;
|
||||
using Orchard.Layouts.Helpers;
|
||||
using Orchard.Tokens;
|
||||
using DescribeContext = Orchard.Forms.Services.DescribeContext;
|
||||
|
||||
namespace Orchard.DynamicForms.Drivers {
|
||||
public class PasswordFieldElementDriver : FormsElementDriver<PasswordField>{
|
||||
public PasswordFieldElementDriver(IFormManager formManager) : base(formManager) {}
|
||||
private readonly ITokenizer _tokenizer;
|
||||
|
||||
public PasswordFieldElementDriver(IFormManager formManager, ITokenizer tokenizer) : base(formManager) {
|
||||
_tokenizer = tokenizer;
|
||||
}
|
||||
|
||||
protected override EditorResult OnBuildEditor(PasswordField element, ElementEditorContext context) {
|
||||
var autoLabelEditor = BuildForm(context, "AutoLabel");
|
||||
@@ -65,5 +72,10 @@ namespace Orchard.DynamicForms.Drivers {
|
||||
return form;
|
||||
});
|
||||
}
|
||||
|
||||
protected override void OnDisplaying(PasswordField element, ElementDisplayContext context) {
|
||||
context.ElementShape.ProcessedName = _tokenizer.Replace(element.Name, context.GetTokenData());
|
||||
context.ElementShape.ProcessedLabel = _tokenizer.Replace(element.Label, context.GetTokenData());
|
||||
}
|
||||
}
|
||||
}
|
@@ -6,10 +6,12 @@ using System.Web.Mvc;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.Core.Title.Models;
|
||||
using Orchard.DynamicForms.Elements;
|
||||
using Orchard.DynamicForms.Helpers;
|
||||
using Orchard.Environment.Extensions;
|
||||
using Orchard.Forms.Services;
|
||||
using Orchard.Layouts.Framework.Display;
|
||||
using Orchard.Layouts.Framework.Drivers;
|
||||
using Orchard.Layouts.Helpers;
|
||||
using Orchard.Projections.Models;
|
||||
using Orchard.Projections.Services;
|
||||
using Orchard.Tokens;
|
||||
@@ -119,20 +121,22 @@ namespace Orchard.DynamicForms.Drivers {
|
||||
protected override void OnDisplaying(Query element, ElementDisplayContext context) {
|
||||
var queryId = element.QueryId;
|
||||
var typeName = element.GetType().Name;
|
||||
var category = element.Category.ToSafeName();
|
||||
var displayType = context.DisplayType;
|
||||
var tokenData = context.GetTokenData();
|
||||
|
||||
context.ElementShape.Options = GetOptions(element, queryId).ToArray();
|
||||
context.ElementShape.ProcessedName = _tokenizer.Replace(element.Name, tokenData);
|
||||
context.ElementShape.ProcessedLabel = _tokenizer.Replace(element.Label, tokenData);
|
||||
context.ElementShape.Options = GetOptions(element, context.DisplayType, queryId, tokenData).ToArray();
|
||||
context.ElementShape.Metadata.Alternates.Add(String.Format("Elements_{0}__{1}", typeName, element.InputType));
|
||||
context.ElementShape.Metadata.Alternates.Add(String.Format("Elements_{0}_{1}__{2}", typeName, displayType, element.InputType));
|
||||
}
|
||||
|
||||
private IEnumerable<SelectListItem> GetOptions(Query element, int? queryId) {
|
||||
private IEnumerable<SelectListItem> GetOptions(Query element, string displayType, int? queryId, IDictionary<string, object> tokenData) {
|
||||
var optionLabel = element.OptionLabel;
|
||||
var runtimeValues = GetRuntimeValues(element);
|
||||
|
||||
if (!String.IsNullOrWhiteSpace(optionLabel)) {
|
||||
yield return new SelectListItem { Text = optionLabel };
|
||||
yield return new SelectListItem { Text = displayType != "Design" ? _tokenizer.Replace(optionLabel, tokenData) : optionLabel };
|
||||
}
|
||||
|
||||
if (queryId == null)
|
||||
|
@@ -3,6 +3,7 @@ using Orchard.DynamicForms.Elements;
|
||||
using Orchard.Forms.Services;
|
||||
using Orchard.Layouts.Framework.Display;
|
||||
using Orchard.Layouts.Framework.Drivers;
|
||||
using Orchard.Layouts.Helpers;
|
||||
using Orchard.Tokens;
|
||||
using DescribeContext = Orchard.Forms.Services.DescribeContext;
|
||||
|
||||
@@ -40,7 +41,9 @@ namespace Orchard.DynamicForms.Drivers {
|
||||
}
|
||||
|
||||
protected override void OnDisplaying(RadioButton element, ElementDisplayContext context) {
|
||||
context.ElementShape.TokenizedValue = _tokenizer.Replace(element.Value, null);
|
||||
context.ElementShape.ProcessedName = _tokenizer.Replace(element.Name, context.GetTokenData());
|
||||
context.ElementShape.ProcessedLabel = _tokenizer.Replace(element.Label, context.GetTokenData());
|
||||
context.ElementShape.ProcessedValue = _tokenizer.Replace(element.Value, context.GetTokenData());
|
||||
}
|
||||
}
|
||||
}
|
@@ -5,14 +5,19 @@ using Orchard.Environment.Extensions;
|
||||
using Orchard.Forms.Services;
|
||||
using Orchard.Layouts.Framework.Display;
|
||||
using Orchard.Layouts.Framework.Drivers;
|
||||
using Orchard.Layouts.Helpers;
|
||||
using Orchard.Tokens;
|
||||
using DescribeContext = Orchard.Forms.Services.DescribeContext;
|
||||
|
||||
namespace Orchard.DynamicForms.Drivers {
|
||||
[OrchardFeature("Orchard.DynamicForms.AntiSpam")]
|
||||
public class ReCaptchaElementDriver : FormsElementDriver<ReCaptcha>{
|
||||
private readonly IOrchardServices _services;
|
||||
private readonly ITokenizer _tokenizer;
|
||||
|
||||
public ReCaptchaElementDriver(IFormManager formManager, IOrchardServices services) : base(formManager) {
|
||||
public ReCaptchaElementDriver(IFormManager formManager, IOrchardServices services, ITokenizer tokenizer) : base(formManager) {
|
||||
_services = services;
|
||||
_tokenizer = tokenizer;
|
||||
}
|
||||
|
||||
protected override EditorResult OnBuildEditor(ReCaptcha element, ElementEditorContext context) {
|
||||
@@ -51,6 +56,7 @@ namespace Orchard.DynamicForms.Drivers {
|
||||
return;
|
||||
}
|
||||
|
||||
context.ElementShape.ProcessedName = _tokenizer.Replace(element.Name, context.GetTokenData());
|
||||
context.ElementShape.PublicKey = settings.PublicKey;
|
||||
}
|
||||
}
|
||||
|
@@ -8,9 +8,9 @@ using Orchard.Environment.Extensions;
|
||||
using Orchard.Forms.Services;
|
||||
using Orchard.Layouts.Framework.Display;
|
||||
using Orchard.Layouts.Framework.Drivers;
|
||||
using Orchard.Layouts.Helpers;
|
||||
using Orchard.Taxonomies.Services;
|
||||
using Orchard.Tokens;
|
||||
using Orchard.Utility.Extensions;
|
||||
using DescribeContext = Orchard.Forms.Services.DescribeContext;
|
||||
|
||||
namespace Orchard.DynamicForms.Drivers {
|
||||
@@ -124,18 +124,21 @@ namespace Orchard.DynamicForms.Drivers {
|
||||
var taxonomyId = element.TaxonomyId;
|
||||
var typeName = element.GetType().Name;
|
||||
var displayType = context.DisplayType;
|
||||
var tokenData = context.GetTokenData();
|
||||
|
||||
context.ElementShape.TermOptions = GetTermOptions(element, taxonomyId).ToArray();
|
||||
context.ElementShape.ProcessedName = _tokenizer.Replace(element.Name, tokenData);
|
||||
context.ElementShape.ProcessedLabel = _tokenizer.Replace(element.Label, tokenData);
|
||||
context.ElementShape.TermOptions = GetTermOptions(element, context.DisplayType, taxonomyId, tokenData).ToArray();
|
||||
context.ElementShape.Metadata.Alternates.Add(String.Format("Elements_{0}__{1}", typeName, element.InputType));
|
||||
context.ElementShape.Metadata.Alternates.Add(String.Format("Elements_{0}_{1}__{2}", typeName, displayType, element.InputType));
|
||||
}
|
||||
|
||||
private IEnumerable<SelectListItem> GetTermOptions(Taxonomy element, int? taxonomyId) {
|
||||
private IEnumerable<SelectListItem> GetTermOptions(Taxonomy element, string displayType, int? taxonomyId, IDictionary<string, object> tokenData) {
|
||||
var optionLabel = element.OptionLabel;
|
||||
var runtimeValues = GetRuntimeValues(element);
|
||||
|
||||
if (!String.IsNullOrWhiteSpace(optionLabel)) {
|
||||
yield return new SelectListItem { Text = optionLabel };
|
||||
yield return new SelectListItem { Text = displayType != "Design" ? _tokenizer.Replace(optionLabel, tokenData) : optionLabel };
|
||||
}
|
||||
|
||||
if (taxonomyId == null)
|
||||
|
@@ -3,6 +3,7 @@ using Orchard.DynamicForms.Elements;
|
||||
using Orchard.Forms.Services;
|
||||
using Orchard.Layouts.Framework.Display;
|
||||
using Orchard.Layouts.Framework.Drivers;
|
||||
using Orchard.Layouts.Helpers;
|
||||
using Orchard.Tokens;
|
||||
using DescribeContext = Orchard.Forms.Services.DescribeContext;
|
||||
|
||||
@@ -88,7 +89,9 @@ namespace Orchard.DynamicForms.Drivers {
|
||||
}
|
||||
|
||||
protected override void OnDisplaying(TextArea element, ElementDisplayContext context) {
|
||||
context.ElementShape.TokenizedValue = _tokenizer.Replace(element.RuntimeValue, null);
|
||||
context.ElementShape.ProcessedName = _tokenizer.Replace(element.Name, context.GetTokenData());
|
||||
context.ElementShape.ProcessedLabel = _tokenizer.Replace(element.Label, context.GetTokenData());
|
||||
context.ElementShape.ProcessedValue = _tokenizer.Replace(element.RuntimeValue, context.GetTokenData());
|
||||
}
|
||||
}
|
||||
}
|
@@ -2,6 +2,7 @@
|
||||
using Orchard.Forms.Services;
|
||||
using Orchard.Layouts.Framework.Display;
|
||||
using Orchard.Layouts.Framework.Drivers;
|
||||
using Orchard.Layouts.Helpers;
|
||||
using Orchard.Tokens;
|
||||
using DescribeContext = Orchard.Forms.Services.DescribeContext;
|
||||
|
||||
@@ -50,13 +51,13 @@ namespace Orchard.DynamicForms.Drivers {
|
||||
Id: "MinimumLength",
|
||||
Name: "MinimumLength",
|
||||
Title: "Minimum Length",
|
||||
Classes: new[] { "text", "medium", "tokenized" },
|
||||
Classes: new[] { "text", "medium" },
|
||||
Description: T("The minimum length required.")),
|
||||
_MaximumLength: shape.Textbox(
|
||||
Id: "MaximumLength",
|
||||
Name: "MaximumLength",
|
||||
Title: "Maximum Length",
|
||||
Classes: new[] { "text", "medium", "tokenized" },
|
||||
Classes: new[] { "text", "medium" },
|
||||
Description: T("The maximum length allowed.")),
|
||||
_CustomValidationMessage: shape.Textbox(
|
||||
Id: "CustomValidationMessage",
|
||||
@@ -76,7 +77,9 @@ namespace Orchard.DynamicForms.Drivers {
|
||||
}
|
||||
|
||||
protected override void OnDisplaying(TextField element, ElementDisplayContext context) {
|
||||
context.ElementShape.TokenizedValue = _tokenizer.Replace(element.RuntimeValue, null);
|
||||
context.ElementShape.ProcessedName = _tokenizer.Replace(element.Name, context.GetTokenData());
|
||||
context.ElementShape.ProcessedLabel = _tokenizer.Replace(element.Label, context.GetTokenData());
|
||||
context.ElementShape.ProcessedValue = _tokenizer.Replace(element.RuntimeValue, context.GetTokenData());
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,11 +1,19 @@
|
||||
using System.Collections.Generic;
|
||||
using Orchard.DynamicForms.Elements;
|
||||
using Orchard.Forms.Services;
|
||||
using Orchard.Layouts.Framework.Display;
|
||||
using Orchard.Layouts.Framework.Drivers;
|
||||
using Orchard.Layouts.Helpers;
|
||||
using Orchard.Tokens;
|
||||
using DescribeContext = Orchard.Forms.Services.DescribeContext;
|
||||
|
||||
namespace Orchard.DynamicForms.Drivers {
|
||||
public class ValidationMessageElementDriver : FormsElementDriver<ValidationMessage> {
|
||||
public ValidationMessageElementDriver(IFormManager formManager) : base(formManager) {}
|
||||
private readonly ITokenizer _tokenizer;
|
||||
|
||||
public ValidationMessageElementDriver(IFormManager formManager, ITokenizer tokenizer) : base(formManager) {
|
||||
_tokenizer = tokenizer;
|
||||
}
|
||||
|
||||
protected override IEnumerable<string> FormNames {
|
||||
get { yield return "ValidationMessage"; }
|
||||
@@ -20,11 +28,15 @@ namespace Orchard.DynamicForms.Drivers {
|
||||
Id: "For",
|
||||
Name: "For",
|
||||
Title: "For",
|
||||
Classes: new[] { "text", "large" },
|
||||
Classes: new[] { "text", "large", "tokenized" },
|
||||
Description: T("The name of the field this validation message is for.")));
|
||||
|
||||
return form;
|
||||
});
|
||||
}
|
||||
|
||||
protected override void OnDisplaying(ValidationMessage element, ElementDisplayContext context) {
|
||||
context.ElementShape.ProcessedFor = _tokenizer.Replace(element.For, context.GetTokenData());
|
||||
}
|
||||
}
|
||||
}
|
@@ -34,7 +34,7 @@ namespace Orchard.DynamicForms.Handlers {
|
||||
FieldName = element.Name
|
||||
};
|
||||
|
||||
if (element.Form != null && element.Form.EnableClientValidation == true) {
|
||||
if (element.Form != null && element.Form.EnableClientValidation == true) {
|
||||
_formService.RegisterClientValidationAttributes(element, registrationContext);
|
||||
|
||||
if (registrationContext.ClientAttributes.Any()) {
|
||||
|
@@ -35,9 +35,10 @@ namespace Orchard.DynamicForms.Handlers {
|
||||
ModelState = context.ModelState,
|
||||
PostedValues = values
|
||||
};
|
||||
var tokensData = new Dictionary<string, object>(formValuesDictionary) {
|
||||
var tokenData = new Dictionary<string, object>(formValuesDictionary) {
|
||||
{"Updater", context.Updater},
|
||||
{"FormSubmission", formTokenContext},
|
||||
{"Content", context.Content }
|
||||
};
|
||||
|
||||
// Store the submission.
|
||||
@@ -53,10 +54,10 @@ namespace Orchard.DynamicForms.Handlers {
|
||||
|
||||
// Notifiy.
|
||||
if (!String.IsNullOrWhiteSpace(form.Notification))
|
||||
_notifier.Information(T(_tokenizer.Replace(T(form.Notification).Text, tokensData)));
|
||||
_notifier.Information(T(_tokenizer.Replace(T(form.Notification).Text, tokenData)));
|
||||
|
||||
// Trigger workflow event.
|
||||
_workflowManager.TriggerEvent(DynamicFormSubmittedActivity.EventName, contentItem, () => tokensData);
|
||||
_workflowManager.TriggerEvent(DynamicFormSubmittedActivity.EventName, contentItem, () => tokenData);
|
||||
}
|
||||
}
|
||||
}
|
@@ -5,9 +5,9 @@ using Orchard.Tokens;
|
||||
|
||||
namespace Orchard.DynamicForms.Helpers {
|
||||
public static class TokenizerExtensions {
|
||||
public static IEnumerable<SelectListItem> Replace(this ITokenizer tokenizer, IEnumerable<SelectListItem> items) {
|
||||
public static IEnumerable<SelectListItem> Replace(this ITokenizer tokenizer, IEnumerable<SelectListItem> items, IDictionary<string, object> data) {
|
||||
return items.Select(item => new SelectListItem {
|
||||
Text = tokenizer.Replace(item.Text, null),
|
||||
Text = tokenizer.Replace(item.Text, data),
|
||||
Value = item.Value,
|
||||
Disabled = item.Disabled,
|
||||
Group = item.Group,
|
||||
|
@@ -2,7 +2,7 @@
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardcustomforms.codeplex.com
|
||||
Version: 1.9.0
|
||||
Version: 1.9.1
|
||||
OrchardVersion: 1.9
|
||||
Description: Create custom forms like contact forms using layouts.
|
||||
Features:
|
||||
|
@@ -516,6 +516,12 @@
|
||||
<ItemGroup>
|
||||
<Content Include="package.json" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Views\Elements\Button.Design.cshtml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Views\Elements\Label.Design.cshtml" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
|
||||
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
|
||||
|
@@ -77,10 +77,11 @@ namespace Orchard.DynamicForms.Services {
|
||||
return GetFormElements(form).Select(x => x.Name).Where(x => !String.IsNullOrWhiteSpace(x)).Distinct();
|
||||
}
|
||||
|
||||
public NameValueCollection SubmitForm(Form form, IValueProvider valueProvider, ModelStateDictionary modelState, IUpdateModel updater) {
|
||||
public NameValueCollection SubmitForm(IContent content, Form form, IValueProvider valueProvider, ModelStateDictionary modelState, IUpdateModel updater) {
|
||||
var values = ReadElementValues(form, valueProvider);
|
||||
|
||||
_formEventHandler.Submitted(new FormSubmittedEventContext {
|
||||
Content = content,
|
||||
Form = form,
|
||||
FormService = this,
|
||||
ValueProvider = valueProvider,
|
||||
@@ -89,6 +90,7 @@ namespace Orchard.DynamicForms.Services {
|
||||
});
|
||||
|
||||
_formEventHandler.Validating(new FormValidatingEventContext {
|
||||
Content = content,
|
||||
Form = form,
|
||||
FormService = this,
|
||||
Values = values,
|
||||
@@ -98,6 +100,7 @@ namespace Orchard.DynamicForms.Services {
|
||||
});
|
||||
|
||||
_formEventHandler.Validated(new FormValidatedEventContext {
|
||||
Content = content,
|
||||
Form = form,
|
||||
FormService = this,
|
||||
Values = values,
|
||||
|
@@ -15,7 +15,7 @@ namespace Orchard.DynamicForms.Services {
|
||||
Form FindForm(LayoutPart layoutPart, string formName = null);
|
||||
IEnumerable<FormElement> GetFormElements(Form form);
|
||||
IEnumerable<string> GetFormElementNames(Form form);
|
||||
NameValueCollection SubmitForm(Form form, IValueProvider valueProvider, ModelStateDictionary modelState, IUpdateModel updater);
|
||||
NameValueCollection SubmitForm(IContent content, Form form, IValueProvider valueProvider, ModelStateDictionary modelState, IUpdateModel updater);
|
||||
Submission CreateSubmission(string formName, NameValueCollection values);
|
||||
Submission CreateSubmission(Submission submission);
|
||||
Submission GetSubmission(int id);
|
||||
|
@@ -5,6 +5,7 @@ using Orchard.DynamicForms.Elements;
|
||||
|
||||
namespace Orchard.DynamicForms.Services.Models {
|
||||
public class FormEventContext {
|
||||
public IContent Content { get; set; }
|
||||
public Form Form { get; set; }
|
||||
public NameValueCollection Values { get; set; }
|
||||
public IFormService FormService { get; set; }
|
||||
|
@@ -0,0 +1,11 @@
|
||||
@using Orchard.DynamicForms.Elements
|
||||
@using Orchard.Layouts.Helpers
|
||||
@{
|
||||
var element = (Button)Model.Element;
|
||||
var tagBuilder = TagBuilderExtensions.CreateElementTagBuilder(Model, "button");
|
||||
|
||||
tagBuilder.Attributes["type"] = "submit";
|
||||
tagBuilder.Attributes["name"] = element.Name;
|
||||
tagBuilder.SetInnerText(element.Text);
|
||||
}
|
||||
@tagBuilder.ToHtmlString()
|
@@ -1,11 +1,9 @@
|
||||
@using Orchard.DynamicForms.Elements
|
||||
@using Orchard.Layouts.Helpers
|
||||
@using Orchard.Layouts.Helpers
|
||||
@{
|
||||
var element = (Button)Model.Element;
|
||||
var tagBuilder = TagBuilderExtensions.CreateElementTagBuilder(Model, "button");
|
||||
|
||||
tagBuilder.Attributes["type"] = "submit";
|
||||
tagBuilder.Attributes["name"] = element.Name;
|
||||
tagBuilder.SetInnerText(element.Text);
|
||||
tagBuilder.Attributes["name"] = Model.ProcessedName;
|
||||
tagBuilder.SetInnerText(Model.ProcessedText);
|
||||
}
|
||||
@tagBuilder.ToHtmlString()
|
||||
|
@@ -6,8 +6,8 @@
|
||||
var tagBuilder = (OrchardTagBuilder)TagBuilderExtensions.CreateElementTagBuilder(Model, "input");
|
||||
|
||||
tagBuilder.Attributes["type"] = "checkbox";
|
||||
tagBuilder.Attributes["name"] = element.Name;
|
||||
tagBuilder.Attributes["value"] = Model.TokenizedValue;
|
||||
tagBuilder.Attributes["name"] = Model.ProcessedName;
|
||||
tagBuilder.Attributes["value"] = Model.ProcessedValue;
|
||||
tagBuilder.AddClientValidationAttributes((IDictionary<string, string>)Model.ClientValidationAttributes);
|
||||
|
||||
if (!String.IsNullOrWhiteSpace(element.PostedValue)) {
|
||||
@@ -17,12 +17,12 @@
|
||||
@if (element.ShowLabel) {
|
||||
<label>
|
||||
@tagBuilder.ToHtmlString(TagRenderMode.SelfClosing)
|
||||
@Html.Raw(element.Label)
|
||||
@Html.Raw(Model.ProcessedLabel)
|
||||
</label>
|
||||
}
|
||||
else {
|
||||
@tagBuilder.ToHtmlString(TagRenderMode.SelfClosing)
|
||||
}
|
||||
@if (element.ValidationSettings.ShowValidationMessage == true) {
|
||||
@Html.ValidationMessage(element.Name)
|
||||
@Html.ValidationMessage((string)Model.ProcessedName)
|
||||
}
|
@@ -7,19 +7,19 @@
|
||||
|
||||
tagBuilder.AddCssClass("text");
|
||||
tagBuilder.Attributes["type"] = "email";
|
||||
tagBuilder.Attributes["value"] = Model.TokenizedValue;
|
||||
tagBuilder.Attributes["name"] = element.Name;
|
||||
tagBuilder.Attributes["value"] = Model.ProcessedValue;
|
||||
tagBuilder.Attributes["name"] = Model.ProcessedName;
|
||||
tagBuilder.AddClientValidationAttributes((IDictionary<string, string>)Model.ClientValidationAttributes);
|
||||
|
||||
if (!ViewData.ModelState.IsValidField(element.Name)) {
|
||||
if (!ViewData.ModelState.IsValidField(Model.ProcessedName)) {
|
||||
tagBuilder.AddCssClass("input-validation-error");
|
||||
}
|
||||
}
|
||||
|
||||
@if (element.ShowLabel) {
|
||||
<label for="@element.HtmlId">@element.Label</label>
|
||||
<label for="@element.HtmlId">@Model.ProcessedLabel</label>
|
||||
}
|
||||
@tagBuilder.ToHtmlString(TagRenderMode.SelfClosing)
|
||||
@if (element.ValidationSettings.ShowValidationMessage == true) {
|
||||
@Html.ValidationMessage(element.Name)
|
||||
@Html.ValidationMessage((string)Model.ProcessedName)
|
||||
}
|
@@ -8,7 +8,7 @@
|
||||
<label>@Html.Raw(element.Label)</label>
|
||||
}
|
||||
@tagBuilder.StartElement
|
||||
@foreach (var option in Model.TokenizedOptions) {
|
||||
@foreach (var option in element.Options) {
|
||||
<li>
|
||||
<label>
|
||||
<input type="checkbox" name="@element.Name" value="@option.Value" />
|
||||
|
@@ -7,13 +7,13 @@
|
||||
var index = 0;
|
||||
}
|
||||
@if (element.ShowLabel) {
|
||||
<label>@Html.Raw(element.Label)</label>
|
||||
<label>@Html.Raw(Model.ProcessedLabel)</label>
|
||||
}
|
||||
@tagBuilder.StartElement
|
||||
@foreach (var option in Model.TokenizedOptions) {
|
||||
@foreach (var option in Model.ProcessedOptions) {
|
||||
var inputTagBuilder = new OrchardTagBuilder("input");
|
||||
inputTagBuilder.Attributes["type"] = "checkbox";
|
||||
inputTagBuilder.Attributes["name"] = element.Name;
|
||||
inputTagBuilder.Attributes["name"] = Model.ProcessedName;
|
||||
inputTagBuilder.Attributes["value"] = option.Value;
|
||||
|
||||
if (option.Selected) {
|
||||
@@ -33,5 +33,5 @@
|
||||
}
|
||||
@tagBuilder.EndElement
|
||||
@if (element.ValidationSettings.ShowValidationMessage == true) {
|
||||
@Html.ValidationMessage(element.Name)
|
||||
@Html.ValidationMessage((string)Model.ProcessedName)
|
||||
}
|
@@ -4,7 +4,7 @@
|
||||
var element = (Enumeration)Model.Element;
|
||||
var attributes = (IDictionary<string, object>)TagBuilderExtensions.GetCommonElementAttributes(Model);
|
||||
var name = String.IsNullOrWhiteSpace(element.Name) ? "MultiSelectList1" : element.Name;
|
||||
var options = (IEnumerable<SelectListItem>)Model.TokenizedOptions;
|
||||
var options = element.Options;
|
||||
}
|
||||
@if (element.ShowLabel) {
|
||||
<label for="@element.HtmlId">@Html.Raw(element.Label)</label>
|
||||
|
@@ -3,8 +3,8 @@
|
||||
@{
|
||||
var element = (Enumeration)Model.Element;
|
||||
var attributes = (IDictionary<string, object>)TagBuilderExtensions.GetCommonElementAttributes(Model);
|
||||
var name = String.IsNullOrWhiteSpace(element.Name) ? "MultiSelectList1" : element.Name;
|
||||
var options = (IEnumerable<SelectListItem>)Model.TokenizedOptions;
|
||||
var name = (string)(String.IsNullOrWhiteSpace(Model.ProcessedName) ? "MultiSelectList1" : Model.ProcessedName);
|
||||
var options = (IEnumerable<SelectListItem>)Model.ProcessedOptions;
|
||||
var clientValidationAttributes = (IDictionary<string, string>)Model.ClientValidationAttributes;
|
||||
var htmlId = !String.IsNullOrWhiteSpace(element.HtmlId) ? element.HtmlId : name;
|
||||
|
||||
@@ -13,9 +13,9 @@
|
||||
}
|
||||
}
|
||||
@if (element.ShowLabel) {
|
||||
<label for="@htmlId">@Html.Raw(element.Label)</label>
|
||||
<label for="@htmlId">@Html.Raw(Model.ProcessedLabel)</label>
|
||||
}
|
||||
@Html.ListBox(name, options, attributes)
|
||||
@if (element.ValidationSettings.ShowValidationMessage == true) {
|
||||
@Html.ValidationMessage(element.Name)
|
||||
@Html.ValidationMessage((string)Model.ProcessedName)
|
||||
}
|
@@ -8,7 +8,7 @@
|
||||
<label>@Html.Raw(element.Label)</label>
|
||||
}
|
||||
@tagBuilder.StartElement
|
||||
@foreach (var option in Model.TokenizedOptions) {
|
||||
@foreach (var option in element.Options) {
|
||||
<li>
|
||||
<label>
|
||||
<input type="radio" name="@element.Name" value="@option.Value" />
|
||||
|
@@ -7,13 +7,13 @@
|
||||
var index = 0;
|
||||
}
|
||||
@if (element.ShowLabel) {
|
||||
<label>@Html.Raw(element.Label)</label>
|
||||
<label>@Html.Raw(Model.ProcessedLabel)</label>
|
||||
}
|
||||
@tagBuilder.StartElement
|
||||
@foreach (var option in Model.TokenizedOptions) {
|
||||
@foreach (var option in Model.ProcessedOptions) {
|
||||
var inputTagBuilder = new OrchardTagBuilder("input");
|
||||
inputTagBuilder.Attributes["type"] = "radio";
|
||||
inputTagBuilder.Attributes["name"] = element.Name;
|
||||
inputTagBuilder.Attributes["name"] = Model.ProcessedName;
|
||||
inputTagBuilder.Attributes["value"] = option.Value;
|
||||
|
||||
if (option.Selected) {
|
||||
@@ -33,5 +33,5 @@
|
||||
}
|
||||
@tagBuilder.EndElement
|
||||
@if (element.ValidationSettings.ShowValidationMessage == true) {
|
||||
@Html.ValidationMessage(element.Name)
|
||||
@Html.ValidationMessage((string)Model.ProcessedName)
|
||||
}
|
@@ -4,7 +4,7 @@
|
||||
var element = (Enumeration)Model.Element;
|
||||
var attributes = (IDictionary<string, object>)TagBuilderExtensions.GetCommonElementAttributes(Model);
|
||||
var name = String.IsNullOrWhiteSpace(element.Name) ? "SelectList1" : element.Name;
|
||||
var options = (IEnumerable<SelectListItem>)Model.TokenizedOptions;
|
||||
var options = element.Options;
|
||||
}
|
||||
@if (element.ShowLabel) {
|
||||
<label for="@element.HtmlId">@Html.Raw(element.Label)</label>
|
||||
|
@@ -3,8 +3,8 @@
|
||||
@{
|
||||
var element = (Enumeration)Model.Element;
|
||||
var attributes = (IDictionary<string, object>)TagBuilderExtensions.GetCommonElementAttributes(Model);
|
||||
var name = String.IsNullOrWhiteSpace(element.Name) ? "SelectList1" : element.Name;
|
||||
var options = (IEnumerable<SelectListItem>)Model.TokenizedOptions;
|
||||
var name = (String.IsNullOrWhiteSpace((string)Model.ProcessedName) ? "SelectList1" : (string)Model.ProcessedName);
|
||||
var options = (IEnumerable<SelectListItem>)Model.ProcessedOptions;
|
||||
var clientValidationAttributes = (IDictionary<string, string>)Model.ClientValidationAttributes;
|
||||
var htmlId = !String.IsNullOrWhiteSpace(element.HtmlId) ? element.HtmlId : name;
|
||||
|
||||
@@ -13,9 +13,9 @@
|
||||
}
|
||||
}
|
||||
@if (element.ShowLabel) {
|
||||
<label for="@htmlId">@Html.Raw(element.Label)</label>
|
||||
<label for="@htmlId">@Html.Raw(Model.ProcessedLabel)</label>
|
||||
}
|
||||
@Html.DropDownList(name, options, attributes)
|
||||
@if (element.ValidationSettings.ShowValidationMessage == true) {
|
||||
@Html.ValidationMessage(element.Name)
|
||||
@Html.ValidationMessage(name)
|
||||
}
|
@@ -3,7 +3,7 @@
|
||||
@{
|
||||
var element = (Fieldset) Model.Element;
|
||||
var tagBuilder = TagBuilderExtensions.CreateElementTagBuilder(Model, "fieldset");
|
||||
var legend = element.Legend;
|
||||
var legend = Model.ProcessedLegend;
|
||||
}
|
||||
@tagBuilder.StartElement
|
||||
<legend>@legend</legend>
|
||||
|
@@ -9,7 +9,8 @@
|
||||
var element = (Form) Model.Element;
|
||||
var tagBuilder = TagBuilderExtensions.CreateElementTagBuilder(Model);
|
||||
var formName = element.Name;
|
||||
var formAction = String.IsNullOrWhiteSpace(element.Action) ? Url.Action("Submit", "Form", new { area = "Orchard.DynamicForms"}) : element.Action;
|
||||
var processedAction = (string)Model.ProcessedAction;
|
||||
var formAction = String.IsNullOrWhiteSpace(processedAction) ? Url.Action("Submit", "Form", new { area = "Orchard.DynamicForms"}) : processedAction;
|
||||
var formMethod = !String.IsNullOrWhiteSpace(element.Method) ? element.Method : "POST";
|
||||
|
||||
tagBuilder.AddCssClass("dynamic-form");
|
||||
|
@@ -1,13 +1,10 @@
|
||||
@using Orchard.DynamicForms.Elements
|
||||
@using Orchard.Layouts.Helpers
|
||||
@using Orchard.Layouts.Helpers
|
||||
@{
|
||||
var element = (HiddenField) Model.Element;
|
||||
var tagBuilder = TagBuilderExtensions.CreateElementTagBuilder(Model, "input");
|
||||
|
||||
tagBuilder.AddCssClass("text");
|
||||
tagBuilder.Attributes["type"] = "hidden";
|
||||
tagBuilder.Attributes["value"] = Model.TokenizedValue;
|
||||
tagBuilder.Attributes["name"] = element.Name;
|
||||
tagBuilder.Attributes["value"] = Model.ProcessedValue;
|
||||
tagBuilder.Attributes["name"] = Model.ProcessedName;
|
||||
}
|
||||
|
||||
@tagBuilder.ToHtmlString(TagRenderMode.SelfClosing)
|
||||
|
@@ -0,0 +1,11 @@
|
||||
@using Orchard.DynamicForms.Elements
|
||||
@using Orchard.Layouts.Helpers
|
||||
@{
|
||||
var tagBuilder = TagBuilderExtensions.CreateElementTagBuilder(Model, "label");
|
||||
var label = (Label)Model.Element;
|
||||
|
||||
tagBuilder.Attributes["for"] = label.For;
|
||||
tagBuilder.InnerHtml = label.Text;
|
||||
}
|
||||
|
||||
@tagBuilder.ToHtmlString(TagRenderMode.Normal)
|
@@ -1,11 +1,9 @@
|
||||
@using Orchard.DynamicForms.Elements
|
||||
@using Orchard.Layouts.Helpers
|
||||
@using Orchard.Layouts.Helpers
|
||||
@{
|
||||
var tagBuilder = TagBuilderExtensions.CreateElementTagBuilder(Model, "label");
|
||||
var label = (Label) Model.Element;
|
||||
|
||||
tagBuilder.Attributes["for"] = label.For;
|
||||
tagBuilder.InnerHtml = label.Text;
|
||||
tagBuilder.Attributes["for"] = Model.ProcessedFor;
|
||||
tagBuilder.InnerHtml = Model.ProcessedText;
|
||||
}
|
||||
|
||||
@tagBuilder.ToHtmlString(TagRenderMode.Normal)
|
||||
|
@@ -7,7 +7,7 @@
|
||||
|
||||
tagBuilder.AddCssClass("text");
|
||||
tagBuilder.Attributes["type"] = "password";
|
||||
tagBuilder.Attributes["name"] = element.Name;
|
||||
tagBuilder.Attributes["name"] = Model.ProcessedName;
|
||||
tagBuilder.AddClientValidationAttributes((IDictionary<string, string>)Model.ClientValidationAttributes);
|
||||
|
||||
if (!ViewData.ModelState.IsValidField(element.Name)) {
|
||||
@@ -16,9 +16,9 @@
|
||||
}
|
||||
|
||||
@if (element.ShowLabel) {
|
||||
<label for="@element.HtmlId">@element.Label</label>
|
||||
<label for="@element.HtmlId">@Model.ProcessedLabel</label>
|
||||
}
|
||||
@tagBuilder.ToHtmlString(TagRenderMode.SelfClosing)
|
||||
@if (element.ValidationSettings.ShowValidationMessage == true) {
|
||||
@Html.ValidationMessage(element.Name)
|
||||
@Html.ValidationMessage((string)Model.ProcessedName)
|
||||
}
|
@@ -3,17 +3,18 @@
|
||||
@using Orchard.Layouts.Helpers
|
||||
@{
|
||||
var element = (Query)Model.Element;
|
||||
var name = String.IsNullOrWhiteSpace((string)Model.ProcessedName) ? "CheckList1" : (string)Model.ProcessedName;
|
||||
var tagBuilder = (OrchardTagBuilder)TagBuilderExtensions.CreateElementTagBuilder(Model, "ol");
|
||||
var index = 0;
|
||||
}
|
||||
@if (element.ShowLabel) {
|
||||
<label>@Html.Raw(element.Label)</label>
|
||||
<label>@Html.Raw(Model.ProcessedLabel)</label>
|
||||
}
|
||||
@tagBuilder.StartElement
|
||||
@foreach (var option in Model.Options) {
|
||||
var inputTagBuilder = new OrchardTagBuilder("input");
|
||||
inputTagBuilder.Attributes["type"] = "checkbox";
|
||||
inputTagBuilder.Attributes["name"] = element.Name;
|
||||
inputTagBuilder.Attributes["name"] = name;
|
||||
inputTagBuilder.Attributes["value"] = option.Value;
|
||||
|
||||
if (option.Selected) {
|
||||
@@ -33,5 +34,5 @@
|
||||
}
|
||||
@tagBuilder.EndElement
|
||||
@if (element.ValidationSettings.ShowValidationMessage == true) {
|
||||
@Html.ValidationMessage(element.Name)
|
||||
@Html.ValidationMessage(name)
|
||||
}
|
@@ -3,7 +3,7 @@
|
||||
@{
|
||||
var element = (Query)Model.Element;
|
||||
var attributes = (IDictionary<string, object>)TagBuilderExtensions.GetCommonElementAttributes(Model);
|
||||
var name = String.IsNullOrWhiteSpace(element.Name) ? "MultiSelectList1" : element.Name;
|
||||
var name = String.IsNullOrWhiteSpace((string)Model.ProcessedName) ? "MultiSelectList1" : (string)Model.ProcessedName;
|
||||
var options = (IEnumerable<SelectListItem>)Model.Options;
|
||||
var clientValidationAttributes = (IDictionary<string, string>)Model.ClientValidationAttributes;
|
||||
var htmlId = !String.IsNullOrWhiteSpace(element.HtmlId) ? element.HtmlId : name;
|
||||
@@ -13,9 +13,9 @@
|
||||
}
|
||||
}
|
||||
@if (element.ShowLabel) {
|
||||
<label for="@htmlId">@Html.Raw(element.Label)</label>
|
||||
<label for="@htmlId">@Html.Raw(Model.ProcessedLabel)</label>
|
||||
}
|
||||
@Html.ListBox(name, options, attributes)
|
||||
@if (element.ValidationSettings.ShowValidationMessage == true) {
|
||||
@Html.ValidationMessage(element.Name)
|
||||
@Html.ValidationMessage(name)
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user