Skip to content

Commit

Permalink
Few more changes
Browse files Browse the repository at this point in the history
  • Loading branch information
David-Esteves committed Jul 10, 2017
1 parent b1bd359 commit 57dc4d5
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 25 deletions.
4 changes: 4 additions & 0 deletions arctic/static/arctic/src/assets/scss/partials/_temp.scss
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@
padding: 12px;
padding-top: 0;
}

&__form-actions {
padding: 12px;
}
}


Expand Down
39 changes: 21 additions & 18 deletions arctic/templates/arctic/base_create_update.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,26 +43,29 @@ <h4>{{ formset.verbose_name }}</h4>

{% block extra_forms %} {% endblock %}

{# TODO move form-actions to it's own section #}
{% block form_actions %}
<div class="row align-center">
<div class="small-6 medium-4 columns">
{% if links %}
{% for link in links %}
{% if object.pk %}
<a class="button secondary" href="{% arctic_url link.1 object.pk %}">
{% else %}
<a class="button secondary" href="{% arctic_url link.1 %}">
{% endif %}
{{ link.0 }}
</a>
{% endfor %}
{% endif %}
<div class="col">
<div class="row justify-content-center">
<div class="col-sm-6 col-md-4 col">
{% if links %}
{% for link in links %}
{% if object.pk %}
<a class="button secondary" href="{% arctic_url link.1 object.pk %}">
{% else %}
<a class="button secondary" href="{% arctic_url link.1 %}">
{% endif %}
{{ link.0 }}
</a>
{% endfor %}
{% endif %}
</div>
<div class="col-sm-6 col-md-4 col text-right">
{% block form_actions_buttons %}
{% endblock %}
<input type="submit" name="save" value="Submit" class="btn btn-primary" id="submit-id-save" />
</div>
</div>
<div class="small-6 medium-4 columns text-right">
{% block form_actions_buttons %}
{% endblock %}
<input type="submit" name="save" value="Submit" class="button" id="submit-id-save" />
</div>
{% endblock form_actions %}
</fieldset>
</form>
Expand Down
18 changes: 11 additions & 7 deletions arctic/templates/arctic/partials/form_fields.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
<div class="row justify-content-center">
<div class="col-sm-12">
{% if layout %}
{# TODO Move layout to it's own template file #}
{% for index, layout_item in layout.items %}
<fieldset class="fieldset-default arctic-card {% if layout_item.fieldset.collapsible %} test-collapse{% endif %}">
<div class="row justify-content-center">
<div class="col-sm-12 col-md-8 justify-content-center">
<div class="col-sm-12 col-md-8">
{% if layout_item.fieldset.title or layout_item.fieldset.description %}
<div class="arctic-card__header">
{% endif %}
Expand Down Expand Up @@ -35,14 +36,17 @@ <h6 class="arctic-card__title">{{ layout_item.fieldset.title }}</h6>
</div>
</fieldset>
{% endfor %}

{% else %}
<fieldset class="fieldset-default">
{% for field in form %}
{% include 'arctic/partials/form_field.html' with field=field%}
{% endfor %}
{# TODO Move this section to it's own template file #}
<fieldset class="fieldset-default arctic-card">
<div class="row justify-content-center">
<div class="col-sm-12 col-md-8">
{% for field in form %}
{% include 'arctic/partials/form_field.html' with field=field%}
{% endfor %}
</div>
</div>
</fieldset>

{% endif %}
</div>
</div>

0 comments on commit 57dc4d5

Please sign in to comment.