<div class="l-admin-content">
    <div>
        <div class="admin-form ui-fixed-width-wide">
            <div class="ui-title">{{::InitializationText.Title_SendNotification}}</div>
            <label class="ui-field">
                <span class="ui-field-label">{{::InitializationText.Label_NotifyLoggedInUsers}}</span>
                <select ng-model="$ctrl.localizedMessage" ng-change="$ctrl.onLocalizedMessageSelected()" ng-options="message.caption for message in $ctrl.standardMessages"></select>
            </label>
            <label class="ui-field">
                <span class="ui-field-label">{{::InitializationText.Label_NotificationMessage}}</span>
                <textarea ng-model="$ctrl.message" class="ui-input-box ui-field-input"></textarea>
            </label>

            <br/>
            <div class="buttonContainer">
                <spinner-medium ng-if="$ctrl.sending.isPending"></spinner-medium>
                <button ng-click="$ctrl.sendClientNotification()" ng-disabled="!$ctrl.canSendClientNotification" class="button-raised button-primary">{{::InitializationText.Label_Send}}</button>
            </div>
        </div>

        <div class="admin-form ui-fixed-width-wide">
            <div class="ui-title">{{::InitializationText.Title_SendEmail}}</div>
            <label class="ui-field">
                <span class="ui-field-label">{{::InitializationText.Label_EmailAllAdmins}}</span>
            </label>
            <label class="ui-field">
                <span class="ui-field-label">{{::InitializationText.Label_EmailSubject}}</span>
                <input type="text" ng-model="$ctrl.subject" class="ui-input-box ui-field-input"/>
            </label>
            <label class="ui-field">
                <span class="ui-field-label">{{::InitializationText.Label_EmailBody}}</span>
                <textarea ng-model="$ctrl.body" class="ui-input-box ui-field-input"></textarea>
            </label>

            <br />
            <div class="buttonContainer">
                <spinner-medium ng-if="$ctrl.sending.isPending"></spinner-medium>
                <button ng-click="$ctrl.sendEmail()" ng-disabled="!$ctrl.canSendEmail" class="button-raised button-primary">{{::InitializationText.Label_Send}}</button>
            </div>
        </div>
    </div>
</div>
