+
+ @if (Model.MinCardinality > 0)
+ {
+ *
+ }
+
+ @displayName
+
+ @*Empty = @Model.IsEmpty.ToString();*@
+
+
+ @if (Model.SystemType.Equals(TypeCode.String.ToString()))
+ {
+
+ if (Model.DataType.ToLower().Equals("text") ||
+ (Model.DataType.ToLower().Equals("string") &&
+ Model.Value != null && Model.Value.ToString().Length >= 60))
{
-
- if (Model.DataType.ToLower().Equals("text") ||
- (Model.DataType.ToLower().Equals("string") &&
- Model.Value!= null && Model.Value.ToString().Length>=60))
+ if (!locked)
{
- if (!locked)
+ if (Model.DomainList.Count == 0)
{
- if (Model.DomainList.Count == 0)
- {
- @Html.TextAreaFor(m => m.Value,
- new { OnChange = "OnChange(this)",
- Name = @displayName,
- Id = @idInput,
- PackageId = @Model.Parent.Id,
- Title = @errorMessage,
- @class = "bx-input bx-metadataFormTextInput " + @errorClass,
- onkeyup = "OnKeyUpTextArea(this)",
- OnLoad = "OnKeyUpTextInput(this)"
- })
- }
- else
- {
- @(Html.Telerik().DropDownList()
- .Placeholder("Select, please")
- .Name(@idInput)
- .HtmlAttributes(new { PackageId = @Model.Parent.Id, Title = @errorMessage, @class = "bx-dropdown" + @errorClass })
- .ClientEvents(events => events.OnChange("OnChangeDropDown"))
- .BindTo(new SelectList(Model.DomainList, Model.Value)))
- }
+ @Html.TextAreaFor(m => m.Value,
+ new { OnChange = "OnChange(this)",
+ Name = @displayName,
+ Id = @idInput,
+ PackageId = @Model.Parent.Id,
+ Title = @errorMessage,
+ @class = "bx-input bx-metadataFormTextInput " + @errorClass,
+ onkeyup = "OnKeyUpTextArea(this)",
+ OnLoad = "OnKeyUpTextInput(this)"
+ })
}
else
{
-
- //@Html.TextAreaFor(m => m.Value, new { disabled = "disabled", Name = @displayName, Id = @idInput, PackageId = @Model.Parent.Id, Title = @errorMessage, @class = "bx-input bx-metadataFormTextInput " + @errorClass + " " + lockedClass })
-
- @if (Model.Value != null)
- {
- @Html.DisplayWithLinksFor(m => m.Value)
- }
-
+ @(Html.Telerik().DropDownList()
+ .Placeholder("Select, please")
+ .Name(@idInput)
+ .HtmlAttributes(new { PackageId = @Model.Parent.Id, Title = @errorMessage, @class = "bx-dropdown" + @errorClass })
+ .ClientEvents(events => events.OnChange("OnChangeDropDown"))
+ .BindTo(new SelectList(Model.DomainList, Model.Value)))
}
+ }
+ else
+ {
+ //@Html.TextAreaFor(m => m.Value, new { disabled = "disabled", Name = @displayName, Id = @idInput, PackageId = @Model.Parent.Id, Title = @errorMessage, @class = "bx-input bx-metadataFormTextInput " + @errorClass + " " + lockedClass })
+
+ @if (Model.Value != null)
+ {
+ @Html.DisplayWithLinksFor(m => m.Value)
+ }
+
+ }
- }
- if (Model.DataType.ToLower().Equals("string") &&
- ((Model.Value != null && Model.Value.ToString().Length < 60) ||
- Model.Value == null))
- {
- if (!locked)
- {
+ }
- if (Model.DomainList.Count == 0)
- {
- string value = "";
- if (@Model.Value != null)
- {
- value = @Model.Value.ToString();
- }
-
- @*@Html.TextBoxFor(m => m.Value, new { OnChange = "OnChange(this)", Name = @displayName, Id = @idInput, PackageId = @Model.Parent.Id, Title = @errorMessage, @class = "bx-input " + @errorClass })*@
-
- @(Html.Telerik().AutoComplete()
- .Name(@idInput)
- .Encode(false)
- .Value(value)
- .HtmlAttributes(new {@class = "bx-metadataFormTextInput " + @errorClass, title = @errorMessage, onKeyUp = "OnKeyUpTextInput(this)", test = Model.Id })
- .ClientEvents(events => events
- .OnChange("OnChangeTextInput")
- .OnClose("OnClose"))
-
- .DataBinding(dataBinding => dataBinding
- .Ajax().Select("_AutoCompleteAjaxLoading", "Form", new {id = Model.Id, type = Model.Source.GetType().Name})
- .Cache(false)
-
- )
-
- .Filterable(filtering =>
- {
- filtering.FilterMode(AutoCompleteFilterMode.Contains);
- filtering.MinimumChars(1);
-
- })
- )
+ if (Model.DataType.ToLower().Equals("string") &&
+ ((Model.Value != null && Model.Value.ToString().Length < 60) ||
+ Model.Value == null))
+ {
+ if (!locked)
+ {
- }
- else
+ if (Model.DomainList.Count == 0)
+ {
+ string value = "";
+ if (@Model.Value != null)
{
- @(Html.Telerik().DropDownList()
- .Name(@idInput)
- .Placeholder("Select, please")
- .HtmlAttributes(new {PackageId = @Model.Parent.Id, Title = @errorMessage, @class = "bx-dropdown " + @errorClass})
- .ClientEvents(events => events.OnChange("OnChangeDropDown"))
- .BindTo(new SelectList(Model.DomainList, Model.Value)))
+ value = @Model.Value.ToString();
}
+
+ @*@Html.TextBoxFor(m => m.Value, new { OnChange = "OnChange(this)", Name = @displayName, Id = @idInput, PackageId = @Model.Parent.Id, Title = @errorMessage, @class = "bx-input " + @errorClass })*@
+
+ @(Html.Telerik().AutoComplete()
+ .Name(@idInput)
+ .Encode(false)
+ .Value(value)
+ .HtmlAttributes(new { @class = "bx-metadataFormTextInput " + @errorClass, title = @errorMessage, onKeyUp = "OnKeyUpTextInput(this)", test = Model.Id })
+ .ClientEvents(events => events
+ .OnChange("OnChangeTextInput")
+ .OnClose("OnClose"))
+
+ .DataBinding(dataBinding => dataBinding
+ .Ajax().Select("_AutoCompleteAjaxLoading", "Form", new { id = Model.Id, type = Model.Source.GetType().Name })
+ .Cache(false)
+
+ )
+
+ .Filterable(filtering =>
+ {
+ filtering.FilterMode(AutoCompleteFilterMode.Contains);
+ filtering.MinimumChars(1);
+
+ })
+ )
+
}
else
{
- //@Html.TextBoxFor(m => m.Value, new {disabled = "disabled", Name = @displayName, Id = @idInput, PackageId = @Model.Parent.Id, Title = @errorMessage, @class = "bx-input bx-metadataFormTextInput " + @errorClass + " " + lockedClass})
-
-
- @if (Model.Value != null)
- {
+ @(Html.Telerik().DropDownList()
+ .Name(@idInput)
+ .Placeholder("Select, please")
+ .HtmlAttributes(new { PackageId = @Model.Parent.Id, Title = @errorMessage, @class = "bx-dropdown " + @errorClass })
+ .ClientEvents(events => events.OnChange("OnChangeDropDown"))
+ .BindTo(new SelectList(Model.DomainList, Model.Value)))
+ }
+ }
+ else
+ {
+ //@Html.TextBoxFor(m => m.Value, new {disabled = "disabled", Name = @displayName, Id = @idInput, PackageId = @Model.Parent.Id, Title = @errorMessage, @class = "bx-input bx-metadataFormTextInput " + @errorClass + " " + lockedClass})
- @Html.DisplayWithLinksFor(m => m.Value)
- }
-
+
+ @if (Model.Value != null)
+ {
- }
+ @Html.DisplayWithLinksFor(m => m.Value)
+ }
+
}
}
- @if (Model.SystemType.Equals(TypeCode.Boolean.ToString()))
- {
+ }
- bool value = false;//(bool?)Model.Value ?? false;
- try
- {
- value = Convert.ToBoolean(Model.Value);
- }
- catch
- {
- value = false;
- }
+ @if (Model.SystemType.Equals(TypeCode.Boolean.ToString()))
+ {
- if (!locked)
- {
- @Html.CheckBox(Model.DisplayName, value, new { OnClick = "OnChangeCheckBox(this)", Name = @displayName, Id = @idInput, PackageId = @Model.Parent.Id, Title = @errorMessage })
- }
- else
- {
- @Html.CheckBox(Model.DisplayName, value, new { OnClick = "OnChangeCheckBox(this)", disabled = "disabled", Name = @displayName, Id = @idInput, PackageId = @Model.Parent.Id, Title = @errorMessage })
- }
+ bool value = false;//(bool?)Model.Value ?? false;
+ try
+ {
+ value = Convert.ToBoolean(Model.Value);
+ }
+ catch
+ {
+ value = false;
+ }
+ if (!locked)
+ {
+ @Html.CheckBox(Model.DisplayName, value, new { OnClick = "OnChangeCheckBox(this)", Name = @displayName, Id = @idInput, PackageId = @Model.Parent.Id, Title = @errorMessage })
+ }
+ else
+ {
+ @Html.CheckBox(Model.DisplayName, value, new { OnClick = "OnChangeCheckBox(this)", disabled = "disabled", Name = @displayName, Id = @idInput, PackageId = @Model.Parent.Id, Title = @errorMessage })
}
- @if (Model.SystemType.Equals(TypeCode.Int32.ToString()) ||
- Model.SystemType.Equals(TypeCode.Int64.ToString()) ||
- Model.SystemType.Equals(TypeCode.Int16.ToString()) ||
- Model.SystemType.Equals(TypeCode.UInt16.ToString()) ||
- Model.SystemType.Equals(TypeCode.UInt32.ToString()) ||
- Model.SystemType.Equals(TypeCode.UInt64.ToString())
-
- )
+ }
+
+ @if (Model.SystemType.Equals(TypeCode.Int32.ToString()) ||
+ Model.SystemType.Equals(TypeCode.Int64.ToString()) ||
+ Model.SystemType.Equals(TypeCode.Int16.ToString()) ||
+ Model.SystemType.Equals(TypeCode.UInt16.ToString()) ||
+ Model.SystemType.Equals(TypeCode.UInt32.ToString()) ||
+ Model.SystemType.Equals(TypeCode.UInt64.ToString())
+
+ )
+ {
+ if (!locked)
{
- if (!locked)
- {
- int value = 0;
- value = Convert.ToInt32(Model.Value);
-
- @(Html.Telerik().IntegerTextBox()
- .Name(idInput)
- .MinValue(0)
- .MaxValue(Int32.MaxValue)
- .Value(value)
- .ClientEvents(events => events
- .OnChange("OnChangeNumbers"))
- .InputHtmlAttributes(new { PackageId = @Model.Parent.Id, Title = @errorMessage, @class = "bx-input bx-metadataFormTextInput " + @errorClass })
- )
- }
- else
- {
+ int value = 0;
+ value = Convert.ToInt32(Model.Value);
+
+ @(Html.Telerik().IntegerTextBox()
+ .Name(idInput)
+ .MinValue(0)
+ .MaxValue(Int32.MaxValue)
+ .Value(value)
+ .ClientEvents(events => events
+ .OnChange("OnChangeNumbers"))
+ .InputHtmlAttributes(new { PackageId = @Model.Parent.Id, Title = @errorMessage, @class = "bx-input bx-metadataFormTextInput " + @errorClass })
+ )
+ }
+ else
+ {
- @Html.TextBoxFor(m => m.Value, new { disabled = "disabled", Name = @displayName, Id = @idInput, PackageId = @Model.Parent.Id, Title = @errorMessage, @class = "bx-input bx-metadataFormTextInput " + @errorClass + " " + lockedClass })
- }
+ @Html.TextBoxFor(m => m.Value, new { disabled = "disabled", Name = @displayName, Id = @idInput, PackageId = @Model.Parent.Id, Title = @errorMessage, @class = "bx-input bx-metadataFormTextInput " + @errorClass + " " + lockedClass })
}
+ }
+
+ @if (Model.SystemType.Equals(TypeCode.Decimal.ToString()) ||
+ Model.SystemType.Equals(TypeCode.Double.ToString()) ||
+ Model.SystemType.Equals(TypeCode.Single.ToString())
+ )
+ {
+ if (!locked)
+ {
+ @Html.TextBoxFor(m => m.Value, new { OnChange = "OnChange(this)", Name = @displayName, Id = @idInput, PackageId = @Model.Parent.Id, Title = @errorMessage, @class = "bx-input bx-metadataFormTextInput " + @errorClass })
+ }
+ else
+ {
+ @Html.TextBoxFor(m => m.Value, new { OnChange = "OnChange(this)", disabled = "disabled", Name = @displayName, Id = @idInput, PackageId = @Model.Parent.Id, Title = @errorMessage, @class = "bx-input bx-metadataFormTextInput " + @errorClass })
+ }
+ }
+
- @if (Model.SystemType.Equals(TypeCode.Decimal.ToString()) ||
- Model.SystemType.Equals(TypeCode.Double.ToString()) ||
- Model.SystemType.Equals(TypeCode.Single.ToString())
- )
+ @if (Model.SystemType.Equals(TypeCode.DateTime.ToString()))
+ {
+ if (!locked)
{
- if (!locked)
+ string value = "";
+ if (Model.Value != null)
{
- @Html.TextBoxFor(m => m.Value, new { OnChange = "OnChange(this)", Name = @displayName, Id = @idInput, PackageId = @Model.Parent.Id, Title = @errorMessage, @class = "bx-input bx-metadataFormTextInput " + @errorClass })
+ value = Model.Value.ToString();
}
else
{
- @Html.TextBoxFor(m => m.Value, new { OnChange = "OnChange(this)", disabled = "disabled", Name = @displayName, Id = @idInput, PackageId = @Model.Parent.Id, Title = @errorMessage, @class = "bx-input bx-metadataFormTextInput " + @errorClass })
+ value = "";//@defaultDate.ToString();
}
- }
+ string format = Model.DisplayPattern;
+ if (string.IsNullOrEmpty(format))
+ {
+ format = "yyyy-MM-dd";
+ }
- @if (Model.SystemType.Equals(TypeCode.DateTime.ToString()))
+ @(Html.Telerik().DatePicker()
+ .Name(@idInput)
+ .ShowButton(true)
+ .TodayButton("d")
+ .OpenOnFocus(true)
+ .Format(format)
+ .Value(value)
+ .ClientEvents(events => events
+ .OnChange("OnChangeDatePicker"))
+ .InputHtmlAttributes(new { Title = @errorMessage, @class = @errorClass })
+ )
+ }
+ else
{
- if (!locked)
- {
- string value = "";
- if (Model.Value != null)
- {
- value = Model.Value.ToString();
- }
- else
+ @Html.TextBoxFor(m => m.Value, new { disabled = "disabled", Name = @displayName, Id = @idInput, PackageId = @Model.Parent.Id, @class = "bx-input bx-metadataFormTextInput " + lockedClass })
+ }
+ }
+
+
+
+
+
+
+ @if (!string.IsNullOrEmpty(Model.Discription))
{
- value = "";//@defaultDate.ToString();
+
}
- string format = Model.DisplayPattern;
- if (string.IsNullOrEmpty(format))
- {
- format = "yyyy-MM-dd";
- }
+
- @(Html.Telerik().DatePicker()
- .Name(@idInput)
- .ShowButton(true)
- .TodayButton("d")
- .OpenOnFocus(true)
- .Format(format)
- .Value(value)
- .ClientEvents(events => events
- .OnChange("OnChangeDatePicker"))
- .InputHtmlAttributes(new { Title = @errorMessage, @class = @errorClass })
- )
- }
- else
+
+ @Html.ValidationMessageFor(m => m.Value)
+ @if (Model.MaxCardinality > 1 && !locked)
{
- @Html.TextBoxFor(m => m.Value, new { disabled = "disabled", Name = @displayName, Id = @idInput, PackageId = @Model.Parent.Id, @class = "bx-input bx-metadataFormTextInput " + lockedClass })
- }
- }
-
-
-
-
+
+
- @if (!string.IsNullOrEmpty(Model.Discription))
- {
-
- }
-
-
-
-
- @Html.ValidationMessageFor(m => m.Value)
- @if (Model.MaxCardinality > 1 && !locked)
- {
-
-
-
-
- @if (!Model.last)
+ @if (!Model.last)
{
}
@@ -361,25 +362,25 @@
}
-
-
+
+
@if (!Model.first)
{
}
else
{
-
+
}
-
+
- }
-
-
-
-
-
+ }
+
+