Skip to content

Commit

Permalink
Merge pull request #1485 from rohit645/remove_toggle_button
Browse files Browse the repository at this point in the history
removed private toggle button from survey-edit window fixes #3909
  • Loading branch information
AmTryingMyBest authored Apr 17, 2020
2 parents 1362818 + 0064aaf commit fd39bf7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion app/settings/surveys/attribute-editor.directive.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ function (
};

$scope.canMakePrivate = function () {
return $scope.editAttribute.type !== 'tags';
return $scope.editAttribute.type !== 'tags' && $scope.editAttribute.type !== 'title' && $scope.editAttribute.type !== 'description';
};

$scope.canDisableCaption = function () {
Expand Down
22 changes: 11 additions & 11 deletions app/settings/surveys/attribute-editor.html
Original file line number Diff line number Diff line change
Expand Up @@ -80,17 +80,17 @@
</div>
<!-- end: media upload toggle to make caption an optional field-->
<div class="form-field switch" ng-show="canMakePrivate()">
<label translate="survey.make_response_private">Make responses private</label>
<p data-fieldgroup-target="field-private-message-3" class="init active" translate="survey.response_private_desc" ng-show="editAttribute.response_private">
<svg class="iconic">
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/img/iconic-sprite.svg#lock-locked"></use>
</svg>
Only people with permission to edit responses will be able to see responses to this field.
</p>
<div class="toggle-switch">
<input class="tgl" id="switchprivateresponse" type="checkbox" ng-model="editAttribute.response_private">
<label class="tgl-btn" for="switchprivateresponse"></label>
</div>
<label translate="survey.make_response_private">Make responses private</label>
<p data-fieldgroup-target="field-private-message-3" class="init active" translate="survey.response_private_desc" ng-show="editAttribute.response_private">
<svg class="iconic">
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/img/iconic-sprite.svg#lock-locked"></use>
</svg>
Only people with permission to edit responses will be able to see responses to this field.
</p>
<div class="toggle-switch">
<input class="tgl" id="switchprivateresponse" type="checkbox" ng-model="editAttribute.response_private">
<label class="tgl-btn" for="switchprivateresponse"></label>
</div>
</div>
<div class="form-field switch" ng-if="canDisplay()">
<label translate="app.default_value">Default value (optional):</label>
Expand Down

0 comments on commit fd39bf7

Please sign in to comment.