diff --git a/src/Orchard.Web/Core/Common/Settings/TextFieldSettings.cs b/src/Orchard.Web/Core/Common/Settings/TextFieldSettings.cs
index 651d1eb28..f6a054786 100644
--- a/src/Orchard.Web/Core/Common/Settings/TextFieldSettings.cs
+++ b/src/Orchard.Web/Core/Common/Settings/TextFieldSettings.cs
@@ -7,6 +7,7 @@ namespace Orchard.Core.Common.Settings {
public string Flavor { get; set; }
public bool Required { get; set; }
public string Hint { get; set; }
+ public string Placeholder { get; set; }
public string DefaultValue { get; set; }
}
}
diff --git a/src/Orchard.Web/Core/Common/Settings/TextFieldSettingsEvents.cs b/src/Orchard.Web/Core/Common/Settings/TextFieldSettingsEvents.cs
index 9ae678cb9..e65f4b612 100644
--- a/src/Orchard.Web/Core/Common/Settings/TextFieldSettingsEvents.cs
+++ b/src/Orchard.Web/Core/Common/Settings/TextFieldSettingsEvents.cs
@@ -33,6 +33,7 @@ namespace Orchard.Core.Common.Settings {
builder.WithSetting("TextFieldSettings.Flavor", model.Settings.Flavor);
builder.WithSetting("TextFieldSettings.Hint", model.Settings.Hint);
builder.WithSetting("TextFieldSettings.Required", model.Settings.Required.ToString(CultureInfo.InvariantCulture));
+ builder.WithSetting("TextFieldSettings.Placeholder", model.Settings.Placeholder);
builder.WithSetting("TextFieldSettings.DefaultValue", model.Settings.DefaultValue);
yield return DefinitionTemplate(model);
diff --git a/src/Orchard.Web/Core/Common/ViewModels/DateTimeEditor.cs b/src/Orchard.Web/Core/Common/ViewModels/DateTimeEditor.cs
index 0663ccc0f..14fa709f4 100644
--- a/src/Orchard.Web/Core/Common/ViewModels/DateTimeEditor.cs
+++ b/src/Orchard.Web/Core/Common/ViewModels/DateTimeEditor.cs
@@ -9,5 +9,7 @@ namespace Orchard.Core.Common.ViewModels {
public string Time { get; set; }
public bool ShowDate { get; set; }
public bool ShowTime { get; set; }
+ public string DatePlaceholder { get; set; }
+ public string TimePlaceholder { get; set; }
}
}
\ No newline at end of file
diff --git a/src/Orchard.Web/Core/Common/Views/Body-Textarea.Editor.cshtml b/src/Orchard.Web/Core/Common/Views/Body-Textarea.Editor.cshtml
index 98ca9d236..b95b646fd 100644
--- a/src/Orchard.Web/Core/Common/Views/Body-Textarea.Editor.cshtml
+++ b/src/Orchard.Web/Core/Common/Views/Body-Textarea.Editor.cshtml
@@ -8,6 +8,10 @@
if (Model.AutoFocus == true) {
htmlAttributes["autofocus"] = "autofocus";
}
+
+ if (!String.IsNullOrEmpty(Model.Placeholder)) {
+ htmlAttributes["placeholder"] = Model.Placeholder;
+ }
}
@Html.TextArea("Text", (string)Model.Text, 25, 80, htmlAttributes)
\ No newline at end of file
diff --git a/src/Orchard.Web/Core/Common/Views/Body.Editor.cshtml b/src/Orchard.Web/Core/Common/Views/Body.Editor.cshtml
index 1cddc06ba..79bfd412b 100644
--- a/src/Orchard.Web/Core/Common/Views/Body.Editor.cshtml
+++ b/src/Orchard.Web/Core/Common/Views/Body.Editor.cshtml
@@ -13,6 +13,10 @@
if (Model.AutoFocus == true) {
htmlAttributes["autofocus"] = "autofocus";
}
+
+ if (!String.IsNullOrEmpty(Model.Placeholder)) {
+ htmlAttributes["placeholder"] = Model.Placeholder;
+ }
}
@Html.TextArea("Text", (string)Model.Text, 25, 80, htmlAttributes)
\ No newline at end of file
diff --git a/src/Orchard.Web/Core/Common/Views/DefinitionTemplates/TextFieldSettingsEventsViewModel.cshtml b/src/Orchard.Web/Core/Common/Views/DefinitionTemplates/TextFieldSettingsEventsViewModel.cshtml
index c339727a9..c34fcc8eb 100644
--- a/src/Orchard.Web/Core/Common/Views/DefinitionTemplates/TextFieldSettingsEventsViewModel.cshtml
+++ b/src/Orchard.Web/Core/Common/Views/DefinitionTemplates/TextFieldSettingsEventsViewModel.cshtml
@@ -19,6 +19,14 @@
@T("The help text is written under the field when authors are editing the content item.")
@Html.ValidationMessageFor(m => m.Settings.Hint)
+
+
+ @T("Watermark (placeholder)")
+ @Html.TextBoxFor(m => m.Settings.Placeholder, new { @class = "text large" })
+ @Html.ValidationMessageFor(m => m.Settings.Placeholder)
+ @T("A hint to display when the input of text is empty. (optional)")
+
+
@Display.DefinitionTemplate(TemplateName: "TextFieldDefaultValueEditor", Model: Model)
\ No newline at end of file
diff --git a/src/Orchard.Web/Core/Common/Views/EditorTemplates/DateTimeEditor.cshtml b/src/Orchard.Web/Core/Common/Views/EditorTemplates/DateTimeEditor.cshtml
index f72b093d0..219276fe0 100644
--- a/src/Orchard.Web/Core/Common/Views/EditorTemplates/DateTimeEditor.cshtml
+++ b/src/Orchard.Web/Core/Common/Views/EditorTemplates/DateTimeEditor.cshtml
@@ -5,13 +5,13 @@
}
@if (Model.ShowDate) {
- @T("Date")
- @Html.TextBoxFor(m => m.Date, new { placeholder = T("Date").Text })
+ @T("Date")
+ @Html.TextBoxFor(m => m.Date, new { placeholder = Model.DatePlaceholder ?? T("Date").Text })
}
@if (Model.ShowTime) {
- @T("Time")
- @Html.TextBoxFor(m => m.Time, new { placeholder = T("Time").Text })
+ @T("Time")
+ @Html.TextBoxFor(m => m.Time, new { placeholder = Model.TimePlaceholder ?? T("Time").Text })
}
@if (Model.ShowDate) { @Html.ValidationMessageFor(m => m.Date) }
diff --git a/src/Orchard.Web/Core/Common/Views/EditorTemplates/Fields.Common.Text.Edit.cshtml b/src/Orchard.Web/Core/Common/Views/EditorTemplates/Fields.Common.Text.Edit.cshtml
index de76c21bb..d5f8784df 100644
--- a/src/Orchard.Web/Core/Common/Views/EditorTemplates/Fields.Common.Text.Edit.cshtml
+++ b/src/Orchard.Web/Core/Common/Views/EditorTemplates/Fields.Common.Text.Edit.cshtml
@@ -3,11 +3,13 @@
class="required" }>@Model.Field.DisplayName
@if (String.IsNullOrWhiteSpace(Model.Settings.Flavor)) {
- @(Model.Settings.Required ? Html.TextBoxFor(m => m.Text, new {@class = "text", required = "required"}) : Html.TextBoxFor(m => m.Text, new {@class = "text"}))
+ @(Model.Settings.Required
+ ? Html.TextBoxFor(m => m.Text, new { @class = "text", required = "required", placeholder = Model.Settings.Placeholder })
+ : Html.TextBoxFor(m => m.Text, new { @class = "text", placeholder = Model.Settings.Placeholder }))
@Html.ValidationMessageFor(m => m.Text)
}
else {
- @Display.Body_Editor(Text: Model.Text, EditorFlavor: Model.Settings.Flavor, Required: Model.Settings.Required, ContentItem: Model.ContentItem)
+ @Display.Body_Editor(Text: Model.Text, EditorFlavor: Model.Settings.Flavor, Required: Model.Settings.Required, ContentItem: Model.ContentItem, Placeholder: Model.Settings.Placeholder)
}
@if (HasText(Model.Settings.Hint)) {
@Model.Settings.Hint
diff --git a/src/Orchard.Web/Modules/Orchard.Fields/Drivers/DateTimeFieldDriver.cs b/src/Orchard.Web/Modules/Orchard.Fields/Drivers/DateTimeFieldDriver.cs
index 290f1a1e7..2df7af861 100644
--- a/src/Orchard.Web/Modules/Orchard.Fields/Drivers/DateTimeFieldDriver.cs
+++ b/src/Orchard.Web/Modules/Orchard.Fields/Drivers/DateTimeFieldDriver.cs
@@ -64,6 +64,8 @@ namespace Orchard.Fields.Drivers {
Time = showTime ? DateLocalizationServices.ConvertToLocalizedTimeString(value, options) : null,
ShowDate = showDate,
ShowTime = showTime,
+ DatePlaceholder = settings.DatePlaceholder,
+ TimePlaceholder = settings.TimePlaceholder
}
};
@@ -102,6 +104,8 @@ namespace Orchard.Fields.Drivers {
Time = showTime ? DateLocalizationServices.ConvertToLocalizedTimeString(value, options) : null,
ShowDate = showDate,
ShowTime = showTime,
+ DatePlaceholder = settings.DatePlaceholder,
+ TimePlaceholder = settings.TimePlaceholder
}
};
diff --git a/src/Orchard.Web/Modules/Orchard.Fields/Settings/DateTimeFieldEditorEvents.cs b/src/Orchard.Web/Modules/Orchard.Fields/Settings/DateTimeFieldEditorEvents.cs
index 30c53d60f..50a5be156 100644
--- a/src/Orchard.Web/Modules/Orchard.Fields/Settings/DateTimeFieldEditorEvents.cs
+++ b/src/Orchard.Web/Modules/Orchard.Fields/Settings/DateTimeFieldEditorEvents.cs
@@ -40,6 +40,8 @@ namespace Orchard.Fields.Settings {
builder.WithSetting("DateTimeFieldSettings.Display", model.Display.ToString());
builder.WithSetting("DateTimeFieldSettings.Hint", model.Hint);
builder.WithSetting("DateTimeFieldSettings.Required", model.Required.ToString(CultureInfo.InvariantCulture));
+ builder.WithSetting("DateTimeFieldSettings.DatePlaceholder", model.DatePlaceholder);
+ builder.WithSetting("DateTimeFieldSettings.TimePlaceholder", model.TimePlaceholder);
model.DefaultValue = model.Editor == null ? model.DefaultValue : _dateLocalizationServices.ConvertFromLocalizedString(model.Editor.Date, model.Editor.Time);
builder.WithSetting("DateTimeFieldSettings.DefaultValue", model.DefaultValue.HasValue ? model.DefaultValue.Value.ToString(CultureInfo.InvariantCulture) : String.Empty);
diff --git a/src/Orchard.Web/Modules/Orchard.Fields/Settings/DateTimeFieldSettings.cs b/src/Orchard.Web/Modules/Orchard.Fields/Settings/DateTimeFieldSettings.cs
index 97859bdd3..d21720804 100644
--- a/src/Orchard.Web/Modules/Orchard.Fields/Settings/DateTimeFieldSettings.cs
+++ b/src/Orchard.Web/Modules/Orchard.Fields/Settings/DateTimeFieldSettings.cs
@@ -13,6 +13,8 @@ namespace Orchard.Fields.Settings {
public DateTimeFieldDisplays Display { get; set; }
public string Hint { get; set; }
public bool Required { get; set; }
+ public string DatePlaceholder { get; set; }
+ public string TimePlaceholder { get; set; }
public DateTime? DefaultValue { get; set; }
public DateTimeEditor Editor { get; set; }
}
diff --git a/src/Orchard.Web/Modules/Orchard.Fields/Settings/LinkFieldEditorEvents.cs b/src/Orchard.Web/Modules/Orchard.Fields/Settings/LinkFieldEditorEvents.cs
index 356aba645..91877507c 100644
--- a/src/Orchard.Web/Modules/Orchard.Fields/Settings/LinkFieldEditorEvents.cs
+++ b/src/Orchard.Web/Modules/Orchard.Fields/Settings/LinkFieldEditorEvents.cs
@@ -28,6 +28,8 @@ namespace Orchard.Fields.Settings {
builder.WithSetting("LinkFieldSettings.TargetMode", model.TargetMode.ToString());
builder.WithSetting("LinkFieldSettings.LinkTextMode", model.LinkTextMode.ToString());
builder.WithSetting("LinkFieldSettings.StaticText", model.StaticText);
+ builder.WithSetting("LinkFieldSettings.UrlPlaceholder", model.UrlPlaceholder);
+ builder.WithSetting("LinkFieldSettings.TextPlaceholder", model.TextPlaceholder);
builder.WithSetting("LinkFieldSettings.DefaultValue", model.DefaultValue);
builder.WithSetting("LinkFieldSettings.TextDefaultValue", model.TextDefaultValue);
diff --git a/src/Orchard.Web/Modules/Orchard.Fields/Settings/LinkFieldSettings.cs b/src/Orchard.Web/Modules/Orchard.Fields/Settings/LinkFieldSettings.cs
index 62439a971..6b67baf05 100644
--- a/src/Orchard.Web/Modules/Orchard.Fields/Settings/LinkFieldSettings.cs
+++ b/src/Orchard.Web/Modules/Orchard.Fields/Settings/LinkFieldSettings.cs
@@ -5,6 +5,8 @@
public TargetMode TargetMode { get; set; }
public LinkTextMode LinkTextMode { get; set; }
public string StaticText { get; set; }
+ public string UrlPlaceholder { get; set; }
+ public string TextPlaceholder { get; set; }
public string DefaultValue { get; set; }
public string TextDefaultValue { get; set; }
diff --git a/src/Orchard.Web/Modules/Orchard.Fields/Settings/NumericFieldEditorEvents.cs b/src/Orchard.Web/Modules/Orchard.Fields/Settings/NumericFieldEditorEvents.cs
index ff037da5c..bc8fe4c05 100644
--- a/src/Orchard.Web/Modules/Orchard.Fields/Settings/NumericFieldEditorEvents.cs
+++ b/src/Orchard.Web/Modules/Orchard.Fields/Settings/NumericFieldEditorEvents.cs
@@ -28,6 +28,7 @@ namespace Orchard.Fields.Settings {
builder.WithSetting("NumericFieldSettings.Scale", model.Scale.ToString(CultureInfo.InvariantCulture));
builder.WithSetting("NumericFieldSettings.Minimum", model.Minimum.HasValue ? model.Minimum.Value.ToString(CultureInfo.InvariantCulture) : string.Empty);
builder.WithSetting("NumericFieldSettings.Maximum", model.Maximum.HasValue ? model.Maximum.Value.ToString(CultureInfo.InvariantCulture) : string.Empty);
+ builder.WithSetting("NumericFieldSettings.Placeholder", model.Placeholder);
builder.WithSetting("NumericFieldSettings.DefaultValue", model.DefaultValue);
}
diff --git a/src/Orchard.Web/Modules/Orchard.Fields/Settings/NumericFieldSettings.cs b/src/Orchard.Web/Modules/Orchard.Fields/Settings/NumericFieldSettings.cs
index 5abca801b..f5ddff390 100644
--- a/src/Orchard.Web/Modules/Orchard.Fields/Settings/NumericFieldSettings.cs
+++ b/src/Orchard.Web/Modules/Orchard.Fields/Settings/NumericFieldSettings.cs
@@ -5,6 +5,7 @@
public int Scale { get; set; }
public decimal? Minimum { get; set; }
public decimal? Maximum { get; set; }
+ public string Placeholder { get; set; }
public string DefaultValue { get; set; }
public NumericFieldSettings() {
diff --git a/src/Orchard.Web/Modules/Orchard.Fields/Views/DefinitionTemplates/DateTimeFieldSettings.cshtml b/src/Orchard.Web/Modules/Orchard.Fields/Views/DefinitionTemplates/DateTimeFieldSettings.cshtml
index b6b72d301..4d8961aa8 100644
--- a/src/Orchard.Web/Modules/Orchard.Fields/Views/DefinitionTemplates/DateTimeFieldSettings.cshtml
+++ b/src/Orchard.Web/Modules/Orchard.Fields/Views/DefinitionTemplates/DateTimeFieldSettings.cshtml
@@ -28,6 +28,24 @@
+
+
+ @T("Watermark (placeholder) for the date")
+ @Html.TextBoxFor(m => m.DatePlaceholder, new { @class = "text large" })
+ @Html.ValidationMessageFor(m => m.DatePlaceholder)
+ @T("A hint to display when the date is empty. (optional)")
+
+
+
+
+
+ @T("Watermark (placeholder) for the time")
+ @Html.TextBoxFor(m => m.TimePlaceholder, new { @class = "text large" })
+ @Html.ValidationMessageFor(m => m.TimePlaceholder)
+ @T("A hint to display when the time is empty. (optional)")
+
+
+
@T("Default value")
diff --git a/src/Orchard.Web/Modules/Orchard.Fields/Views/DefinitionTemplates/EnumerationFieldSettings.cshtml b/src/Orchard.Web/Modules/Orchard.Fields/Views/DefinitionTemplates/EnumerationFieldSettings.cshtml
index ffd253bff..d9b5f14fa 100644
--- a/src/Orchard.Web/Modules/Orchard.Fields/Views/DefinitionTemplates/EnumerationFieldSettings.cshtml
+++ b/src/Orchard.Web/Modules/Orchard.Fields/Views/DefinitionTemplates/EnumerationFieldSettings.cshtml
@@ -30,9 +30,9 @@
- @T("Default value")
+ @T("Default value")
@Html.TextBoxFor(m => m.DefaultValue, new { @class = "text large tokenized ui-autocomplete-input" })
@T("Enter a default option for the field. You can use tokens in this field. If there is no equivalent choice among Options, it will not be used. (optional)")
@Html.ValidationMessageFor(m => m.DefaultValue)
-
\ No newline at end of file
+
diff --git a/src/Orchard.Web/Modules/Orchard.Fields/Views/DefinitionTemplates/LinkFieldSettings.cshtml b/src/Orchard.Web/Modules/Orchard.Fields/Views/DefinitionTemplates/LinkFieldSettings.cshtml
index 9dad8f7b7..42e6c8504 100644
--- a/src/Orchard.Web/Modules/Orchard.Fields/Views/DefinitionTemplates/LinkFieldSettings.cshtml
+++ b/src/Orchard.Web/Modules/Orchard.Fields/Views/DefinitionTemplates/LinkFieldSettings.cshtml
@@ -44,6 +44,22 @@
@Html.ValidationMessageFor(m => m.Hint)
+
+
+ @T("Watermark (placeholder) for the url")
+ @Html.TextBoxFor(m => m.UrlPlaceholder, new { @class = "text large" })
+ @Html.ValidationMessageFor(m => m.UrlPlaceholder)
+ @T("A hint to display when the input of url is empty. (optional)")
+
+
+
+
+ @T("Watermark (placeholder) for the text of the link")
+ @Html.TextBoxFor(m => m.TextPlaceholder, new { @class = "text large" })
+ @Html.ValidationMessageFor(m => m.TextPlaceholder)
+ @T("A hint to display when the input of text is empty. (optional)")
+
+
@T("Default value")
diff --git a/src/Orchard.Web/Modules/Orchard.Fields/Views/DefinitionTemplates/NumericFieldSettings.cshtml b/src/Orchard.Web/Modules/Orchard.Fields/Views/DefinitionTemplates/NumericFieldSettings.cshtml
index 09cedb61a..45b536fae 100644
--- a/src/Orchard.Web/Modules/Orchard.Fields/Views/DefinitionTemplates/NumericFieldSettings.cshtml
+++ b/src/Orchard.Web/Modules/Orchard.Fields/Views/DefinitionTemplates/NumericFieldSettings.cshtml
@@ -41,9 +41,17 @@
- @T("Default value")
+ @T("Watermark (placeholder)")
+ @Html.TextBoxFor(m => m.Placeholder, new { @class = "text large" })
+ @Html.ValidationMessageFor(m => m.Placeholder)
+ @T("A hint to display when the input is empty. (optional)")
+
+
+
+
+ @T("Default value")
@Html.TextBoxFor(m => m.DefaultValue, new { @class = "text large tokenized ui-autocomplete-input" })
@T("The default value for the field. It must be a number, and if not it will not shown. Make sure to set the Scale property if the value is not an integer. You can use tokens in this field. (optional)")
@Html.ValidationMessageFor(m => m.DefaultValue)
-
\ No newline at end of file
+
diff --git a/src/Orchard.Web/Modules/Orchard.Fields/Views/EditorTemplates/Fields/Link.Edit.cshtml b/src/Orchard.Web/Modules/Orchard.Fields/Views/EditorTemplates/Fields/Link.Edit.cshtml
index f1c487f09..24e28fa44 100644
--- a/src/Orchard.Web/Modules/Orchard.Fields/Views/EditorTemplates/Fields/Link.Edit.cshtml
+++ b/src/Orchard.Web/Modules/Orchard.Fields/Views/EditorTemplates/Fields/Link.Edit.cshtml
@@ -24,7 +24,7 @@
class="required" }>@T("Url")
- @Html.TextBoxFor(m => m.Value, new { @class = "text large" })
+ @Html.TextBoxFor(m => m.Value, new { @class = "text large", placeholder = settings.UrlPlaceholder })
@T("A valid url, i.e. http://orchardproject.net, /content/file.pdf, ...")
@if (!String.IsNullOrWhiteSpace(settings.DefaultValue)) {
@@ -35,7 +35,7 @@
class="required" }>@T("Text")
- @Html.TextBoxFor(m => m.Text, new { @class = "text medium" })
+ @Html.TextBoxFor(m => m.Text, new { @class = "text medium", placeholder = settings.TextPlaceholder })
@if (!String.IsNullOrWhiteSpace(settings.TextDefaultValue)) {
@T("If the field is left empty then the default value will be used.")
}
diff --git a/src/Orchard.Web/Modules/Orchard.Fields/Views/EditorTemplates/Fields/Numeric.Edit.cshtml b/src/Orchard.Web/Modules/Orchard.Fields/Views/EditorTemplates/Fields/Numeric.Edit.cshtml
index baae80d67..ff294cc30 100644
--- a/src/Orchard.Web/Modules/Orchard.Fields/Views/EditorTemplates/Fields/Numeric.Edit.cshtml
+++ b/src/Orchard.Web/Modules/Orchard.Fields/Views/EditorTemplates/Fields/Numeric.Edit.cshtml
@@ -5,8 +5,8 @@
class="required" }>@Model.Field.DisplayName
@(Model.Settings.Required
- ? Html.TextBoxFor(m => m.Value, new {@class = "text-small", type = "text", min = (Model.Settings.Minimum.HasValue) ? Model.Settings.Minimum.Value : 0, max = (Model.Settings.Maximum.HasValue) ? Model.Settings.Maximum.Value : 1000000, step = Math.Pow(10, 0 - Model.Settings.Scale).ToString(CultureInfo.InvariantCulture), required = "required"})
- : Html.TextBoxFor(m => m.Value, new {@class = "text-small", type = "text", min = (Model.Settings.Minimum.HasValue) ? Model.Settings.Minimum.Value : 0, max = (Model.Settings.Maximum.HasValue) ? Model.Settings.Maximum.Value : 1000000, step = Math.Pow(10, 0 - Model.Settings.Scale).ToString(CultureInfo.InvariantCulture)}))
+ ? Html.TextBoxFor(m => m.Value, new {@class = "text-small", type = "text", min = (Model.Settings.Minimum.HasValue) ? Model.Settings.Minimum.Value : 0, max = (Model.Settings.Maximum.HasValue) ? Model.Settings.Maximum.Value : 1000000, step = Math.Pow(10, 0 - Model.Settings.Scale).ToString(CultureInfo.InvariantCulture), required = "required", placeholder = Model.Settings.Placeholder })
+ : Html.TextBoxFor(m => m.Value, new {@class = "text-small", type = "text", min = (Model.Settings.Minimum.HasValue) ? Model.Settings.Minimum.Value : 0, max = (Model.Settings.Maximum.HasValue) ? Model.Settings.Maximum.Value : 1000000, step = Math.Pow(10, 0 - Model.Settings.Scale).ToString(CultureInfo.InvariantCulture), placeholder = Model.Settings.Placeholder }))
@Html.ValidationMessageFor(m => m.Value)
@if (HasText(Model.Settings.Hint)) {
@Model.Settings.Hint
diff --git a/src/Orchard.Web/Modules/Orchard.Resources/Views/EditorTemplates/DateTimeEditor.cshtml b/src/Orchard.Web/Modules/Orchard.Resources/Views/EditorTemplates/DateTimeEditor.cshtml
index 65dec23d3..c924c95fe 100644
--- a/src/Orchard.Web/Modules/Orchard.Resources/Views/EditorTemplates/DateTimeEditor.cshtml
+++ b/src/Orchard.Web/Modules/Orchard.Resources/Views/EditorTemplates/DateTimeEditor.cshtml
@@ -11,12 +11,12 @@
@if (Model.ShowDate) {
@T("Date")
- @Html.TextBoxFor(m => m.Date, new { placeholder = T("Date").Text, @class = "text" })
+ @Html.TextBoxFor(m => m.Date, new { placeholder = Model.DatePlaceholder ?? T("Date").Text, @class = "text" })
}
@if (Model.ShowTime) {
@T("Time")
- @Html.TextBoxFor(m => m.Time, new { placeholder = T("Time").Text, @class = "text" })
+ @Html.TextBoxFor(m => m.Time, new { placeholder = Model.TimePlaceholder ?? T("Time").Text, @class = "text" })
}
@if (Model.ShowDate) { @Html.ValidationMessageFor(m => m.Date) }
diff --git a/src/Orchard.Web/Modules/Orchard.jQuery/Views/EditorTemplates/DateTimeEditor.cshtml b/src/Orchard.Web/Modules/Orchard.jQuery/Views/EditorTemplates/DateTimeEditor.cshtml
index fdea5a964..b3f5216be 100644
--- a/src/Orchard.Web/Modules/Orchard.jQuery/Views/EditorTemplates/DateTimeEditor.cshtml
+++ b/src/Orchard.Web/Modules/Orchard.jQuery/Views/EditorTemplates/DateTimeEditor.cshtml
@@ -11,12 +11,12 @@
@if (Model.ShowDate) {
@T("Date")
- @Html.TextBoxFor(m => m.Date, new { placeholder = T("Date").Text, @class = "text" })
+ @Html.TextBoxFor(m => m.Date, new { placeholder = Model.DatePlaceholder ?? T("Date").Text, @class = "text" })
}
@if (Model.ShowTime) {
@T("Time")
- @Html.TextBoxFor(m => m.Time, new { placeholder = T("Time").Text, @class = "text" })
+ @Html.TextBoxFor(m => m.Time, new { placeholder = Model.TimePlaceholder ?? T("Time").Text, @class = "text" })
}
@if (Model.ShowDate) { @Html.ValidationMessageFor(m => m.Date) }