Commit fa963fdb authored by maxwellkeeble's avatar maxwellkeeble
Browse files

Issue #3282950: Tokens for approval/transition links; Issue #3282949: Show...

Issue #3282950: Tokens for approval/transition links; Issue #3282949: Show summary of all workflow processes on tab
parent e2dd15aa
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -42,6 +42,7 @@ A user will only be able to move a Submitted form to In process - however they w
5. On 'Access', make sure you select the role or access rules for 'Update' - these are the roles that can edit the workflow for the submission, but it defaults to authenticated user. (Elements default to not appearing on the 'create' webform, i.e. a new webform, but you can change that on Access too by providing an access role or other method).
6. The workflow element is now available on the update form, and in the results view of the form.
7. You should enable logging on the webform.
8. You can check the set-up of your workflow via the "Workflows" tab on the webform. It will summarise the transitions, access rules and e-mails the workflow is set up to have for that form. It is recommended to install the Workflows Diagram module <https://drupal.org/project/workflows_diagram> to show your workflow as a diagram.

## Create an e-mail handler on a workflow change

+35 −1
Original line number Diff line number Diff line
ui:
  color_options: "Blue|webform-workflow-color-blue\r\nYellow|webform-workflow-color-yellow\r\nRed|webform-workflow-color-red \r\nGreen|webform-workflow-color-green\r\nGrey|webform-workflow-color-grey\r\nPurple|webform-workflow-color-purple"
  color_options: "Blue|webform-workflow-color-blue\r\nGrey|webform-workflow-color-grey\r\nGreen|webform-workflow-color-green\r\nRed|webform-workflow-color-red\r\nOrange|webform-workflow-color-orange\r\nYellow|webform-workflow-color-yellow\r\nPurple|webform-workflow-color-purple\r\nBlack|webform-workflow-color-black\r\nWhite|webform-workflow-color-white"
mail:
  default_body_text: |
    The submission has been changed to: [webform_submission:values:workflow:workflow_state_label].

    [webform_submission:values:workflow:log_public]

    ***

    View submission at [webform_submission:url:canonical]

    Submitted on [webform_submission:created]

    Submitted by: [webform_submission:user]

    Submitted values are:

    [webform_submission:values]

  default_body_html: |
    <p>The submission has been changed to: [webform_submission:values:workflow:workflow_state_label].</p>

    <p><em>[webform_submission:values:workflow:log_public]</em></p>

    <hr />

    <p>View submission at <a href="[webform_submission:url:canonical]">[webform_submission:url:canonical]</a></p>

    <p>Submitted on [webform_submission:created]</p>

    <p>Submitted by: [webform_submission:user]</p>

    <p>Submitted values are:</p>

    <p>[webform_submission:values]</p>
+3 −3
Original line number Diff line number Diff line
workflow.type_settings.webform_workflows_element:
  type: mapping
  label: 'Webform workflow'
  label: "Webform workflow"
  mapping:
    initial_state:
      type: string
      label: 'Initial state'
      label: "Initial state"
    states:
      type: sequence
      sequence:
+12 −0
Original line number Diff line number Diff line
@@ -9,3 +9,15 @@ webform_workflows_element.settings:
        color_options:
          type: string
          label: "Color options"
    mail:
      type: mapping
      label: "Email default settings"
      mapping:
        default_body_text:
          type: text
          label: "Default workflow change email body (Plain text)"
          webform_type: text
        default_body_html:
          type: text
          label: "Default workflow change email body (HTML)"
          webform_type: html
+53 −7
Original line number Diff line number Diff line
.webform-workflow-value > div {
.webform-workflow-value > .webform-workflow-state-label {
  margin-bottom: 0.3em;
}

@@ -9,37 +9,83 @@
  display: inline-block;
}

/* Dealing with Mermaid styling */

.mermaid .nodes .node {
  font-weight: normal;
}

.webform-workflow-state-label.with-color.node rect {
  fill: unset !important;
  stroke: unset !important;
}

/* DEFAULT COLORS BELOW */

/* If providing custom color classes, always provide:
    background-color, fill, color, and stroke,
  to work across normal display and diagrams. */

.webform-workflow-color-blue {
  background-color: #cde3fa;
  fill: #cde3fa;
  color: #2b4d7a;
  stroke: #2b4d7a;
}

.webform-workflow-color-yellow {
  background-color: #f7df92;
  fill: #f7df92;
  color: #6c530f;
  stroke: #6c530f;
}

.webform-workflow-color-orange {
  background-color: #ffbf66;
  background-color: #ffbe7e;
  fill: #ffbe7e;
  color: #6a2900;
  stroke: #6a2900;
}

.webform-workflow-color-red {
  background-color: #f5c7cc;
  background-color: #f4b8bf;
  fill: #f4b8bf;
  color: #5e2128;
  stroke: #5e2128;
}

.webform-workflow-color-green {
  background-color: #d2eedc;
  background-color: #c2f7bc;
  fill: #c2f7bc;
  color: #324e2b;
  stroke: #324e2b;
}

.webform-workflow-color-purple {
  background-color: #c4a9dc;
  fill: #c4a9dc;
  color: #573d7d;
  stroke: #573d7d;
}

.webform-workflow-color-grey {
  background-color: #d7d8da;
  fill: #d7d8da;
  color: #1e2027;
  stroke: #1e2027;
}

.webform-workflow-color-purple {
  background-color: #c4a9dc;
  color: #573d7d;
.webform-workflow-color-black {
  background-color: #000000;
  fill: #000000;
  color: #FFFFFF;
  stroke: #FFFFFF;
}

.webform-workflow-color-white {
  background-color: #FFFFFF;
  fill: #FFFFFF;
  color: #000000;
  stroke: #000000;
}
Loading