Skip to content

Commit

Permalink
Use cursor pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
Juan Carlos Rodríguez del Pino committed Jan 19, 2024
1 parent cfe33f0 commit 9d301c3
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions classes/util/hide_show.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,16 @@ public function generate(): string {
$title = get_string('hide');
$icon = "class='icon fa fa-eye-slash'";
$sign = '[-]';
$display = $this->show ? '' : "style='display:none'";
$html .= "<span $id $display><i $icon aria-hidden='true' title='$title'></i>$sign</span>";
$style = "style='cursor:pointer";
$style .= $this->show ? "'" : ";display:none'";
$html .= "<span $id $style><i $icon aria-hidden='true' title='$title'></i>$sign</span>";
$id = "id='vpl_shb{$this->id}s'";
$title = get_string('show');
$icon = "class='icon fa fa-eye'";
$sign = '[+]';
$display = $this->show ? "style='display:none'" : '';
$html .= "<span $id $display><i $id $icon aria-hidden='true' title='$title'></i>$sign</span>";
$style = "style='cursor:pointer";
$style .= $this->show ? ";display:none'" : "'";
$html .= "<span $id $style><i $id $icon aria-hidden='true' title='$title'></i>$sign</span>";
$html .= '</a> ';
return $html;
}
Expand Down

0 comments on commit 9d301c3

Please sign in to comment.