<div ng-controller="Wizdom365NotificationAdministrationController" class="lt-module-page">

    <div class="lt-module-page__top lt-module-page-top">
        <div class="lt-module-page-top__title">
            <h1>Email notifications</h1>
        </div>
        <div class="lt-module-page-top__actions">
            <div class="saveConfigurationButton">
                <button class="btn btn-primary"
                        ng-disabled="saving"
                        ng-click="saveConfig()">
                    {{'Save configuration' | translate}}
                </button>
            </div>
        </div>
    </div>


    <div class="lt-module-page__content">
        <div class="container-fluid">
            <div class="wizdom-controls">
                <div class="row wizdom-controls-row noborder">
                    <div class="col-sm-12">
                        <form role="form" class="form-horizontal">
                            <div class="form-group">
                                <div class="col-xs-4">
                                    <label class="control-label">{{'Enable email notifications' | translate}}</label>
                                </div>
                                <div class="col-xs-8">
                                    <div class="checkbox">
                                        <label>
                                            <input type="checkbox" id="emailNotificationEnabled" ng-model="emailNotificationEnabled">
                                        </label>
                                    </div>
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-xs-4">
                                    <label class="control-label">{{'Enable email notifications for comments' | translate}}</label>
                                </div>
                                <div class="col-xs-8">
                                    <div class="checkbox">
                                        <label>
                                            <input type="checkbox" id="emailNotificationForCommentsEnabled" ng-model="emailNotificationForCommentsEnabled" ng-disabled="!emailNotificationEnabled">
                                        </label>
                                    </div>
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-xs-4">
                                    <label class="control-label">{{'Enable email notifications for mentions' | translate}}</label>
                                </div>
                                <div class="col-xs-8">
                                    <div class="checkbox">
                                        <label>
                                            <input type="checkbox" id="emailNotificationForMentiosEnabled" ng-model="emailNotificationForMentiosEnabled" ng-disabled="!emailNotificationEnabled">
                                        </label>
                                    </div>
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-sm-4">
                                    <label class="control-label">{{'Always send email notifications for comments' | translate}}</label>
                                </div>
                                <div class="col-sm-8">
                                    <div class="checkbox">
                                        <label>
                                            <input type="checkbox" id="alwaysSendNotificationsComments" ng-model="alwaysSendNotificationsComments" class="lt-checkbox"  ng-disabled="!emailNotificationEnabled"/>
                                        </label>
                                    </div>
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-sm-4">
                                    <label class="control-label">{{'Always send email notifications for replies' | translate}}</label>
                                </div>
                                <div class="col-sm-8">
                                    <div class="checkbox">
                                        <label>
                                            <input type="checkbox" id="alwaysSendNoficationsForReplies" ng-model="alwaysSendNoficationsForReplies" class="lt-checkbox" ng-disabled="!emailNotificationEnabled"/>
                                        </label>
                                    </div>
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-xs-4">
                                    <label class="control-label">{{'Use "bcc" instead of "to"' | translate}}</label>
                                </div>
                                <div class="col-xs-8">
                                    <div class="checkbox">
                                        <label>
                                            <input type="checkbox" id="emailNotificationUseBCC" ng-model="emailNotificationUseBCC">
                                        </label>
                                    </div>
                                </div>
                            </div>

                            <div class="form-group">
                                <div class="col-xs-4">
                                    <label class="control-label">{{'Max number of recipients per email message' | translate}}</label>
                                </div>
                                <div class="col-xs-8">
                                    <input class="form-control" type="text" id="emailNotificationMaxRecipients" ng-model="emailNotificationMaxRecipients">
                                </div>
                            </div>

                            <div class="form-group">
                                <div class="col-xs-4">
                                    <label class="control-label">{{'Email overview template:' | translate}}</label>
                                </div>
                                <div class="col-xs-8">
                                    <wizdom365-template-picker template-url="emailNotificationOverviewTemplate"
                                                               directory-path="Noticeboard/Templates/ViewTemplates/Email/Overview">
                                    </wizdom365-template-picker>
                                </div>
                            </div>

                            <div class="form-group">
                                <div class="col-xs-4">
                                    <label class="control-label">{{'Email subject template content:' | translate}}</label>
                                </div>
                                <div class="col-xs-8">
                                    <input class="form-control" type="text" id="emailSubjectTemplate" ng-model="subjectTemplateContent" />
                                    <div class="alert alert-info  ">
                                        {{'For example: {'+'{ChannelName}'+'} - {'+'{ItemHeading}'+'}.' | translate}}
                                        {{'Available placeholders: AutherName, ItemPosted, CommentsCount, ItemLikesCount, ItemHeading, ChannelName, ItemBody, AppUrl, ItemId.' | translate}}
                                        {{'The template will be saved into Wizdom configuration when "Save configuration" button is clicked' | translate}}
                                    </div>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>


</div>

