fixed flashing between configure tabs

This commit is contained in:
David Baldwynn 2017-11-19 21:26:49 -08:00
parent 56b7497dca
commit 9d040e9672
3 changed files with 9 additions and 4 deletions

View file

@ -39,16 +39,19 @@ angular.module('forms').directive('configureFormDirective', ['$rootScope', '$sta
{
heading: $translate.instant('GENERAL_TAB'),
route: 'viewForm.configure.general',
template: 'modules/forms/admin/views/adminTabs/configureTabs/general.html',
active: false
},
{
heading: $translate.instant('SELF_NOTIFICATIONS_TAB'),
route: 'viewForm.configure.self_notifications',
template: 'modules/forms/admin/views/adminTabs/configureTabs/self_notifications.html',
active: false
},
{
heading: $translate.instant('RESPONDENT_NOTIFICATIONS_TAB'),
route: 'viewForm.configure.respondent_notifications',
template: 'modules/forms/admin/views/adminTabs/configureTabs/respondent_notifications.html',
active: false
}
];

View file

@ -17,11 +17,13 @@
</div>
<div class="notification-row">
<input class="toggle-switch notification-toggle" type="checkbox" switch-size="small"
bs-switch ng-model="myform.respondentNotifications.enabled"
<input bs-switch class="toggle-switch notification-toggle" type="checkbox"
switch-size="small"
ng-model="myform.respondentNotifications.enabled"
ng-if="myform.respondentNotifications"
switch-on-text="{{ 'ON' | translate }}"
switch-off-text="{{ 'OFF' | translate }}"
ng-disabled="!formHasEmailField"
switch-active="!formHasEmailField"
ng-true-value="true"
ng-false-value="false">
</div>

View file

@ -2,7 +2,7 @@
<div class="row">
<uib-tabset active="activePill" type="pills">
<uib-tab ng-repeat="tab in configureTabs" active="tab.active" select="go(tab)" heading="{{tab.heading}}">
<div ui-view></div>
<div ng-if="tab.active" ui-view></div>
</uib-tab>
</uib-tabset>
</div>