[Bps-public-commit] rt-extension-formtools branch revise-admin-labels created. 0.53-61-gbb18d65

BPS Git Server git at git.bestpractical.com
Thu Oct 19 15:57:29 UTC 2023


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "rt-extension-formtools".

The branch, revise-admin-labels has been created
        at  bb18d652f734805b9738da40bb8b54e88c64d421 (commit)

- Log -----------------------------------------------------------------
commit bb18d652f734805b9738da40bb8b54e88c64d421
Author: Jim Brandt <jbrandt at bestpractical.com>
Date:   Thu Oct 19 11:57:20 2023 -0400

    Update admin help, labels, spacing

diff --git a/html/Admin/Elements/FormToolsHelp b/html/Admin/Elements/FormToolsHelp
index 2df8c64..46102f2 100644
--- a/html/Admin/Elements/FormToolsHelp
+++ b/html/Admin/Elements/FormToolsHelp
@@ -47,6 +47,8 @@
 %# END BPS TAGGED BLOCK }}}
 <div class="help" id="rt-help-text">
 <&| /Widgets/TitleBox, title => loc('FormTools Configuration') &>
-<p>FormTools help goes here.</p>
+<p>Build your form using the tools below. To create new pages for a multi-page form, click the plus (+). To change the order of pages, click the gear and update the Sort order. To remove a page, click the gear and click Delete. Make sure to Save Changes at the bottom of the form after any updates.<p>
+
+<p>To create your form, drag components from the Components box on the left to the Content area on the right. Click the pencil to edit components. Click the X to remove them. Click Save Changes to save the new page.</p>
 </&>
 </div>
diff --git a/html/Admin/FormTools/Modify.html b/html/Admin/FormTools/Modify.html
index e7e72dc..9d8d284 100644
--- a/html/Admin/FormTools/Modify.html
+++ b/html/Admin/FormTools/Modify.html
@@ -9,7 +9,7 @@
       <div class="d-block text-center">
 % foreach my $item ( @html_components ) {
         <div id="formtools-element-<% $item %>" class="formtools-element" draggable="true" ondragstart="formTools.dragstart(event);" ondragend="formTools.dragend(event);" data-value="<% JSON({ type => 'raw_html', html => "<$item>test</$item>"}) %>">
-          <p class="formtools-element-placeholder m-1 p-2 border rounded"><% loc('Put it here') %></p>
+          <p class="formtools-element-placeholder m-1 p-2 border rounded"><% loc('Place here') %></p>
           <p class="m-1 p-2 border rounded">
             <span class="badge badge-primary"><% $item eq 'html' ? 'HTML' : uc($item) %></span>
             <span class="content"><% loc('[_1] Element', uc($item)) %></span>
@@ -57,9 +57,9 @@
         <hr />
 % foreach my $item ( @core_components ) {
         <div id="formtools-element-<% $item %>" class="formtools-element" draggable="true" ondragstart="formTools.dragstart(event);" ondragend="formTools.dragend(event);" data-value="<% JSON({ type => 'component', comp_name => 'Field', arguments => { name => $item } }) %>">
-          <p class="formtools-element-placeholder m-1 p-2 border rounded"><% loc('Put it here') %></p>
+          <p class="formtools-element-placeholder m-1 p-2 border rounded"><% loc('Place here') %></p>
           <p class="m-1 p-2 border rounded">
-            <span class="badge badge-primary"><% loc('Field') %></span>
+            <span class="badge badge-primary"><% loc('Custom Field') %></span>
             <% $item %>
             <a href="#" class="edit" data-toggle="modal" data-target="#formtools-element-modal">
               <span class="fas fa-pencil-alt" alt="<% loc('Edit') %>" data-toggle="tooltip" data-placement="top" data-original-title="<% loc('Edit') %>"></span>
@@ -101,9 +101,9 @@
         <hr />
 % foreach my $item ( @custom_fields ) {
         <div id="formtools-element-<% $item %>" class="formtools-element" draggable="true" ondragstart="formTools.dragstart(event);" ondragend="formTools.dragend(event);" data-value="<% JSON({ type => 'component', comp_name => 'Field', arguments => { name => $item } }) %>">
-          <p class="formtools-element-placeholder m-1 p-2 border rounded"><% loc('Put it here') %></p>
+          <p class="formtools-element-placeholder m-1 p-2 border rounded"><% loc('Place here') %></p>
           <p class="m-1 p-2 border rounded">
-            <span class="badge badge-primary"><% loc('Field') %></span>
+            <span class="badge badge-primary"><% loc('Custom Field') %></span>
             <% $item %>
             <a href="#" class="edit" data-toggle="modal" data-target="#formtools-element-modal">
               <span class="fas fa-pencil-alt" alt="<% loc('Edit') %>" data-toggle="tooltip" data-placement="top" data-original-title="<% loc('Edit') %>"></span>
@@ -154,7 +154,7 @@
         <hr />
 % foreach my $item ( sort keys %other_components ) {
         <div id="formtools-element-<% $item %>" class="formtools-element" draggable="true" ondragstart="formTools.dragstart(event);" ondragend="formTools.dragend(event);" data-value="<% JSON($other_components{$item}) %>">
-          <p class="formtools-element-placeholder m-1 p-2 border rounded"><% loc('Put it here') %></p>
+          <p class="formtools-element-placeholder m-1 p-2 border rounded"><% loc('Place here') %></p>
           <p class="m-1 p-2 border rounded">
             <span class="badge badge-primary"><% $other_components{$item}{type} eq 'hidden' ? loc('Hidden') : loc('Component') %></span>
             <span class="content"><% $item %></span>
@@ -233,7 +233,7 @@
                 </div>
                 <div class="modal-body">
                   <form>
-                    <&| /Elements/LabeledValue, Label => loc('Name') &>
+                    <&| /Elements/LabeledValue, Label => loc('Page Name') &>
                       <input name="name" class="form-control" value="<% $form->{'formtools-pages'}{$page_name}{name} %>" />
                     </&>
                     <&| /Elements/LabeledValue, Label => loc('Sort Order') &>
@@ -270,7 +270,7 @@
 %         my $i = 0;
 %         for my $item ( grep { $_->{type} ne 'hidden' || $_->{'input-name'} ne 'create_ticket' } @{$form->{'formtools-pages'}{$page_name}{content} || []} ) {
             <div id="formtools-element-<% $form_page_id{$page_name} %>-<% $i %>" class="formtools-element" draggable="true" ondragstart="formTools.dragstart(event);" ondragend="formTools.dragend(event);" ondragenter="formTools.dragenter(event)" ondragleave="formTools.dragleave(event)" data-value="<% JSON($item) %>">
-              <p class="formtools-element-placeholder m-1 p-2 border rounded"><% loc('Put it here') %></p>
+              <p class="formtools-element-placeholder m-1 p-2 border rounded"><% loc('Place here') %></p>
               <p class="m-1 p-2 border rounded">
                 <span class="badge badge-primary">
 %                 if ( $item->{type} eq 'raw_html' ) {
@@ -280,7 +280,7 @@
 %                 } elsif ( $item->{type} eq 'hidden' ) {
                     <% loc('Hidden') %>
 %                 } else {
-                    <% loc('Field') %>
+                    <% loc('Custom Field') %>
 %                 }
                 </span>
                 <span class="content">
@@ -308,7 +308,7 @@
             </div>
 %           $i++;
 %         }
-            <p class="formtools-element-placeholder m-1 p-2 border rounded"><% loc('Put it here') %></p>
+            <p class="formtools-element-placeholder m-1 p-2 border rounded"><% loc('Place here') %></p>
           </div>
           <div class="modal-wrapper">
 %         $i = 0;
diff --git a/static/css/rt-extension-formtools.css b/static/css/rt-extension-formtools.css
index 575b09c..57e41b1 100644
--- a/static/css/rt-extension-formtools.css
+++ b/static/css/rt-extension-formtools.css
@@ -68,3 +68,7 @@ div .formtools-admin-description {
     color: black;
     line-height: 1.5;
 }
+
+#formtools-edit .card-body {
+    padding: 15px 15px 15px 15px;
+}

commit ff0dc2de3b83abd9f78a9151ec832374161af623
Author: Jim Brandt <jbrandt at bestpractical.com>
Date:   Thu Oct 19 11:56:06 2023 -0400

    Update results content to new page data structure

diff --git a/html/Admin/FormTools/Modify.html b/html/Admin/FormTools/Modify.html
index e53d21e..e7e72dc 100644
--- a/html/Admin/FormTools/Modify.html
+++ b/html/Admin/FormTools/Modify.html
@@ -531,12 +531,16 @@ $form->{'formtools-pages'} ||= {
         name       => 'Result',
         content    => [
             {
-                type => 'raw_html',
-                html => '<h2>Request Submitted</h2>',
+               "content" => "Request Submitted",
+               "html"    => "<h2>Request Submitted</h2>",
+               "type"    => "raw_html",
+               "wrapper" => "h2"
             },
             {
-                type => 'raw_html',
-                html => '<p>Your request has been submitted.</p>',
+               "content" => "Your request has been submitted.",
+               "html"    => "<p>Your request has been submitted.</p>",
+               "type"    => "raw_html",
+               "wrapper" => "p"
             },
         ],
     },

commit 88aff705bd26edabb8abbc968a54429c33f91fc0
Author: Jim Brandt <jbrandt at bestpractical.com>
Date:   Wed Oct 18 16:05:54 2023 -0400

    Add titleboxes to additional form pages

diff --git a/html/Admin/FormTools/Create.html b/html/Admin/FormTools/Create.html
index 58f2ed1..9c27b61 100644
--- a/html/Admin/FormTools/Create.html
+++ b/html/Admin/FormTools/Create.html
@@ -2,6 +2,7 @@
 <& /Elements/Tabs &>
 <& /Elements/ListActions, actions => \@results &>
 
+<&| /Widgets/TitleBox, title => '', class => 'container w-75' &>
 <form action="<%RT->Config->Get('WebPath')%>/Admin/FormTools/Create.html" name="CreateFormTools" method="post" enctype="multipart/form-data" class="mx-auto max-width-sm">
   <&| /Elements/LabeledValue, Label => loc('Name') &>
     <input name="Description" class="form-control" value="<% $ARGS{Description} // '' %>"/>
@@ -16,7 +17,7 @@
   </div>
 
 </form>
-
+</&>
 <%INIT>
 Abort( loc('Permission Denied') )
     unless $session{'CurrentUser'}->HasRight( Object => $RT::System, Right => 'SuperUser' );
diff --git a/html/Admin/FormTools/index.html b/html/Admin/FormTools/index.html
index 3c00092..219a407 100644
--- a/html/Admin/FormTools/index.html
+++ b/html/Admin/FormTools/index.html
@@ -2,18 +2,8 @@
 <& /Elements/Tabs &>
 <& /Elements/ListActions, actions => \@results &>
 
+<&| /Widgets/TitleBox, title => '', class => 'container formtools-admin-select' &>
 <form method="post" action="<% RT->Config->Get('WebPath') %>/Admin/FormTools/index.html">
-  <div class="form-row">
-    <div class="col-auto">
-      <div class="custom-control custom-checkbox">
-        <input type="checkbox" class="custom-control-input checkbox" id="FindDisabledForms" name="FindDisabledForms" value="1" <% $FindDisabledForms ? 'checked="checked"': '' |n%> />
-        <label class="custom-control-label" for="FindDisabledForms"><&|/l&>Include disabled forms in listing.</&></label>
-      </div>
-    </div>
-    <div class="col-auto">
-      <input type="submit" name="Go" class="form-control btn btn-primary" value="<&|/l&>Go!</&>" />
-    </div>
-  </div>
   <table class="table collection collection-as-table" cellspacing="0">
     <tbody>
       <tr class="collection-as-table">
@@ -38,15 +28,23 @@
 % }
     </tbody>
   </table>
-  <div class="form-row">
+  <div class="form-row align-items-center">
     <div class="col-12">
-      <div align="right">
+      <div class="custom-control custom-checkbox text-right">
+        <input type="checkbox" class="custom-control-input checkbox" id="FindDisabledForms" name="FindDisabledForms" value="1" <% $FindDisabledForms ? 'checked="checked"': '' |n%> />
+        <label class="custom-control-label" for="FindDisabledForms"><&|/l&>Include disabled forms in listing.</&></label>
+      </div>
+    </div>
+  </div>
+  <div class="form-row align-items-center">
+    <div class="col-12">
+      <div class="text-right">
         <input type="submit" name="Submit" class="form-control btn btn-primary" value="<&|/l&>Update</&>" />
       </div>
     </div>
   </div>
 </form>
-
+</&>
 <%init>
 my @results;
 

-----------------------------------------------------------------------


hooks/post-receive
-- 
rt-extension-formtools


More information about the Bps-public-commit mailing list