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.
66 lines
3.2 KiB
66 lines
3.2 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">
|
|
<div class="checkbox">
|
|
<input type="checkbox" id="enable" formControlName="enabled">
|
|
<label for="enable">Enabled</label>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="form-group">
|
|
<label for="botApi" class="control-label">Bot API</label>
|
|
<input type="text" class="form-control form-control-custom " id="botApi" name="botApi" formControlName="botApi" [ngClass]="{'form-error': form.get('botApi').hasError('required')}">
|
|
<small *ngIf="form.get('botApi').hasError('required')" class="error-text">The Bot API is required</small>
|
|
<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">
|
|
<label for="chatId" class="control-label">Chat Id</label>
|
|
<input type="text" class="form-control form-control-custom " id="chatId" name="chatId" formControlName="chatId" [ngClass]="{'form-error': form.get('chatId').hasError('required')}">
|
|
<small *ngIf="form.get('chatId').hasError('required')" class="error-text">The Chat Id is required</small>
|
|
<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" type="button" (click)="test(form)" class="btn btn-primary-outline">
|
|
Test
|
|
<div id="spinner"></div>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<div>
|
|
<button [disabled]="form.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" [showSubject]="false"></notification-templates>
|
|
</div>
|
|
</fieldset>
|
|
</div> |