You are here: Foswiki>Tasks Web>Item13553 (08 Feb 2016, GeorgeClark)Edit Attach

Item13553: Add form-defiition-table template

Priority: Enhancement
Current State: Closed
Released In: 2.1.0
Target Release: minor
Applies To: Engine
Component: Documentation
Branches: master Release02x00 Item13897
Reported By: JozefMojzis
Waiting For:
Last Change By: GeorgeClark


Everytime when I going to define a new form, doing the following (very frustrating - not effective) steps:
  • click the wanted web
  • click create new topic, name it such MyNewForm
  • damm!! forgot again once - what is the dammed structure of the "data-form table"?
  • save the empty topic
  • Click System-web
  • Index
  • find the DataForms topic
  • Show wiki text
  • copy the form-definition table header to clipboard
  • click again the wanted web
  • click index
  • find my previously saved MyNewForm
  • click edit
  • copy the form definition table header into it
  • FINALLY could - add my form defs
  • save

Would be nice
  • go to the wanted web
  • create new topic
  • select from the templates instead of the "Default template" something like: "Default Form table template"
  • edit (already included the DataForms table-header)
  • add my form defs
  • save - done


Imho, affects nothing, only
  • need ship one more "default" template topic.
  • add the template to the default select-menu in the "create new topic" form.

Could helps users - easing the form-definition, reducing frustration of the beginners.

-- JozefMojzis - 23 Jul 2015

I started working on this .. It's a good idea. Problem is that the template has to be in the web where you are creating the application. We could possibly add it to Sandbox, and maybe the _default web. Creating it in System web doesn't help much.

-- GeorgeClark - 24 Jul 2015

Simple fix to add it to NatEdit:
diff --git a/NatEditPlugin/pub/System/NatEditPlugin/jquery.natedit.uncompressed.js b/NatEditPlugin/pub/System/NatEditPlugin/jquery.natedit.uncompressed.js
index cfa9970..59be02f 100644
--- a/NatEditPlugin/pub/System/NatEditPlugin/jquery.natedit.uncompressed.js
+++ b/NatEditPlugin/pub/System/NatEditPlugin/jquery.natedit.uncompressed.js
@@ -2589,6 +2589,7 @@ $.NatEditor.defaults = {
   outdentMarkup: ['','',''],
   mathMarkup: ['<latex title="Example">\n','\\sum_{x=1}^{n}\\frac{1}{x}','\n</latex>'],
   signatureMarkup: ['-- ', '[[%WIKINAME%]], ' - '%DATE%'],
+  dataFormMarkup: ['', '| *Name*  | *Type* | *Size* | *Values* | *Description* | *Attributes* | *Default* |', '\n'],
   horizRulerMarkup: ['', '---', '\n'],
   autoHideToolbar: false,
diff --git a/NatEditPlugin/templates/edittoolbar.natedit.tmpl b/NatEditPlugin/templates/edittoolbar.natedit.tmpl
index 8139430..91791a3 100644
--- a/NatEditPlugin/templates/edittoolbar.natedit.tmpl
+++ b/NatEditPlugin/templates/edittoolbar.natedit.tmpl
@@ -105,6 +105,7 @@
     <li><a href="#" title="%MAKETEXT{"Insert your signature"}%" data-markup="signatureMarkup"><i class="ui-icon fa fa-pencil-square-o"></i> %MAKETEXT{"Signature"}%</a></li>
     <li><a href="#" title="%MAKETEXT{"Insert a horizontal ruler"}%" data-markup="horizRulerMarkup"><i class="ui-icon fa fa-minus"></i> %MAKETEXT{"Horizontal ruler"}%</a></li>
     <li class="ui-natedit-formula"><a href="#" title="%MAKETEXT{"Insert a mathematical formula"}%" data-markup="mathMarkup"><i class="ui-icon fa">&#931;</i> %MAKETEXT{"Formula"}%</a></li>
+    <li><a href="#" title="%MAKETEXT{"Insert a data form table header"}%" data-markup="dataFormMarkup"><i class="ui-icon fa fa-columns"></i> %MAKETEXT{"Data Form Table Header"}%</a></li>
     <!-- li>-</li -->
     <!-- li><a href="#" title="%MAKETEXT{"Insert a macro"}%"><i class="ui-icon fa fa-gears"></i> %MAKETEXT{"Macro"}%</a></li -->

-- Main.GeorgeClark - 25 Jul 2015 - 00:20

GREAT solution - works like a charm. smile

-- JozefMojzis - 25 Jul 2015

ItemTemplate edit

Summary Add form-defiition-table template
ReportedBy JozefMojzis
Codebase 2.0.0, trunk
SVN Range
AppliesTo Engine
Component Documentation
Priority Enhancement
CurrentState Closed
Checkins distro:1dfd7491bda7 distro:b2f2e22b21d5
TargetRelease minor
ReleasedIn 2.1.0
CheckinsOnBranches master Release02x00 Item13897
masterCheckins distro:1dfd7491bda7
ItemBranchCheckins distro:1dfd7491bda7
Release02x00Checkins distro:b2f2e22b21d5
Topic revision: r7 - 08 Feb 2016, GeorgeClark - This page was cached on 18 Oct 2020 - 15:22.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy