forked from apex-enterprise-patterns/fflib-apex-common
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Starting to build a modal mode for the view and edit form
- Loading branch information
1 parent
b39e23c
commit 521a494
Showing
5 changed files
with
254 additions
and
68 deletions.
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
66 changes: 66 additions & 0 deletions
66
framework/default/ortoo-core/default/lwc/viewAndEditForm/viewAndEditForm-card.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,66 @@ | ||
<template> | ||
<template if:true={visible}> | ||
<lightning-card if:false={inEditMode}> | ||
|
||
<div slot="title"> | ||
<slot name="title"></slot> | ||
</div> | ||
|
||
<div slot="actions"> | ||
<lightning-button-group> | ||
<slot name="additionalViewButtons"></slot> | ||
|
||
<lightning-button | ||
class="slds-m-top_small slds-float_right" | ||
variant="default" | ||
name="edit" | ||
data-name="edit" | ||
label={editButtonLabel} | ||
onclick={handleEditClick} | ||
></lightning-button> | ||
</lightning-button-group> | ||
</div> | ||
|
||
<div class="slds-p-around_small"> | ||
<slot name="viewForm"></slot> | ||
</div> | ||
</lightning-card> | ||
|
||
<lightning-card if:true={inEditMode}> | ||
|
||
<div slot="title"> | ||
<slot name="title"></slot> | ||
</div> | ||
|
||
<div class="slds-p-around_small"> | ||
<lightning-messages></lightning-messages> | ||
|
||
<slot name="editForm"></slot> | ||
</div> | ||
|
||
<div slot="footer"> | ||
|
||
<lightning-button-group> | ||
|
||
<lightning-button | ||
variant="default" | ||
name="cancel" | ||
data-name="cancel" | ||
label={cancelButtonLabel} | ||
onclick={handleCancelClick} | ||
></lightning-button> | ||
|
||
<slot name="additionalEditButtons"></slot> | ||
|
||
<lightning-button | ||
variant="brand" | ||
name="save" | ||
data-name="save" | ||
label={saveButtonLabel} | ||
onclick={handleSaveClick} | ||
></lightning-button> | ||
</lightning-button-group> | ||
</div> | ||
</lightning-card> | ||
</template> | ||
</template> |
68 changes: 68 additions & 0 deletions
68
framework/default/ortoo-core/default/lwc/viewAndEditForm/viewAndEditForm-modal.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,68 @@ | ||
<template> | ||
|
||
<c-modal | ||
visible={visible} | ||
oncancel={handleCancelModalClick} | ||
> | ||
<!-- TODO - new event for Cancel Modal Click--> | ||
|
||
<div slot="title"> | ||
<slot name="title"></slot> | ||
</div> | ||
|
||
<div slot="contents"> | ||
|
||
<template if:false={inEditMode}> | ||
|
||
<!-- TODO: where do these go? --> | ||
<lightning-button-group> | ||
<slot name="additionalViewButtons"></slot> | ||
|
||
<lightning-button | ||
class="slds-m-top_small slds-float_right" | ||
variant="default" | ||
name="edit" | ||
data-name="edit" | ||
label={editButtonLabel} | ||
onclick={handleEditClick} | ||
></lightning-button> | ||
</lightning-button-group> | ||
|
||
|
||
<slot name="viewForm"></slot> | ||
|
||
</template> | ||
|
||
<template if:true={inEditMode}> | ||
<slot name="editForm"></slot> | ||
</template> | ||
|
||
</div> | ||
|
||
<div slot="footer" if:true={inEditMode}> | ||
|
||
<lightning-button-group> | ||
|
||
<lightning-button | ||
variant="default" | ||
name="cancel" | ||
data-name="cancel" | ||
label={cancelButtonLabel} | ||
onclick={handleCancelClick} | ||
></lightning-button> | ||
|
||
<slot name="additionalEditButtons"></slot> | ||
|
||
<lightning-button | ||
variant="brand" | ||
name="save" | ||
data-name="save" | ||
label={saveButtonLabel} | ||
onclick={handleSaveClick} | ||
></lightning-button> | ||
</lightning-button-group> | ||
</div> | ||
|
||
</c-modal> | ||
|
||
</template> |
64 changes: 0 additions & 64 deletions
64
framework/default/ortoo-core/default/lwc/viewAndEditForm/viewAndEditForm.html
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.