Code cleanup, no functional changes
This commit is contained in:
@@ -75,11 +75,11 @@
|
||||
<div class="offset-1 col-1">
|
||||
<label for="admin" class="form-label">Site Admin</label>
|
||||
<div class="input-group">
|
||||
<div class="btn-group" role="group" @if($user->id == $o->id)data-bs-toggle="tooltip" title="You cannot demote yourself" @endif>
|
||||
<div class="btn-group" role="group" @if($user->id === $o->id)data-bs-toggle="tooltip" title="You cannot demote yourself" @endif>
|
||||
<input type="radio" class="btn-check" name="admin" id="admin_yes" value="1" required @cannot('admin',$o)disabled @endcannot @if(old('admin',$o->admin))checked @endif>
|
||||
<label class="btn btn-outline-success" for="admin_yes">Yes</label>
|
||||
|
||||
<input type="radio" class="btn-check btn-danger" name="admin" id="admin_no" value="0" required @if(($user->id == $o->id) || $user->cannot('admin',$o)) disabled @endif @if(! old('admin',$o->admin))checked @endif>
|
||||
<input type="radio" class="btn-check btn-danger" name="admin" id="admin_no" value="0" required @if(($user->id === $o->id) || $user->cannot('admin',$o)) disabled @endif @if(! old('admin',$o->admin))checked @endif>
|
||||
<label class="btn btn-outline-danger" for="admin_no">No</label>
|
||||
</div>
|
||||
</div>
|
||||
@@ -113,7 +113,7 @@
|
||||
@endsection
|
||||
|
||||
@section('page-scripts')
|
||||
@if($user->id == $o->id)
|
||||
@if($user->id === $o->id)
|
||||
<script>
|
||||
var tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]'))
|
||||
var tooltipList = tooltipTriggerList.map(function (tooltipTriggerEl) {
|
||||
|
@@ -119,7 +119,7 @@
|
||||
async : true,
|
||||
cache : false,
|
||||
beforeSend : function() {
|
||||
if (c++ == 0) {
|
||||
if (c++ === 0) {
|
||||
icon.removeClass('d-none');
|
||||
}
|
||||
},
|
||||
@@ -130,7 +130,7 @@
|
||||
process(data);
|
||||
},
|
||||
complete : function() {
|
||||
if (--c == 0) {
|
||||
if (--c === 0) {
|
||||
icon.addClass('d-none');
|
||||
}
|
||||
}
|
||||
|
@@ -227,7 +227,7 @@
|
||||
async : true,
|
||||
cache : false,
|
||||
beforeSend : function() {
|
||||
if (c++ == 0) {
|
||||
if (c++ === 0) {
|
||||
icon.removeClass('d-none');
|
||||
}
|
||||
},
|
||||
@@ -238,7 +238,7 @@
|
||||
process(data);
|
||||
},
|
||||
complete : function() {
|
||||
if (--c == 0) {
|
||||
if (--c === 0) {
|
||||
icon.addClass('d-none');
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user