-
Notifications
You must be signed in to change notification settings - Fork 1
50 improve required field look and feel #73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,26 +4,52 @@ <h1 class="card-title">Project</h1> | |
|
||
<div class="form-group"> | ||
<label for="name">Name:</label> | ||
<input class="form-control" id="name" type="text" formControlName="name" required> | ||
<p class="alert alert-danger" *ngIf="(name.dirty || name.touched) && name.invalid && name.errors.required">Name Project is required.</p> | ||
<input | ||
class="form-control" | ||
id="name" | ||
type="text" | ||
formControlName="name" | ||
[class.is-invalid]="name.invalid && name.touched" | ||
required | ||
/> | ||
<p class="text-danger" *ngIf="(name.dirty || name.touched) && name.invalid && name.errors.required"> | ||
Name Project is required. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Project name is required. |
||
</p> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<label for="details">Details:</label> | ||
<textarea class="form-control" rows="3" id="details" type="text" formControlName="details" required></textarea> | ||
<p class="alert alert-danger" *ngIf="(details.dirty || details.touched) && details.invalid && details.errors.required">Details Project is required.</p> | ||
<textarea | ||
class="form-control" | ||
rows="3" | ||
id="details" | ||
type="text" | ||
formControlName="details" | ||
[class.is-invalid]="details.invalid && details.touched" | ||
required | ||
></textarea> | ||
<p class="text-danger" *ngIf="(details.dirty || details.touched) && details.invalid && details.errors.required"> | ||
Details Project is required. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Project details are required. |
||
</p> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<label for="status">Status:</label> | ||
<select class="form-control" formControlName="status"> | ||
<option *ngFor="let status of projectStatus" [value]="status">{{status}}</option> | ||
<option | ||
*ngFor="let status of projectStatus" | ||
[class.is-invalid]="status.invalid && status.touched" | ||
[value]="status" | ||
>{{ status }}</option | ||
> | ||
</select> | ||
<p class="alert alert-danger" *ngIf="(status.dirty || status.touched) && status.invalid && status.errors.required">Status Project is required.</p> | ||
<p class="text-danger" *ngIf="(status.dirty || status.touched) && status.invalid && status.errors.required"> | ||
Status Project is required. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Project status is required. |
||
</p> | ||
</div> | ||
|
||
<div class="form-group form-check" [hidden]="!projectToEdit"> | ||
<input type="checkbox" class="form-check-input" id="completedProject" formControlName="completed"> | ||
<input type="checkbox" class="form-check-input" id="completedProject" formControlName="completed" /> | ||
<label class="form-check-label" for="completedProject">Completed project</label> | ||
</div> | ||
<div class="btn-toolbar" role="toolbar"> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't if the description is required in activity. @enriquezrene can help us.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not, let's remove this validation @daros10
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done @enriquezrene