diff --git a/.gitignore b/.gitignore
index 8c1601a0a..c110e2248 100644
--- a/.gitignore
+++ b/.gitignore
@@ -68,6 +68,9 @@ ipch/
_ReSharper*/
*.[Rr]e[Ss]harper
+# CodeRush is a .NET coding add-in
+.cr*/
+
# TeamCity is a build add-in
_TeamCity*
diff --git a/src/Orchard.Web/Core/Settings/Views/EditorTemplates/Parts.Settings.SiteSettingsPart.cshtml b/src/Orchard.Web/Core/Settings/Views/EditorTemplates/Parts.Settings.SiteSettingsPart.cshtml
index b11cb0939..746efc39b 100644
--- a/src/Orchard.Web/Core/Settings/Views/EditorTemplates/Parts.Settings.SiteSettingsPart.cshtml
+++ b/src/Orchard.Web/Core/Settings/Views/EditorTemplates/Parts.Settings.SiteSettingsPart.cshtml
@@ -63,8 +63,8 @@
@T("Determines whether scripts and stylesheets load in their debuggable or minified form.")
- @Html.LabelFor(m => m.UseCdn, T("Use CDN"))
@Html.CheckBoxFor(m => m.UseCdn)
+ @Html.LabelFor(m => m.UseCdn, T("Use CDN").Text, new { @class = "forcheckbox" })
@T("Determines whether the defined CDN value is used for scripts and stylesheets, or their local version")
@@ -84,4 +84,4 @@
@T("Determines the last element of the database that can be displayed. Leave 0 for unlimited.")
}
-
\ No newline at end of file
+
diff --git a/src/Orchard.Web/Modules/Orchard.ContentTypes/ViewModels/AddFieldViewModel.cs b/src/Orchard.Web/Modules/Orchard.ContentTypes/ViewModels/AddFieldViewModel.cs
index 4ad6fe51e..4b6217c83 100644
--- a/src/Orchard.Web/Modules/Orchard.ContentTypes/ViewModels/AddFieldViewModel.cs
+++ b/src/Orchard.Web/Modules/Orchard.ContentTypes/ViewModels/AddFieldViewModel.cs
@@ -1,5 +1,4 @@
using System.Collections.Generic;
-using System.ComponentModel.DataAnnotations;
using Orchard.ContentManagement.MetaData;
namespace Orchard.ContentTypes.ViewModels {
@@ -11,19 +10,16 @@ namespace Orchard.ContentTypes.ViewModels {
///
/// The technical name of the field
///
- [Required]
public string Name { get; set; }
///
/// The display name of the field
///
- [Required]
public string DisplayName { get; set; }
///
/// The selected field type
///
- [Required]
public string FieldTypeName { get; set; }
///
diff --git a/src/Orchard.Web/Modules/Orchard.ContentTypes/ViewModels/EditFieldNameViewModel.cs b/src/Orchard.Web/Modules/Orchard.ContentTypes/ViewModels/EditFieldNameViewModel.cs
index db01940c6..fb046ad99 100644
--- a/src/Orchard.Web/Modules/Orchard.ContentTypes/ViewModels/EditFieldNameViewModel.cs
+++ b/src/Orchard.Web/Modules/Orchard.ContentTypes/ViewModels/EditFieldNameViewModel.cs
@@ -1,5 +1,4 @@
using System.Collections.Generic;
-using System.ComponentModel.DataAnnotations;
using Orchard.ContentManagement.MetaData;
namespace Orchard.ContentTypes.ViewModels {
@@ -12,7 +11,6 @@ namespace Orchard.ContentTypes.ViewModels {
///
/// The display name of the field
///
- [Required]
public string DisplayName { get; set; }
}
}
\ No newline at end of file
diff --git a/src/Orchard.Web/Modules/Orchard.ContentTypes/Views/Admin/AddFieldTo.cshtml b/src/Orchard.Web/Modules/Orchard.ContentTypes/Views/Admin/AddFieldTo.cshtml
index d8a7dee0d..d54b645d3 100644
--- a/src/Orchard.Web/Modules/Orchard.ContentTypes/Views/Admin/AddFieldTo.cshtml
+++ b/src/Orchard.Web/Modules/Orchard.ContentTypes/Views/Admin/AddFieldTo.cshtml
@@ -4,17 +4,19 @@
Style.Require("ContentTypesAdmin");
Layout.Title = T("Add New Field To \"{0}\"", Model.Part.DisplayName).ToString();
+
+ var returnUrl = Request.QueryString["returnUrl"];
}
@using (Html.BeginFormAntiForgeryPost()) {
@Html.ValidationSummary()
}
diff --git a/src/Orchard.Web/Modules/Orchard.ContentTypes/Views/Admin/Edit.cshtml b/src/Orchard.Web/Modules/Orchard.ContentTypes/Views/Admin/Edit.cshtml
index 9751beaa8..bc0b6868a 100644
--- a/src/Orchard.Web/Modules/Orchard.ContentTypes/Views/Admin/Edit.cshtml
+++ b/src/Orchard.Web/Modules/Orchard.ContentTypes/Views/Admin/Edit.cshtml
@@ -1,8 +1,10 @@
+@using Orchard.Utility.Extensions;
@model Orchard.ContentTypes.ViewModels.EditTypeViewModel
@{
Style.Require("ContentTypesAdmin");
Script.Require("jQuery");
Layout.Title = T("Edit Content Type - {0}", Html.Raw(Model.DisplayName)).Text;
+ var returnUrl = ViewContext.RequestContext.HttpContext.Request.ToUrlString();
}
@@ -27,7 +29,7 @@
@T("Fields")
- @Html.ActionLink(T("Add Field").Text, "AddFieldTo", new { area = "Orchard.ContentTypes", id = Model.Name }, new { @class = "button" })
+ @Html.ActionLink(T("Add Field").Text, "AddFieldTo", new { area = "Orchard.ContentTypes", id = Model.Name, returnUrl }, new { @class = "button" })
@Html.EditorFor(m => m.Fields, "Fields", "")
@T("Parts")
diff --git a/src/Orchard.Web/Modules/Orchard.ContentTypes/Views/Admin/EditField.cshtml b/src/Orchard.Web/Modules/Orchard.ContentTypes/Views/Admin/EditField.cshtml
index 7ea22ac44..1ecb517d4 100644
--- a/src/Orchard.Web/Modules/Orchard.ContentTypes/Views/Admin/EditField.cshtml
+++ b/src/Orchard.Web/Modules/Orchard.ContentTypes/Views/Admin/EditField.cshtml
@@ -4,12 +4,14 @@
Style.Require("ContentTypesAdmin");
Layout.Title = T("Edit Field \"{0}\"", Html.Raw(Model.DisplayName)).ToString();
+
+ var returnUrl = Request.QueryString["returnUrl"];
}
@using (Html.BeginFormAntiForgeryPost()) {
@Html.ValidationSummary()
}
diff --git a/src/Orchard.Web/Modules/Orchard.ContentTypes/Views/EditorTemplates/Field.cshtml b/src/Orchard.Web/Modules/Orchard.ContentTypes/Views/EditorTemplates/Field.cshtml
index 1313e5143..db780c845 100644
--- a/src/Orchard.Web/Modules/Orchard.ContentTypes/Views/EditorTemplates/Field.cshtml
+++ b/src/Orchard.Web/Modules/Orchard.ContentTypes/Views/EditorTemplates/Field.cshtml
@@ -1,13 +1,16 @@
@using Orchard.Utility.Extensions
@model Orchard.ContentTypes.ViewModels.EditPartFieldViewModel
-
\ No newline at end of file
+@{
+ var returnUrl = ViewContext.RequestContext.HttpContext.Request.ToUrlString();
+}
+
\ No newline at end of file
diff --git a/src/Orchard.Web/Modules/Orchard.DynamicForms/Drivers/CheckboxElementDriver.cs b/src/Orchard.Web/Modules/Orchard.DynamicForms/Drivers/CheckboxElementDriver.cs
index beb915651..232cc7253 100644
--- a/src/Orchard.Web/Modules/Orchard.DynamicForms/Drivers/CheckboxElementDriver.cs
+++ b/src/Orchard.Web/Modules/Orchard.DynamicForms/Drivers/CheckboxElementDriver.cs
@@ -32,7 +32,7 @@ namespace Orchard.DynamicForms.Drivers {
Id: "Value",
Name: "Value",
Title: "Value",
- Classes: new[] { "text", "large", "tokenized" },
+ Classes: new[] { "text", "large" },
Description: T("The value of this checkbox.")));
return form;
diff --git a/src/Orchard.Web/Modules/Orchard.DynamicForms/Drivers/EmailFieldElementDriver.cs b/src/Orchard.Web/Modules/Orchard.DynamicForms/Drivers/EmailFieldElementDriver.cs
index 4bbd49372..91c9da709 100644
--- a/src/Orchard.Web/Modules/Orchard.DynamicForms/Drivers/EmailFieldElementDriver.cs
+++ b/src/Orchard.Web/Modules/Orchard.DynamicForms/Drivers/EmailFieldElementDriver.cs
@@ -31,7 +31,7 @@ namespace Orchard.DynamicForms.Drivers {
Id: "Value",
Name: "Value",
Title: "Value",
- Classes: new[] { "text", "medium", "tokenized" },
+ Classes: new[] { "text", "medium" },
Description: T("The value of this email field.")));
return form;
diff --git a/src/Orchard.Web/Modules/Orchard.DynamicForms/Drivers/HiddenFieldElementDriver.cs b/src/Orchard.Web/Modules/Orchard.DynamicForms/Drivers/HiddenFieldElementDriver.cs
index b8a4f7d5b..b99c3c1bf 100644
--- a/src/Orchard.Web/Modules/Orchard.DynamicForms/Drivers/HiddenFieldElementDriver.cs
+++ b/src/Orchard.Web/Modules/Orchard.DynamicForms/Drivers/HiddenFieldElementDriver.cs
@@ -27,7 +27,7 @@ namespace Orchard.DynamicForms.Drivers {
Id: "Value",
Name: "Value",
Title: "Value",
- Classes: new[] { "text", "medium", "tokenized" },
+ Classes: new[] { "text", "medium" },
Description: T("The value of this hidden field.")));
return form;
@@ -40,7 +40,7 @@ namespace Orchard.DynamicForms.Drivers {
// Allow the initial value to be tokenized.
// If a value was posted, use that value instead (without tokenizing it).
- context.ElementShape.ProcessedValue = element.PostedValue != null ? element.PostedValue : _tokenizer.Replace(element.RuntimeValue, tokenData, new ReplaceOptions { Encoding = ReplaceOptions.NoEncode });
+ context.ElementShape.ProcessedValue = element.PostedValue != null ? element.PostedValue : _tokenizer.Replace(element.RuntimeValue ?? "", tokenData, new ReplaceOptions { Encoding = ReplaceOptions.NoEncode });
}
}
-}
\ No newline at end of file
+}
diff --git a/src/Orchard.Web/Modules/Orchard.DynamicForms/Drivers/TextAreaElementDriver.cs b/src/Orchard.Web/Modules/Orchard.DynamicForms/Drivers/TextAreaElementDriver.cs
index dc52384d8..3dc880b8a 100644
--- a/src/Orchard.Web/Modules/Orchard.DynamicForms/Drivers/TextAreaElementDriver.cs
+++ b/src/Orchard.Web/Modules/Orchard.DynamicForms/Drivers/TextAreaElementDriver.cs
@@ -30,7 +30,7 @@ namespace Orchard.DynamicForms.Drivers {
Id: "Value",
Name: "Value",
Title: "Value",
- Classes: new[] { "text", "large", "tokenized" },
+ Classes: new[] { "text", "large" },
Description: T("The value of this text area.")),
_Rows: shape.Textbox(
Id: "Rows",
diff --git a/src/Orchard.Web/Modules/Orchard.DynamicForms/Drivers/TextFieldElementDriver.cs b/src/Orchard.Web/Modules/Orchard.DynamicForms/Drivers/TextFieldElementDriver.cs
index 5ba11d182..821c5a1f0 100644
--- a/src/Orchard.Web/Modules/Orchard.DynamicForms/Drivers/TextFieldElementDriver.cs
+++ b/src/Orchard.Web/Modules/Orchard.DynamicForms/Drivers/TextFieldElementDriver.cs
@@ -31,7 +31,7 @@ namespace Orchard.DynamicForms.Drivers {
Id: "Value",
Name: "Value",
Title: "Value",
- Classes: new[] { "text", "medium", "tokenized" },
+ Classes: new[] { "text", "medium" },
Description: T("The value of this text field.")));
return form;
diff --git a/src/Orchard.Web/Modules/Orchard.DynamicForms/Drivers/UrlFieldElementDriver.cs b/src/Orchard.Web/Modules/Orchard.DynamicForms/Drivers/UrlFieldElementDriver.cs
index d1e9b4943..05ecc9c04 100644
--- a/src/Orchard.Web/Modules/Orchard.DynamicForms/Drivers/UrlFieldElementDriver.cs
+++ b/src/Orchard.Web/Modules/Orchard.DynamicForms/Drivers/UrlFieldElementDriver.cs
@@ -31,7 +31,7 @@ namespace Orchard.DynamicForms.Drivers {
Id: "Value",
Name: "Value",
Title: "Value",
- Classes: new[] {"text", "medium", "tokenized"},
+ Classes: new[] { "text", "medium" },
Description: T("The value of this URL field.")));
return form;
diff --git a/src/Orchard.Web/Modules/Orchard.Fields/Views/EditorTemplates/Fields/Boolean.Edit.cshtml b/src/Orchard.Web/Modules/Orchard.Fields/Views/EditorTemplates/Fields/Boolean.Edit.cshtml
index 9adbae3e6..c039f3e81 100644
--- a/src/Orchard.Web/Modules/Orchard.Fields/Views/EditorTemplates/Fields/Boolean.Edit.cshtml
+++ b/src/Orchard.Web/Modules/Orchard.Fields/Views/EditorTemplates/Fields/Boolean.Edit.cshtml
@@ -5,7 +5,7 @@
var settings = Model.PartFieldDefinition.Settings.GetModel();
}