Update samy.ps1
This commit is contained in:
19
samy.ps1
19
samy.ps1
@@ -801,21 +801,30 @@ if (-not $Global:SamyTasks) {
|
|||||||
|
|
||||||
$labelText = Escape-HtmlText ([string]$_.Label)
|
$labelText = Escape-HtmlText ([string]$_.Label)
|
||||||
|
|
||||||
$html = "<label$tooltipAttr><input type='checkbox' id='$taskId' name='$($_.Name)' data-column='$Column'> $labelText</label>"
|
$taskIdAttr = Escape-HtmlAttr ([string]$taskId)
|
||||||
|
$nameAttr = Escape-HtmlAttr ([string]$_.Name)
|
||||||
|
$colAttr = Escape-HtmlAttr ([string]$Column)
|
||||||
|
|
||||||
|
$html = "<label$tooltipAttr><input type=""checkbox"" id=""$taskIdAttr"" name=""$nameAttr"" data-column=""$colAttr""> $labelText</label>"
|
||||||
|
|
||||||
if ($_.SubOptions) {
|
if ($_.SubOptions) {
|
||||||
$subHtml = (
|
$subHtml = (
|
||||||
$_.SubOptions |
|
$_.SubOptions |
|
||||||
ForEach-Object {
|
ForEach-Object {
|
||||||
$subLabel = Escape-HtmlText ([string]$_.Label)
|
$subLabel = Escape-HtmlText ([string]$_.Label)
|
||||||
"<label style='margin-left:20px; display:block;'>
|
|
||||||
<input type='checkbox' class='sub-option-$taskId' name='$($_.Value)' value='$($_.Value)'> $subLabel
|
$subTaskIdClass = Escape-HtmlAttr ([string]$taskId)
|
||||||
|
$subValueAttr = Escape-HtmlAttr ([string]$_.Value)
|
||||||
|
|
||||||
|
"<label style=""margin-left:20px; display:block;"">
|
||||||
|
<input type=""checkbox"" class=""sub-option-$subTaskIdClass"" name=""$subValueAttr"" value=""$subValueAttr""> $subLabel
|
||||||
</label>"
|
</label>"
|
||||||
|
|
||||||
}
|
}
|
||||||
) -join "`n"
|
) -join "`n"
|
||||||
|
|
||||||
$html += @"
|
$html += @"
|
||||||
<div id='${taskId}OptionsContainer' style='display:none; margin-top:4px;'>
|
<div id="$(Escape-HtmlAttr ([string]$taskId))OptionsContainer" style="display:none; margin-top:4px;">
|
||||||
$subHtml
|
$subHtml
|
||||||
</div>
|
</div>
|
||||||
"@
|
"@
|
||||||
|
|||||||
Reference in New Issue
Block a user