Ticket #3445 (closed enhancement: fixed)

Opened 5 years ago

Last modified 2 years ago

a way to reset form, esp if 'tf.who' is stored with form

Reported by: anonymous Assigned to: hasienda
Priority: normal Component: TracFormsPlugin
Severity: normal Keywords: form field reset
Cc: Trac Release: 0.11

Description

I've created a master form and am including it on other pages and all seems to be working fine. However I noticed that the master form has the "tf.who" value stored from when I was testing how it worked. Is there any way to clear those values? Where do these values get stored?

A reset button would be fab.

Attachments

Change History

08/02/08 15:14:43 changed by anonymous

Definitely worth noting the lack of a reset button. Some form of clear makes perfect sense.

Thanks! Rich

12/04/10 01:10:16 changed by hasienda

  • type changed from defect to enhancement.

Is worthy feature, yes; a valid request, yes; a defect?

However I need this on my own and will try to implement such a button. But I'd require not only a dumb <Reset> with effect of reset all, but a permission like FORMS_ADMIN required to even display such a button. And better have a per-field reset option too, if it could be done in such a way that form display is i.e. not cluttered with buttons etc.

12/05/10 01:12:15 changed by hasienda

  • owner changed from rharkins to hasienda.

I'll look into this, considering it as short- to mid-term goal.

03/31/11 22:57:49 changed by hasienda

  • keywords changed from form reset to form field reset.
  • status changed from new to assigned.

Any comment? Implementation could happen next month, since I need this for my own application too.

04/03/11 00:47:05 changed by hasienda

(In [10010]) TracFormsPlugin: Add api.py missing from [10002] and add a TracForm resource, refs #3445 and #3500.

The new Trac resource 'form' is a prerequisite for introducing permissions and subsequent stuff relying on permission checks.

04/03/11 01:34:22 changed by hasienda

(In [10011]) TracFormsPlugin: Add basic TracForm? permissions, refs #3445 and #3500.

Note: Only users with 'TRAC_ADMIN' permision will see 'Update Form' buttons, until you add at least 'FORM_EDIT_VAL' permission to the relevant groups and/or users. This is a prerequisite for other stuff relying on permission checks too.

04/13/11 23:01:22 changed by hasienda

(In [10079]) TracFormsPlugin: Add basic history browsing capability, refs #3445, #4759 and #8258.

Fix code around TracForms db handling after using tuple for 'src'. Plugin now contributes to parent resource's context navigation, db interface is grown by a method for reverse-lookup of forms and the 'Form' resource is getting extended to provide more information too, everything needed to establish infrastructure for history browsing. With the addition of templates we need to extend i18n capabilities as well. This is the base for later adding form reset and delete/purge functions.

04/15/11 15:42:57 changed by hasienda

(In [10086]) TracFormsPlugin: Integrate initial form reset support, refs #3445.

Users with permission FORM_RESET will see a button to delete full form history and reset current form state back defaults. Navigation between form list of current parent resource and form history page has been improved by a backlink. Incremental deletion of (last) change may come with version support for the 'form' Trac resource.

04/16/11 15:38:55 changed by hasienda

(In [10089]) TracFormsPlugin: TracForms history goes Trac tickets style, refs #3445.

Fix another place (in get_tracform_state), where form_id or TracForms parent resource identifier is allowed, but form_id has not been handled properly after upgrading to TracForms db schema version 14. Majority of additions and code changes enables a TracForm history view close to the style of ticket changelog in Trac>=12. Context navigation links provide access to and interconnection between the history view and multiple-forms-per-resource selection list page.

04/27/11 00:58:21 changed by hasienda

(In [10126]) TracFormsPlugin: Introduce a stepwise history reset method, refs #3445 and #4759.

Now we utilize the TracForm history parser for recovering the previous state. With an obvious but notable limitation: We need recorded form history, that currently is an optional form command, otherwise fallback to a simple form reset.

04/27/11 01:23:13 changed by hasienda

(In [10127]) TracFormsPlugin: Make stepwise history reset method available, refs #3445 and #4759.

I've made a decision to not support an single form field reset. So with this changeset the TracForm reset support is nearly final as far as I consider it to be necessary, and reasonably usable according to my tests. But a form reset is a final decision, there is even no confirmation dialog, so FORM_RESET permission should be granted with care to keep this actions administrative. Again: Think before pressing the almighty button(s) - you've been warned.

04/30/11 01:11:41 changed by hasienda

  • status changed from assigned to closed.
  • resolution set to fixed.

(In [10143]) TracFormsPlugin: Releasing version 0.3, pushing development to 0.4, closes #3445, #3550, #3741, #4759 and #8258, refs #3388 and #6993.

This is a major release requiring a Trac environment upgrade.

While the parser logic remains unchanged, there is a lot new supplementary funcionality to make TracForms behave more like the existing Trac core resources (ticket, wiki, attachment, ...).

This version performs a series of non-trivial db schema changes, that especially may leave traces of stale forms (i.e. recorded for wiki pages, that don't exist anymore). So please make sure to read the changelog, BACKUP your environment(s) before installing this version as usual and check the new db tables forms, forms_fields and forms_history after upgrading.


Add/Change #3445 (a way to reset form, esp if 'tf.who' is stored with form)




Change Properties
Action