Merge pull request #4366 from emanuelschuetze/fixes
several fixes and improvements
This commit is contained in:
commit
f09a39a3c3
@ -35,5 +35,5 @@
|
||||
}
|
||||
|
||||
mat-toolbar.multi-select {
|
||||
background-color: #757575;
|
||||
background-color: #757575 !important;
|
||||
}
|
||||
|
@ -1,7 +1,9 @@
|
||||
<div id="container" [osResized]="resizeSubject" [ngStyle]="containerStyle" #container>
|
||||
<div id="projector" [ngStyle]="projectorStyle">
|
||||
<div id="header" [ngStyle]="headerFooterStyle" *ngIf="enableHeaderAndFooter">
|
||||
<!-- TODO: Logo <img *ngIf="enableLogo" id="logo"> -->
|
||||
<!-- projector logo -->
|
||||
<os-logo *ngIf="enableLogo" inputAction="logo_projector_main" class="projector-logo-main"> </os-logo>
|
||||
|
||||
<div *ngIf="enableTitle" id="eventdata">
|
||||
<div
|
||||
*ngIf="eventName"
|
||||
|
@ -21,12 +21,12 @@
|
||||
margin-bottom: 20px;
|
||||
z-index: 1;
|
||||
|
||||
#logo {
|
||||
.projector-logo-main {
|
||||
height: 50px;
|
||||
padding-left: 50px;
|
||||
padding-top: 10px;
|
||||
height: 50px;
|
||||
margin-right: 25px;
|
||||
float: left;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
#eventdata {
|
||||
|
@ -157,20 +157,33 @@ export class ProjectorComponent extends BaseComponent implements OnDestroy {
|
||||
super(titleService, translate);
|
||||
|
||||
// Get all important config variables.
|
||||
|
||||
// enable header/footer
|
||||
this.configService
|
||||
.get<boolean>('projector_enable_header_footer')
|
||||
.subscribe(val => (this.enableHeaderAndFooter = val));
|
||||
this.configService.get<boolean>('projector_enable_title').subscribe(val => (this.enableTitle = val));
|
||||
|
||||
// projector colors
|
||||
this.configService
|
||||
.get<string>('projector_header_fontcolor')
|
||||
.subscribe(val => (this.headerFooterStyle.color = val));
|
||||
this.configService
|
||||
.get<string>('projector_header_backgroundcolor')
|
||||
.subscribe(val => (this.headerFooterStyle['background-color'] = val));
|
||||
this.configService.get<boolean>('projector_enable_logo').subscribe(val => (this.enableLogo = val));
|
||||
this.configService
|
||||
.get<string>('projector_background_color')
|
||||
.subscribe(val => (this.projectorStyle['background-color'] = val));
|
||||
|
||||
// projector logo / background-image
|
||||
this.configService.get<boolean>('projector_enable_logo').subscribe(val => (this.enableLogo = val));
|
||||
this.configService.get<{ path?: string }>('logo_projector_header').subscribe(val => {
|
||||
if (val && val.path) {
|
||||
this.headerFooterStyle['background-image'] = "url('" + val.path + "')";
|
||||
}
|
||||
});
|
||||
|
||||
// event data
|
||||
this.configService.get<string>('general_event_name').subscribe(val => (this.eventName = val));
|
||||
this.configService.get<string>('general_event_description').subscribe(val => (this.eventDescription = val));
|
||||
this.configService.get<string>('general_event_date').subscribe(val => (this.eventDate = val));
|
||||
|
@ -48,7 +48,6 @@
|
||||
*ngIf="user"
|
||||
(keydown)="onKeyDown($event)"
|
||||
>
|
||||
<!-- <h3 translate>Personal Data</h3> -->
|
||||
<div *ngIf="isAllowed('seeName')">
|
||||
<!-- Title -->
|
||||
<mat-form-field
|
||||
@ -107,7 +106,7 @@
|
||||
</mat-form-field>
|
||||
|
||||
<!-- Gender -->
|
||||
<mat-form-field class="form25 force-min-with" *ngIf="user.gender || editUser">
|
||||
<mat-form-field class="form25 force-min-with" *ngIf="user.gender || (editUser && isAllowed('manage'))">
|
||||
<mat-select placeholder="{{ 'Gender' | translate }}" formControlName="gender">
|
||||
<mat-option>-</mat-option>
|
||||
<mat-option *ngFor="let gender of genderList" [value]="gender">{{ gender | translate }}</mat-option>
|
||||
|
@ -124,7 +124,7 @@
|
||||
<mat-icon>cloud_upload</mat-icon>
|
||||
<span translate>Import</span><span> ...</span>
|
||||
</button>
|
||||
|
||||
</div>
|
||||
<div *ngIf="isMultiSelect">
|
||||
<button mat-menu-item (click)="selectAll()">
|
||||
<mat-icon>done_all</mat-icon>
|
||||
@ -192,7 +192,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</mat-menu>
|
||||
</mat-drawer-container>
|
||||
|
||||
|
@ -16,6 +16,7 @@ from django.contrib.sites.shortcuts import get_current_site
|
||||
from django.core import mail
|
||||
from django.core.exceptions import ValidationError as DjangoValidationError
|
||||
from django.db import transaction
|
||||
from django.http.request import QueryDict
|
||||
from django.utils.encoding import force_bytes, force_text
|
||||
from django.utils.http import urlsafe_base64_decode, urlsafe_base64_encode
|
||||
|
||||
@ -114,6 +115,7 @@ class UserViewSet(ModelViewSet):
|
||||
self.permission_denied(request)
|
||||
|
||||
# This is a hack to make request.data mutable. Otherwise fields can not be deleted.
|
||||
if isinstance(request.data, QueryDict):
|
||||
request.data._mutable = True
|
||||
# Remove fields that the user is not allowed to change.
|
||||
# The list() is required because we want to use del inside the loop.
|
||||
|
Loading…
Reference in New Issue
Block a user