app/models/adminpanel/user.rb in adminpanel-1.2.4 vs app/models/adminpanel/user.rb in adminpanel-1.2.5

- old
+ new

@@ -26,11 +26,25 @@ def has_role?(role_sym) roles.any? { |r| r.name.underscore.to_sym == role_sym } end + def self.form_attributes + [ + {"name" => {"type" => "text_field", "name" => "Nombre", 'label' => "Nombre", "placeholder" => "Nombre"}}, + {"email" => {"type" => "text_field", "name" => "Correo", 'label' => 'Correo', 'placeholder' => 'Correo'}}, + {"password" => {"type" => "password_field", "name" => "Contrasena", 'label' => I18n.t('model.attributes.password'), "placeholder" => I18n.t('model.attributes.password'), 'show' => 'false'}}, + {"password_confirmation" => {"type" => "password_field", "name" => "Confirmacion de contrasena", 'placeholder' => I18n.t('model.attributes.password_confirmation'), 'label' => I18n.t('model.attributes.password_confirmation'), 'show' => 'false'}}, + ] + end + + def self.display_name + "Usuario" + + end + private def create_remember_token self.remember_token = SecureRandom.base64.tr("+/", "-_") end end -end \ No newline at end of file +end