3 changed files with 60 additions and 10 deletions
@ -0,0 +1,25 @@ |
|||||||
|
<div class="form-actions row justify-content-end my-3"> |
||||||
|
<div class="col-sm-10"> |
||||||
|
<input name="return_to" type="<%= :hidden %>" value="<%= (params[:return_to].presence || request.referer) %>"> |
||||||
|
<button class="govuk-button" data-disable-with="<%= t("admin.form.save") %>" name="_save" type="submit"<%= " disabled" unless @action.enabled? %>> |
||||||
|
<i class="fas fa-check"></i> |
||||||
|
<%= t("admin.form.save") %> |
||||||
|
</button> |
||||||
|
<span class="extra_buttons"> |
||||||
|
<% if @action.enabled? && authorized?(:new, @abstract_model) %> |
||||||
|
<button class="govuk-button govuk-button--secondary" data-disable-with="<%= t("admin.form.save_and_add_another") %>" name="_add_another" type="submit"> |
||||||
|
<%= t("admin.form.save_and_add_another") %> |
||||||
|
</button> |
||||||
|
<% end %> |
||||||
|
<% if @action.enabled? && authorized?(:edit, @abstract_model) %> |
||||||
|
<button class="govuk-button govuk-button--secondary" data-disable-with="<%= t("admin.form.save_and_edit") %>" name="_add_edit" type="submit"<%= " disabled" unless @action.enabled? %>> |
||||||
|
<%= t("admin.form.save_and_edit") %> |
||||||
|
</button> |
||||||
|
<% end %> |
||||||
|
<button class="govuk-button govuk-button--secondary" data-disable-with="<%= t("admin.form.cancel") %>" formnovalidate="<%= true %>" name="_continue" type="submit"> |
||||||
|
<i class="fas fa-times"></i> |
||||||
|
<%= t("admin.form.cancel") %> |
||||||
|
</button> |
||||||
|
</span> |
||||||
|
</div> |
||||||
|
</div> |
@ -0,0 +1,21 @@ |
|||||||
|
<h4> |
||||||
|
<%= t("admin.form.are_you_sure_you_want_to_delete_the_object", model_name: @abstract_model.pretty_name.downcase) %> |
||||||
|
<q><strong><%= @model_config.with(object: @object).object_label %></strong></q> |
||||||
|
<%= t("admin.form.all_of_the_following_related_items_will_be_deleted") %> |
||||||
|
</h4> |
||||||
|
<ul> |
||||||
|
<%= render partial: "delete_notice", object: @object %> |
||||||
|
</ul> |
||||||
|
<%= form_for(@object, url: delete_path(model_name: @abstract_model.to_param, id: @object.id), html: { method: "delete" }) do %> |
||||||
|
<input name="return_to" type="<%= :hidden %>" value="<%= (params[:return_to].presence || request.referer) %>"> |
||||||
|
<div class="form-actions"> |
||||||
|
<button class="govuk-button govuk-button--warning" data-disable-with="<%= t("admin.form.confirmation") %>" type="submit"> |
||||||
|
<i class="fas fa-check"></i> |
||||||
|
<%= t("admin.form.confirmation") %> |
||||||
|
</button> |
||||||
|
<button class="govuk-button" data-disable-with="<%= t("admin.form.cancel") %>" name="_continue" type="submit"> |
||||||
|
<i class="fas fa-times"></i> |
||||||
|
<%= t("admin.form.cancel") %> |
||||||
|
</button> |
||||||
|
</div> |
||||||
|
<% end %> |
Loading…
Reference in new issue