Update samy.ps1
This commit is contained in:
17
samy.ps1
17
samy.ps1
@@ -801,21 +801,30 @@ if (-not $Global:SamyTasks) {
|
||||
|
||||
$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) {
|
||||
$subHtml = (
|
||||
$_.SubOptions |
|
||||
ForEach-Object {
|
||||
$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>"
|
||||
|
||||
}
|
||||
) -join "`n"
|
||||
|
||||
$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
|
||||
</div>
|
||||
"@
|
||||
|
||||
Reference in New Issue
Block a user