Journal entry add file should be a button

Bug #1515398 reported by Liam
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Low
Unassigned
16.04
Fix Released
Low
Unassigned
16.10
Fix Released
Low
Unassigned

Bug Description

Journal entry added a file: Shouldn't the "Remove" link be a button?

Tags: blog frontend
Liam (liam-sharpe)
Changed in mahara:
assignee: nobody → Liam (liam-sharpe)
Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "master" branch: https://reviews.mahara.org/5694

Revision history for this message
Aaron Wells (u-aaronw) wrote :

To test:

1. Create a new journal entry.
2. Click the "Add a file" button and upload or choose a file in the modal. Then close the modal by clicking the close icon in the upper-right.
Expected: You should see the file in the list of attachments, with a red "x" icon and the word "Remove" styled as if they're in a button.
3. Save the journal entry.
4. On the list of journal entries, click the "edit" button to go back to editing the journal entry you just saved.
5. Look at the list of attachments.
Expected: You should again see the file listed, with a red "x" icon and the word "Remove" styled as if in a button.

The "add new" and "edit existing" test cases have to be tested separately, because the "add new" case is adding a button which is dynamically generated using javascript, and the "edit existing" is looking a button that is rendered from a .tpl file. Ideally, these two should create exactly the same HTML. (Perhaps we ought to refactor this so that they use the same code to render both somehow?)

Revision history for this message
Dean (deans) wrote :

When I tested this I found some strange behaviour by mistake.

Steps to reproduce:
- create journal
- Make sure you leave the Entry * field empty
- Click the "Add a file" button and upload or choose a file in the modal
- Attempt to save the page
- Error message displays saying that you need something in the Entry* field to be able to save
- Remove the file that was uploaded and click on 'add a file' button again to upload another file

Expected result:
The upload file screen should display as it did the first time you uploaded the file

Actual result:
Upload screen is not displaying correctly and is missing information

Aaron Wells (u-aaronw)
Changed in mahara:
milestone: none → 16.04.0
importance: Undecided → Low
status: New → In Progress
tags: added: blog frontend
Revision history for this message
Liam (liam-sharpe) wrote :

I had a look around and managed to reproduce the bug but I think it is more of a php/backend issue so im not to sure on how to fix it

Liam (liam-sharpe)
Changed in mahara:
status: In Progress → Confirmed
assignee: Liam (liam-sharpe) → nobody
Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/5694
Committed: https://git.mahara.org/mahara/mahara/commit/17190a621de9a3da851a7d6de4e3cf4cbb7e91c0
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit 17190a621de9a3da851a7d6de4e3cf4cbb7e91c0
Author: Liam Sharpe <email address hidden>
Date: Thu Nov 12 10:06:40 2015 +1300

Journal add file remove is now a button - Bug #1515398

- Fixed 'Remove' button for existing attachments
- Fixed reloading of modal popup for 'Add a file' if form reloads with
error

behatnotneeded

Change-Id: Ib68e6a33beb6f85701281fcdf337fafd079c9528

Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "16.04_STABLE" branch: https://reviews.mahara.org/6360

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/6360
Committed: https://git.mahara.org/mahara/mahara/commit/60481797cc189f53dd804b4295640c34eb930544
Submitter: Robert Lyon (<email address hidden>)
Branch: 16.04_STABLE

commit 60481797cc189f53dd804b4295640c34eb930544
Author: Liam Sharpe <email address hidden>
Date: Thu Nov 12 10:06:40 2015 +1300

Journal add file remove is now a button - Bug #1515398

- Fixed 'Remove' button for existing attachments
- Fixed reloading of modal popup for 'Add a file' if form reloads with
error

behatnotneeded

Change-Id: Ib68e6a33beb6f85701281fcdf337fafd079c9528
(cherry picked from commit 17190a621de9a3da851a7d6de4e3cf4cbb7e91c0)

Robert Lyon (robertl-9)
Changed in mahara:
milestone: 16.10.0 → none
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.