Skip to content
Snippets Groups Projects
Commit c1b6ef53 authored by Elmar Ludwig's avatar Elmar Ludwig Committed by David Siegfried
Browse files

drop studip-checkbox CSS class, fixes #111

parent 4113494c
No related branches found
No related tags found
No related merge requests found
Showing
with 45 additions and 135 deletions
<? if ($type === 'boolean') : ?> <? if ($type === 'boolean') : ?>
<input type="hidden" name="value" value="0"> <input type="hidden" name="value" value="0">
<input type="checkbox" name="value" value="1" id="item-value" class="studip-checkbox" <label>
<? if ($value) echo 'checked'; ?>> <input type="checkbox" name="value" value="1" <? if ($value) echo 'checked'; ?>>
<label for="item-value">
<?= _('aktiviert') ?> <?= _('aktiviert') ?>
</label> </label>
<? else : ?> <? else : ?>
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
<div id="event-color-picker"></div> <div id="event-color-picker"></div>
<input id="semtype-checkbox" name="event_color_semtype" type="checkbox" class="studip-checkbox" value="1"> <label>
<label for="semtype-checkbox"> <input name="event_color_semtype" type="checkbox" value="1">
<?= sprintf(_('Farbtyp für alle VA dieses Typs (%s) übernehmen'), htmlReady($semtype)) ?> <?= sprintf(_('Farbtyp für alle VA dieses Typs (%s) übernehmen'), htmlReady($semtype)) ?>
</label> </label>
......
...@@ -13,11 +13,11 @@ ...@@ -13,11 +13,11 @@
<? if($col['id'] == '0') continue; ?> <? if($col['id'] == '0') continue; ?>
<tr> <tr>
<td> <td>
<input id="column_view_<?= $col['id'] ?>" name="column_view[]" <input name="column_view[]"
class="studip-checkbox" type="checkbox" type="checkbox"
value="<?= $col['id'] ?>" value="<?= $col['id'] ?>"
title="<?= htmlReady($col['title']) ?>"
<?= $col['visible'] ? 'checked' : '' ?>> <?= $col['visible'] ? 'checked' : '' ?>>
<label for="column_view_<?= $col['id'] ?>"><?= htmlReady($col['title']) ?></label>
</td> </td>
<td class="actions"> <td class="actions">
<?= ActionMenu::get()->addLink( <?= ActionMenu::get()->addLink(
......
...@@ -25,8 +25,7 @@ ...@@ -25,8 +25,7 @@
</div> </div>
<div class="type-checkbox"> <div class="type-checkbox">
<input type="checkbox" name="create" id="create" value="1" checked <input type="checkbox" name="create" id="create" value="1" checked>
class="studip-checkbox">
<label for="create"> <label for="create">
<?= _('Versuche Datenbank anzulegen, falls sie noch nicht existiert') ?> <?= _('Versuche Datenbank anzulegen, falls sie noch nicht existiert') ?>
</label> </label>
......
...@@ -11,10 +11,10 @@ ...@@ -11,10 +11,10 @@
<li> <li>
<?php if (in_array($file, $required)): ?> <?php if (in_array($file, $required)): ?>
<input type="hidden" name="files[]" value="<?= htmlReady($file) ?>"> <input type="hidden" name="files[]" value="<?= htmlReady($file) ?>">
<input type="checkbox" checked disabled class="studip-checkbox"> <input type="checkbox" checked disabled>
<?php else: ?> <?php else: ?>
<input type="checkbox" name="files[]" value="<?= htmlReady($file) ?>" <input type="checkbox" name="files[]" value="<?= htmlReady($file) ?>"
class="studip-checkbox" id="option-<?= $i ?>"> id="option-<?= $i ?>">
<?php endif; ?> <?php endif; ?>
<label for="option-<?= $i ?>"> <label for="option-<?= $i ?>">
<strong <?php if (in_array($file, $required)): ?>class="required"<?php endif; ?>> <strong <?php if (in_array($file, $required)): ?>class="required"<?php endif; ?>>
......
...@@ -20,11 +20,9 @@ ...@@ -20,11 +20,9 @@
<ul class="list-unstyled"> <ul class="list-unstyled">
<? foreach ($slot->bookings as $booking): ?> <? foreach ($slot->bookings as $booking): ?>
<li> <li>
<input type="checkbox" name="ids[]" checked <label class="undecorated">
class="studip-checkbox" <input type="checkbox" name="ids[]" checked
id="booking-<?= htmlReady($booking->id) ?>" value="<?= htmlReady($booking->id) ?>">
value="<?= htmlReady($booking->id) ?>">
<label for="booking-<?= htmlReady($booking->id) ?>" class="undecorated">
<?= htmlReady($booking->user->getFullName()) ?> <?= htmlReady($booking->user->getFullName()) ?>
</label> </label>
</li> </li>
......
...@@ -23,11 +23,9 @@ ...@@ -23,11 +23,9 @@
<thead> <thead>
<tr> <tr>
<th> <th>
<input type="checkbox" id="checkbox-proxy" <input type="checkbox"
class="studip-checkbox"
data-proxyfor=".consultation-overview tbody th :checkbox" data-proxyfor=".consultation-overview tbody th :checkbox"
data-activates=".consultation-overview tfoot button"> data-activates=".consultation-overview tfoot button">
<label for="checkbox-proxy"></label>
</th> </th>
</th> </th>
<th><?= _('Uhrzeit') ?></th> <th><?= _('Uhrzeit') ?></th>
...@@ -40,10 +38,7 @@ ...@@ -40,10 +38,7 @@
<tbody id="block-<?= htmlReady($block['block']->id) ?>" <? if ($block['block']->is_expired) echo 'class="block-is-expired"'; ?>> <tbody id="block-<?= htmlReady($block['block']->id) ?>" <? if ($block['block']->is_expired) echo 'class="block-is-expired"'; ?>>
<tr class="<? if ($block['block']->has_bookings) echo 'is-occupied'; ?>"> <tr class="<? if ($block['block']->has_bookings) echo 'is-occupied'; ?>">
<th> <th>
<input type="checkbox" id="slots-<?= htmLReady($block['block']->id) ?>-checkbox" <input type="checkbox" data-proxyfor="#block-<?= htmlReady($block['block']->id) ?> :checkbox[name^=slot]">
class="studip-checkbox"
data-proxyfor="#block-<?= htmlReady($block['block']->id) ?> :checkbox[name^=slot]">
<label for="slots-<?= htmlReady($block['block']->id) ?>-checkbox"></label>
</th> </th>
<th colspan="3"> <th colspan="3">
<?= $this->render_partial('consultation/block-description.php', ['block' => $block['block']]) ?> <?= $this->render_partial('consultation/block-description.php', ['block' => $block['block']]) ?>
...@@ -88,10 +83,7 @@ ...@@ -88,10 +83,7 @@
<? foreach ($block['slots'] as $slot): ?> <? foreach ($block['slots'] as $slot): ?>
<tr id="slot-<?= htmlReady($slot->id) ?>" class="<? if ($slot->is_expired) echo 'slot-is-expired'; ?> <? if (count($slot->bookings) > 0) echo 'is-occupied'; ?>"> <tr id="slot-<?= htmlReady($slot->id) ?>" class="<? if ($slot->is_expired) echo 'slot-is-expired'; ?> <? if (count($slot->bookings) > 0) echo 'is-occupied'; ?>">
<td> <td>
<input type="checkbox" name="slot-id[]" id="slot-<?= htmlReady($slot->id) ?>-checkbox" <input type="checkbox" name="slot-id[]" value="<?= htmlReady($block['block']->id) ?>-<?= htmlReady($slot->id) ?>">
class="studip-checkbox"
value="<?= htmlReady($block['block']->id) ?>-<?= htmlReady($slot->id) ?>">
<label for="slot-<?= htmlReady($slot->id) ?>-checkbox"></label>
</td> </td>
<td> <td>
<?= strftime('%R', $slot->start_time) ?> <?= strftime('%R', $slot->start_time) ?>
......
...@@ -25,11 +25,9 @@ ...@@ -25,11 +25,9 @@
<thead> <thead>
<tr> <tr>
<th> <th>
<input type="checkbox" id="checkbox-block-proxy" <input type="checkbox"
class="studip-checkbox"
data-proxyfor=".block-overview tbody :checkbox" data-proxyfor=".block-overview tbody :checkbox"
data-activates=".block-overview tfoot button"> data-activates=".block-overview tfoot button">
<label for="checkbox-block-proxy"></label>
</th> </th>
<th><?= _('Tag') ?></th> <th><?= _('Tag') ?></th>
<th><?= _('Zeit') ?></th> <th><?= _('Zeit') ?></th>
...@@ -42,10 +40,7 @@ ...@@ -42,10 +40,7 @@
<? foreach ($blocks as $block): ?> <? foreach ($blocks as $block): ?>
<tr id="block-<?= htmlReady($block->id) ?>" class="<? if ($block->is_expired) echo 'block-is-expired'; ?> <? if ($block->has_bookings) echo 'is-occupied'; ?>"> <tr id="block-<?= htmlReady($block->id) ?>" class="<? if ($block->is_expired) echo 'block-is-expired'; ?> <? if ($block->has_bookings) echo 'is-occupied'; ?>">
<td> <td>
<input type="checkbox" id="block-checkbox-<?= htmlReady($block->id) ?>" <input type="checkbox" name="block-id[]" value="<?= htmlReady($block->id) ?>">
name="block-id[]"
class="studip-checkbox" value="<?= htmlReady($block->id) ?>">
<label for="block-checkbox-<?= htmlReady($block->id) ?>"></label>
</td> </td>
<td> <td>
<?= strftime('%A, %x', $block->start) ?> <?= strftime('%A, %x', $block->start) ?>
...@@ -139,11 +134,9 @@ ...@@ -139,11 +134,9 @@
<thead> <thead>
<tr> <tr>
<th> <th>
<input type="checkbox" id="checkbox-slot-proxy" <input type="checkbox"
class="studip-checkbox"
data-proxyfor=".slot-overview tbody :checkbox" data-proxyfor=".slot-overview tbody :checkbox"
data-activates=".slot-overview tfoot button"> data-activates=".slot-overview tfoot button">
<label for="checkbox-slot-proxy"></label>
</th> </th>
</th> </th>
<th><?= _('Tag') ?></th> <th><?= _('Tag') ?></th>
...@@ -159,10 +152,7 @@ ...@@ -159,10 +152,7 @@
<? foreach ($slots as $slot): ?> <? foreach ($slots as $slot): ?>
<tr id="slot-<?= htmlReady($slot->id) ?>" class="<? if ($slot->is_expired) echo 'slot-is-expired'; ?> <? if (count($slot->bookings) > 0) echo 'is-occupied'; ?>"> <tr id="slot-<?= htmlReady($slot->id) ?>" class="<? if ($slot->is_expired) echo 'slot-is-expired'; ?> <? if (count($slot->bookings) > 0) echo 'is-occupied'; ?>">
<td> <td>
<input type="checkbox" name="slot-id[]" id="slot-<?= htmlReady($slot->id) ?>" <input type="checkbox" name="slot-id[]" value="<?= htmlReady($slot->block_id) ?>-<?= htmlReady($slot->id) ?>">
class="studip-checkbox"
value="<?= htmlReady($slot->block_id) ?>-<?= htmlReady($slot->id) ?>">
<label for="slot-<?= htmlReady($slot->id) ?>"></label>
</td> </td>
<td> <td>
<?= strftime(_('%A, %x'), $slot->start_time) ?> <?= strftime(_('%A, %x'), $slot->start_time) ?>
......
...@@ -15,12 +15,9 @@ if ($file->isDownloadable($GLOBALS['user']->id)) { ...@@ -15,12 +15,9 @@ if ($file->isDownloadable($GLOBALS['user']->id)) {
<td> <td>
<? if ($file->isDownloadable($GLOBALS['user']->id)) : ?> <? if ($file->isDownloadable($GLOBALS['user']->id)) : ?>
<input type="checkbox" <input type="checkbox"
class="studip-checkbox"
name="ids[]" name="ids[]"
id="file_checkbox_<?= htmlReady($table_id) ?>_<?= htmlReady($file->getId()) ?>"
value="<?= htmlReady($file->getId()) ?>" value="<?= htmlReady($file->getId()) ?>"
<?= in_array($file->getId(), (array) $marked_element_ids) ? 'checked' : '' ?>> <?= in_array($file->getId(), (array) $marked_element_ids) ? 'checked' : '' ?>>
<label for="file_checkbox_<?= htmlReady($table_id) ?>_<?= htmlReady($file->getId()) ?>"></label>
<? endif ?> <? endif ?>
</td> </td>
<? endif ?> <? endif ?>
......
...@@ -17,7 +17,6 @@ ...@@ -17,7 +17,6 @@
<? if ($show_bulk_checkboxes) : ?> <? if ($show_bulk_checkboxes) : ?>
<th data-sort="false"> <th data-sort="false">
<input type="checkbox" <input type="checkbox"
class="studip-checkbox"
<?= $table_id <?= $table_id
? 'data-proxyfor="table.documents[data-table_id=\'' . htmlReady($table_id) . '\'] tbody :checkbox"' ? 'data-proxyfor="table.documents[data-table_id=\'' . htmlReady($table_id) . '\'] tbody :checkbox"'
: 'data-proxyfor="table.documents tbody :checkbox"' : 'data-proxyfor="table.documents tbody :checkbox"'
...@@ -26,8 +25,7 @@ ...@@ -26,8 +25,7 @@
? 'data-activates="table.documents[data-table_id=\'' . htmlReady($table_id) . '\'] tfoot .multibuttons .button"' ? 'data-activates="table.documents[data-table_id=\'' . htmlReady($table_id) . '\'] tfoot .multibuttons .button"'
: 'data-activates="table.documents tfoot .multibuttons .button"' : 'data-activates="table.documents tfoot .multibuttons .button"'
?> ?>
id="all_files_checkbox_<?= htmlReady($table_id) ?>"> >
<label for="all_files_checkbox_<?= htmlReady($table_id) ?>"></label>
</th> </th>
<? endif ?> <? endif ?>
<th data-sort="htmldata"><?= _('Typ') ?></th> <th data-sort="htmldata"><?= _('Typ') ?></th>
......
...@@ -25,11 +25,8 @@ if ($folder->isReadable($GLOBALS['user']->id)) { ...@@ -25,11 +25,8 @@ if ($folder->isReadable($GLOBALS['user']->id)) {
<? if ($is_readable) : ?> <? if ($is_readable) : ?>
<input type="checkbox" <input type="checkbox"
name="ids[]" name="ids[]"
class="studip-checkbox"
id="file_checkbox_<?= $folder->id ?>"
value="<?= $folder->id ?>" value="<?= $folder->id ?>"
<? if (in_array($folder->getId(), (array)$marked_element_ids)) echo 'checked'; ?>> <? if (in_array($folder->getId(), (array)$marked_element_ids)) echo 'checked'; ?>>
<label for="file_checkbox_<?= $folder->id ?>"></label>
<? endif?> <? endif?>
</td> </td>
<td class="document-icon" data-sort-value="<?=crc32(get_class($folder))?>"> <td class="document-icon" data-sort-value="<?=crc32(get_class($folder))?>">
......
...@@ -27,12 +27,8 @@ ...@@ -27,12 +27,8 @@
<? foreach ($help_contents as $help_content_id => $help_content) : ?> <? foreach ($help_contents as $help_content_id => $help_content) : ?>
<tr> <tr>
<td><input type="checkbox" name="help_content_status_<?= $help_content_id ?>" <td><input type="checkbox" name="help_content_status_<?= $help_content_id ?>"
id="help_content_status_<?= $help_content_id ?>" value="1" value="1" class="help_on"
class="studip-checkbox help_on" <?= tooltip(_("Status der Hilfe (aktiv oder inaktiv)"), false) ?><?= $help_content->visible ? ' checked' : '' ?>>
<?= tooltip(_("Status der Hilfe (aktiv oder inaktiv)"), false) ?><?= ($help_content->visible) ? ' checked' : '' ?>>
<label for="help_content_status_<?= $help_content_id ?>">
<? _('Status der Hilfe (aktiv oder inaktiv)') ?>
</label>
</td> </td>
<td><?= htmlReady($help_content->route) ?></td> <td><?= htmlReady($help_content->route) ?></td>
<td><?= htmlReady($help_content->language) ?></td> <td><?= htmlReady($help_content->language) ?></td>
......
...@@ -12,12 +12,12 @@ ...@@ -12,12 +12,12 @@
<div class="element_header"> <div class="element_header">
<input type="hidden" name="modules[<?= htmlReady($id) ?>]" value="0"> <input type="hidden" name="modules[<?= htmlReady($id) ?>]" value="0">
<input type="checkbox" value="1" class="studip-checkbox" <label>
id="<?= md5($item['name']) ?>" name="modules[<?= htmlReady($id) ?>]" <input type="checkbox" value="1"
onclick="jQuery(this).closest('form').submit()" name="modules[<?= htmlReady($id) ?>]"
<? if ($item['activated']) echo 'checked'; ?>> onclick="jQuery(this).closest('form').submit()"
<? if ($item['activated']) echo 'checked'; ?>>
<label for="<?= md5($item['name']) ?>">
<strong><?= htmlReady($item['name']) ?></strong> <strong><?= htmlReady($item['name']) ?></strong>
</label> </label>
</div> </div>
......
...@@ -46,22 +46,20 @@ ...@@ -46,22 +46,20 @@
<?= _('Angezeigter Name') ?> <?= _('Angezeigter Name') ?>
<?= I18N::input('display_name', $display_name) ?> <?= I18N::input('display_name', $display_name) ?>
</label> </label>
<input type="checkbox" name="searchable" id="searchable" class="studip-checkbox" <label>
<?= $searchable ? 'checked="checked"' : '' ?> <input type="checkbox" name="searchable"
<?= $property->system ? 'disabled="disabled"' : '' ?>> <?= $searchable ? 'checked="checked"' : '' ?>
<label for="searchable"> <?= $property->system ? 'disabled="disabled"' : '' ?>>
<?= _('Diese Eigenschaft kann zur Suche genutzt werden.') ?> <?= _('Diese Eigenschaft kann zur Suche genutzt werden.') ?>
</label> </label>
<input type="checkbox" value="1" name="info_label" id="info_label" class="studip-checkbox" <label>
<?= $info_label ? 'checked="checked"' : '' ?>> <input type="checkbox" value="1" name="info_label"
<label for="info_label"> <?= $info_label ? 'checked="checked"' : '' ?>>
<?= _('Diese Eigenschaft soll im Info-Icon zu einem Raum angezeigt werden.') ?> <?= _('Diese Eigenschaft soll im Info-Icon zu einem Raum angezeigt werden.') ?>
</label> </label>
<input type="checkbox" name="range_search" value="1" class="studip-checkbox" id="range_search" <label>
<?= $range_search <input type="checkbox" name="range_search" value="1"
? 'checked="checked"' <?= $range_search ? 'checked="checked"' : '' ?>
: '' ?> <?= $property->system ? 'disabled="disabled"' : '' ?>>
<?= $property->system ? 'disabled="disabled"' : '' ?>>
<label for="range_search">
<?= _('Suchkriterium mit Intervall') ?> <?= _('Suchkriterium mit Intervall') ?>
</label> </label>
<? if ($show_form): ?> <? if ($show_form): ?>
<form class="default" method="post" action="<?= $form_action_link ?>" data-dialog="reload-on-close"> <form class="default" method="post" action="<?= $form_action_link ?>" data-dialog="reload-on-close">
<input type="hidden" name="origin_url" value="<?= htmlReady($origin_url) ?>"> <input type="hidden" name="origin_url" value="<?= htmlReady($origin_url) ?>">
<input type="checkbox" id="multiday" <?= ($begin_date_str != $end_date_str) ? 'checked' : ''; ?> <label>
onClick="$('#end_date_section').toggle();" class="studip-checkbox"> <input type="checkbox" <?= ($begin_date_str != $end_date_str) ? 'checked' : ''; ?>
<label for="multiday"> onClick="$('#end_date_section').toggle();">
<?= _('Mehrtägig') ?> <?= _('Mehrtägig') ?>
</label> </label>
<section> <section>
......
...@@ -463,30 +463,6 @@ form.narrow { ...@@ -463,30 +463,6 @@ form.narrow {
} }
} }
.studip-checkbox {
display: none;
+ label {
.icon('before', 'checkbox-unchecked', 'clickable', 16, 5px);
cursor: pointer;
}
&:checked + label {
.icon('before', 'checkbox-checked', 'clickable', 16, 5px);
}
&:indeterminate + label {
.icon('before', 'checkbox-indeterminate', 'clickable', 16, 5px);
}
&[disabled] {
+ label {
.icon('before', 'checkbox-unchecked', 'inactive', 16, 5px);
}
&:checked + label {
.icon('before', 'checkbox-checked', 'inactive', 16, 5px);
}
}
}
// give forms some optimized styling for very narrow screen sizes // give forms some optimized styling for very narrow screen sizes
.media-breakpoint-tiny-down({ .media-breakpoint-tiny-down({
form.default { form.default {
......
...@@ -26,12 +26,8 @@ ...@@ -26,12 +26,8 @@
} }
body.enable-skiplinks { body.enable-skiplinks {
*:focus, *:not(:empty):focus {
.focus_box, outline: 2px dashed @orange;
.studip-checkbox:focus + label {
&:not(:empty) {
outline: 2px dashed @orange;
}
} }
#tabs { #tabs {
......
...@@ -233,10 +233,6 @@ ...@@ -233,10 +233,6 @@
} }
} }
} }
.studip-checkbox + label {
float: none;
width: auto;
}
.messagebox { .messagebox {
margin-bottom: 2em; margin-bottom: 2em;
......
...@@ -46,7 +46,6 @@ ...@@ -46,7 +46,6 @@
<tr class="sortable"> <tr class="sortable">
<th v-if="show_bulk_actions" data-sort="false"> <th v-if="show_bulk_actions" data-sort="false">
<studip-proxy-checkbox <studip-proxy-checkbox
type="studip"
v-model="selectedIds" v-model="selectedIds"
:total="allIds" :total="allIds"
></studip-proxy-checkbox> ></studip-proxy-checkbox>
...@@ -107,7 +106,6 @@ ...@@ -107,7 +106,6 @@
<td v-if="show_bulk_actions"> <td v-if="show_bulk_actions">
<studip-proxied-checkbox <studip-proxied-checkbox
name="ids[]" name="ids[]"
type="studip"
:value="folder.id" :value="folder.id"
v-model="selectedIds" v-model="selectedIds"
></studip-proxied-checkbox> ></studip-proxied-checkbox>
...@@ -153,7 +151,6 @@ ...@@ -153,7 +151,6 @@
<td v-if="show_bulk_actions"> <td v-if="show_bulk_actions">
<studip-proxied-checkbox <studip-proxied-checkbox
name="ids[]" name="ids[]"
type="studip"
:value="file.id" :value="file.id"
v-model="selectedIds" v-model="selectedIds"
></studip-proxied-checkbox> ></studip-proxied-checkbox>
......
...@@ -9,7 +9,6 @@ export default { ...@@ -9,7 +9,6 @@ export default {
props: { props: {
name: String, name: String,
id: String, id: String,
type: String,
value: { value: {
required: true required: true
}, },
...@@ -41,9 +40,6 @@ export default { ...@@ -41,9 +40,6 @@ export default {
}, },
render (createElement) { render (createElement) {
const checkbox = createElement('input', { const checkbox = createElement('input', {
class: {
'studip-checkbox': this.type === 'studip'
},
attrs: { attrs: {
type: 'checkbox', type: 'checkbox',
name: this.name, name: this.name,
...@@ -58,22 +54,7 @@ export default { ...@@ -58,22 +54,7 @@ export default {
} }
}); });
if (this.type !== 'studip') { return checkbox;
return checkbox;
}
return createElement('span', {
style: {
display: 'contents',
},
}, [
checkbox,
createElement('label', {
attrs: {
for: this.proxiedId
}
}),
]);
} }
}; };
</script> </script>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment