-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow setting default value for date/time picker in Dialog Editor modal #373
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
5d43974
Allow setting default value for date/time picker in Dialog Editor modal
romanblanco 4750ab0
Add a button to clear default value
romanblanco e324336
Replaced pf-datepicker component for uib-datepicker
romanblanco e6f5aae
Added missing option to set field as required
romanblanco File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
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
115 changes: 115 additions & 0 deletions
115
src/dialog-editor/components/modal-field-template/date-control.html
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 |
---|---|---|
@@ -0,0 +1,115 @@ | ||
<div ng-if="vm.modalTabIsSet('options') && !vm.modalData.dynamic"> | ||
<form class="form-horizontal"> | ||
<div pf-form-group pf-label="{{'Required'|translate}}"> | ||
<input bs-switch | ||
ng-model="vm.modalData.required" | ||
type="checkbox" | ||
switch-on-text="{{'Yes'|translate}}" | ||
switch-off-text="{{'No'|translate}}"> | ||
</div> | ||
<div pf-form-group pf-label="{{'Default value'|translate}}"> | ||
<div class="dateTimePadding"> | ||
<p class="input-group"> | ||
<input uib-datepicker-popup="MM/dd/yyyy" | ||
type="text" | ||
class="form-control" | ||
ng-model="vm.modalData.default_value" | ||
is-open="open" | ||
close-text="{{'Close'|translate}}"/> | ||
<span class="input-group-btn"> | ||
<button type="button" | ||
class="btn btn-default" | ||
ng-click="open = !open"> | ||
<i class="fa fa-calendar"></i> | ||
</button> | ||
</span> | ||
</p> | ||
</div> | ||
</div> | ||
<div pf-form-group pf-label="{{'Read only'|translate}}"> | ||
<input bs-switch | ||
ng-model="vm.modalData.read_only" | ||
type="checkbox" | ||
switch-on-text="{{'Yes'|translate}}" | ||
switch-off-text="{{'No'|translate}}"> | ||
</div> | ||
<div pf-form-group pf-label="{{'Visible'|translate}}"> | ||
<input bs-switch | ||
ng-model="vm.modalData.visible" | ||
type="checkbox" | ||
switch-on-text="{{'Yes'|translate}}" | ||
switch-off-text="{{'No'|translate}}"> | ||
</div> | ||
<div pf-form-group pf-label="{{'Show Past Dates'|translate}}"> | ||
<input bs-switch | ||
ng-model="vm.modalData.options.show_past_dates" | ||
type="checkbox" | ||
switch-on-text="{{'Yes'|translate}}" | ||
switch-off-text="{{'No'|translate}}"> | ||
</div> | ||
<dialog-editor-modal-field-template template="fields-to-refresh.html" | ||
modal-data="vm.modalData"> | ||
</dialog-editor-modal-field-template> | ||
</form> | ||
</div> | ||
<div ng-if="vm.modalTabIsSet('options') && vm.modalData.dynamic"> | ||
<form class="form-horizontal"> | ||
<div ng-show="!vm.treeOptions.show"> | ||
<div pf-form-group pf-label="{{'Entry Point'|translate}}"> | ||
<div class="input-group"> | ||
<input type="text" class="form-control" ng-value="vm.showFullyQualifiedName(vm.modalData.resource_action)" disabled> | ||
<span class="input-group-btn"> | ||
<button class="btn btn-default" ng-click="vm.treeOptions.toggle();"><i class="ff ff-load-balancer"></i></button> | ||
</span> | ||
</div> | ||
</div> | ||
<div pf-form-group pf-label="{{'Show Refresh Button'|translate}}"> | ||
<input bs-switch | ||
ng-model="vm.modalData.show_refresh_button" | ||
type="checkbox" | ||
switch-on-text="{{'Yes'|translate}}" | ||
switch-off-text="{{'No'|translate }}"/> | ||
</div> | ||
<div pf-form-group pf-label="{{'Show Past Dates'|translate}}"> | ||
<input bs-switch | ||
ng-model="vm.modalData.options.show_past_dates" | ||
type="checkbox" | ||
switch-on-text="{{'Yes'|translate}}" | ||
switch-off-text="{{'No'|translate}}"> | ||
</div> | ||
<dialog-editor-modal-field-template template="fields-to-refresh.html" | ||
modal-data="vm.modalData"> | ||
</dialog-editor-modal-field-template> | ||
</div> | ||
|
||
<div pf-form-group pf-label="{{'Required'|translate}}"> | ||
<input bs-switch | ||
ng-model="vm.modalData.required" | ||
type="checkbox" | ||
switch-on-text="{{'Yes'|translate}}" | ||
switch-off-text="{{'No'|translate}}"> | ||
</div> | ||
|
||
<dialog-editor-tree-selector ng-if="vm.treeOptions.show" | ||
tree-options="vm.treeOptions"> | ||
</dialog-editor-tree-selector> | ||
</form> | ||
</div> | ||
<div ng-if="vm.modalTabIsSet('overridable') && vm.modalData.dynamic"> | ||
<form class="form-horizontal"> | ||
<div pf-form-group pf-label="{{'Read only'|translate}}"> | ||
<input bs-switch | ||
ng-model="vm.modalData.read_only" | ||
type="checkbox" | ||
switch-on-text="{{'Yes'|translate}}" | ||
switch-off-text="{{'No'|translate}}"> | ||
</div> | ||
<div pf-form-group pf-label="{{'Visible'|translate}}"> | ||
<input bs-switch | ||
ng-model="vm.modalData.visible" | ||
type="checkbox" | ||
switch-on-text="{{'Yes'|translate}}" | ||
switch-off-text="{{'No'|translate}}"> | ||
</div> | ||
</form> | ||
</div> |
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
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
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
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.
dateOptions
is intentionally removed? (I'm not seeing it defined anywhere, so sounds about right, just checking :), line 33 does havedatepicker-options
, line 53 doesn't)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.
yes.
Thanks! Removing 👍