File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,3 +10,4 @@ artifacts/
1010coverage /
1111vendor /
1212.idea /
13+ .vscode
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ if (typeof(ss) === 'undefined' || typeof(ss.i18n) === 'undefined') {
2424 "LinkField.LINK_MODIFIED_LABEL" : "Modified" ,
2525 "LinkField.LINK_MODIFIED_TITLE" : "Link has unpublished changes" ,
2626 "LinkField.SAVE_RECORD_FIRST" : "Cannot add links until the record has been saved" ,
27+ "LinkField.SAVE_RECORD_FIRST_SINGLE" : "Cannot add link until the record has been saved" ,
2728 "LinkField.SAVE_SUCCESS" : "Saved link" ,
2829 "LinkField.SORT_ERROR" : "Unable to sort links" ,
2930 "LinkField.SORT_SUCCESS" : "Updated link sort order"
Original file line number Diff line number Diff line change 1717 "LinkField.LINK_MODIFIED_LABEL" : " Modified" ,
1818 "LinkField.LINK_MODIFIED_TITLE" : " Link has unpublished changes" ,
1919 "LinkField.SAVE_RECORD_FIRST" : " Cannot add links until the record has been saved" ,
20+ "LinkField.SAVE_RECORD_FIRST_SINGLE" : " Cannot add link until the record has been saved" ,
2021 "LinkField.SAVE_SUCCESS" : " Saved link" ,
2122 "LinkField.SORT_ERROR" : " Unable to sort links" ,
2223 "LinkField.SORT_SUCCESS" : " Updated link sort order"
Original file line number Diff line number Diff line change @@ -524,7 +524,9 @@ const LinkField = ({
524524 const renderPicker = ! loadingError && ! inHistoryViewer && ! saveRecordFirst && ( isMulti || linkIDs . length === 0 ) ;
525525 const renderModal = ! loadingError && ! saveRecordFirst && Boolean ( editingID ) ;
526526 const loadingErrorText = i18n . _t ( 'LinkField.FAILED_TO_LOAD_LINKS' , 'Failed to load link(s)' ) ;
527- const saveRecordFirstText = i18n . _t ( 'LinkField.SAVE_RECORD_FIRST' , 'Cannot add links until the record has been saved' ) ;
527+ const saveRecordFirstText = isMulti
528+ ? i18n . _t ( 'LinkField.SAVE_RECORD_FIRST' , 'Cannot add links until the record has been saved' )
529+ : i18n . _t ( 'LinkField.SAVE_RECORD_FIRST_SINGLE' , 'Cannot add link until the record has been saved' ) ;
528530 const links = renderLinks ( ) ;
529531
530532 return < LinkFieldContext . Provider value = { {
You can’t perform that action at this time.
0 commit comments