Skip to content

Commit

Permalink
Reverted the button name and just added if else logic
Browse files Browse the repository at this point in the history
  • Loading branch information
ashmeet-kandhari committed Oct 5, 2018
1 parent 5a33bcf commit 348da14
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions ckan/templates/package/snippets/resource_form.html
Expand Up @@ -76,12 +76,14 @@
{% block again_button %}
<button class="btn btn-default" name="save" value="again" type="submit">{{ _('Save & add another') }}</button>
{% endblock %}
{% block save_button %}
{% if stage %}
<button class="btn btn-primary" name="save" value="go-metadata" type="submit">{{ _('Finish') }}</button>
{% else %}
<button class="btn btn-primary" name="save" value="go-dataset-complete" type="submit">{{ _('Finish') }}</button>
{% endif %}
{% endblock %}
{% if stage %}
{% block save_button %}
<button class="btn btn-primary" name="save" value="go-metadata" type="submit">{% block save_button_text %}{{ _('Finish') }}{% endblock %}</button>
{% endblock %}
{% else %}
{% block add_button %}
<button class="btn btn-primary" name="save" value="go-dataset-complete" type="submit">{{ _('Add') }}</button>
{% endblock %}
{% endif %}
</div>
</form>

0 comments on commit 348da14

Please sign in to comment.