Advertisement
Guest User

Untitled

a guest
Sep 26th, 2017
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.40 KB | None | 0 0
  1. <aura:component implements="flexipage:availableForAllPageTypes,force:hasRecordId">
  2.  
  3. <aura:attribute name="accountRecord" type="Object" /> <aura:attribute name="recordSaveError" type="String" />
  4.  
  5. <force:recordData aura:id="recordEditor"
  6. layoutType="FULL"
  7. recordId="{!v.recordId}"
  8. fields="Name"
  9. targetError="{!v.recordSaveError}"
  10. targetRecord="{!v.accountRecord}"
  11. targetFields="{!v.accountRecord}"
  12. recordUpdated="{!c.recordUpdated}"
  13. mode="EDIT" />
  14. <ui:outputText value="Edit Account" />
  15.  
  16. <div class="slds-form--stacked">
  17. <div class="slds-form-element">
  18. <label class="slds-form-element__label" for="recordName">Name: </label>
  19. <div class="slds-form-element__control">
  20. <ui:outputText value="{!v.accountRecord.Name}" class="slds-input" aura:id="recordName"/>
  21. </div>
  22. </div>
  23. </div>
  24.  
  25.  
  26. <aura:if isTrue="{!not(empty(v.recordSaveError))}">
  27. <div class="recordSaveError">
  28. <ui:message title="Error" severity="error" closable="true">
  29. {!v.recordSaveError}
  30. </ui:message>
  31. Error: <ui:outputText value="{!v.recordSaveError}"/>
  32.  
  33. </div>
  34. </aura:if>
  35.  
  36. <lightning:input aura:id="recordName" name="recordName" label="Account Name"
  37. value="{!v.accountRecord.Name}" required="true"/>
  38.  
  39. <ui:button label="Save Account"/> </aura:component>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement