Not all step based ingest workflows required to have a parent
COLLECTION object. Even when it’s common, there are concrete cases,
like newspapers and books, where the parent object is not a collection.
And more over, it does not require such because the resulting ingested
object are not children of such. This pull request fixes an error
introduced by a recent pull which enabled Contextual CMODEL labels on
step forms and broke book and newspaper drupal tests. Also adds the
ability to enable/disable those contextual messages since the use case
could not be global.
* Added context info to ingest forms.
* refactored ingest form context title.
* Safety check on cmodel load
* Updated and moved functionality into step storage.
* Updated index key
* Refactored ingest step context.
* No need to pass by reference, updated function doc.
* Added simple display for single CModel ingest step.
* Cleaning up?
* Coding standards.
* Updated label retrieval method.
* Updated parameter name in label retrieving function.
The "undo_function" part of callbacks was required, even though it
might not be required for functionality... Make it optional, so we
don't end up making/using no-op functions to avoid doing anything.
Makes the objects available to later submission handlers... Handling a
weird case, yes... Need to trigger something only after ingest, but
only when ingesting through the form.
Tests ingest forms by using a shared variable 'models'.
Additional stuff:
'models' is no longer a required config for ingest steps, now
its set from the given objects.
No longer need to rebuild steps from within a form step when the
shared_storage gets changed, we now detect if changes have been
made then we rebuild if necessary.
Fixed POST requests in WebTestCases previously the user was always
anonymous so interactions with fedora would fail via post requests.
There was a mistake where a step was reverting its global changes before it was
actually selected as the previous step. Innocuous enough but it had strange
side effects on the global storage, since the step list would be rebuild with
this information, steps could insert themselves as previous steps even if they
weren't used by the user.
Fix's an error in my logic. Now instead of having a null step ID mean
that it is the first step. The step ID gets initialized when the
form is first build and NULL is changed to mean that all steps
have been executed.
Also added some comments.