1
0
Fork 0
Commit Graph

104 Commits (master)

Author SHA1 Message Date
Mike Gerwitz ddb58c0438 src/progui-pkg-map: Retain numeric values after mapping
This is a half-assed solution for now.
2019-08-13 16:44:29 -04:00
Mike Gerwitz ddffdba914 Support include fragment modifiers
In summary:

  <include fragment="program/step/whatever-the-path-is">
    <before question="foo_bar">
      <static>Some information about foo_bar</static>
    </before>

    <after question="baz">
      <question id="quux"/>
      <question id="quuux"/>
    </after>

    <modify question="pct_alcohol_sales">
      <!-- {} is both consitent with existing substitution syntax, and
           `{}` itself is common with utilities like `find`; it will be
           replaced with the current value to allow for appending,
           prepending, both, or removing entirely -->
      <attribute name="when" value="{} deli"/>
    </modify>

    <modify question="sell_under-label">
      <append>
        <assert:equal ref="c:manufacturers-noc-needed" value="'0'" forEach="true">
          <assert:message>Use class 54444 instead of
          12467</assert:message>
        </assert:equal>
      </append>
    </modify>
  </include>
2019-07-23 15:23:23 -04:00
Mike Gerwitz 94899b9111 progui-class: Add lockTimeout field 2019-05-29 15:17:16 -04:00
Andrew Fanton 1e046589ce [DEV-3514] Add quote expiration options for program.xml
The new 'pre-rate-expiration' and 'post-rate-expiration' attributes
will be used by Liza to determine how long quotes may remain open
before being locked. The corresponding 'pre-rate-grace-period' and
'post-rate-grace-period' attributes will delay the locking effect
without changing the official expiration date.
2019-05-24 12:30:31 -04:00
Corey Vollmer 15488de885 Merge branch 'jira-3492' into 'master'
[DEV-3492] init endpoint in liza wont update quote every time

See merge request floss/liza-proguic!14
2019-05-07 15:42:13 -04:00
Corey Vollmer 6ec6ca153b [DEV-3492] init endpoint in liza wont update to quote every time 2019-05-07 14:26:01 -04:00
Jeffrey Fisher abb2a20324 Add default bucket value for percent selection 2019-03-08 10:48:54 -05:00
Joseph Frazer da9d198ad2 [DEV-4347] Add div around rating step
Add a div element around each rating step that allows developers to
assign classes to it.
2019-02-25 08:51:38 -05:00
Mike Gerwitz 9f2d5c21ee progui-pkg-map: /rater/core{=>/base}
/rater/core is being removed.
2019-02-01 00:39:11 -05:00
Mike Gerwitz 6d87149628 New Accordion group based on stacked group
* src/group/accordion.xsl: New file.
* src/group/group.xsl: Include new file.
* src/group/stacked.xsl (stacked-group): Name template.
  [group, class]: New params.  Use themin dl.
2019-01-21 12:17:35 -05:00
Mike Gerwitz a5273cc665 Revert "program-data-api: Bucket takes precedence over diff for current data"
This reverts commit b93389bd36.

This is broken.
2019-01-21 11:46:31 -05:00
Mike Gerwitz fef5444115 src/program-preprocess: Support includes within child nodes
* src/program-preprocess.xsl (preproc:incldue)[lv:include[@fragment]:
  Default `rel-root' to `$orig-root'.
2019-01-08 16:20:27 -05:00
Mike Gerwitz b93389bd36 program-data-api: Bucket takes precedence over diff for current data
Otherwise the final argument to `triggerFieldUpdate' will always be `true',
meaning that data didn't change (when in fact it did).  Ideally, it should
never be the case that there's a value in the diff that isn't in the bucket,
but it could happen.

This potential unearths old bugs from 2013/2014 (internal id: FS#14712), but
hopefully those situations no longer apply after various changes to liza
since.

* src/program-data-api.xsl (compiler:compile-api-init)[lv:question/lv:data]:
  Give bucket precedence over diff for `cdata'.

DEV-4077
2018-12-10 16:15:43 -05:00
Joseph Frazer b3bde040ca [DEV-3866] update the checkbox defaults
Change the checkbox defaults to be "0" unless it is set to "yes", in
which case it would be "1".
2018-11-07 14:09:54 -05:00
Joseph Frazer f0386b3795 [DEV-3866] add "checkbox" question type 2018-11-05 12:32:58 -05:00
Joseph Frazer 65dde08fb9 [DEV-3866] add checkbox question type
The mega rater needs a regular checkbox question type that is not like
the "yesno" ones. This should add the basic markup to meet that
requirement.
2018-11-05 11:37:49 -05:00
Mike Gerwitz a9ad49d22d program-preprocess: Error when using undefined dapi 2018-10-26 16:19:25 -04:00
Mike Gerwitz f2cab0a145 program-preprocess: Error when using undefined dapi
This was previously a runtime error in liza, which is far too late.

* src/program-preprocess.xsl (preproc:expand): Produce error when
    referencing a dapi that has no corresponding api definition.
2018-10-26 12:16:05 -04:00
Mike Gerwitz 0ed744984e program-preprocess: Add support for lv:include[@fragment]
* src/program-preprocess.xsl (orig-root): New variable.
  (preprocess)[lv:program]: Apply `preproc:include' templates.
  (preproc:include): New templates.
2018-10-18 16:24:52 -04:00
Mike Gerwitz 3d89234029 progui-class: Add third cmatchCheck argument
This duplicity is to maintain BC with ancient systems.

* src/progui-class.xsl (gen-assert)[assert:*]: Add third argument to cmatchCheck.
2018-10-16 10:23:55 -04:00
Mike Gerwitz 9a24443678 Makefile.am: Specify hoxsl-generated apply stylesheets
This should significantly speed up the build.

* Makefile.am (apply_src): Manually specify sources.
2018-10-11 23:35:10 -04:00
Joseph Frazer 3231f3fd53 Revert "[DEV-3011] Add new question type for datalists"
This reverts commit 82d327c25d.
2018-09-24 11:05:50 -04:00
Joseph Frazer 75b35f950b Revert "[DEV-3011] use different names between the datalist and the input"
This reverts commit 68862c4bbe.
2018-09-24 11:05:49 -04:00
Joseph Frazer c52feb5d80 Revert "[DEV-3011] Update copyright year"
This reverts commit ad5191dee0.
2018-09-24 11:05:47 -04:00
Joseph Frazer 424cd05ed3 Revert "[DEV-3011] Update to use generic attributes"
This reverts commit ee7ccec31a.
2018-09-24 11:05:46 -04:00
Joseph Frazer b74f86fb1a Revert "[DEV-3011] make sure the datalist input is a "text""
This reverts commit 64720e544f.
2018-09-24 11:05:45 -04:00
Joseph Frazer eeb9c180a3
[DEV-3011] add imput type of "text" for datalist 2018-09-17 12:41:25 -04:00
Joseph Frazer 64720e544f
[DEV-3011] make sure the datalist input is a "text" 2018-09-16 13:13:54 -04:00
Joseph Frazer 8e2ea261a5 [DEV-3011] Add datalist question type 2018-09-14 08:53:40 -04:00
Joseph Frazer ee7ccec31a [DEV-3011] Update to use generic attributes 2018-09-13 15:12:24 -04:00
Joseph Frazer 2a32c6320b Revert "[DEV-3011] Update all of the copyrights to include 2018"
This reverts commit 7f13e33fc2.
2018-09-13 12:19:03 -04:00
Joseph Frazer 7f13e33fc2 [DEV-3011] Update all of the copyrights to include 2018 2018-09-13 11:16:53 -04:00
Joseph Frazer ad5191dee0 [DEV-3011] Update copyright year 2018-09-13 11:04:14 -04:00
Joseph Frazer 68862c4bbe [DEV-3011] use different names between the datalist and the input 2018-09-12 16:40:06 -04:00
Joseph Frazer 82d327c25d [DEV-3011] Add new question type for datalists 2018-09-12 13:16:45 -04:00
Jeff Fisher a4fc8d53a0 Merge branch 'jira-3497' into 'master'
[DEV-3497] Update xml to accept default selection

See merge request floss/liza-proguic!8
2018-08-30 16:23:24 -04:00
Jeffrey Fisher 4be35630a1 [DEV-3497] Updated variable names 2018-08-30 10:28:12 -04:00
Jeffrey Fisher 57882ad3e3 [DEV-3497] Update xml to accept default selection 2018-08-29 12:06:42 -04:00
Mike Gerwitz 543c5c78c0 [bugfix] progui-class: Include externals in groupFields for linked groups
This includes some refactoring that makes this change deceptively complex;
it's not.

* src/progui-class.xsl: Add `xs' namespace prefix.
  (build-group-fields): Extract code into `compiler:group-refs' to reduce
    duplicate logic (this bug was caused by inconsistencies between the
    duplicate logic).
  (compiler:group-refs): New function.  Recurse for linked groups.
2018-08-16 15:32:05 -04:00
Mike Gerwitz 80d11b942a Add dapimap 2018-07-18 22:25:51 -04:00
Mike Gerwitz 66d58ff420 [DEV-3257] progui-class: Add dapimap
* src/program-data-api.xsl (compiler:compile)[lv:question/lv:data]: Replace
  inline map with reference to dapimap.
  (compilre:gen-data-map)[lv:data]: Remove template.
* src/progui-class.xsl (build-program-class)[/lv:program]: New dapi
    property.
  (build-dapimap): New template.
  (compiler:dapi-qmap): New function.
2018-07-11 09:33:11 -04:00
Mike Gerwitz 9d9b4e9f62 [DEV-3257] program-preprocess.xsl: Expand label node once
The label node was producing a map node on each preprocessor repass.

* src/program-preprocess.xsl (preproc:expand): Match only first pass.
2018-07-11 09:33:11 -04:00
Mike Gerwitz 40e182bc4f Revert "meta: Do not output qtypes for externals without @type"
This reverts commit 6dd21729e9.

We can't do this, because then the Quote Server won't be aware that this
field exists and will strip it from all saves!
2018-07-11 09:16:04 -04:00
Mike Gerwitz 6dd21729e9 meta: Do not output qtypes for externals without @type
This was causing the type to be output as "undefined" even if something else
had already defined the type.

This whole thing needs revisiting, but this will help for now.

* src/program-build-meta.xsl (build-meta): Ignore lv:external without @type.
2018-07-10 14:15:29 -04:00
Mike Gerwitz 4cb7bca505 Fail in error given invalid lv:answer 2018-07-09 15:29:16 -04:00
Mike Gerwitz 2be2abc1fc Fail on invalid lv:answer
This address two common cases where lv:display should be used in place of
lv:answer.

* src/program-preprocess.xsl (preproc:expand)[lv:answer[@type]]: Fail and
    recommend lv:display when `@type' is provided.
  [lv:answer[not(@ref=/lv:question/@id)]]: Fail when `@ref' does not
    reference a known question.
2018-07-09 13:40:17 -04:00
Mike Gerwitz 5bc423be80 Fail on preproc:error
So apparently I have been providing errors, but the system had no code to
actually do anything with them.  Wonderful.

* src/program-preprocess.xsl (preproc:error)[preproc:error]: New template:
    output error message.
  (preprocess)[*]: Terminate on preproc:error.
2018-07-09 13:40:13 -04:00
Mike Gerwitz 1c389fad89 question: Add @maxlength to generic-text{,area}
* src/program.xsd: Add maxlength attribute.
* src/question/question.xsl (generic-text, generic-textarea): Add @maxlength support.
2018-06-11 15:49:18 -04:00
Mike Gerwitz 114e1b8294 serialize: struct:itmes-from-attrs: Normalize whitespace
* src/util/serialize.xsl (struct:items-from-attrs): Normalize attribute
  value whitespace.
* test/util/serialize.xspec: New test.
  (foo:elementw): New stub.
2018-06-11 14:50:51 -04:00
Mike Gerwitz 84d34d8cae Add step, group, and field metadata to program output 2018-06-06 16:41:25 -04:00