diff --git a/Sources/AdminPanel/Support/LeafTags/FormTextAreaGroup.swift b/Sources/AdminPanel/Support/LeafTags/FormTextAreaGroup.swift new file mode 100644 index 0000000..02c6f5a --- /dev/null +++ b/Sources/AdminPanel/Support/LeafTags/FormTextAreaGroup.swift @@ -0,0 +1,110 @@ +import Foundation +import Leaf +import Node +import Vapor +import VaporForms + +public class FormTextAreaGroup: BasicTag { + public init(){} + public let name = "form:textareagroup" + + public func run(arguments: [Argument]) throws -> Node? { + + /* + #form:textgroup(key, value, fieldset, attr1, attr2 etc) + + Arguments: + [0] = The name of the input (the key that gets posted) * + [1] = The value of the input (the value that gets posted) (defaults to empty string) * + [2] = The VaporForms Fieldset of the entire model * ** + + * - All the arguments are actually required. We need to throw exceptions at people if they don't supply all of them + ** - It would be awesome if you could only post the exact Field of the Fieldset so we don't need to find it in this code (its gonna get repetetive) + + The