This repository has been archived by the owner on May 11, 2023. It is now read-only.
Add property "description" to common options #211
Closed
Closed
Changes from 1 commit
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
be9a70f
Add description property to the list of common options
AbdallaElabd 5912a9e
Disable auto-opening edit modal of added components if their isNonEdi…
AbdallaElabd ba2ae92
Disable auto-opening the edit modal of added components if their isNo…
AbdallaElabd e1f4e9c
Merge remote-tracking branch 'origin/master'
AbdallaElabd 4fc9a50
fix: hide edit button if component is non-editable
AbdallaElabd ed0b8b1
fix: correct the description's placeholder property
AbdallaElabd 69c444a
chore: update dist files
AbdallaElabd dfe5241
chore: update dist files
AbdallaElabd 8ea8b9f
fix: add isConfigurable that disables editing the component if set to…
AbdallaElabd 049a911
commit dist files
AbdallaElabd File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2925,6 +2925,9 @@ module.exports = ['debounce', function(debounce) { | |
$scope.formComponents = _.cloneDeep(formioComponents.components); | ||
_.each($scope.formComponents, function(component, key) { | ||
component.settings.isNew = true; | ||
if (!component.settings.hasOwnProperty('isConfigurable')) { | ||
component.settings.isConfigurable = true; | ||
} | ||
if (component.settings.hasOwnProperty('builder') && !component.settings.builder || component.disabled) { | ||
delete $scope.formComponents[key]; | ||
} | ||
|
@@ -3187,7 +3190,7 @@ module.exports = [ | |
|
||
$scope.addComponent = function(component, index) { | ||
// Only edit immediately for components that are not resource comps. | ||
if (component.isNew && !component.isNonEditable && (!component.key || (component.key.indexOf('.') === -1))) { | ||
if (component.isNew && component.isConfigurable && (!component.key || (component.key.indexOf('.') === -1))) { | ||
$scope.editComponent(component); | ||
} | ||
else { | ||
|
@@ -3973,7 +3976,7 @@ app.run([ | |
}); | ||
|
||
$templateCache.put('formio/formbuilder/editbuttons.html', | ||
"<div class=\"component-btn-group\">\n <div class=\"btn btn-xxs btn-danger component-settings-button\" style=\"z-index: 1000\" ng-click=\"removeComponent(component, formComponent.confirmRemove)\"><span class=\"glyphicon glyphicon-remove\"></span></div>\n <div ng-if=\"::!hideMoveButton\" class=\"btn btn-xxs btn-default component-settings-button\" style=\"z-index: 1000\"><span class=\"glyphicon glyphicon glyphicon-move\"></span></div>\n <div ng-if=\"::formComponent.views && !component.isNonEditable\" class=\"btn btn-xxs btn-default component-settings-button\" style=\"z-index: 1000\" ng-click=\"editComponent(component)\"><span class=\"glyphicon glyphicon-cog\"></span></div>\n</div>\n" | ||
"<div class=\"component-btn-group\">\n <div class=\"btn btn-xxs btn-danger component-settings-button\" style=\"z-index: 1000\" ng-click=\"removeComponent(component, formComponent.confirmRemove)\"><span class=\"glyphicon glyphicon-remove\"></span></div>\n <div ng-if=\"::!hideMoveButton && component.isConfigurable\" class=\"btn btn-xxs btn-default component-settings-button\" style=\"z-index: 1000\"><span class=\"glyphicon glyphicon glyphicon-move\"></span></div>\n <div ng-if=\"::formComponent.views && !component.isNonEditable\" class=\"btn btn-xxs btn-default component-settings-button\" style=\"z-index: 1000\" ng-click=\"editComponent(component)\"><span class=\"glyphicon glyphicon-cog\"></span></div>\n</div>\n" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Components with |
||
); | ||
|
||
$templateCache.put('formio/formbuilder/component.html', | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is where I default the value to true, if it's not provided by the person registering the component.