SpotOn.Litium.Accelerator.Mvc.ApplicationForm 1.1.0

The owner has unlisted this package. This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package SpotOn.Litium.Accelerator.Mvc.ApplicationForm --version 1.1.0
                    
NuGet\Install-Package SpotOn.Litium.Accelerator.Mvc.ApplicationForm -Version 1.1.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SpotOn.Litium.Accelerator.Mvc.ApplicationForm" Version="1.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SpotOn.Litium.Accelerator.Mvc.ApplicationForm" Version="1.1.0" />
                    
Directory.Packages.props
<PackageReference Include="SpotOn.Litium.Accelerator.Mvc.ApplicationForm" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add SpotOn.Litium.Accelerator.Mvc.ApplicationForm --version 1.1.0
                    
#r "nuget: SpotOn.Litium.Accelerator.Mvc.ApplicationForm, 1.1.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package SpotOn.Litium.Accelerator.Mvc.ApplicationForm@1.1.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=SpotOn.Litium.Accelerator.Mvc.ApplicationForm&version=1.1.0
                    
Install as a Cake Addin
#tool nuget:?package=SpotOn.Litium.Accelerator.Mvc.ApplicationForm&version=1.1.0
                    
Install as a Cake Tool

Form Application Settings

Functionality

generate classes for creating a block
SpotOn.Litium.Accelerator.Mvc.ApplicationForm : It provides the views and connection to the classess generated by this Nuget

Installation

  1. Add to ..\Litium.Accelerator\Constants\BlockFieldNameConstants.cs

    //using in Application Form block template
    public const string EmailFrom = "EmailFrom";
    public const string EmailTo = "EmailTo";
    public const string GDPRLinkText = "GDPRLinkText";
    public const string GDPRLink = "GDPRLink";
    public const string TermsAndConditionsLabel = "TermsAndConditionsLabel";
    public const string TermsAndConditions = "TermsAndConditions";
    public const string Fields = "Fields";
    public const string FieldValue = "FieldValue";
    public const string IsMandatory = "IsMandatory";
    public const string FieldType = "FieldType"; 
    
  2. Add to ..\Litium.Accelerator\Constants\BlockTemplateNameConstants.cs

    public const string ApplicationForm = "ApplicationForm";
    
  3. Add to ..\Litium.Accelerator\Definitions\Blocks\BlockFieldDefinitionSetup.cs

    new FieldDefinition<BlockArea>(BlockFieldNameConstants.EmailFrom, SystemFieldTypeConstants.LimitedText)
    {
    MultiCulture=false
    },
    new FieldDefinition<BlockArea>(BlockFieldNameConstants.EmailTo, SystemFieldTypeConstants.LimitedText)
    {
    MultiCulture=false
    },
    new FieldDefinition<BlockArea>(BlockFieldNameConstants.Description, SystemFieldTypeConstants.Editor)
    {
    MultiCulture=true
    },
    new FieldDefinition<BlockArea>(BlockFieldNameConstants.FieldValue, SystemFieldTypeConstants.MultirowText)
    {
    MultiCulture=true
    },
    new FieldDefinition<BlockArea>(BlockFieldNameConstants.IsMandatory, SystemFieldTypeConstants.Boolean),
    new FieldDefinition<BlockArea>(BlockFieldNameConstants.GDPRLink, SystemFieldTypeConstants.Pointer)
    {
    	Option = new PointerOption{ EntityType = PointerTypeConstants.WebsitesPage }
    },
    new FieldDefinition<BlockArea>(BlockFieldNameConstants.FieldType, SystemFieldTypeConstants.TextOption)
    {
    Option = new TextOption
    {
    MultiSelect = false,
    Items = new List<TextOption.Item>
    {
    new TextOption.Item
    {
    Value = "Text",
    Name = new Dictionary<string, string> { { "en-US", "Text" }, { "sv-SE", "Text" } }
    },
    new TextOption.Item
    {
    Value = "MultirowText",
    Name = new Dictionary<string, string> { { "en-US", "Multi-row text" }, { "sv-SE", "Multi-row text" } }
    },
    new TextOption.Item
    {
    Value = "Integer",
    Name = new Dictionary<string, string> { { "en-US", "Integer" }, { "sv-SE", "Integer" } }
    },
    new TextOption.Item
    {
    Value = "FileUpload",
    Name = new Dictionary<string, string> { { "en-US", "File upload" }, { "sv-SE", "File upload" } }
    },
    new TextOption.Item
    {
    Value = "Dropdown",
    Name = new Dictionary<string, string> { { "en-US", "Dropdown" }, { "sv-SE", "Dropdown" } }
    },
    new TextOption.Item
    {
    Value = "CheckBox",
    Name = new Dictionary<string, string> { { "en-US", "Checkbox" }, { "sv-SE", "Checkbox" } }
    },
    new TextOption.Item
    {
    Value = "RadioButton",
    Name = new Dictionary<string, string> { { "en-US", "Radio button" }, { "sv-SE", "Radio button" } }
    },
    new TextOption.Item
    {
    Value = "Email",
    Name = new Dictionary<string, string> { { "en-US", "Email" }, { "sv-SE", "Email" } }
    }
    }
    }
    },
    new FieldDefinition<BlockArea>(BlockFieldNameConstants.Fields, SystemFieldTypeConstants.MultiField)
    {
    Option = new MultiFieldOption { IsArray = true, Fields = new List<string>{ BlockFieldNameConstants.LabelText, BlockFieldNameConstants.Description, BlockFieldNameConstants.IsMandatory, BlockFieldNameConstants.FieldType, BlockFieldNameConstants.FieldValue } }
    },
    new FieldDefinition<BlockArea>(BlockFieldNameConstants.GDPRLinkText, SystemFieldTypeConstants.Text)
    {
    MultiCulture = true,
    },
    new FieldDefinition<BlockArea>(BlockFieldNameConstants.TermsAndConditions, SystemFieldTypeConstants.Editor)
    {
    MultiCulture = true,
    },
    new FieldDefinition<BlockArea>(BlockFieldNameConstants.TermsAndConditionsLabel, SystemFieldTypeConstants.Text)
    {
    MultiCulture = true,
    },
    
  4. Add to ../Litium.Accelerator/Services/MailService.cs

    using System.Collections.Generic;
    using System.Net.Mail;
    using System.Web;
    
    /// <summary>
    /// Send email with attachments
    /// </summary>
    /// <param name="from"></param>
    /// <param name="to"></param>
    /// <param name="subject"></param>
    /// <param name="body"></param>
    /// <param name="deliveryMethod"></param>
    /// <param name="attachments"></param>
    public abstract void SendMailWithAttachment(string from, string to, string subject, string body, SmtpDeliveryMethod deliveryMethod, List<HttpPostedFileBase> attachments);
    
  5. Add to ../Litium.Accelerator/Services/MailServiceImpl.cs

    using System.Collections.Generic;
    using System.Web;
    
    public override void SendMailWithAttachment(string from, string to, string subject, string body, SmtpDeliveryMethod deliveryMethod, List<HttpPostedFileBase> attachments)
    {
    try
    {
    var mailClient = new SmtpClient();
    //Set mail client host to local host if empty
    if (!string.IsNullOrEmpty(GeneralConfig.Instance.SMTPServer))
    {
    mailClient.Host = GeneralConfig.Instance.SMTPServer;
    mailClient.EnableSsl = GeneralConfig.Instance.EnableSslForSMTP;
    mailClient.DeliveryMethod = SmtpDeliveryMethod.Network;
    }
    else
    {
    mailClient.Host = "127.0.0.1";
    mailClient.DeliveryMethod = deliveryMethod;
    }
    if (string.IsNullOrEmpty(from))
    {
    throw new Exception("From address is required");
    }
    using (var message = new MailMessage(from, to, subject, body))
    {
    if (attachments.Count > 0)
    {
    foreach (var file in attachments)
    {
    message.Attachments.Add(new Attachment(file.InputStream, file.FileName));
    }
    }
    if (!string.IsNullOrEmpty(GeneralConfig.Instance.SMTPUsername) && !string.IsNullOrEmpty(GeneralConfig.Instance.SMTPPassword))
    {
    mailClient.Credentials = new NetworkCredential(GeneralConfig.Instance.SMTPUsername, GeneralConfig.Instance.SMTPPassword);
    }
    else
    {
    mailClient.UseDefaultCredentials = true;
    }
    mailClient.Send(message);
    }
    }
    catch (SmtpException e)
    {
    _logger.LogCritical($"{typeof(MailServiceProcessor).FullName} - Message: {e.Message}");
    }
    catch (Exception ex)
    {
    _logger.LogError($"{typeof(MailServiceProcessor).FullName} - Message: {ex.Message}");
    }
    }
    
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETStandard 2.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated