Note: If (for some bizarre/erroneous reason) an admin added the "Open Case" activity to another
timeline, then it would be reasonable to delete it.
}
};
+ $scope.isActivityRemovable = function(activitySet, activity) {
+ if (activitySet.name == 'standard_timeline' && activity.name == 'Open Case') {
+ return false;
+ } else {
+ return true;
+ }
+ };
+
$scope.isValidName = function(name) {
return !name || name.match(/^[a-zA-Z0-9_]+$/);
};
</select>
</td>
<td>
- <a class="crm-hover-button" ng-click="removeItem(activitySet.activityTypes, activity)">
+ <a class="crm-hover-button"
+ ng-show="isActivityRemovable(activitySet, activity)"
+ ng-click="removeItem(activitySet.activityTypes, activity)">
<span class="icon delete-icon" title="Remove"></span>
</a>
</td>