Skip to content
Snippets Groups Projects
Commit 5a289c72 authored by Jan-Hendrik Willms's avatar Jan-Hendrik Willms Committed by Elmar Ludwig
Browse files

let sidebar buttons extend from button.as-link instead of requiring the class...

let sidebar buttons extend from button.as-link instead of requiring the class set on the button, re #1474

Merge request studip/studip!2053
parent 75cedc6d
No related branches found
No related tags found
No related merge requests found
...@@ -226,7 +226,7 @@ class LinkElement extends WidgetElement implements ArrayAccess ...@@ -226,7 +226,7 @@ class LinkElement extends WidgetElement implements ArrayAccess
protected function renderButton() protected function renderButton()
{ {
return sprintf( return sprintf(
'<button formaction="%s" class="as-link" %s>%s</button>', '<button formaction="%s" %s>%s</button>',
htmlReady($this->url), htmlReady($this->url),
arrayToHtmlAttributes((array) $this->attributes), arrayToHtmlAttributes((array) $this->attributes),
htmlReady($this->label) htmlReady($this->label)
......
...@@ -34,7 +34,7 @@ class OptionsWidget extends ListWidget ...@@ -34,7 +34,7 @@ class OptionsWidget extends ListWidget
$toggle_url_off = isset($toggle_url_off) ? html_entity_decode($toggle_url_off) : null; $toggle_url_off = isset($toggle_url_off) ? html_entity_decode($toggle_url_off) : null;
$content = sprintf( $content = sprintf(
'<button formaction="%s" role="checkbox" aria-checked="%s" class="as-link options-checkbox options-%s" %s>%s</button>', '<button formaction="%s" role="checkbox" aria-checked="%s" class="options-checkbox options-%s" %s>%s</button>',
htmlReady($state && $toggle_url_off !== null ? $toggle_url_off : $toggle_url), htmlReady($state && $toggle_url_off !== null ? $toggle_url_off : $toggle_url),
$state ? 'true' : 'false', $state ? 'true' : 'false',
$state ? 'checked' : 'unchecked', $state ? 'checked' : 'unchecked',
...@@ -55,7 +55,7 @@ class OptionsWidget extends ListWidget ...@@ -55,7 +55,7 @@ class OptionsWidget extends ListWidget
$url = html_entity_decode($url); $url = html_entity_decode($url);
$content = sprintf( $content = sprintf(
'<button formaction="%s" role="radio" aria-checked="%s" class="as-link options-radio options-%s" %s>%s</button>', '<button formaction="%s" role="radio" aria-checked="%s" class="options-radio options-%s" %s>%s</button>',
htmlReady($url), htmlReady($url),
$checked ? 'true' : 'false', $checked ? 'true' : 'false',
$checked ? 'checked' : 'unchecked', $checked ? 'checked' : 'unchecked',
......
...@@ -125,6 +125,7 @@ ul.widget-list { ...@@ -125,6 +125,7 @@ ul.widget-list {
} }
button { button {
@extend .as-link;
text-align: left; text-align: left;
width: 100%; width: 100%;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment