Skip to content

Commit

Permalink
Revert "[#880] Show the file upload field"
Browse files Browse the repository at this point in the history
This reverts commit 2bdaa7e.
  • Loading branch information
nigelbabu committed Aug 23, 2013
1 parent 2bdaa7e commit 5a89f22
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion ckan/templates/package/new_resource.html
Expand Up @@ -8,7 +8,7 @@

{% block subtitle %}{{ _('Add data to the dataset') }}{% endblock %}

{% block form %}{% snippet 'package/snippets/resource_form.html', data=data, errors=errors, error_summary=error_summary, include_metadata=false, pkg_name=pkg_name, stage=stage, allow_upload=g.ofs_impl and g.ofs_impl != 'pairtree' and logged_in %}{% endblock %}
{% block form %}{% snippet 'package/snippets/resource_form.html', data=data, errors=errors, error_summary=error_summary, include_metadata=false, pkg_name=pkg_name, stage=stage, allow_upload=g.ofs_impl and logged_in %}{% endblock %}

{% block secondary_content %}
{% if pkg_dict and pkg_dict.state != 'draft' %}
Expand Down
6 changes: 1 addition & 5 deletions ckan/templates/package/snippets/resource_form.html
Expand Up @@ -4,7 +4,7 @@
{% set errors = errors or {} %}
{% set action = form_action or h.url_for(controller='package', action='new_resource', id=pkg_name) %}

<form enctype="multipart/form-data" class="dataset-form dataset-resource-form form-horizontal" method="post" action="{{ action }}" data-module="basic-form resource-form">
<form class="dataset-form dataset-resource-form form-horizontal" method="post" action="{{ action }}" data-module="basic-form resource-form">
{% block stages %}
{# An empty stages variable will not show the stages #}
{% if stage %}
Expand Down Expand Up @@ -41,10 +41,6 @@
{{ form.input('url', id='field-url', label=_('Resource'), placeholder=_('eg. http://example.com/gold-prices-jan-2011.json'), value=data.url, error=errors.url, classes=['control-full', 'control-large'], is_required=true) }}
{% endblock %}

{% block basic_fields_file %}
{{ form.input('file', id='field-file', label=_('Resource'), placeholder=_('Select a file to upload'), value=None, error=errors.file, classes=['control-full', 'control-large'], is_required=true, type='file') }}
{% endblock %}

{% block basic_fields_name %}
{{ form.input('name', id='field-name', label=_('Name'), placeholder=_('eg. January 2011 Gold Prices'), value=data.name, error=errors.name, classes=['control-full']) }}
{% endblock %}
Expand Down

0 comments on commit 5a89f22

Please sign in to comment.