Merge pull request #4402 from emanuelschuetze/fixes-20190225

Fixes
This commit is contained in:
Emanuel Schütze 2019-02-25 18:40:44 +01:00 committed by GitHub
commit 798af8c5ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 20 additions and 4 deletions

View File

@ -347,7 +347,7 @@ _('Email');
_('Email sender');
_('Email subject');
_('Your login for {event_name}');
_('You can use {event_name} as a placeholder.');
_('You can use {event_name} and {username} as placeholder.');
_('Email body');
_(
'Dear {name},\n\nthis is your OpenSlides login for the event {event_name}:\n\n {url}\n username: {username}\n password: {password}\n\nThis email was generated automatically.'

View File

@ -2,7 +2,7 @@
<div id="projector" [ngStyle]="projectorStyle">
<div id="header" [ngStyle]="headerFooterStyle" *ngIf="enableHeaderAndFooter">
<!-- projector logo -->
<os-logo *ngIf="enableLogo" inputAction="logo_projector_main" class="projector-logo-main"> </os-logo>
<img *ngIf="enableLogo && projectorLogo" src="{{ projectorLogo }}" class="projector-logo-main" />
<div *ngIf="enableTitle" id="eventdata">
<div

View File

@ -133,6 +133,7 @@ export class ProjectorComponent extends BaseComponent implements OnDestroy {
public enableHeaderAndFooter = true;
public enableTitle = true;
public enableLogo = true;
public projectorLogo;
public eventName;
public eventDescription;
public eventDate;
@ -177,6 +178,11 @@ export class ProjectorComponent extends BaseComponent implements OnDestroy {
// projector logo / background-image
this.configService.get<boolean>('projector_enable_logo').subscribe(val => (this.enableLogo = val));
this.configService.get<{ path?: string }>('logo_projector_main').subscribe(val => {
if (val && val.path) {
this.projectorLogo = val.path;
}
});
this.configService.get<{ path?: string }>('logo_projector_header').subscribe(val => {
if (val && val.path) {
this.headerFooterStyle['background-image'] = "url('" + val.path + "')";

View File

@ -1,4 +1,9 @@
.os-listview-table {
/** Projector button **/
.mat-column-projector {
padding-right: 15px;
}
/** Title */
.mat-column-title {
flex: 2 0 50px;

View File

@ -1,8 +1,10 @@
#projector {
width: 100%; /*1000px;*/
border: 1px solid lightgrey;
}
.column-left {
color: black;
display: inline-block;
padding-top: 20px;
width: 60%;

View File

@ -9,6 +9,7 @@
.projector {
width: 320px;
color: black;
}
form {

View File

@ -121,7 +121,7 @@ def get_config_variables():
default_value="Your login for {event_name}",
input_type="string",
label="Email subject",
help_text="You can use {event_name} as a placeholder.",
help_text="You can use {event_name} and {username} as placeholder.",
weight=605,
group="Participants",
subgroup="Email",

View File

@ -237,7 +237,9 @@ class User(RESTModelMixin, PermissionsMixin, AbstractBaseUser):
except KeyError as err:
raise ValidationError({"detail": f"Invalid property {err}."})
subject_format = format_dict({"event_name": config["general_event_name"]})
subject_format = format_dict(
{"event_name": config["general_event_name"], "username": self.username}
)
try:
subject = subject.format(**subject_format)
except KeyError as err: