Merge branch 'master' of github.com:domify/registry

Conflicts:
	app/assets/stylesheets/shared/general.sass
This commit is contained in:
Martin Lensment 2015-04-21 13:23:50 +03:00
commit dbbc6b3bff
58 changed files with 552 additions and 322 deletions

View file

@ -39,7 +39,8 @@ module Registry
# Precompile additional assets
config.assets.precompile += %w(*.svg *.eot *.woff *.ttf)
config.assets.precompile += %w(admin-manifest.css)
config.assets.precompile += %w(admin-manifest.css admin-manifest.js)
config.assets.precompile += %w(registrar-manifest.css registrar-manifest.js)
# Active Record used to suppresses errors raised within
# `after_rollback`/`after_commit` callbacks and only printed them to the logs.

View file

@ -0,0 +1,28 @@
class ActionView::Helpers::FormBuilder
alias_method :orig_label, :label
# add a 'required' CSS class to the field label if the field is required
# rubocop:disable Metrics/CyclomaticComplexity
# rubocop:disable Metrics/PerceivedComplexity
def label(method, content_or_options = nil, options = nil, &block)
if content_or_options && content_or_options.class == Hash
options = content_or_options
else
content = content_or_options
end
if object.class.respond_to?(:validators_on) &&
object.class.validators_on(method).map(&:class).include?(ActiveRecord::Validations::PresenceValidator)
if options.class != Hash
options = { class: 'required' }
else
options[:class] = ((options[:class] || "") + ' required').split(' ').uniq.join(' ')
end
end
orig_label(method, content, options || {}, &block)
end
# rubocop:enable Metrics/PerceivedComplexity
# rubocop:enable Metrics/CyclomaticComplexity
end

View file

@ -641,7 +641,7 @@ en:
m_id: 'M-ID'
destroyed: It was successfully deleted.
not_found: Not found
no_connection_to_registry: Connection issue to the registry server! Please try again later.
no_connection_to_registry: Connection issue to the registry EPP or REPP server! Please try again later.
domain_not_found: 'Domain was not found'
new_contact: 'New contact'
add_deposit: 'Add deposit'