bootstrapified term details buttons. fixes CNVS-4875
test steps: - go to the terms page for an account (/accounts/#/terms) - click the link 'Add New Term' - ensure the form and buttons look good - click the edit (pencil) icon next to an existing term - ensure the form and buttons look good Change-Id: Ida21981780ebf108c246b5a98eb31b3ad70401b9 Reviewed-on: https://gerrit.instructure.com/19313 QA-Review: Marc LeGendre <marc@instructure.com> Tested-by: Jenkins <jenkins@instructure.com> Reviewed-by: Eric Berry <ericb@instructure.com> QA-Review: Eric Berry <ericb@instructure.com> Product-Review: Eric Berry <ericb@instructure.com>
This commit is contained in:
parent
2712c3c4b7
commit
ff0f87a934
|
@ -14,18 +14,23 @@
|
|||
<%= term && t(:user_count, "User", :count => term.users_count) %>
|
||||
</div>
|
||||
<% form_for (term || EnrollmentTerm.new), :url => (term ? context_url(@context, :context_term_url, term.id) : context_url(@context, :context_terms_url)), :html => {:class => "enrollment_term_form", :method => (term ? :put : :post)} do |f| %>
|
||||
<div class="edit_term">
|
||||
<%= f.label :name, :en => 'Term Name:' %>
|
||||
<%= f.text_field :name %>
|
||||
</div>
|
||||
<div class="control-group edit_term">
|
||||
<label class="control-label" for="enrollment_term_name"><%= t :name, 'Term Name:' %></label>
|
||||
<div class="controls">
|
||||
<%= f.text_field :name, :class => "input-xlarge" %>
|
||||
</div>
|
||||
</div>
|
||||
<% if term && can_do(@root_account, @current_user, :manage_sis) %>
|
||||
<div class="edit_term" style="font-size: 0.8em;">
|
||||
<%= before_label :sis_id, "SIS ID" %> <%= f.text_field :sis_source_id %>
|
||||
<div class="control-group edit_term">
|
||||
<label class="control-label" for="enrollment_term_sis_source_id"><%= t :sis_source_id, 'SIS ID:' %></label>
|
||||
<div class="controls">
|
||||
<%= f.text_field :sis_source_id, :class => "input-xlarge" %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="edit_term" style="margin-top: 10px;">
|
||||
<button class="btn submit_button" type="submit"><%= term ? t('buttons.update', "Update Term") : t('buttons.add', "Add Term") %></button>
|
||||
<button class="btn btn button-secondary cancel_button" type="button"><%= t '#buttons.cancel', "Cancel" %></button>
|
||||
<div class="edit_term edit_term_buttons">
|
||||
<button class="btn button-secondary cancel_button" type="button"><%= t '#buttons.cancel', "Cancel" %></button>
|
||||
<button class="btn btn-primary submit_button" type="submit"><%= term ? t('buttons.update', "Update Term") : t('buttons.add', "Add Term") %></button>
|
||||
</div>
|
||||
<% end %>
|
||||
</td>
|
||||
|
|
|
@ -9,6 +9,9 @@
|
|||
<% end %>
|
||||
|
||||
<style>
|
||||
#wrapper-container {
|
||||
min-width: 1100px;
|
||||
}
|
||||
.term .edit_term {
|
||||
display: none;
|
||||
}
|
||||
|
@ -39,6 +42,19 @@
|
|||
#terms td.links {
|
||||
padding-left: 5px;
|
||||
}
|
||||
#terms form.enrollment_term_form {
|
||||
width: 80%;
|
||||
}
|
||||
#terms form.enrollment_term_form .control-group {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
#terms form.enrollment_term_form label {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
#terms form.enrollment_term_form .edit_term_buttons {
|
||||
text-align: right;
|
||||
width: 286px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<% js_block do %>
|
||||
|
|
Loading…
Reference in New Issue