mirror of
https://github.com/internetee/registry.git
synced 2025-06-11 07:04:47 +02:00
Use standard UI
This commit is contained in:
parent
837f3ed541
commit
b850efb939
4 changed files with 9 additions and 8 deletions
|
@ -1,5 +1,5 @@
|
||||||
<%= form_for([:admin, @api_user.registrar, @api_user], html: { class: 'form-horizontal', autocomplete: 'off' }) do |f| %>
|
<%= form_for([:admin, @api_user.registrar, @api_user], html: { class: 'form-horizontal', autocomplete: 'off' }) do |f| %>
|
||||||
<%= render 'shared/full_errors', object: @api_user %>
|
<%= render 'form_errors', target: @api_user %>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
|
@ -48,12 +48,11 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr/>
|
<hr>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-8 text-right">
|
<div class="col-md-8 text-right">
|
||||||
<%= button_tag(t(:save), class: 'btn btn-primary') %>
|
<%= button_tag t(".#{f.object.new_record? ? 'create' : 'update'}_btn"), class: 'btn btn-success' %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -14,12 +14,12 @@
|
||||||
<div class="col-sm-4 text-right">
|
<div class="col-sm-4 text-right">
|
||||||
<%= link_to t('.edit_btn'), edit_admin_registrar_api_user_path(@api_user.registrar,
|
<%= link_to t('.edit_btn'), edit_admin_registrar_api_user_path(@api_user.registrar,
|
||||||
@api_user),
|
@api_user),
|
||||||
class: 'btn btn-default' %>
|
class: 'btn btn-primary' %>
|
||||||
<%= link_to t('.delete_btn'), admin_registrar_api_user_path(@api_user.registrar,
|
<%= link_to t('.delete_btn'), admin_registrar_api_user_path(@api_user.registrar,
|
||||||
@api_user),
|
@api_user),
|
||||||
method: :delete,
|
method: :delete,
|
||||||
data: { confirm: t(:are_you_sure) },
|
data: { confirm: t(:are_you_sure) },
|
||||||
class: 'btn btn-danger' %>
|
class: 'btn btn-default' %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -19,3 +19,5 @@ en:
|
||||||
|
|
||||||
form:
|
form:
|
||||||
active: Active
|
active: Active
|
||||||
|
create_btn: Create API user
|
||||||
|
update_btn: Update API user
|
||||||
|
|
|
@ -14,7 +14,7 @@ class AdminRegistrarsApiUsersSystemTest < ApplicationSystemTestCase
|
||||||
|
|
||||||
fill_in 'Username', with: username
|
fill_in 'Username', with: username
|
||||||
fill_in 'Password', with: valid_password
|
fill_in 'Password', with: valid_password
|
||||||
click_on 'Save'
|
click_on 'Create API user'
|
||||||
|
|
||||||
assert_text 'Record created'
|
assert_text 'Record created'
|
||||||
assert_text "Username #{username}"
|
assert_text "Username #{username}"
|
||||||
|
@ -43,7 +43,7 @@ class AdminRegistrarsApiUsersSystemTest < ApplicationSystemTestCase
|
||||||
visit admin_registrar_api_user_path(api_user.registrar, api_user)
|
visit admin_registrar_api_user_path(api_user.registrar, api_user)
|
||||||
click_link_or_button 'Edit'
|
click_link_or_button 'Edit'
|
||||||
fill_in 'Username', with: new_username
|
fill_in 'Username', with: new_username
|
||||||
click_link_or_button 'Save'
|
click_link_or_button 'Update API user'
|
||||||
|
|
||||||
assert_text 'Record updated'
|
assert_text 'Record updated'
|
||||||
assert_text "Username #{new_username}"
|
assert_text "Username #{new_username}"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue