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.
Ombi/src/Ombi/ClientApp/src/app/settings/notifications/telegram.component.html

66 lines
2.9 KiB

<settings-menu>
</settings-menu>
<div *ngIf="form" class="small-middle-container">
<fieldset>
<legend>Telegram Notifications</legend>
<div class="col-md-6">
<form novalidate [formGroup]="form" (ngSubmit)="onSubmit(form)">
<div class="form-group">
<mat-checkbox id="enable" formControlName="enabled">Enabled</mat-checkbox>
</div>
<div class="form-group">
<mat-form-field>
<mat-label>Bot API</mat-label>
<input matInput type="text" id="botApi" name="botApi" formControlName="botApi" [ngClass]="{'form-error': form.get('botApi').hasError('required')}">
</mat-form-field>
<small>You need a bot for Telegram notifications, You can find out how to create a bot
<a href="https://core.telegram.org/bots#6-botfather">here</a>.</small>
</div>
<div class="form-group">
<mat-form-field>
<mat-label>Chat Id</mat-label>
<input matInput type="text" id="chatId" name="chatId" formControlName="chatId" [ngClass]="{'form-error': form.get('chatId').hasError('required')}">
</mat-form-field>
<small>This is the Chat ID from Telegram. You can get the Chat Id from
<a href="https://telegram.me/get_id_bot">here</a>. This also supports Group Chat Id's.</small>
</div>
<div class="form-group">
<p-radioButton name="parseMode" value="markdown" formControlName="parseMode" label="Markdown Formatting"></p-radioButton>
</div>
<div class="form-group">
<p-radioButton name="parseMode" value="html" formControlName="parseMode" label="Html Formatting"></p-radioButton>
</div>
<small>Select a formatting option for the messages, you can view the supported formatting <a href="https://core.telegram.org/bots/api#formatting-options">here</a>.</small>
<div class="form-group">
<div>
<button [disabled]="form.invalid" mat-raised-button type="button" (click)="test(form)">
Test
<div id="spinner"></div>
</button>
</div>
</div>
<div class="form-group">
<div>
<button [disabled]="form.invalid" mat-raised-button type="submit" id="save">Submit</button>
</div>
</div>
</form>
</div>
<div class="col-md-6">
<notification-templates [templates]="templates" [showSubject]="false"></notification-templates>
</div>
</fieldset>
</div>