Collection missing 'cancel' during create functionality
Bug #619266 reported by
Stacey Walker
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mahara |
Fix Released
|
Medium
|
Stacey Walker |
Bug Description
Functionality for canceling creation of a new collection has disappeared.
Using the existing functionality in view creation as a template, this should be checking for the 'new' flag, alerting the user about the fact that they are canceling and then removing all traces of the aborted collection.
Edit collection, add views and collection access pages need to ensure the user can cancel creation at any stage.
Changed in mahara: | |
assignee: | nobody → Stacey Walker (stacey) |
Changed in mahara: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
milestone: | none → 1.3.0 |
Changed in mahara: | |
status: | Confirmed → In Progress |
Changed in mahara: | |
status: | In Progress → Fix Committed |
Changed in mahara: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
While fixing this I thought about visually making the 'next' element on the right of the 'cancel' (which I'd wanted to do for a while).
Using the existing submitcancel pieform element this wasn't possible due to the explicit indexing and "drawing" of the elements in the return statement.
I had originally copied this and created a new element called cancelsubmit that simply just reversed everything. Richard then suggested that we instead make the submitcancel element more generic and handle some string indices as well as the default numeric indices. That way we can add the submit/cancel buttons in any order we want by specifying what they are with 'cancel' and 'submit' as array keys. The way they are entered into the array determines the order in which they will be drawn in the form.
http:// gitorious. org/~stacey/ mahara/ staceys- sandbox/ commit/ b2989c50b8b4e74 c494c93fde97261 fae560f568
e.g., we can add cancel and submit buttons by either of the following ways:
$elements[ 'submit' ]['values' ] = array( 'submit' ), 'cancel' ),
'submit' => get_string(
'cancel' => get_string(
);
or,
$elements[ 'submit' ]['values' ] = array(get_ string( 'cancel' ), get_string( 'submit' ));
The first syntax might also mean that we can have any amount of elements if we wanted; provided the plugin does exist.
e.g.,
$elements[ 'submit' ]['values' ] = array( 'submit' ), 'cancel' ),
'anotherplugin ' => get_string( 'anotherplugin' ),
'submit' => get_string(
'cancel' => get_string(
...
);
I haven't tested just what you can add in there yet. :) but if it does work with lots of plugins, then it might solve one of the TODOs at the bottom of this page: http:// wiki.mahara. org/Developer_ Area/Core_ Subsystems/ Form_API_ (Pieforms)
any thoughts?
I also have the simple fix for the cancellation issue now, but I need to separate it out into more appropriate commits before pushing to master.