diff --git a/samy.ps1 b/samy.ps1 index ed6d9ec..3caa9dd 100644 --- a/samy.ps1 +++ b/samy.ps1 @@ -843,27 +843,51 @@ $Global:SamyTasks | ForEach-Object { $html = "" if ($_.SubOptions) { - $subHtml = ( - $_.SubOptions | - ForEach-Object { - $subLabel = Escape-HtmlText ([string]$_.Label) - $subTaskIdClass = Escape-HtmlAttr ([string]$taskId) - $subValueAttr = Escape-HtmlAttr ([string]$_.Value) + $subHtml = ( + $_.SubOptions | ForEach-Object { - "" + $type = if ($_.PSObject.Properties.Name -contains 'Type' -and $_.Type) { + [string]$_.Type + } else { + 'checkbox' + } - } - ) -join "`n" + if ($type -eq 'text') { + $subId = Escape-HtmlAttr ([string]$_.Id) + $subLabel = Escape-HtmlText ([string]$_.Label) + $ph = if ($_.PSObject.Properties.Name -contains 'Placeholder') { Escape-HtmlAttr ([string]$_.Placeholder) } else { '' } + $help = if ($_.PSObject.Properties.Name -contains 'Help') { Escape-HtmlText ([string]$_.Help) } else { '' } - $html += @" -
+@" +