Skip to content

Commit

Permalink
Fixed templates for Bolt 2.0 style
Browse files Browse the repository at this point in the history
  • Loading branch information
tobias2k committed Jan 8, 2015
1 parent 73e6ee9 commit 2275947
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 13 deletions.
30 changes: 20 additions & 10 deletions templates/import_form.twig
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
{# {% include '_header.twig' %} #}

{% extends '_base/_page-nav.twig' %}

{% block page_nav 'Labels' %}
Expand All @@ -8,17 +6,29 @@

{% block page_main %}
<form action="{{base_path}}/csv" method="POST" enctype="multipart/form-data">
<h2>{{ l("labels-ui:CSV") }}</h2>
<label>
{{ l("labels-ui:Upload CSV File") }}
<input type="file" name="csv_file"/>
<input type="submit" value="{{l("labels-ui:Upload")}}" />
<h1>{{ l("labels-ui:CSV") }}</h1>
<label for="csv_file">{{ l("labels-ui:Upload CSV File") }}</label>
<input class="btn btn-secondary" type="file" name="csv_file" data-filename-placement="inside" title="CSV file..."/>
<button class="btn btn-primary" disabled="disabled" type="submit">{{l("labels-ui:Upload")}}</button>
</form>

<h2>{{ l("labels-ui:Download") }}</h2>
<div>
<a href="{{base_path}}/csv">{{ l("labels-ui:Download CSV") }}</a>
<a class="btn btn-secondary" href="{{base_path}}/csv">{{ l("labels-ui:Download CSV") }}</a>
</div>

{% endblock page_main %}
<script type="text/javascript">
$(function() {
$('input[type=file]').bootstrapFileInput();
{# {% include '_footer.twig' %} #}
$('input:file').change(
function(){
if ($(this).val()) {
$('button:submit').removeAttr('disabled');
}
}
);
});
</script>
{% endblock page_main %}
11 changes: 8 additions & 3 deletions templates/translatables.twig
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
{% include '_header.twig' %}
{% extends '_base/_page-nav.twig' %}

{% block page_nav 'Labels' %}

{% block page_title __('page.labels-listing.title') %}

{% block page_main %}

<table class="dashboardlisting">
<tr>
Expand All @@ -14,5 +20,4 @@
<tr>
{% endfor %}
</table>

{% include '_footer.twig' %}
{% endblock page_main %}

0 comments on commit 2275947

Please sign in to comment.