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