@@ -162,44 +162,44 @@ export const formPane: PaneDefinition = {
162162 storeNode . uri ,
163163 targetSubject as unknown as Parameters < typeof kb . fetcher . nowOrWhenFetched > [ 1 ] ,
164164 function ( ok , body ) {
165- if ( ! ok ) return complain ( 'Cannot load store ' + storeNode . uri + ': ' + body )
165+ if ( ! ok ) return complain ( 'Cannot load store ' + storeNode . uri + ': ' + body )
166166
167- // Render the forms
167+ // Render the forms
168168
169- const forms = UI . widgets . formsFor ( targetSubject ) as NamedNode [ ]
169+ const forms = UI . widgets . formsFor ( targetSubject ) as NamedNode [ ]
170170
171- // complain('Form for editing this form:');
172- for ( const form of forms ) {
173- normalizeAmbiguousFieldTypes ( kb as never , form )
171+ // complain('Form for editing this form:');
172+ for ( const form of forms ) {
173+ normalizeAmbiguousFieldTypes ( kb as never , form )
174174
175- const heading = dom . createElement ( 'h4' )
176- heading . classList . add ( 'formPane__heading' )
177- box . appendChild ( heading )
178- /* The edit Form is not working in the local environment. it does not find
175+ const heading = dom . createElement ( 'h4' )
176+ heading . classList . add ( 'formPane__heading' )
177+ box . appendChild ( heading )
178+ /* The edit Form is not working in the local environment. it does not find
179179 the ui FormForm ontology. Need to research further and check in production. */
180- if ( form . uri ) {
181- const formStore = $rdf . Util . uri . document ( form . uri )
182- if ( formStore . uri !== form . uri ) {
183- const editButton = box . appendChild (
184- UI . widgets . editFormButton (
185- dom ,
186- box ,
187- form ,
188- formStore ,
189- complainIfBad
180+ if ( form . uri ) {
181+ const formStore = $rdf . Util . uri . document ( form . uri )
182+ if ( formStore . uri !== form . uri ) {
183+ const editButton = box . appendChild (
184+ UI . widgets . editFormButton (
185+ dom ,
186+ box ,
187+ form ,
188+ formStore ,
189+ complainIfBad
190+ )
190191 )
191- )
192- editButton . classList . add ( 'formPane__editButton' )
192+ editButton . classList . add ( 'formPane__editButton' )
193+ }
193194 }
194- }
195195
196- const anchor = dom . createElement ( 'a' )
197- anchor . classList . add ( 'formPane__headingLink' )
198- anchor . setAttribute ( 'href' , form . uri )
199- heading . insertBefore ( anchor , heading . firstChild )
200- anchor . textContent = UI . utils . label ( form , true )
196+ const anchor = dom . createElement ( 'a' )
197+ anchor . classList . add ( 'formPane__headingLink' )
198+ anchor . setAttribute ( 'href' , form . uri )
199+ heading . insertBefore ( anchor , heading . firstChild )
200+ anchor . textContent = UI . utils . label ( form , true )
201201
202- /* Keep tis as a reminder to let a New one have its URI given by user
202+ /* Keep tis as a reminder to let a New one have its URI given by user
203203 mention("Where will this information be stored?")
204204 const ele = dom.createElement('input');
205205 box.appendChild(ele);
@@ -210,17 +210,17 @@ export const formPane: PaneDefinition = {
210210 ele.value = store.uri
211211 */
212212
213- UI . widgets . appendForm (
214- dom ,
215- box ,
216- { } ,
217- targetSubject ,
218- form ,
219- storeNode ,
220- complainIfBad
221- )
222- tagMobileTextareaRows ( box )
223- }
213+ UI . widgets . appendForm (
214+ dom ,
215+ box ,
216+ { } ,
217+ targetSubject ,
218+ form ,
219+ storeNode ,
220+ complainIfBad
221+ )
222+ tagMobileTextareaRows ( box )
223+ }
224224 }
225225 ) // end: when store loded
226226 } // renderFormsFor
0 commit comments