Esempio n. 1
0
        private IHtmlString GetSingleCheckboxHtml(IReadonlyFieldConfiguration fieldConfiguration)
        {
            var attrs = new HtmlAttributes(fieldConfiguration.HtmlAttributes);

            AdjustHtmlForModelState(attrs, FieldGenerator);
            var fieldhtml = HtmlCreator.BuildSingleCheckbox(GetFieldName(FieldGenerator), GetValue() ?? false, attrs);

            if (fieldConfiguration.HasInlineLabel)
            {
                if (fieldConfiguration.ShouldInlineLabelWrapElement)
                {
                    var inlineLabelText = fieldConfiguration.InlineLabelText;

                    var content = fieldhtml.ToHtmlString() + " " + (inlineLabelText != null ? inlineLabelText.ToHtmlString() : FieldGenerator.GetFieldDisplayName());

                    return(HtmlCreator.BuildLabel(null, new HtmlString(content), null));
                }
                else
                {
                    return(new HtmlString(string.Format("{0} {1}", fieldhtml, HtmlCreator.BuildLabel(
                                                            GetFieldName(FieldGenerator),
                                                            fieldConfiguration.InlineLabelText ?? FieldGenerator.GetFieldDisplayName().ToHtml(),
                                                            null
                                                            ))));
                }
            }
            else
            {
                return(fieldhtml);
            }
        }
        public static System.Web.WebPages.HelperResult GetHint(IReadonlyFieldConfiguration fieldConfiguration)
        {
            return(new System.Web.WebPages.HelperResult(__razor_helper_writer => {
#line 57 "..\..\Templates\Default\DefaultHtmlHelpers.cshtml"

                if (fieldConfiguration.Hint != null)
                {
#line default
#line hidden

                    WebViewPage.WriteLiteralTo(@__razor_helper_writer, "<div class=\"hint\">");



#line 58 "..\..\Templates\Default\DefaultHtmlHelpers.cshtml"
                    WebViewPage.WriteTo(@__razor_helper_writer, fieldConfiguration.Hint);

#line default
#line hidden

                    WebViewPage.WriteLiteralTo(@__razor_helper_writer, "</div>");



#line 58 "..\..\Templates\Default\DefaultHtmlHelpers.cshtml"
                }

#line default
#line hidden
            }));
        }
 /// <inheritdoc />
 public override IHtmlString GenerateFieldHtml(IReadonlyFieldConfiguration fieldConfiguration)
 {
     return(FieldGenerator.HtmlHelper.TextAreaFor(
                FieldGenerator.FieldProperty,
                fieldConfiguration.HtmlAttributes
                ));
 }
        public static System.Web.WebPages.HelperResult GetAppendedHtml(IReadonlyFieldConfiguration fieldConfiguration)
        {
            return(new System.Web.WebPages.HelperResult(__razor_helper_writer => {
#line 53 "..\..\Templates\Default\DefaultHtmlHelpers.cshtml"

                foreach (var html in fieldConfiguration.AppendedHtml)
                {
#line default
#line hidden


#line 54 "..\..\Templates\Default\DefaultHtmlHelpers.cshtml"
                    WebViewPage.WriteTo(@__razor_helper_writer, html);

#line default
#line hidden


#line 54 "..\..\Templates\Default\DefaultHtmlHelpers.cshtml"
                }

#line default
#line hidden
            }));
        }
        /// <summary>
        /// Returns HTML for an &lt;input&gt; HTML element.
        /// </summary>
        /// <param name="inputType">The type of input to produce</param>
        /// <param name="fieldConfiguration">The field configuration to use for attributes and format string</param>
        /// <returns>The HTML of the input element</returns>
        protected IHtmlContent GetInputHtml(TextInputType inputType, IReadonlyFieldConfiguration fieldConfiguration)
        {
            if (inputType == TextInputType.Password)
            {
                return(FieldGenerator.HtmlHelper.PasswordFor(FieldGenerator.FieldProperty, fieldConfiguration.HtmlAttributes));
            }

            var attrs = new HtmlAttributes(fieldConfiguration.HtmlAttributes);

            if (!attrs.Attributes.ContainsKey("type"))
            {
                attrs = attrs.Attr(type => inputType.ToString().ToLower());
            }

            IHtmlContent htmlContent;

            if (!string.IsNullOrEmpty(fieldConfiguration.FormatString))
            {
                htmlContent = FieldGenerator.HtmlHelper.TextBoxFor(
                    FieldGenerator.FieldProperty,
                    fieldConfiguration.FormatString,
                    attrs.ToDictionary()
                    );
            }
            else
            {
                htmlContent = FieldGenerator.HtmlHelper.TextBoxFor(
                    FieldGenerator.FieldProperty,
                    attrs.ToDictionary()
                    );
            }

            return(htmlContent);
        }
Esempio n. 6
0
        /// <inheritdoc />
        public override IHtmlContent GenerateFieldHtml(IReadonlyFieldConfiguration fieldConfiguration)
        {
            var model      = FieldGenerator.GetModel();
            var selectList = GetSelectList(model);

            return(GetSelectListHtml(selectList, fieldConfiguration));
        }
        public static Nancy.ViewEngines.Razor.HelperResult GetAppendedHtml(IReadonlyFieldConfiguration fieldConfiguration)
        {
#line default
#line hidden
            return(new Nancy.ViewEngines.Razor.HelperResult(__razor_helper_writer => {
#line 46 "..\..\Templates\HtmlHelpers.cshtml"

                if (fieldConfiguration != null)
                {
                    foreach (var html in fieldConfiguration.AppendedHtml)
                    {
#line default
#line hidden

#line 48 "..\..\Templates\HtmlHelpers.cshtml"
                        WriteTo(__razor_helper_writer, html);


#line default
#line hidden

#line 48 "..\..\Templates\HtmlHelpers.cshtml"
                    }
                }


#line default
#line hidden
            }));

#line 50 "..\..\Templates\HtmlHelpers.cshtml"
        }
        /// <inheritdoc />
        public IHtmlContent GetLabelHtml(IReadonlyFieldConfiguration fieldConfiguration)
        {
            fieldConfiguration = fieldConfiguration ?? new FieldConfiguration();

            string @for;

            if (fieldConfiguration.HtmlAttributes.ContainsKey("id"))
            {
                @for = fieldConfiguration.HtmlAttributes["id"].ToString();
            }
            else
            {
                @for = HtmlHelper.GetFullHtmlFieldName(FieldProperty);
            }

            var labelText = fieldConfiguration.LabelText
                            ?? GetFieldDisplayName().ToHtml();

            if (!fieldConfiguration.HasLabelElement)
            {
                return(labelText);
            }

            var labelAttrs = new HtmlAttributes();

            if (!string.IsNullOrEmpty(fieldConfiguration.LabelClasses))
            {
                labelAttrs.AddClass(fieldConfiguration.LabelClasses);
            }

            return(HtmlCreator.BuildLabel(@for, labelText, labelAttrs));
        }
Esempio n. 9
0
        public static System.Web.WebPages.HelperResult GetAppendedHtml(IReadonlyFieldConfiguration fieldConfiguration, bool isInputGroup)
        {
            return(new System.Web.WebPages.HelperResult(__razor_helper_writer => {
#line 70 "..\..\Templates\TwitterBootstrap3\TwitterBootstrapHtmlHelpers.cshtml"

                foreach (var html in fieldConfiguration.AppendedHtml)
                {
#line default
#line hidden


#line 71 "..\..\Templates\TwitterBootstrap3\TwitterBootstrapHtmlHelpers.cshtml"
                    WebViewPage.WriteTo(@__razor_helper_writer, GetInputGroupHtml(html, isInputGroup));

#line default
#line hidden


#line 71 "..\..\Templates\TwitterBootstrap3\TwitterBootstrapHtmlHelpers.cshtml"
                }

#line default
#line hidden
            }));
        }
Esempio n. 10
0
        public static System.Web.WebPages.HelperResult GetPrependedHtml(IReadonlyFieldConfiguration fieldConfiguration)
        {
#line default
#line hidden
            return(new System.Web.WebPages.HelperResult(__razor_helper_writer => {
#line 40 "..\..\Templates\HtmlHelpers.cshtml"

                if (fieldConfiguration != null)
                {
                    foreach (var html in fieldConfiguration.PrependedHtml)
                    {
#line default
#line hidden

#line 42 "..\..\Templates\HtmlHelpers.cshtml"
                        WriteTo(__razor_helper_writer, html);


#line default
#line hidden

#line 42 "..\..\Templates\HtmlHelpers.cshtml"
                    }
                }


#line default
#line hidden
            }));

#line 44 "..\..\Templates\HtmlHelpers.cshtml"
        }
Esempio n. 11
0
        public Nancy.ViewEngines.Razor.IHtmlString GetFieldHtml(IReadonlyFieldConfiguration fieldConfiguration)
        {
            fieldConfiguration = fieldConfiguration ?? new ReadonlyFieldConfiguration(new FieldConfiguration());
            if (fieldConfiguration.FieldHtml != null)
            {
                return(fieldConfiguration.FieldHtml);
            }

            return(FieldGeneratorHandlersRouter <TModel, T> .GetFieldHtml(this, fieldConfiguration));
        }
Esempio n. 12
0
        /// <inheritdoc />
        public IHtmlString GetFieldHtml(IReadonlyFieldConfiguration fieldConfiguration)
        {
            fieldConfiguration = fieldConfiguration ?? new FieldConfiguration();
            if (fieldConfiguration.FieldHtml != null)
            {
                return(fieldConfiguration.FieldHtml);
            }

            return(FieldGeneratorHandlersRouter <TModel, T> .GetHandler(this).GenerateFieldHtml(fieldConfiguration));
        }
Esempio n. 13
0
        /// <inheritdoc />
        public override IHtmlString GenerateFieldHtml(IReadonlyFieldConfiguration fieldConfiguration)
        {
            if (GetDisplayType(fieldConfiguration) == FieldDisplayType.Checkbox)
            {
                return(GetSingleCheckboxHtml(fieldConfiguration));
            }

            var selectList = GetBooleanSelectList(fieldConfiguration);

            return(GetSelectListHtml(selectList, FieldGenerator, fieldConfiguration));
        }
Esempio n. 14
0
        /// <inheritdoc />
        public override FieldDisplayType GetDisplayType(IReadonlyFieldConfiguration fieldConfiguration)
        {
            if (fieldConfiguration.DisplayType == FieldDisplayType.Default && FieldGenerator.Metadata.ModelType == typeof(bool))
            {
                return(FieldDisplayType.Checkbox);
            }

            return(fieldConfiguration.DisplayType == FieldDisplayType.List
                ? FieldDisplayType.List
                : FieldDisplayType.DropDown);
        }
Esempio n. 15
0
        private IEnumerable <SelectListItem> GetBooleanSelectList(IReadonlyFieldConfiguration fieldConfiguration)
        {
            var value = GetValue();

            yield return(new SelectListItem {
                Value = "true", Text = fieldConfiguration.TrueString, Selected = value == true
            });

            yield return(new SelectListItem {
                Value = "false", Text = fieldConfiguration.FalseString, Selected = value == false
            });
        }
Esempio n. 16
0
        private IHtmlString GetSingleCheckboxHtml(IReadonlyFieldConfiguration fieldConfiguration)
        {
            var attrs = new HtmlAttributes(fieldConfiguration.HtmlAttributes);

            AdjustHtmlForModelState(attrs, FieldGenerator);
            var fieldhtml = HtmlCreator.BuildSingleCheckbox(GetFieldName(FieldGenerator), GetValue() ?? false, attrs);
            var labelHtml = HtmlCreator.BuildLabel(
                GetFieldName(FieldGenerator),
                fieldConfiguration.InlineLabelText ?? FieldGenerator.GetFieldDisplayName().ToHtml(),
                null
                );

            return(new HtmlString(string.Format("{0} {1}", fieldhtml, labelHtml)));
        }
Esempio n. 17
0
        /// <inheritdoc />
        public override IHtmlContent GenerateFieldHtml(IReadonlyFieldConfiguration fieldConfiguration)
        {
            var type = TextInputType.Text;

            if (FieldGenerator.Metadata.DataTypeName == DataType.EmailAddress.ToString())
            {
                type = TextInputType.Email;
            }
            if (FieldGenerator.Metadata.DataTypeName == DataType.Url.ToString() || typeof(T) == typeof(Uri))
            {
                type = TextInputType.Url;
            }

            return(GetInputHtml(type, fieldConfiguration));
        }
        /// <inheritdoc />
        public virtual IHtmlContent BeginField(IHtmlContent labelHtml, IHtmlContent elementHtml, IHtmlContent validationHtml,
                                               ModelMetadata fieldMetadata, IReadonlyFieldConfiguration fieldConfiguration, bool isValid)
        {
            var requiredDesignator = RequiredDesignator(fieldMetadata, fieldConfiguration, isValid);

            return(new ChameleonFormsDefaultTemplate.Field().Render(new FieldParams()
            {
                RenderMode = FieldRenderMode.BeginField,
                FieldConfiguration = fieldConfiguration,
                ElementHtml = elementHtml,
                FieldMetadata = fieldMetadata,
                LabelHtml = labelHtml,
                RequiredDesignator = requiredDesignator,
                ValidationHtml = validationHtml
            }));
        }
Esempio n. 19
0
        public static System.Web.WebPages.HelperResult RequiredDesignator(IReadonlyFieldConfiguration fieldConfiguration)
        {
            return(new System.Web.WebPages.HelperResult(__razor_helper_writer => {
#line 88 "..\..\Templates\TwitterBootstrap3\TwitterBootstrapHtmlHelpers.cshtml"


#line default
#line hidden

                WebViewPage.WriteLiteralTo(@__razor_helper_writer, "<em class=\"required\" title=\"Required\">&lowast;</em>\r\n");



#line 90 "..\..\Templates\TwitterBootstrap3\TwitterBootstrapHtmlHelpers.cshtml"

#line default
#line hidden
            }));
        }
Esempio n. 20
0
        private IHtmlContent GetSingleCheckboxHtml(IReadonlyFieldConfiguration fieldConfiguration)
        {
            var attrs = new HtmlAttributes(fieldConfiguration.HtmlAttributes);

            AdjustHtmlForModelState(attrs);
            var fieldHtml = HtmlCreator.BuildSingleCheckbox(GetFieldName(), GetValue() ?? false, attrs);

            if (fieldConfiguration.HasInlineLabel)
            {
                if (fieldConfiguration.ShouldInlineLabelWrapElement)
                {
                    var inlineLabelText = fieldConfiguration.InlineLabelText;

                    var contentBuilder = new HtmlContentBuilder();
                    contentBuilder.AppendHtml(fieldHtml);
                    contentBuilder.Append(" ");
                    if (inlineLabelText != null)
                    {
                        contentBuilder.AppendHtml(inlineLabelText);
                    }
                    else
                    {
                        contentBuilder.Append(FieldGenerator.GetFieldDisplayName());
                    }

                    return(HtmlCreator.BuildLabel(null, contentBuilder, null));
                }
                else
                {
                    return(new HtmlContentBuilder()
                           .AppendHtml(fieldHtml)
                           .Append(" ")
                           .AppendHtml(HtmlCreator.BuildLabel(GetFieldName(), fieldConfiguration.InlineLabelText ?? FieldGenerator.GetFieldDisplayName().ToHtml(), null)));
                }
            }
            else
            {
                return(fieldHtml);
            }
        }
        private bool HasEmptySelectListItem(IReadonlyFieldConfiguration fieldConfiguration)
        {
            if (fieldConfiguration.EmptyItemHidden)
            {
                return(false);
            }

            // If it's a checkbox list then it
            //  shouldn't since you can uncheck everything
            if (fieldConfiguration.DisplayType == FieldDisplayType.List && FieldGenerator.HasMultipleValues())
            {
                return(false);
            }

            // If it's a radio list for a required field then it
            //  shouldn't since no value is not a valid value and
            //  an initial null value translates to none of the radio
            //  boxes being selected
            if (fieldConfiguration.DisplayType == FieldDisplayType.List)
            {
                return(!FieldGenerator.Metadata.IsRequired);
            }

            // If it's a multi-select dropdown and required then
            //  there shouldn't be an empty item
            if (FieldGenerator.HasMultipleValues())
            {
                return(!FieldGenerator.Metadata.IsRequired);
            }

            // Dropdown lists for nullable types should have an empty item
            if (!FieldGenerator.Metadata.ModelType.IsValueType ||
                Nullable.GetUnderlyingType(FieldGenerator.Metadata.ModelType) != null)
            {
                return(true);
            }

            return(false);
        }
        public static Nancy.ViewEngines.Razor.HelperResult GetHint(IReadonlyFieldConfiguration fieldConfiguration)
        {
#line default
#line hidden
            return(new Nancy.ViewEngines.Razor.HelperResult(__razor_helper_writer => {
#line 52 "..\..\Templates\HtmlHelpers.cshtml"

                if (fieldConfiguration != null && fieldConfiguration.Hint != null)
                {
#line default
#line hidden
                    WriteLiteralTo(__razor_helper_writer, "<div");

                    WriteLiteralTo(__razor_helper_writer, " class=\"hint\"");

                    WriteLiteralTo(__razor_helper_writer, ">");


#line 53 "..\..\Templates\HtmlHelpers.cshtml"
                    WriteTo(__razor_helper_writer, fieldConfiguration.Hint);


#line default
#line hidden
                    WriteLiteralTo(__razor_helper_writer, "</div>");


#line 53 "..\..\Templates\HtmlHelpers.cshtml"
                }


#line default
#line hidden
            }));

#line 54 "..\..\Templates\HtmlHelpers.cshtml"
        }
Esempio n. 23
0
        public Nancy.ViewEngines.Razor.IHtmlString GetLabelHtml(IReadonlyFieldConfiguration fieldConfiguration)
        {
            string @for;

            if (fieldConfiguration != null && fieldConfiguration.HtmlAttributes.ContainsKey("id"))
            {
                @for = fieldConfiguration.HtmlAttributes["id"].ToString();
            }
            else
            {
                @for = HtmlHelper.ViewContext.ViewData.TemplateInfo.GetFullHtmlFieldName(
                    ExpressionHelper.GetExpressionText(FieldProperty));
            }

            var labelText = (fieldConfiguration == null ? null : fieldConfiguration.LabelText)
                            ?? new NonEncodedHtmlString(GetFieldDisplayName());

            if (fieldConfiguration != null && !fieldConfiguration.HasLabel)
            {
                return(labelText);
            }

            return(HtmlCreator.BuildLabel(@for, labelText, null));
        }
public static System.Web.WebPages.HelperResult BeginFieldInternal(IHtmlString labelHtml, IHtmlString elementHtml, IHtmlString validationHtml, IReadonlyFieldConfiguration fieldConfiguration, ModelMetadata fieldMetadata, IHtmlString requiredDesignator) {
#line default
#line hidden
return new System.Web.WebPages.HelperResult(__razor_helper_writer => {

#line 62 "..\..\Templates\Default\DefaultHtmlHelpers.cshtml"
                                                                                                                                                                                                                     


#line default
#line hidden
WriteLiteralTo(__razor_helper_writer, "            <dt>");


#line 63 "..\..\Templates\Default\DefaultHtmlHelpers.cshtml"
WriteTo(__razor_helper_writer, labelHtml);


#line default
#line hidden

#line 63 "..\..\Templates\Default\DefaultHtmlHelpers.cshtml"
WriteTo(__razor_helper_writer, new HtmlString(fieldMetadata != null && fieldMetadata.IsRequired ? requiredDesignator.ToHtmlString() : ""));


#line default
#line hidden
WriteLiteralTo(__razor_helper_writer, "</dt>\r\n");

WriteLiteralTo(__razor_helper_writer, "            <dd>\r\n");

WriteLiteralTo(__razor_helper_writer, "                ");


#line 65 "..\..\Templates\Default\DefaultHtmlHelpers.cshtml"
WriteTo(__razor_helper_writer, GetPrependedHtml(fieldConfiguration));


#line default
#line hidden

#line 65 "..\..\Templates\Default\DefaultHtmlHelpers.cshtml"
                         WriteTo(__razor_helper_writer, elementHtml);


#line default
#line hidden

#line 65 "..\..\Templates\Default\DefaultHtmlHelpers.cshtml"
                                     WriteTo(__razor_helper_writer, GetAppendedHtml(fieldConfiguration));


#line default
#line hidden

#line 65 "..\..\Templates\Default\DefaultHtmlHelpers.cshtml"
                                                                         WriteTo(__razor_helper_writer, GetHint(fieldConfiguration));


#line default
#line hidden
WriteLiteralTo(__razor_helper_writer, " ");


#line 65 "..\..\Templates\Default\DefaultHtmlHelpers.cshtml"
                                                                                                      WriteTo(__razor_helper_writer, validationHtml);


#line default
#line hidden
WriteLiteralTo(__razor_helper_writer, "\r\n");


#line 66 "..\..\Templates\Default\DefaultHtmlHelpers.cshtml"


#line default
#line hidden
});

#line 66 "..\..\Templates\Default\DefaultHtmlHelpers.cshtml"
}
public static System.Web.WebPages.HelperResult GetHint(IReadonlyFieldConfiguration fieldConfiguration) {
#line default
#line hidden
return new System.Web.WebPages.HelperResult(__razor_helper_writer => {

#line 58 "..\..\Templates\Default\DefaultHtmlHelpers.cshtml"
                                                                 
    if (fieldConfiguration.Hint != null) {

#line default
#line hidden
WriteLiteralTo(__razor_helper_writer, "<div");

WriteLiteralTo(__razor_helper_writer, " class=\"hint\"");

WriteLiteralTo(__razor_helper_writer, ">");


#line 59 "..\..\Templates\Default\DefaultHtmlHelpers.cshtml"
                              WriteTo(__razor_helper_writer, fieldConfiguration.Hint);


#line default
#line hidden
WriteLiteralTo(__razor_helper_writer, "</div>");


#line 59 "..\..\Templates\Default\DefaultHtmlHelpers.cshtml"
                                                                                          }


#line default
#line hidden
});

#line 60 "..\..\Templates\Default\DefaultHtmlHelpers.cshtml"
}
public static System.Web.WebPages.HelperResult GetAppendedHtml(IReadonlyFieldConfiguration fieldConfiguration) {
#line default
#line hidden
return new System.Web.WebPages.HelperResult(__razor_helper_writer => {

#line 54 "..\..\Templates\Default\DefaultHtmlHelpers.cshtml"
                                                                         
    foreach (var html in fieldConfiguration.AppendedHtml) {

#line default
#line hidden

#line 55 "..\..\Templates\Default\DefaultHtmlHelpers.cshtml"
                             WriteTo(__razor_helper_writer, html);


#line default
#line hidden

#line 55 "..\..\Templates\Default\DefaultHtmlHelpers.cshtml"
                                                                }


#line default
#line hidden
});

#line 56 "..\..\Templates\Default\DefaultHtmlHelpers.cshtml"
}
        public static Nancy.ViewEngines.Razor.HelperResult GetHint(IReadonlyFieldConfiguration fieldConfiguration) {
#line default
#line hidden
            return new Nancy.ViewEngines.Razor.HelperResult(__razor_helper_writer => {

#line 52 "..\..\Templates\HtmlHelpers.cshtml"

                if (fieldConfiguration != null && fieldConfiguration.Hint != null) {

#line default
#line hidden
                    WriteLiteralTo(__razor_helper_writer, "<div");

                    WriteLiteralTo(__razor_helper_writer, " class=\"hint\"");

                    WriteLiteralTo(__razor_helper_writer, ">");


#line 53 "..\..\Templates\HtmlHelpers.cshtml"
                    WriteTo(__razor_helper_writer, fieldConfiguration.Hint);


#line default
#line hidden
                    WriteLiteralTo(__razor_helper_writer, "</div>");


#line 53 "..\..\Templates\HtmlHelpers.cshtml"
                }


#line default
#line hidden
            });

#line 54 "..\..\Templates\HtmlHelpers.cshtml"
        }
        public static Nancy.ViewEngines.Razor.HelperResult BeginFieldInternal(Nancy.ViewEngines.Razor.IHtmlString labelHtml, Nancy.ViewEngines.Razor.IHtmlString elementHtml, Nancy.ViewEngines.Razor.IHtmlString validationHtml, IReadonlyFieldConfiguration fieldConfiguration, ModelMetadata fieldMetadata) {
#line default
#line hidden
            return new Nancy.ViewEngines.Razor.HelperResult(__razor_helper_writer => {

#line 56 "..\..\Templates\HtmlHelpers.cshtml"



#line default
#line hidden
                WriteLiteralTo(__razor_helper_writer, "            <dt>");


#line 57 "..\..\Templates\HtmlHelpers.cshtml"
                WriteTo(__razor_helper_writer, labelHtml);


#line default
#line hidden

#line 57 "..\..\Templates\HtmlHelpers.cshtml"
                WriteTo(__razor_helper_writer, new HtmlString(fieldMetadata != null && fieldMetadata.IsRequired ? " <em class=\"required\">*</em>" : ""));


#line default
#line hidden
                WriteLiteralTo(__razor_helper_writer, "</dt>\r\n");

                WriteLiteralTo(__razor_helper_writer, "            <dd>\r\n");

                WriteLiteralTo(__razor_helper_writer, "                ");


#line 59 "..\..\Templates\HtmlHelpers.cshtml"
                WriteTo(__razor_helper_writer, GetPrependedHtml(fieldConfiguration));


#line default
#line hidden

#line 59 "..\..\Templates\HtmlHelpers.cshtml"
                WriteTo(__razor_helper_writer, elementHtml);


#line default
#line hidden

#line 59 "..\..\Templates\HtmlHelpers.cshtml"
                WriteTo(__razor_helper_writer, GetAppendedHtml(fieldConfiguration));


#line default
#line hidden

#line 59 "..\..\Templates\HtmlHelpers.cshtml"
                WriteTo(__razor_helper_writer, GetHint(fieldConfiguration));


#line default
#line hidden
                WriteLiteralTo(__razor_helper_writer, " ");


#line 59 "..\..\Templates\HtmlHelpers.cshtml"
                WriteTo(__razor_helper_writer, validationHtml);


#line default
#line hidden
                WriteLiteralTo(__razor_helper_writer, "\r\n");


#line 60 "..\..\Templates\HtmlHelpers.cshtml"


#line default
#line hidden
            });

#line 60 "..\..\Templates\HtmlHelpers.cshtml"
        }
public static System.Web.WebPages.HelperResult GetPrependedHtml(IReadonlyFieldConfiguration fieldConfiguration) {
#line default
#line hidden
return new System.Web.WebPages.HelperResult(__razor_helper_writer => {

#line 39 "..\..\Templates\HtmlHelpers.cshtml"
                                                                          
    if (fieldConfiguration != null) {
        foreach (var html in fieldConfiguration.PrependedHtml) {

#line default
#line hidden

#line 41 "..\..\Templates\HtmlHelpers.cshtml"
                                  WriteTo(__razor_helper_writer, html);


#line default
#line hidden

#line 41 "..\..\Templates\HtmlHelpers.cshtml"
                                                                     }
    }


#line default
#line hidden
});

#line 43 "..\..\Templates\HtmlHelpers.cshtml"
}
public static System.Web.WebPages.HelperResult Field(IHtmlString labelHtml, IHtmlString elementHtml, IHtmlString validationHtml, ModelMetadata fieldMetadata, IReadonlyFieldConfiguration fieldConfiguration) {
#line default
#line hidden
return new System.Web.WebPages.HelperResult(__razor_helper_writer => {

#line 61 "..\..\Templates\HtmlHelpers.cshtml"
                                                                                                                                                                        


#line default
#line hidden

#line 62 "..\..\Templates\HtmlHelpers.cshtml"
WriteTo(__razor_helper_writer, BeginFieldInternal(labelHtml, elementHtml, validationHtml, fieldConfiguration, fieldMetadata));


#line default
#line hidden

#line 62 "..\..\Templates\HtmlHelpers.cshtml"
                                                                                              


#line default
#line hidden
WriteLiteralTo(__razor_helper_writer, "            </dd>\r\n");


#line 64 "..\..\Templates\HtmlHelpers.cshtml"


#line default
#line hidden
});

#line 64 "..\..\Templates\HtmlHelpers.cshtml"
}
 public virtual Nancy.ViewEngines.Razor.IHtmlString BeginField(Nancy.ViewEngines.Razor.IHtmlString labelHtml,   Nancy.ViewEngines.Razor.IHtmlString elementHtml,   Nancy.ViewEngines.Razor.IHtmlString validationHtml, ModelMetadata fieldMetadata, IReadonlyFieldConfiguration fieldConfiguration, bool isValid)
 {
     return HtmlHelpers.BeginField(labelHtml, elementHtml, validationHtml, fieldMetadata, fieldConfiguration);
 }
public static System.Web.WebPages.HelperResult Field(IHtmlString labelHtml, IHtmlString elementHtml, IHtmlString validationHtml, ModelMetadata fieldMetadata, IReadonlyFieldConfiguration fieldConfiguration, bool isValid, IHtmlString requiredDesignator) {
return new System.Web.WebPages.HelperResult(__razor_helper_writer => {



#line 126 "..\..\Templates\TwitterBootstrap3\TwitterBootstrapHtmlHelpers.cshtml"
                                                                                                                                                                                                                      

#line default
#line hidden


#line 127 "..\..\Templates\TwitterBootstrap3\TwitterBootstrapHtmlHelpers.cshtml"
WebViewPage.WriteTo(@__razor_helper_writer, BeginFieldInternal(labelHtml, elementHtml, validationHtml, fieldConfiguration, fieldMetadata, isValid, requiredDesignator));

#line default
#line hidden


#line 127 "..\..\Templates\TwitterBootstrap3\TwitterBootstrapHtmlHelpers.cshtml"
                                                                                                                           

#line default
#line hidden

WebViewPage.WriteLiteralTo(@__razor_helper_writer, "            </div>\r\n");



#line 129 "..\..\Templates\TwitterBootstrap3\TwitterBootstrapHtmlHelpers.cshtml"

#line default
#line hidden

});

}
public static System.Web.WebPages.HelperResult BeginFieldInternal(IHtmlString labelHtml, IHtmlString elementHtml, IHtmlString validationHtml, IReadonlyFieldConfiguration fieldConfiguration, ModelMetadata fieldMetadata, bool isValid, IHtmlString requiredDesignator) {
return new System.Web.WebPages.HelperResult(__razor_helper_writer => {



#line 106 "..\..\Templates\TwitterBootstrap3\TwitterBootstrapHtmlHelpers.cshtml"
                                                                                                                                                                                                                                   
    var isCheckboxControl = fieldConfiguration.GetBagData<bool>("IsCheckboxControl");
    var canBeInputGroup = fieldConfiguration.GetBagData<bool>("CanBeInputGroup");
    var isRadioOrCheckboxList = fieldConfiguration.GetBagData<bool>("IsRadioOrCheckboxList");
    var isRequired = fieldMetadata != null && fieldMetadata.IsRequired;
    var isInputGroup = canBeInputGroup && (isRequired || fieldConfiguration.GetBagData<bool>("DisplayAsInputGroup"));

#line default
#line hidden

WebViewPage.WriteLiteralTo(@__razor_helper_writer, "            <div class=\"");



#line 112 "..\..\Templates\TwitterBootstrap3\TwitterBootstrapHtmlHelpers.cshtml"
WebViewPage.WriteTo(@__razor_helper_writer, isCheckboxControl ? "checkbox" : "form-group");

#line default
#line hidden



#line 112 "..\..\Templates\TwitterBootstrap3\TwitterBootstrapHtmlHelpers.cshtml"
                                WebViewPage.WriteTo(@__razor_helper_writer, !isValid ? " has-error" : string.Empty);

#line default
#line hidden

WebViewPage.WriteLiteralTo(@__razor_helper_writer, "\">\r\n");



#line 113 "..\..\Templates\TwitterBootstrap3\TwitterBootstrapHtmlHelpers.cshtml"
              
#line default
#line hidden


#line 113 "..\..\Templates\TwitterBootstrap3\TwitterBootstrapHtmlHelpers.cshtml"
WebViewPage.WriteTo(@__razor_helper_writer, GetLabelHtml(labelHtml, fieldConfiguration.HasLabel, isCheckboxControl, isRadioOrCheckboxList || (!isCheckboxControl && !isInputGroup), isRequired, requiredDesignator));

#line default
#line hidden


#line 113 "..\..\Templates\TwitterBootstrap3\TwitterBootstrapHtmlHelpers.cshtml"
                                                                                                                                                                                      
              if (isInputGroup)
              {

#line default
#line hidden

WebViewPage.WriteLiteralTo(@__razor_helper_writer, "            <div class=\"input-group\">\r\n");



#line 117 "..\..\Templates\TwitterBootstrap3\TwitterBootstrapHtmlHelpers.cshtml"
              }

#line default
#line hidden

WebViewPage.WriteLiteralTo(@__razor_helper_writer, "            ");



#line 118 "..\..\Templates\TwitterBootstrap3\TwitterBootstrapHtmlHelpers.cshtml"
WebViewPage.WriteTo(@__razor_helper_writer, GetPrependedHtml(fieldConfiguration, isInputGroup));

#line default
#line hidden



#line 118 "..\..\Templates\TwitterBootstrap3\TwitterBootstrapHtmlHelpers.cshtml"
                      WebViewPage.WriteTo(@__razor_helper_writer, elementHtml);

#line default
#line hidden



#line 118 "..\..\Templates\TwitterBootstrap3\TwitterBootstrapHtmlHelpers.cshtml"
                                  WebViewPage.WriteTo(@__razor_helper_writer, GetPostElementRequiredDesignator(isRequired, isCheckboxControl, requiredDesignator));

#line default
#line hidden



#line 118 "..\..\Templates\TwitterBootstrap3\TwitterBootstrapHtmlHelpers.cshtml"
                                                                                                                      WebViewPage.WriteTo(@__razor_helper_writer, GetAppendedHtml(fieldConfiguration, isInputGroup));

#line default
#line hidden



#line 118 "..\..\Templates\TwitterBootstrap3\TwitterBootstrapHtmlHelpers.cshtml"
                                                                                                                                                                        WebViewPage.WriteTo(@__razor_helper_writer, GetInputGroupRequiredDesignator(isRequired, isInputGroup, requiredDesignator));

#line default
#line hidden

WebViewPage.WriteLiteralTo(@__razor_helper_writer, "\r\n");



#line 119 "..\..\Templates\TwitterBootstrap3\TwitterBootstrapHtmlHelpers.cshtml"
              if (isInputGroup)
              {

#line default
#line hidden

WebViewPage.WriteLiteralTo(@__razor_helper_writer, "            </div>\r\n");



#line 122 "..\..\Templates\TwitterBootstrap3\TwitterBootstrapHtmlHelpers.cshtml"
              }

#line default
#line hidden

WebViewPage.WriteLiteralTo(@__razor_helper_writer, "            ");



#line 123 "..\..\Templates\TwitterBootstrap3\TwitterBootstrapHtmlHelpers.cshtml"
WebViewPage.WriteTo(@__razor_helper_writer, GetHint(fieldConfiguration));

#line default
#line hidden

WebViewPage.WriteLiteralTo(@__razor_helper_writer, " ");



#line 123 "..\..\Templates\TwitterBootstrap3\TwitterBootstrapHtmlHelpers.cshtml"
WebViewPage.WriteTo(@__razor_helper_writer, validationHtml);

#line default
#line hidden

WebViewPage.WriteLiteralTo(@__razor_helper_writer, "\r\n");



#line 124 "..\..\Templates\TwitterBootstrap3\TwitterBootstrapHtmlHelpers.cshtml"

#line default
#line hidden

});

}
public static System.Web.WebPages.HelperResult RequiredDesignator(IReadonlyFieldConfiguration fieldConfiguration) {
return new System.Web.WebPages.HelperResult(__razor_helper_writer => {



#line 88 "..\..\Templates\TwitterBootstrap3\TwitterBootstrapHtmlHelpers.cshtml"
                                                                            

#line default
#line hidden

WebViewPage.WriteLiteralTo(@__razor_helper_writer, "<em class=\"required\" title=\"Required\">&lowast;</em>\r\n");



#line 90 "..\..\Templates\TwitterBootstrap3\TwitterBootstrapHtmlHelpers.cshtml"

#line default
#line hidden

});

}
Esempio n. 35
0
 public virtual IHtmlString Field(IHtmlString labelHtml, IHtmlString elementHtml, IHtmlString validationHtml, ModelMetadata fieldMetadata, IReadonlyFieldConfiguration fieldConfiguration, bool isValid)
 {
     return HtmlHelpers.Field(labelHtml, elementHtml, validationHtml, fieldMetadata, fieldConfiguration);
 }
public static System.Web.WebPages.HelperResult BeginField(IHtmlString labelHtml, IHtmlString elementHtml, IHtmlString validationHtml, ModelMetadata fieldMetadata, IReadonlyFieldConfiguration fieldConfiguration, IHtmlString requiredDesignator)
{
#line default
#line hidden
return new System.Web.WebPages.HelperResult(__razor_helper_writer => {

#line 74 "..\..\Templates\Default\DefaultHtmlHelpers.cshtml"
 


#line default
#line hidden

#line 75 "..\..\Templates\Default\DefaultHtmlHelpers.cshtml"
WriteTo(__razor_helper_writer, BeginFieldInternal(labelHtml, elementHtml, validationHtml, fieldConfiguration, fieldMetadata, requiredDesignator));


#line default
#line hidden

#line 75 "..\..\Templates\Default\DefaultHtmlHelpers.cshtml"
                                                                                                                  


#line default
#line hidden
WriteLiteralTo(__razor_helper_writer, "                <dl>\r\n");


#line 77 "..\..\Templates\Default\DefaultHtmlHelpers.cshtml"


#line default
#line hidden
});

#line 77 "..\..\Templates\Default\DefaultHtmlHelpers.cshtml"
}
        public static Nancy.ViewEngines.Razor.HelperResult GetAppendedHtml(IReadonlyFieldConfiguration fieldConfiguration) {
#line default
#line hidden
            return new Nancy.ViewEngines.Razor.HelperResult(__razor_helper_writer => {

#line 46 "..\..\Templates\HtmlHelpers.cshtml"

                if (fieldConfiguration != null) {
                    foreach (var html in fieldConfiguration.AppendedHtml) {

#line default
#line hidden

#line 48 "..\..\Templates\HtmlHelpers.cshtml"
                        WriteTo(__razor_helper_writer, html);


#line default
#line hidden

#line 48 "..\..\Templates\HtmlHelpers.cshtml"
                    }
                }


#line default
#line hidden
            });

#line 50 "..\..\Templates\HtmlHelpers.cshtml"
        }
        public static Nancy.ViewEngines.Razor.HelperResult BeginField(Nancy.ViewEngines.Razor.IHtmlString labelHtml, Nancy.ViewEngines.Razor.IHtmlString elementHtml, Nancy.ViewEngines.Razor.IHtmlString validationHtml, ModelMetadata fieldMetadata, IReadonlyFieldConfiguration fieldConfiguration) {
#line default
#line hidden
            return new Nancy.ViewEngines.Razor.HelperResult(__razor_helper_writer => {

#line 68 "..\..\Templates\HtmlHelpers.cshtml"



#line default
#line hidden

#line 69 "..\..\Templates\HtmlHelpers.cshtml"
                WriteTo(__razor_helper_writer, BeginFieldInternal(labelHtml, elementHtml, validationHtml, fieldConfiguration, fieldMetadata));


#line default
#line hidden

#line 69 "..\..\Templates\HtmlHelpers.cshtml"



#line default
#line hidden
                WriteLiteralTo(__razor_helper_writer, "                <dl>\r\n");


#line 71 "..\..\Templates\HtmlHelpers.cshtml"


#line default
#line hidden
            });

#line 71 "..\..\Templates\HtmlHelpers.cshtml"
        }
Esempio n. 39
0
        public static System.Web.WebPages.HelperResult Field(IHtmlString labelHtml, IHtmlString elementHtml, IHtmlString validationHtml, ModelMetadata fieldMetadata, IReadonlyFieldConfiguration fieldConfiguration, bool isValid, IHtmlString requiredDesignator)
        {
            return(new System.Web.WebPages.HelperResult(__razor_helper_writer => {
#line 126 "..\..\Templates\TwitterBootstrap3\TwitterBootstrapHtmlHelpers.cshtml"


#line default
#line hidden


#line 127 "..\..\Templates\TwitterBootstrap3\TwitterBootstrapHtmlHelpers.cshtml"
                WebViewPage.WriteTo(@__razor_helper_writer, BeginFieldInternal(labelHtml, elementHtml, validationHtml, fieldConfiguration, fieldMetadata, isValid, requiredDesignator));

#line default
#line hidden


#line 127 "..\..\Templates\TwitterBootstrap3\TwitterBootstrapHtmlHelpers.cshtml"


#line default
#line hidden

                WebViewPage.WriteLiteralTo(@__razor_helper_writer, "            </div>\r\n");



#line 129 "..\..\Templates\TwitterBootstrap3\TwitterBootstrapHtmlHelpers.cshtml"

#line default
#line hidden
            }));
        }
Esempio n. 40
0
 /// <inheritdoc />
 public override IHtmlContent GenerateFieldHtml(IReadonlyFieldConfiguration fieldConfiguration)
 {
     return(GetInputHtml(TextInputType.Number, fieldConfiguration));
 }
Esempio n. 41
0
 /// <inheritdoc />
 public override FieldDisplayType GetDisplayType(IReadonlyFieldConfiguration fieldConfiguration)
 {
     return(FieldDisplayType.SingleLineText);
 }
        public static System.Web.WebPages.HelperResult BeginFieldInternal(IHtmlString labelHtml, IHtmlString elementHtml, IHtmlString validationHtml, IReadonlyFieldConfiguration fieldConfiguration, ModelMetadata fieldMetadata, IHtmlString requiredDesignator)
        {
            return(new System.Web.WebPages.HelperResult(__razor_helper_writer => {
#line 61 "..\..\Templates\Default\DefaultHtmlHelpers.cshtml"


#line default
#line hidden

                WebViewPage.WriteLiteralTo(@__razor_helper_writer, "            <dt>");



#line 62 "..\..\Templates\Default\DefaultHtmlHelpers.cshtml"
                WebViewPage.WriteTo(@__razor_helper_writer, labelHtml);

#line default
#line hidden



#line 62 "..\..\Templates\Default\DefaultHtmlHelpers.cshtml"
                WebViewPage.WriteTo(@__razor_helper_writer, new HtmlString(fieldMetadata != null && fieldMetadata.IsRequired ? requiredDesignator.ToHtmlString() : ""));

#line default
#line hidden

                WebViewPage.WriteLiteralTo(@__razor_helper_writer, "</dt>\r\n");



                WebViewPage.WriteLiteralTo(@__razor_helper_writer, "            <dd");



#line 63 "..\..\Templates\Default\DefaultHtmlHelpers.cshtml"
                WebViewPage.WriteTo(@__razor_helper_writer, RenderIfNotEmpty(fieldConfiguration.FieldContainerClasses, item => new System.Web.WebPages.HelperResult(__razor_template_writer => {
#line default
#line hidden


                    WebViewPage.WriteLiteralTo(@__razor_template_writer, " class=\"");



#line 63 "..\..\Templates\Default\DefaultHtmlHelpers.cshtml"
                    WebViewPage.WriteTo(@__razor_template_writer, fieldConfiguration.FieldContainerClasses);

#line default
#line hidden

                    WebViewPage.WriteLiteralTo(@__razor_template_writer, "\"");



#line 63 "..\..\Templates\Default\DefaultHtmlHelpers.cshtml"
                })));

#line default
#line hidden

                WebViewPage.WriteLiteralTo(@__razor_helper_writer, ">\r\n");



                WebViewPage.WriteLiteralTo(@__razor_helper_writer, "                ");



#line 64 "..\..\Templates\Default\DefaultHtmlHelpers.cshtml"
                WebViewPage.WriteTo(@__razor_helper_writer, GetPrependedHtml(fieldConfiguration));

#line default
#line hidden



#line 64 "..\..\Templates\Default\DefaultHtmlHelpers.cshtml"
                WebViewPage.WriteTo(@__razor_helper_writer, elementHtml);

#line default
#line hidden



#line 64 "..\..\Templates\Default\DefaultHtmlHelpers.cshtml"
                WebViewPage.WriteTo(@__razor_helper_writer, GetAppendedHtml(fieldConfiguration));

#line default
#line hidden



#line 64 "..\..\Templates\Default\DefaultHtmlHelpers.cshtml"
                WebViewPage.WriteTo(@__razor_helper_writer, GetHint(fieldConfiguration));

#line default
#line hidden

                WebViewPage.WriteLiteralTo(@__razor_helper_writer, " ");



#line 64 "..\..\Templates\Default\DefaultHtmlHelpers.cshtml"
                WebViewPage.WriteTo(@__razor_helper_writer, validationHtml);

#line default
#line hidden

                WebViewPage.WriteLiteralTo(@__razor_helper_writer, "\r\n");



#line 65 "..\..\Templates\Default\DefaultHtmlHelpers.cshtml"

#line default
#line hidden
            }));
        }
Esempio n. 43
0
        /// <inheritdoc />
        public override IHtmlString GenerateFieldHtml(IReadonlyFieldConfiguration fieldConfiguration)
        {
            var selectList = GetSelectList(fieldConfiguration.ExcludedEnums);

            return(GetSelectListHtml(selectList, FieldGenerator, fieldConfiguration));
        }
public static System.Web.WebPages.HelperResult BeginFieldInternal(IHtmlString labelHtml, IHtmlString elementHtml, IHtmlString validationHtml, IReadonlyFieldConfiguration fieldConfiguration, ModelMetadata fieldMetadata, IHtmlString requiredDesignator) {
return new System.Web.WebPages.HelperResult(__razor_helper_writer => {



#line 61 "..\..\Templates\Default\DefaultHtmlHelpers.cshtml"
                                                                                                                                                                                                                     

#line default
#line hidden

WebViewPage.WriteLiteralTo(@__razor_helper_writer, "            <dt>");



#line 62 "..\..\Templates\Default\DefaultHtmlHelpers.cshtml"
WebViewPage.WriteTo(@__razor_helper_writer, labelHtml);

#line default
#line hidden



#line 62 "..\..\Templates\Default\DefaultHtmlHelpers.cshtml"
WebViewPage.WriteTo(@__razor_helper_writer, new HtmlString(fieldMetadata != null && fieldMetadata.IsRequired ? requiredDesignator.ToHtmlString() : ""));

#line default
#line hidden

WebViewPage.WriteLiteralTo(@__razor_helper_writer, "</dt>\r\n");



WebViewPage.WriteLiteralTo(@__razor_helper_writer, "            <dd");



#line 63 "..\..\Templates\Default\DefaultHtmlHelpers.cshtml"
WebViewPage.WriteTo(@__razor_helper_writer, RenderIfNotEmpty(fieldConfiguration.FieldContainerClasses,item => new System.Web.WebPages.HelperResult(__razor_template_writer => {

#line default
#line hidden


WebViewPage.WriteLiteralTo(@__razor_template_writer, " class=\"");



#line 63 "..\..\Templates\Default\DefaultHtmlHelpers.cshtml"
                                               WebViewPage.WriteTo(@__razor_template_writer, fieldConfiguration.FieldContainerClasses);

#line default
#line hidden

WebViewPage.WriteLiteralTo(@__razor_template_writer, "\"");



#line 63 "..\..\Templates\Default\DefaultHtmlHelpers.cshtml"
                                                                                                                                           })));

#line default
#line hidden

WebViewPage.WriteLiteralTo(@__razor_helper_writer, ">\r\n");



WebViewPage.WriteLiteralTo(@__razor_helper_writer, "                ");



#line 64 "..\..\Templates\Default\DefaultHtmlHelpers.cshtml"
WebViewPage.WriteTo(@__razor_helper_writer, GetPrependedHtml(fieldConfiguration));

#line default
#line hidden



#line 64 "..\..\Templates\Default\DefaultHtmlHelpers.cshtml"
            WebViewPage.WriteTo(@__razor_helper_writer, elementHtml);

#line default
#line hidden



#line 64 "..\..\Templates\Default\DefaultHtmlHelpers.cshtml"
                        WebViewPage.WriteTo(@__razor_helper_writer, GetAppendedHtml(fieldConfiguration));

#line default
#line hidden



#line 64 "..\..\Templates\Default\DefaultHtmlHelpers.cshtml"
                                                            WebViewPage.WriteTo(@__razor_helper_writer, GetHint(fieldConfiguration));

#line default
#line hidden

WebViewPage.WriteLiteralTo(@__razor_helper_writer, " ");



#line 64 "..\..\Templates\Default\DefaultHtmlHelpers.cshtml"
                                                                                         WebViewPage.WriteTo(@__razor_helper_writer, validationHtml);

#line default
#line hidden

WebViewPage.WriteLiteralTo(@__razor_helper_writer, "\r\n");



#line 65 "..\..\Templates\Default\DefaultHtmlHelpers.cshtml"

#line default
#line hidden

});

}
        public static System.Web.WebPages.HelperResult BeginField(IHtmlString labelHtml, IHtmlString elementHtml, IHtmlString validationHtml, ModelMetadata fieldMetadata, IReadonlyFieldConfiguration fieldConfiguration, IHtmlString requiredDesignator)
        {
            return(new System.Web.WebPages.HelperResult(__razor_helper_writer => {
#line 73 "..\..\Templates\Default\DefaultHtmlHelpers.cshtml"


#line default
#line hidden


#line 74 "..\..\Templates\Default\DefaultHtmlHelpers.cshtml"
                WebViewPage.WriteTo(@__razor_helper_writer, BeginFieldInternal(labelHtml, elementHtml, validationHtml, fieldConfiguration, fieldMetadata, requiredDesignator));

#line default
#line hidden


#line 74 "..\..\Templates\Default\DefaultHtmlHelpers.cshtml"


#line default
#line hidden

                WebViewPage.WriteLiteralTo(@__razor_helper_writer, "                <dl>\r\n");



#line 76 "..\..\Templates\Default\DefaultHtmlHelpers.cshtml"

#line default
#line hidden
            }));
        }
public static System.Web.WebPages.HelperResult GetAppendedHtml(IReadonlyFieldConfiguration fieldConfiguration, bool isInputGroup) {
return new System.Web.WebPages.HelperResult(__razor_helper_writer => {



#line 70 "..\..\Templates\TwitterBootstrap3\TwitterBootstrapHtmlHelpers.cshtml"
                                                                                            
    foreach (var html in fieldConfiguration.AppendedHtml) {
#line default
#line hidden


#line 71 "..\..\Templates\TwitterBootstrap3\TwitterBootstrapHtmlHelpers.cshtml"
                WebViewPage.WriteTo(@__razor_helper_writer, GetInputGroupHtml(html, isInputGroup));

#line default
#line hidden


#line 71 "..\..\Templates\TwitterBootstrap3\TwitterBootstrapHtmlHelpers.cshtml"
                                                                                                 }

#line default
#line hidden

});

}
Esempio n. 47
0
 /// <inheritdoc />
 public override FieldDisplayType GetDisplayType(IReadonlyFieldConfiguration fieldConfiguration)
 {
     return(fieldConfiguration.DisplayType == FieldDisplayType.List
         ? FieldDisplayType.List
         : FieldDisplayType.DropDown);
 }
public static System.Web.WebPages.HelperResult GetHint(IReadonlyFieldConfiguration fieldConfiguration) {
return new System.Web.WebPages.HelperResult(__razor_helper_writer => {



#line 74 "..\..\Templates\TwitterBootstrap3\TwitterBootstrapHtmlHelpers.cshtml"
                                                                 
    if (fieldConfiguration.Hint != null) {
#line default
#line hidden

WebViewPage.WriteLiteralTo(@__razor_helper_writer, "<div class=\"help-block form-hint\">");



#line 75 "..\..\Templates\TwitterBootstrap3\TwitterBootstrapHtmlHelpers.cshtml"
                                 WebViewPage.WriteTo(@__razor_helper_writer, fieldConfiguration.Hint);

#line default
#line hidden

WebViewPage.WriteLiteralTo(@__razor_helper_writer, "</div>");



#line 75 "..\..\Templates\TwitterBootstrap3\TwitterBootstrapHtmlHelpers.cshtml"
                                                                                                          }

#line default
#line hidden

});

}