mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #01081
[Bug 619266] Re: Collection missing 'cancel' during create functionality
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/b2989c50b8b4e74c494c93fde97261fae560f568
e.g., we can add cancel and submit buttons by either of the following
ways:
$elements['submit']['values'] = array(
'submit' => get_string('submit'),
'cancel' => get_string('cancel'),
);
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' => get_string('submit'),
'cancel' => get_string('cancel'),
'anotherplugin' => get_string('anotherplugin'),
...
);
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.
--
Collection missing 'cancel' during create functionality
https://bugs.launchpad.net/bugs/619266
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Status in Mahara ePortfolio: In Progress
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.
References