[#7] Updates to the edit/new harvest source form

This commit is contained in:
John Martin 2013-02-12 16:29:07 +00:00
parent 891f247181
commit 28e589ee92
3 changed files with 28 additions and 6 deletions

View File

@ -95,3 +95,10 @@ header.with-filter h1 {
.harvest-error-list .error { .harvest-error-list .error {
padding-left: 20px; padding-left: 20px;
} }
.harvest-types label.radio {
font-weight: normal;
margin-bottom: 0;
}
.harvest-types label.radio i {
color: #999;
}

View File

@ -104,3 +104,11 @@ header.with-filter {
padding-left: 20px; padding-left: 20px;
} }
} }
.harvest-types label.radio {
font-weight: normal;
margin-bottom: 0;
i {
color: #999;
}
}

View File

@ -5,7 +5,7 @@
{% block errors %}{{ form.errors(error_summary) }}{% endblock %} {% block errors %}{{ form.errors(error_summary) }}{% endblock %}
{% call form.input('url', id='field-url', label=_('URL'), value=data.url, error=errors.url, classes=['control-full', 'control-large']) %} {% call form.input('url', id='field-url', label=_('URL'), value=data.url, error=errors.url, classes=['control-full', 'control-large']) %}
<span class="info-block icon-large icon-info-sign"> <span class="info-block">
{{ _('This should include the http:// part of the URL') }} {{ _('This should include the http:// part of the URL') }}
</span> </span>
{% endcall %} {% endcall %}
@ -21,13 +21,18 @@
{{ form.markdown('notes', id='field-notes', label=_('Description'), value=data.notes, error=errors.notes) }} {{ form.markdown('notes', id='field-notes', label=_('Description'), value=data.notes, error=errors.notes) }}
{{ form.select('source_type', id='field-source_type', label=_('Source type'), options=h.harvester_types(), selected=data.source_type, error=errors.source_type) }} <div class="harvest-types control-group">
<label class="control-label">Source type</label>
<div class="controls"> <div class="controls">
<ul>
{% for harvester in h.harvesters_info() %} {% for harvester in h.harvesters_info() %}
<li><b>{{ harvester['title']}}</b>: {{harvester['description'] }}</li> {% set checked = harvester['name'] == ( data.source_type or 'ckan' ) %}
<label class="radio">
<input type="radio" name="source_type" value="{{ harvester['name'] }}" {{ "checked " if checked }}>
{{ harvester['title'] }}
<i class="icon-question-sign" title="{{ harvester['description'] }}" data-toggle="tooltip"></i>
</label>
{% endfor %} {% endfor %}
</ul> </div>
</div> </div>
{{ form.select('frequency', id='field-frequency', label=_('Frequency of update'), options=h.harvest_frequencies(), selected=data.frequency, error=errors.frequency) }} {{ form.select('frequency', id='field-frequency', label=_('Frequency of update'), options=h.harvest_frequencies(), selected=data.frequency, error=errors.frequency) }}
@ -58,6 +63,8 @@
{% endif %} {% endif %}
{% endif %} {% endif %}
<input id="save" name="save" value="Save" type="submit" class="btn"/> <p class="form-actions">
<input id="save" name="save" value="Save" type="submit" class="btn btn-primary">
</p>
</form> </form>