Commit 090cf7ac by David Taylor Committed by GitHub

Merge pull request #43 from jeff-phillips-18/fixes

Don't allow changing the Create button in create-project directive
parents d3c48214 604c2dc6
...@@ -87,7 +87,7 @@ hawtioPluginLoader.addModule('openshiftCommonUI'); ...@@ -87,7 +87,7 @@ hawtioPluginLoader.addModule('openshiftCommonUI');
" ng-click=\"createProject()\"\n" + " ng-click=\"createProject()\"\n" +
" ng-disabled=\"createProjectForm.$invalid || nameTaken || disableInputs\"\n" + " ng-disabled=\"createProjectForm.$invalid || nameTaken || disableInputs\"\n" +
" value=\"\">\n" + " value=\"\">\n" +
" {{submitButtonLabel}}\n" + " Create\n" +
" </button>\n" + " </button>\n" +
" <button\n" + " <button\n" +
" class=\"btn btn-default btn-lg\"\n" + " class=\"btn btn-default btn-lg\"\n" +
...@@ -241,17 +241,12 @@ angular.module("openshiftCommonUI") ...@@ -241,17 +241,12 @@ angular.module("openshiftCommonUI")
restrict: 'E', restrict: 'E',
scope: { scope: {
alerts: '=', alerts: '=',
submitButtonLabel: '@',
redirectAction: '&', redirectAction: '&',
onCancel: '&?', onCancel: '&?',
isDialog: '@' isDialog: '@'
}, },
templateUrl: 'src/components/create-project/createProject.html', templateUrl: 'src/components/create-project/createProject.html',
controller: function($scope, $filter, $location, DataService) { controller: function($scope, $filter, $location, DataService) {
if(!($scope.submitButtonLabel)) {
$scope.submitButtonLabel = 'Create';
}
$scope.isDialog = $scope.isDialog === 'true'; $scope.isDialog = $scope.isDialog === 'true';
$scope.createProject = function() { $scope.createProject = function() {
......
...@@ -257,7 +257,7 @@ hawtioPluginLoader.addModule('openshiftCommonUI'); ...@@ -257,7 +257,7 @@ hawtioPluginLoader.addModule('openshiftCommonUI');
" ng-click=\"createProject()\"\n" + " ng-click=\"createProject()\"\n" +
" ng-disabled=\"createProjectForm.$invalid || nameTaken || disableInputs\"\n" + " ng-disabled=\"createProjectForm.$invalid || nameTaken || disableInputs\"\n" +
" value=\"\">\n" + " value=\"\">\n" +
" {{submitButtonLabel}}\n" + " Create\n" +
" </button>\n" + " </button>\n" +
" <button\n" + " <button\n" +
" class=\"btn btn-default btn-lg\"\n" + " class=\"btn btn-default btn-lg\"\n" +
...@@ -411,17 +411,12 @@ angular.module("openshiftCommonUI") ...@@ -411,17 +411,12 @@ angular.module("openshiftCommonUI")
restrict: 'E', restrict: 'E',
scope: { scope: {
alerts: '=', alerts: '=',
submitButtonLabel: '@',
redirectAction: '&', redirectAction: '&',
onCancel: '&?', onCancel: '&?',
isDialog: '@' isDialog: '@'
}, },
templateUrl: 'src/components/create-project/createProject.html', templateUrl: 'src/components/create-project/createProject.html',
controller: ["$scope", "$filter", "$location", "DataService", function($scope, $filter, $location, DataService) { controller: ["$scope", "$filter", "$location", "DataService", function($scope, $filter, $location, DataService) {
if(!($scope.submitButtonLabel)) {
$scope.submitButtonLabel = 'Create';
}
$scope.isDialog = $scope.isDialog === 'true'; $scope.isDialog = $scope.isDialog === 'true';
$scope.createProject = function() { $scope.createProject = function() {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -77,7 +77,7 @@ angular.module('openshiftCommonUI').run(['$templateCache', function($templateCac ...@@ -77,7 +77,7 @@ angular.module('openshiftCommonUI').run(['$templateCache', function($templateCac
" ng-click=\"createProject()\"\n" + " ng-click=\"createProject()\"\n" +
" ng-disabled=\"createProjectForm.$invalid || nameTaken || disableInputs\"\n" + " ng-disabled=\"createProjectForm.$invalid || nameTaken || disableInputs\"\n" +
" value=\"\">\n" + " value=\"\">\n" +
" {{submitButtonLabel}}\n" + " Create\n" +
" </button>\n" + " </button>\n" +
" <button\n" + " <button\n" +
" class=\"btn btn-default btn-lg\"\n" + " class=\"btn btn-default btn-lg\"\n" +
......
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
ng-click="createProject()" ng-click="createProject()"
ng-disabled="createProjectForm.$invalid || nameTaken || disableInputs" ng-disabled="createProjectForm.$invalid || nameTaken || disableInputs"
value=""> value="">
{{submitButtonLabel}} Create
</button> </button>
<button <button
class="btn btn-default btn-lg" class="btn btn-default btn-lg"
......
...@@ -7,17 +7,12 @@ angular.module("openshiftCommonUI") ...@@ -7,17 +7,12 @@ angular.module("openshiftCommonUI")
restrict: 'E', restrict: 'E',
scope: { scope: {
alerts: '=', alerts: '=',
submitButtonLabel: '@',
redirectAction: '&', redirectAction: '&',
onCancel: '&?', onCancel: '&?',
isDialog: '@' isDialog: '@'
}, },
templateUrl: 'src/components/create-project/createProject.html', templateUrl: 'src/components/create-project/createProject.html',
controller: function($scope, $filter, $location, DataService) { controller: function($scope, $filter, $location, DataService) {
if(!($scope.submitButtonLabel)) {
$scope.submitButtonLabel = 'Create';
}
$scope.isDialog = $scope.isDialog === 'true'; $scope.isDialog = $scope.isDialog === 'true';
$scope.createProject = function() { $scope.createProject = function() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment