Difference between revisions of "User:Ruben"

From Security Vision
Jump to: navigation, search
Line 4: Line 4:
 
See also [[Help:Statements_About_Statements]].
 
See also [[Help:Statements_About_Statements]].
  
In the Deployment form:
+
To make nice forms see the following steps. See a similar implementation for the ''Has events'' property on Deployments.
 +
 
 +
In  [[Template:Deployments]] there is
 +
 
 +
<pre><nowiki>
 +
|-
 +
! Potentially used by
 +
| {{{Potentially used by|}}}
 +
|-
 +
</nowiki></pre>
 +
 
 +
In the [[Form:Deployments|Deployments form]]:
  
 
<pre>
 
<pre>
Line 41: Line 52:
 
[[Has fields::Institution;Information Certainty;CiteRef;Description]]
 
[[Has fields::Institution;Information Certainty;CiteRef;Description]]
 
</nowiki></pre>
 
</nowiki></pre>
 +
 +
  
 
<hr>
 
<hr>
Line 47: Line 60:
  
 
* Set ''Certainty'' by default to ''Documented'', and leave the Citekey to fill in manually (copy-paste)
 
* Set ''Certainty'' by default to ''Documented'', and leave the Citekey to fill in manually (copy-paste)
* There might be a way to auto-fill blank values with the value from the form on submit (or actually, on rendering the form). This would have to be tried.
+
* There might be a way to auto-fill blank values with the value from the form on submit (or actually, on rendering the page). This would have to be tried. Adding things to eg. [[Template:HasEvent]] doesn't seem to work, but I might be doing this the wrong way
 +
 
  
 
== Testing ground ==
 
== Testing ground ==

Revision as of 14:35, 16 February 2022

Statements about statements[edit | ]

See also Help:Statements_About_Statements.

To make nice forms see the following steps. See a similar implementation for the Has events property on Deployments.

In Template:Deployments there is

|-
! Potentially used by
| {{{Potentially used by|}}}
|-

In the Deployments form:

|-
! Used by (new format)
| {{{field|Potentially used by|holds template|autocomplete on category=Institution}}} {{Unknown_Entity_redlink|Institution}}
|-

Then, lower in the form (before the </includeonly> tag).

{{{for template|PotentiallyUsedBy|multiple|embed in field=Deployments[Potentially used by]}}}
'''Institution:''' {{{field|1|property=Institution|input type=combobox}}}

'''Certainty:''' {{{field|2|property=Certainty|input type=tokens}}}

'''Citekey of source:''' {{{field|3|property=Source}}}
'''Description:''' {{{field|4|property=Description}}}
{{{end template}}}

This section references the PotentiallyUsedBy Template, which is used to populate the property. Note how the variables 1-4 match the fields of the section above.

[[Potentially used by::{{{1|}}};{{{2|}}};{{{3|}}};{{{4|}}}]]
<includeonly>
<!--[[{{{1|}}}]] ({{{2|}}}, {{{3|}}}-{{{4|}}})-->
<includeonly>

Which in turn references the Potentially used by Property.

It is a property of type [[Has type::Record]].
[[Has fields::Institution;Information Certainty;CiteRef;Description]]



Currently there is no way to do the following: when adding another record (using the *Add another* button) to pre-populate the data as it was filled in the main template. For now I see the following workarounds:

  • Set Certainty by default to Documented, and leave the Citekey to fill in manually (copy-paste)
  • There might be a way to auto-fill blank values with the value from the form on submit (or actually, on rendering the page). This would have to be tried. Adding things to eg. Template:HasEvent doesn't seem to work, but I might be doing this the wrong way


Testing ground[edit | ]

Loading map...
Loading map...