mirror of https://github.com/Ombi-app/Ombi
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
99 lines
5.1 KiB
99 lines
5.1 KiB
|
|
<settings-menu></settings-menu>
|
|
<div *ngIf="emailForm">
|
|
<fieldset>
|
|
<legend>Email Notifications</legend>
|
|
<div class="col-md-6">
|
|
<form novalidate [formGroup]="emailForm" (ngSubmit)="onSubmit(emailForm)">
|
|
|
|
<div class="form-group">
|
|
<div class="checkbox">
|
|
<input type="checkbox" id="enable" formControlName="enabled">
|
|
<label for="enable">Enabled</label>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<div class="checkbox">
|
|
<input type="checkbox" id="Authentication" formControlName="authentication"><label for="Authentication">Enable SMTP Authentication</label>
|
|
</div>
|
|
</div>
|
|
<div *ngIf="emailForm.invalid && emailForm.dirty" class="alert alert-danger">
|
|
<div *ngIf="emailForm.get('host').hasError('required')">Host is required</div>
|
|
<div *ngIf="emailForm.get('port').hasError('required')">The Port is required</div>
|
|
<div *ngIf="emailForm.get('sender').hasError('required')">The Email Sender is required</div>
|
|
<div *ngIf="emailForm.get('sender').hasError('email')">The Email Sender needs to be a valid email address</div>
|
|
<div *ngIf="emailForm.get('adminEmail').hasError('required')">The Email Sender is required</div>
|
|
<div *ngIf="emailForm.get('adminEmail').hasError('email')">The Admin Email needs to be a valid email address</div>
|
|
<div *ngIf="emailForm.get('username').hasError('required')">The Username is required</div>
|
|
<div *ngIf="emailForm.get('password').hasError('required')">The Password is required</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="host" class="control-label">SMTP Host</label>
|
|
<div>
|
|
<input type="text" class="form-control form-control-custom " id="host" name="host" placeholder="localhost" formControlName="host">
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="portNumber" class="control-label">SMTP Port</label>
|
|
<div>
|
|
<input type="text" class="form-control form-control-custom " id="portNumber" name="Port" placeholder="Port Number" formControlName="port">
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="sender" class="control-label">Email Sender</label>
|
|
<div>
|
|
<input type="text" class="form-control form-control-custom " id="sender" name="sender" formControlName="sender" tooltipPosition="top" pTooltip="The email address that the emails will be sent from">
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="adminEmail" class="control-label">Admin Email</label>
|
|
<div>
|
|
<input type="text" class="form-control form-control-custom " id="adminEmail" name="adminEmail" formControlName="adminEmail" tooltipPosition="top" pTooltip="The administrator email will be used to send emails for admin only notifications (e.g. New Requests that require approvals)">
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="form-group" *ngIf="emailForm.controls['username'].validator">
|
|
<label for="username" class="control-label">Username</label>
|
|
<div>
|
|
<input type="text" class="form-control form-control-custom " id="username" name="username" formControlName="username" pTooltip="The username if authentication is enabled" tooltipPosition="top">
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group" *ngIf="emailForm.get('password').validator">
|
|
<label for="password" class="control-label">Password</label>
|
|
<div>
|
|
<input type="password" class="form-control form-control-custom " id="password" name="password" formControlName="password" pTooltip="The password if authentication is enabled" tooltipPosition="top">
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<div>
|
|
<button [disabled]="emailForm.invalid" type="submit" (click)="test(emailForm)" class="btn btn-primary-outline">
|
|
Test Connectivity
|
|
<div id="spinner"></div>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="form-group">
|
|
<div>
|
|
<button [disabled]="emailForm.invalid" type="submit" id="save" class="btn btn-primary-outline">Submit</button>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
|
|
|
|
<div class="col-md-6">
|
|
<notification-templates [templates]="templates"></notification-templates>
|
|
</div>
|
|
</fieldset>
|
|
</div> |