Closed Bug 512386 Opened 15 years ago Closed 15 years ago

[ForumUX] Admin panel for new "Ask a question" form

Categories

(support.mozilla.org :: Forum, task, P1)

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: paulc, Assigned: jsocol)

References

()

Details

(Whiteboard: sumo_only)

Attachments

(3 files, 3 obsolete files)

This is for the admin panel in bug 505425. Basically, that bug will provide a fixed form, and this will add a UI for customizing that form. We should investigate the degree of customization that we want before I go ahead and implement this.

From a discussion with Cheng, the basics involve:
* Control over # and text of questions in step 1 (radio buttons filtering what type of problem user is having)
* Control over # and text of fields in last step
* Correlation between first and last step (which fields show up for which radio button/choice)

Anything else?
Assignee: paul.craciunoiu → nobody
Component: General → Forum
QA Contact: general → forum
Priority: -- → P1
Assignee: nobody → jsocol
Attached patch patch, v1, adding 5 files (obsolete) — Splinter Review
Adds 5 files:
* tiki-admin_ask_a_question.php - The actual admin panel, handles form submissions.
  - templates/tiki-admin_ask_a_question.tpl - the primary view
  - templates/tiki-admin_ask_a_question-section.tpl - detailed view for a section
  - templates/tiki-admin_ask_a_question-field.tpl - detailed view for a field
* tiki-js-ask_a_question.php - Generates JavaScript to hand this configuration to the form.
Attachment #399639 - Flags: review?(laura)
Attachment #399639 - Flags: review?(paul.craciunoiu)
Attached file table structure (obsolete) —
Comment on attachment 399639 [details] [diff] [review]
patch, v1, adding 5 files

Oops. I don't see a questionlib.php file in this patch?
Attached patch patch, v2 (obsolete) — Splinter Review
As Paul pointed out, there should actually be _six_ files.
Attachment #399639 - Attachment is obsolete: true
Attachment #399943 - Flags: review?(paul.craciunoiu)
Attachment #399639 - Flags: review?(paul.craciunoiu)
Attachment #399639 - Flags: review?(laura)
Comment on attachment 399943 [details] [diff] [review]
patch, v2

Some broken things:
* Adding new field doesn't save values for "Value" and "Weight"
* Editing field doesn't save values for "Value"
* Listing fields for a section (option) lists the value of "Weight" under the "Value" column (the actual "Value" should be listed)
* Can you order fields with same weight by name?

The rest looks great though :)
Attachment #399943 - Flags: review?(paul.craciunoiu) → review-
Attached patch patch, v3Splinter Review
* Fixed
* Fixed
* Fixed
* Wontfix
Attachment #399943 - Attachment is obsolete: true
Attachment #400107 - Flags: review?(paul.craciunoiu)
Attached file table structure, v2
Attachment #399640 - Attachment is obsolete: true
Comment on attachment 400107 [details] [diff] [review]
patch, v3

Looks good.
Attachment #400107 - Flags: review?(paul.craciunoiu) → review+
r51329 / r51331
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Woot!!
Does this need SQL to be run?

https://support-stage.mozilla.org/tiki-admin_ask_a_question.php gives me:

Context:
File	tiki-admin_ask_a_question.php
Url	tiki-admin_ask_a_question.php
Query:
SELECT id FROM tiki_question_sections ORDER BY weight;
Values:
Message:
Table 'support_wiki.tiki_question_sections' doesn't exist
Built query was probably:
SELECT id FROM tiki_question_sections ORDER BY weight;
yeah.  We'll need to add the tables.
When SQL needs to be run before QA can verify, please add a dependency (depends on bug xxx); thanks!
Depends on: 400108
Depends on: 516090
when editing a field on this page https://support-stage.mozilla.org/tiki-admin_ask_a_question.php, if you put a new value for weight and hit 'Save Changes' , it does not save the new value. The old value sticks.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Attached patch patch to patch 3Splinter Review
Fixes the error discovered in comment 15.
Attachment #401356 - Flags: review?(morgamic)
Comment on attachment 401356 [details] [diff] [review]
patch to patch 3

Not sure why 10 is hard-coded as a default weight.  Might make sense to have a default in a constants file somewhere and use that instead.  That said, rest looks good.
Attachment #401356 - Flags: review?(morgamic) → review+
Status: REOPENED → RESOLVED
Closed: 15 years ago15 years ago
Resolution: --- → FIXED
Verified, FIXED.
Status: RESOLVED → VERIFIED
Whiteboard: sumo_only
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: