default max count of answers set to a big number

This commit is contained in:
Tykayn 2022-03-21 10:32:13 +01:00 committed by tykayn
parent 5c1e7119b2
commit 62489dd250
2 changed files with 90 additions and 87 deletions

View File

@ -818,8 +818,8 @@ export class PollService implements Resolve<Poll> {
} }
newpoll.description = form.value.description; newpoll.description = form.value.description;
newpoll.has_several_hours = form.value.hasSeveralHours; newpoll.has_several_hours = form.value.hasSeveralHours;
newpoll.max_count_of_answers = form.value.maxCountOfAnswers; newpoll.max_count_of_answers = form.value.maxCountOfAnswers | (1024 * 10);
newpoll.maxCountOfAnswers = form.value.maxCountOfAnswers; newpoll.maxCountOfAnswers = form.value.maxCountOfAnswers | (1024 * 10);
newpoll.password = form.value.password; newpoll.password = form.value.password;
newpoll.kind = form.value.isAboutDate ? 'date' : 'classic'; newpoll.kind = form.value.isAboutDate ? 'date' : 'classic';
newpoll.allow_comments = form.value.allowComments; newpoll.allow_comments = form.value.allowComments;

View File

@ -16,99 +16,102 @@
</button> </button>
<form action="#/administration/step/{{ pollService.step_current }}"> <form action="#/administration/step/{{ pollService.step_current }}">
<p-dialog <dialog [attr.aria-labelledby]="'popup.languages.title' | translate" role="dialog">
[modal]="true" <p-dialog
[(visible)]="display_lang_dialog" [modal]="true"
[breakpoints]="['960px']" [(visible)]="display_lang_dialog"
[style]="{ width: '486px' }" [breakpoints]="['960px']"
[draggable]="false" [style]="{ width: '486px' }"
[showHeader]="false" [draggable]="false"
[resizable]="true" [showHeader]="false"
[attr.aria-labelledby]="'popup.languages.title' | translate" [resizable]="true"
role="dialog" id="lang_selector_modale"
id="lang_selector_modale" >
> <ng-template pTemplate="titlebar">
<ng-template pTemplate="titlebar">
<div class="">
<div class=""> <div class="">
<div class="top"> <div class="">
<button <div class="top">
id="close_dialog{{ idSuffix }}" <button
class="button cancel-button-reject pull-right img-marged-left has-no-border is-closing-popup" id="close_dialog{{ idSuffix }}"
lang="{{ currentLang }}" class="button cancel-button-reject pull-right img-marged-left has-no-border is-closing-popup"
(click)="closeModalAndFocusOnButtonToOpen()" lang="{{ currentLang }}"
> (click)="closeModalAndFocusOnButtonToOpen()"
{{ 'SENTENCES.Close' | translate }} >
<img class="icon" src="assets/icons/x_blue.svg" /> {{ 'SENTENCES.Close' | translate }}
</button> <img class="icon" src="assets/icons/x_blue.svg" />
</button>
</div>
</div> </div>
</div> </div>
</div> <h1 class="title is-1 has-text-left" id="lang_selector_modale_title">
<h1 class="title is-1 has-text-left" id="lang_selector_modale_title"> {{ 'popup.languages.title' | translate }}
{{ 'popup.languages.title' | translate }} </h1>
</h1>
<div class="list-of-langs is-dynamic" *ngIf="display_dynamic_langs"> <div class="list-of-langs is-dynamic" *ngIf="display_dynamic_langs">
<div *ngFor="let language of availableLanguages" (click)="language_to_apply = language"> <div *ngFor="let language of availableLanguages" (click)="language_to_apply = language">
<label <label
[attr.for]="'#lang_' + language" [attr.for]="'#lang_' + language"
class="lang-element button is-action" class="lang-element button is-action"
[ngClass]="{ [ngClass]="{
'is-primary': language_to_apply === language, 'is-primary': language_to_apply === language,
'is-current': language === currentLang 'is-current': language === currentLang
}" }"
> >
<input <input
class="pull-left" class="pull-left"
type="radio" type="radio"
value="{{ language }}" value="{{ language }}"
name="lang_to_apply" name="lang_to_apply"
lang="{{ language }}" lang="{{ language }}"
[(ngModel)]="language_to_apply" [(ngModel)]="language_to_apply"
[attr.id]="'#lang_' + language" [attr.id]="'#lang_' + language"
(click)="language_to_apply = language" (click)="language_to_apply = language"
/> />
<!-- {{ language }} - --> <!-- {{ language }} - -->
{{ 'LANGUAGES.' + language.toUpperCase() | translate }} {{ 'LANGUAGES.' + language.toUpperCase() | translate }}
</label> </label>
</div>
</div> </div>
</div>
<div class="list-of-langs is-static" *ngIf="!display_dynamic_langs"> <div class="list-of-langs is-static" *ngIf="!display_dynamic_langs">
<div *ngFor="let language of availableLanguagesStatic" (click)="language_to_apply = language.value"> <div
<label *ngFor="let language of availableLanguagesStatic"
[attr.for]="'#lang_' + language" (click)="language_to_apply = language.value"
class="lang-element button is-action"
[ngClass]="{
'is-primary is-focused': language_to_apply === language.value,
'is-current': language.value === currentLang
}"
> >
<input <label
type="radio" [attr.for]="'#lang_' + language"
value="{{ language.value }}" class="lang-element button is-action"
name="lang_to_apply" [ngClass]="{
lang="{{ language.value }}" 'is-primary is-focused': language_to_apply === language.value,
[(ngModel)]="language_to_apply" 'is-current': language.value === currentLang
[attr.id]="'#lang_' + language.value" }"
(click)="language_to_apply = language.value" >
/> <input
{{ 'LANGUAGES.' + language.value.toUpperCase() | translate }} type="radio"
</label> value="{{ language.value }}"
name="lang_to_apply"
lang="{{ language.value }}"
[(ngModel)]="language_to_apply"
[attr.id]="'#lang_' + language.value"
(click)="language_to_apply = language.value"
/>
{{ 'LANGUAGES.' + language.value.toUpperCase() | translate }}
</label>
</div>
</div> </div>
</div> </ng-template>
</ng-template>
<ng-template pTemplate="footer"> <ng-template pTemplate="footer">
<div class="buttons-bottom"> <div class="buttons-bottom">
<button class="button is-secondary" (click)="applyLangAndClosePopup()" lang="{{ currentLang }}"> <button class="button is-secondary" (click)="applyLangAndClosePopup()" lang="{{ currentLang }}">
{{ 'SENTENCES.Cancel' | translate }} {{ 'SENTENCES.Cancel' | translate }}
</button> </button>
<button class="button is-primary" (click)="applyLangAndClosePopup()" lang="{{ currentLang }}"> <button class="button is-primary" (click)="applyLangAndClosePopup()" lang="{{ currentLang }}">
{{ 'nav.save' | translate }} {{ 'nav.save' | translate }}
</button> </button>
</div> </div>
</ng-template> </ng-template>
</p-dialog> </p-dialog>
</dialog>
</form> </form>
</div> </div>