Esempio n. 1
0
        public PcFieldBaseOptions InitPcFieldBaseOptions(PageComponentContext context)
        {
            var options = new PcFieldBaseOptions();

            //Check if it is defined in form group
            if (context.Items.ContainsKey(typeof(LabelRenderMode)))
            {
                options.LabelMode = (LabelRenderMode)context.Items[typeof(LabelRenderMode)];
            }
            else
            {
                options.LabelMode = LabelRenderMode.Stacked;
            }


            //Check if it is defined in form group
            if (context.Items.ContainsKey(typeof(FieldRenderMode)))
            {
                options.Mode = (FieldRenderMode)context.Items[typeof(FieldRenderMode)];
            }
            else
            {
                options.Mode = FieldRenderMode.Form;
            }

            return(options);
        }
Esempio n. 2
0
 public static PcFieldTextOptions CopyFromBaseOptions(PcFieldBaseOptions input)
 {
     return(new PcFieldTextOptions {
         LabelMode = input.LabelMode,
         LabelText = input.LabelText,
         Mode = input.Mode,
         Name = input.Name,
         MaxLength = null
     });
 }
Esempio n. 3
0
 public static PcFieldDateTimeOptions CopyFromBaseOptions(PcFieldBaseOptions input)
 {
     return(new PcFieldDateTimeOptions
     {
         LabelMode = input.LabelMode,
         LabelText = input.LabelText,
         Mode = input.Mode,
         Name = input.Name
     });
 }
Esempio n. 4
0
 public static PcFieldFileOptions CopyFromBaseOptions(PcFieldBaseOptions input)
 {
     return(new PcFieldFileOptions
     {
         LabelMode = input.LabelMode,
         LabelText = input.LabelText,
         Mode = input.Mode,
         Name = input.Name,
         Accept = ""
     });
 }
Esempio n. 5
0
 public static PcFieldUrlOptions CopyFromBaseOptions(PcFieldBaseOptions input)
 {
     return(new PcFieldUrlOptions
     {
         IsVisible = input.IsVisible,
         LabelMode = input.LabelMode,
         LabelText = input.LabelText,
         Mode = input.Mode,
         Name = input.Name
     });
 }
Esempio n. 6
0
 public static PcFieldTextareaOptions CopyFromBaseOptions(PcFieldBaseOptions input)
 {
     return(new PcFieldTextareaOptions
     {
         LabelMode = input.LabelMode,
         LabelText = input.LabelText,
         Mode = input.Mode,
         Name = input.Name,
         Height = ""
     });
 }
Esempio n. 7
0
 public static PcFieldRadioListOptions CopyFromBaseOptions(PcFieldBaseOptions input)
 {
     return(new PcFieldRadioListOptions
     {
         LabelMode = input.LabelMode,
         LabelText = input.LabelText,
         Mode = input.Mode,
         Name = input.Name,
         Options = ""
     });
 }
 public static PcFieldAutonumberOptions CopyFromBaseOptions(PcFieldBaseOptions input)
 {
     return(new PcFieldAutonumberOptions
     {
         LabelMode = input.LabelMode,
         LabelText = input.LabelText,
         Mode = input.Mode,
         Name = input.Name,
         Template = input.Template
     });
 }
Esempio n. 9
0
 public static PcFieldPasswordOptions CopyFromBaseOptions(PcFieldBaseOptions input)
 {
     return(new PcFieldPasswordOptions
     {
         LabelMode = input.LabelMode,
         LabelText = input.LabelText,
         Mode = input.Mode,
         Name = input.Name,
         Min = null,
         Max = null
     });
 }
Esempio n. 10
0
 public static PcFieldCheckboxListOptions CopyFromBaseOptions(PcFieldBaseOptions input)
 {
     return(new PcFieldCheckboxListOptions
     {
         IsVisible = input.IsVisible,
         LabelMode = input.LabelMode,
         LabelText = input.LabelText,
         Mode = input.Mode,
         Name = input.Name,
         Options = ""
     });
 }
Esempio n. 11
0
 public static PcFieldCheckboxOptions CopyFromBaseOptions(PcFieldBaseOptions input)
 {
     return(new PcFieldCheckboxOptions
     {
         LabelMode = input.LabelMode,
         LabelText = input.LabelText,
         Mode = input.Mode,
         Name = input.Name,
         TextTrue = "",
         TextFalse = ""
     });
 }
Esempio n. 12
0
 public static PcFieldMultiFileUploadOptions CopyFromBaseOptions(PcFieldBaseOptions input)
 {
     return(new PcFieldMultiFileUploadOptions
     {
         IsVisible = input.IsVisible,
         LabelMode = input.LabelMode,
         LabelText = input.LabelText,
         Mode = input.Mode,
         Name = input.Name,
         Accept = ""
     });
 }
Esempio n. 13
0
 public static PcFieldPhoneOptions CopyFromBaseOptions(PcFieldBaseOptions input)
 {
     return(new PcFieldPhoneOptions
     {
         IsVisible = input.IsVisible,
         LabelMode = input.LabelMode,
         LabelText = input.LabelText,
         Mode = input.Mode,
         Name = input.Name,
         MaxLength = input.MaxLength
     });
 }
Esempio n. 14
0
 public static PcFieldHtmlOptions CopyFromBaseOptions(PcFieldBaseOptions input)
 {
     return(new PcFieldHtmlOptions
     {
         LabelMode = input.LabelMode,
         LabelText = input.LabelText,
         Mode = input.Mode,
         Name = input.Name,
         UploadMode = HtmlUploadMode.None,
         ToolbarMode = HtmlToolbarMode.Basic
     });
 }
Esempio n. 15
0
 public static PcFieldCodeOptions CopyFromBaseOptions(PcFieldBaseOptions input)
 {
     return(new PcFieldCodeOptions
     {
         LabelMode = input.LabelMode,
         LabelText = input.LabelText,
         Mode = input.Mode,
         Name = input.Name,
         Height = "120px",
         Language = "razor",
         Theme = "cobalt"
     });
 }
Esempio n. 16
0
 public static PcFieldTimeOptions CopyFromBaseOptions(PcFieldBaseOptions input)
 {
     return(new PcFieldTimeOptions
     {
         IsVisible = input.IsVisible,
         LabelMode = input.LabelMode,
         LabelText = input.LabelText,
         Mode = input.Mode,
         Name = input.Name,
         Description = input.Description,
         LabelHelpText = input.LabelHelpText
     });
 }
Esempio n. 17
0
 public static PcFieldPasswordOptions CopyFromBaseOptions(PcFieldBaseOptions input)
 {
     return(new PcFieldPasswordOptions
     {
         IsVisible = input.IsVisible,
         LabelMode = input.LabelMode,
         LabelText = input.LabelText,
         Mode = input.Mode,
         Name = input.Name,
         Min = (int?)input.Min,
         Max = (int?)input.Max
     });
 }
Esempio n. 18
0
 public static PcFieldSelectOptions CopyFromBaseOptions(PcFieldBaseOptions input)
 {
     return(new PcFieldSelectOptions
     {
         IsVisible = input.IsVisible,
         LabelMode = input.LabelMode,
         LabelText = input.LabelText,
         Mode = input.Mode,
         Name = input.Name,
         Options = "",
         AjaxDatasource = null
     });
 }
Esempio n. 19
0
 public static PcFieldCheckboxGridOptions CopyFromBaseOptions(PcFieldBaseOptions input)
 {
     return new PcFieldCheckboxGridOptions
     {
         IsVisible = input.IsVisible,
         LabelMode = input.LabelMode,
         LabelText = input.LabelText,
         Mode = input.Mode,
         Name = input.Name,
         TextTrue = "",
         TextFalse = ""
     };
 }
Esempio n. 20
0
 public static PcFieldMultiSelectOptions CopyFromBaseOptions(PcFieldBaseOptions input)
 {
     return(new PcFieldMultiSelectOptions
     {
         IsVisible = input.IsVisible,
         LabelMode = input.LabelMode,
         LabelText = input.LabelText,
         Mode = input.Mode,
         Name = input.Name,
         Options = "",
         AjaxDatasource = null,
         SelectMatchingType = WvSelectMatchType.Contains
     });
 }
Esempio n. 21
0
 public static PcFieldNumberOptions CopyFromBaseOptions(PcFieldBaseOptions input)
 {
     return(new PcFieldNumberOptions
     {
         LabelMode = input.LabelMode,
         LabelText = input.LabelText,
         Mode = input.Mode,
         Name = input.Name,
         Min = input.Min,
         Max = input.Max,
         Step = null,
         DecimalDigits = input.DecimalDigits
     });
 }
Esempio n. 22
0
 public static PcFieldCurrencyOptions CopyFromBaseOptions(PcFieldBaseOptions input)
 {
     return(new PcFieldCurrencyOptions
     {
         LabelMode = input.LabelMode,
         LabelText = input.LabelText,
         Mode = input.Mode,
         Name = input.Name,
         Min = null,
         Max = null,
         Step = null,
         CurrencyCode = "USD"
     });
 }
Esempio n. 23
0
 public static PcFieldPercentOptions CopyFromBaseOptions(PcFieldBaseOptions input)
 {
     return(new PcFieldPercentOptions
     {
         LabelMode = input.LabelMode,
         LabelText = input.LabelText,
         Mode = input.Mode,
         Name = input.Name,
         Min = null,
         Max = null,
         Step = null,
         DecimalDigits = 2
     });
 }
Esempio n. 24
0
 public static PcFieldHtmlOptions CopyFromBaseOptions(PcFieldBaseOptions input)
 {
     return(new PcFieldHtmlOptions
     {
         IsVisible = input.IsVisible,
         LabelMode = input.LabelMode,
         LabelText = input.LabelText,
         Mode = input.Mode,
         Name = input.Name,
         UploadMode = HtmlUploadMode.None,
         ToolbarMode = HtmlToolbarMode.Basic,
         Description = input.Description,
         LabelHelpText = input.LabelHelpText
     });
 }
Esempio n. 25
0
 public static PcFieldCurrencyOptions CopyFromBaseOptions(PcFieldBaseOptions input)
 {
     return(new PcFieldCurrencyOptions
     {
         IsVisible = input.IsVisible,
         LabelMode = input.LabelMode,
         LabelText = input.LabelText,
         Mode = input.Mode,
         Name = input.Name,
         Min = input.Min,
         Max = input.Max,
         Step = null,
         CurrencyCode = input.CurrencyCode
     });
 }
Esempio n. 26
0
 public static PcFieldCheckboxOptions CopyFromBaseOptions(PcFieldBaseOptions input)
 {
     return(new PcFieldCheckboxOptions
     {
         IsVisible = input.IsVisible,
         LabelMode = input.LabelMode,
         LabelText = input.LabelText,
         Mode = input.Mode,
         Name = input.Name,
         TextTrue = "",
         TextFalse = "",
         Description = input.Description,
         LabelHelpText = input.LabelHelpText
     });
 }
Esempio n. 27
0
 public static PcFieldImageOptions CopyFromBaseOptions(PcFieldBaseOptions input)
 {
     return(new PcFieldImageOptions
     {
         LabelMode = input.LabelMode,
         LabelText = input.LabelText,
         Mode = input.Mode,
         Name = input.Name,
         TextRemove = "remove",
         TextSelect = "select",
         Accept = "",
         Width = null,
         Height = null,
         ResizeAction = ImageResizeMode.Pad
     });
 }
Esempio n. 28
0
 public static PcFieldPercentOptions CopyFromBaseOptions(PcFieldBaseOptions input)
 {
     return(new PcFieldPercentOptions
     {
         IsVisible = input.IsVisible,
         LabelMode = input.LabelMode,
         LabelText = input.LabelText,
         Mode = input.Mode,
         Name = input.Name,
         Min = input.Min,
         Max = input.Max,
         Step = null,
         DecimalDigits = input.DecimalDigits,
         Description = input.Description,
         LabelHelpText = input.LabelHelpText
     });
 }
Esempio n. 29
0
 public static PcFieldDataCsvOptions CopyFromBaseOptions(PcFieldBaseOptions input)
 {
     return(new PcFieldDataCsvOptions
     {
         IsVisible = input.IsVisible,
         LabelMode = input.LabelMode,
         LabelText = input.LabelText,
         Mode = input.Mode,
         Name = input.Name,
         Height = "",
         DelimiterValueDs = "",
         HasHeaderValueDs = "",
         DelimiterFieldName = "",
         HasHeaderFieldName = "",
         LangDs = "en",
     });
 }
 public static PcFieldMultiFileUploadOptions CopyFromBaseOptions(PcFieldBaseOptions input)
 {
     return(new PcFieldMultiFileUploadOptions
     {
         IsVisible = input.IsVisible,
         LabelMode = input.LabelMode,
         LabelText = input.LabelText,
         Mode = input.Mode,
         Name = input.Name,
         Accept = "",
         GetHandlerPrefix = "/fs",
         FileUploadApi = "/fs/upload-file-multiple",
         PathPropName = "path",
         SizePropName = "size",
         NamePropName = "name",
         IconPropName = "icon",
         TimestampPropName = "timestamp",
         AuthorPropName = "author"
     });
 }