#452: use "fa-check" icon for save button
This commit is contained in:
parent
73e2ac0b0b
commit
6d3498c4e5
|
@ -1,4 +1,14 @@
|
|||
module ApplicationHelper
|
||||
|
||||
def submit_button_tag(icon_class: 'fa-check', text: nil)
|
||||
text ||= I18n.t('layout.save')
|
||||
button_tag type: :submit,
|
||||
data: {'disable-with' => I18n.t('layout.processing')},
|
||||
class: 'btn btn-primary' do
|
||||
content_tag(:i, nil, class: ['fa', icon_class]) << ' '<< text
|
||||
end
|
||||
end
|
||||
|
||||
def layout_class
|
||||
case
|
||||
when controller_name == 'issues' && action_name == 'new'
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
.rightlist= f.text_field :uname
|
||||
.leftlist
|
||||
\
|
||||
.rightlist= submit_tag t('layout.save'), data: {'disable-with' => t('layout.saving')}
|
||||
.rightlist= submit_button_tag
|
||||
.both
|
||||
-else
|
||||
= render "users/base/form", f: f
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
= f.input :uname
|
||||
= f.input :description, as: :text
|
||||
= render 'shared/avatar_form', subject: @group, f: f
|
||||
= f.button :submit, t('layout.save')
|
||||
= submit_button_tag
|
|
@ -6,4 +6,4 @@ h3
|
|||
= f.input :secret, as: :text
|
||||
= f.input :repository_id, collection: key_pair_repository_options(@platform)
|
||||
|
||||
= f.button :submit, t('layout.save')
|
||||
= submit_button_tag
|
|
@ -59,7 +59,7 @@
|
|||
label: false
|
||||
|
||||
.col-sm-offset-3.col-sm-9
|
||||
=> f.button :submit, t('layout.save')
|
||||
=> submit_button_tag
|
||||
=> t('layout.or')
|
||||
a.btn.btn-default href=(@platform.new_record? ? root_path : platform_path(@platform))
|
||||
= t('layout.cancel')
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
|
||||
= f.input :autostart_status, collection: Product::AUTOSTART_STATUSES.collect{|status| [Product.human_autostart_status(status), status]}
|
||||
|
||||
=> f.button :submit, t('layout.save')
|
||||
=> submit_button_tag
|
||||
=> t('layout.or')
|
||||
a.btn.btn-default href=( @product.new_record? ? platform_path(@platform) : platform_product_path(@platform, @product) )
|
||||
= t('layout.cancel')
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
- if @platform.main?
|
||||
= f.input :publish_builds_only_from_branch
|
||||
|
||||
=> f.button :submit, t('layout.save')
|
||||
=> submit_button_tag
|
||||
=> t('layout.or')
|
||||
a.btn.btn-default href=(@repository.new_record? ? platform_repositories_path(@platform) : platform_repository_path(@platform, @repository))
|
||||
= t('layout.cancel')
|
||||
|
|
|
@ -9,4 +9,4 @@
|
|||
= simple_form_for @token, url: platform_tokens_path(@platform) do |f|
|
||||
= f.input :description, as: :text
|
||||
|
||||
= f.button :submit, t('layout.save')
|
||||
= submit_button_tag
|
|
@ -1,2 +1 @@
|
|||
=render 'projects/comments/body', f: f, id: id
|
||||
/.comment-right= submit_tag t('layout.save'), data: {'disable-with' => t('layout.saving')}
|
||||
= render 'projects/comments/body', f: f, id: id
|
||||
|
|
|
@ -15,9 +15,7 @@ h3= t("layout.projects.files_in_project")
|
|||
label[ for = :message ]= t("layout.enter_commit_message")
|
||||
= text_area_tag :message, "Updated #{@blob.name}", class: 'form-control'
|
||||
|
||||
=> submit_tag t('layout.save'), title: t('layout.save'),
|
||||
data: {'disable-with' => t('layout.saving')},
|
||||
class: 'btn btn-primary'
|
||||
=> submit_button_tag
|
||||
=> t("layout.or")
|
||||
= link_to t("layout.cancel"), blob_path(@project, @treeish, @path), class: 'btn btn-default'
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ div ng-controller = 'ProjectFromController' ng-cloak = 'true'
|
|||
= f.input :srpm, as: :file
|
||||
|
||||
.col-sm-offset-3.col-sm-9
|
||||
= f.button :submit, t('layout.save'), data: {'disable-with' => t('layout.saving')}
|
||||
= submit_button_tag
|
||||
|
||||
- content_for :additional_scripts do
|
||||
javascript:
|
||||
|
|
|
@ -17,4 +17,4 @@
|
|||
hint: t('layout.projects.has_wiki_description')
|
||||
|
||||
.col-sm-offset-3.col-sm-9
|
||||
= f.button :submit, t('layout.save'), data: {'disable-with' => t('layout.saving')}
|
||||
= submit_button_tag
|
||||
|
|
|
@ -22,4 +22,4 @@
|
|||
= f.input :professional_experience, as: :text
|
||||
= f.input :sound_notifications, as: :boolean
|
||||
|
||||
= f.button :submit, t('layout.save')
|
||||
= submit_button_tag
|
|
@ -18,10 +18,18 @@
|
|||
ul.nav.navbar-nav.left-border
|
||||
|
||||
li class=('active' if act == :profile)
|
||||
= link_to t('layout.users.profile'), profile_settings_path
|
||||
a href=profile_settings_path
|
||||
i.fa.fa-user>
|
||||
= t('layout.users.profile')
|
||||
li class=('active' if act == :private)
|
||||
= link_to t('layout.users.user_private_settings'), private_settings_path
|
||||
a href=private_settings_path
|
||||
i.fa.fa-cog>
|
||||
= t('layout.users.user_private_settings')
|
||||
li class=('active' if act == :notifiers)
|
||||
= link_to t('layout.users.settings_notifier'), notifiers_settings_path
|
||||
a href=notifiers_settings_path
|
||||
i.fa.fa-inbox>
|
||||
= t('layout.users.settings_notifier')
|
||||
li class=('active' if contr == :ssh_keys)
|
||||
= link_to t('ssh_keys'), ssh_keys_path
|
||||
a href=ssh_keys_path
|
||||
i.fa.fa-key>
|
||||
= t('ssh_keys')
|
||||
|
|
|
@ -39,5 +39,5 @@
|
|||
|
||||
.row
|
||||
hr
|
||||
= f.button :submit, t('layout.save')
|
||||
= submit_button_tag
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
= f.input :password
|
||||
= f.input :password_confirmation
|
||||
|
||||
= f.button :submit, t('layout.save')
|
||||
= submit_button_tag
|
||||
|
||||
hr
|
||||
= simple_form_for @user,
|
||||
|
|
|
@ -4,4 +4,4 @@ h3
|
|||
= simple_form_for @ssh_key, url: ssh_keys_path do |f|
|
||||
= f.input :name
|
||||
= f.input :key, as: :text
|
||||
= f.button :submit, t('layout.save')
|
||||
= submit_button_tag
|
Loading…
Reference in New Issue