-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #183 from gctools-outilsgc/input-refactor
Input/WYSIWYG refactor
- Loading branch information
Showing
29 changed files
with
199 additions
and
232 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 11 additions & 19 deletions
30
src/app/shared/components/blog-form/blog-form.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,42 @@ | ||
<form id="gcc-form-poll" [formGroup]="form"> | ||
|
||
<app-input [(value)]="model.name" | ||
<app-input [value]="model.name" | ||
[name]="'name'" | ||
formControlName="name" | ||
[control]="$any(form).controls['name']" | ||
[control]="form.controls['name'] | formControl" | ||
[label]="translations.forms.blog.name_of_blog | translate" | ||
[placeholder]="translations.forms.placeholder | translate" | ||
[errorMatcher]="errorStateMatcher" | ||
[autofocus]="true" | ||
[required]="true" | ||
[disabled]="disabled"> | ||
[required]="true"> | ||
</app-input> | ||
|
||
<app-input [(value)]="model.publisher" | ||
<app-input [value]="model.publisher" | ||
[name]="'publisher'" | ||
formControlName="publisher" | ||
[control]="$any(form).controls['publisher']" | ||
[control]="form.controls['publisher'] | formControl" | ||
[label]="translations.forms.blog.name_of_publisher | translate" | ||
[placeholder]="translations.forms.placeholder | translate" | ||
[errorMatcher]="errorStateMatcher" | ||
[required]="true" | ||
[disabled]="disabled"> | ||
[required]="true"> | ||
</app-input> | ||
|
||
<app-file-select [label]="translations.forms.blog.upload_cover_photo | translate" | ||
[control]="$any(form).controls['coverPhoto']"> | ||
[control]="form.controls['coverPhoto'] | formControl"> | ||
</app-file-select> | ||
|
||
<app-input [(value)]="model.coverPhotoAlt" | ||
<app-input [value]="model.coverPhotoAlt" | ||
[name]="'coverPhotoAlt'" | ||
formControlName="coverPhotoAlt" | ||
[control]="$any(form).controls['coverPhotoAlt']" | ||
[control]="form.controls['coverPhotoAlt'] | formControl" | ||
[label]="translations.forms.blog.cover_photo_alt | translate" | ||
[placeholder]="translations.forms.placeholder | translate" | ||
[errorMatcher]="errorStateMatcher" | ||
[required]="true" | ||
[disabled]="disabled"> | ||
[required]="true"> | ||
</app-input> | ||
|
||
<app-editor [label]="translations.forms.blog.body | translate" | ||
[hint]="translations.forms.placeholder | translate" | ||
[(html)]="model.description" | ||
[required]="true" | ||
[maxCharacters]="maxBlogLength" | ||
formControlName="description" | ||
[control]="$any(form).controls['description']" | ||
[disabled]="disabled"> | ||
[control]="form.controls['description'] | formControl"> | ||
</app-editor> | ||
</form> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.