diff options
author | Christopher Baines <mail@cbaines.net> | 2018-02-04 12:09:04 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2018-03-29 07:28:09 +0100 |
commit | 064d6ee52c4f056c4f1d07c4aa0031baa87da552 (patch) | |
tree | 26c6faa55f05d19e92ac2ea3c53e6a0bade17c4f /app/views | |
parent | 2cfcbfb378028c3a3ba76f8e61bd70c54b121c49 (diff) | |
download | govuk-mini-environment-admin-064d6ee52c4f056c4f1d07c4aa0031baa87da552.tar govuk-mini-environment-admin-064d6ee52c4f056c4f1d07c4aa0031baa87da552.tar.gz |
Add form for creating a mini environment
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/mini_environments/index.html.erb | 8 | ||||
-rw-r--r-- | app/views/mini_environments/new.html.erb | 24 |
2 files changed, 27 insertions, 5 deletions
diff --git a/app/views/mini_environments/index.html.erb b/app/views/mini_environments/index.html.erb index 11d5a79..5e131c6 100644 --- a/app/views/mini_environments/index.html.erb +++ b/app/views/mini_environments/index.html.erb @@ -1,5 +1,11 @@ -<a href="<%= new_mini_environment_path %>">Create new mini environment</a> +<a class="btn btn-lg btn-success pull-right" + role="button" + href="<%= new_mini_environment_path %>"> + Create a new mini environment +</a> + + <% MiniEnvironment.all.each do |mini_environment| %> <a href="<%= mini_environment_path mini_environment %>"> diff --git a/app/views/mini_environments/new.html.erb b/app/views/mini_environments/new.html.erb index 4a4712e..84d2316 100644 --- a/app/views/mini_environments/new.html.erb +++ b/app/views/mini_environments/new.html.erb @@ -1,5 +1,21 @@ +<div class="row"> + <div class="col-md-8"> + <%= form_for @mini_environment, + url: { action: "create" }, + html: { class: 'form-horizontal' } do |f| %> -<%= form_for @mini_environment, url: {action: "create"} do |f| %> - <%= f.text_field :name %> - <%= f.submit "Create" %> -<% end %> + <div class="form-group"> + <%= f.label :name, class: 'col-sm-2 control-label' %> + <div class="col-sm-10"> + <%= f.text_field :name, class: 'form-control' %> + </div> + </div> + + <div class="form-group"> + <div class="col-sm-offset-2 col-sm-10"> + <%= f.submit "Create", class: 'btn btn-lg btn-success' %> + </div> + </div> + <% end %> + </div> +</div> |