Skip to content

Commit

Permalink
2375 get add dataset form to save by pretending we are the api
Browse files Browse the repository at this point in the history
  • Loading branch information
tobes committed May 28, 2012
1 parent 3528091 commit 1014225
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions ckan/controllers/package.py
Expand Up @@ -609,6 +609,7 @@ def _save_new(self, context, package_type=None):
tuplize_dict(parse_params(request.POST))))
data_dict['type'] = package_type
context['message'] = data_dict.get('log_message', '')
context['api_version'] = 3
pkg = get_action('package_create')(context, data_dict)

self._form_save_redirect(pkg['name'], 'new')
Expand Down
2 changes: 1 addition & 1 deletion ckan/templates/package/new.html
Expand Up @@ -100,7 +100,7 @@ <h2>Errors in form</h2>

<div class="form-actions">
<a class="btn" href="">Cancel</a>
<button class="btn btn-primary" type="submit">Next: Add Data</button>
<button class="btn btn-primary" type="submit" name="save">Next: Add Data</button>
</div>
</form>
</div>
Expand Down

0 comments on commit 1014225

Please sign in to comment.