diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 3b44447..f9424bd 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -190,9 +190,11 @@ module ApplicationHelper
field_html =~ /id=['"]([^'"]*)['"]/
field_id = $1
end
+ field_html =~ /type=['"]([^'"]*)['"]/
+ field_type = $1
label_html = content_tag('label', text, :class => 'formlabel', :for => field_id)
- control_html = content_tag('div', field_html, :class => 'formfield' )
+ control_html = content_tag('div', field_html, :class => 'formfield '+field_type )
content_tag('div', label_html + control_html, :class => 'formfieldline' )
end
diff --git a/app/views/profile_editor/change_image.rhtml b/app/views/profile_editor/change_image.rhtml
index 71a63a9..8577e40 100644
--- a/app/views/profile_editor/change_image.rhtml
+++ b/app/views/profile_editor/change_image.rhtml
@@ -1,5 +1,25 @@
-<% form_for :image, @image, :html => { :multipart => true }, :url => { :action => 'change_image'} do |f| %>
- <%= display_form_field(_('Image'), f.file_field( :uploaded_data ) ) %>
+<% form_for :image, @image,
+ :html => { :multipart => true },
+ :url => { :action => 'change_image'} do |f| %>
+ <%= display_form_field(_('Image'), f.file_field( :uploaded_data, { :onchange => 'updateImg(this.value)' } ) ) %>
<%= display_submit_tag(_('Upload')) %>
<%= link_to _('Cancel'), :action => 'index' %>
<% end %>
+
+
+
+
+
+
+
diff --git a/public/designs/templates/default/stylesheets/forms.css b/public/designs/templates/default/stylesheets/forms.css
index 8e1e263..f0f1541 100644
--- a/public/designs/templates/default/stylesheets/forms.css
+++ b/public/designs/templates/default/stylesheets/forms.css
@@ -10,13 +10,12 @@
padding: 2px 5px;
}
-.formfield.text_field input,
-.formfield.password_field input,
+.formfield input,
.formfield textarea {
-/* background: transparent url("../images/input-bg.gif") top left no-repeat; */
+ background: transparent url("../images/input-bg.gif") top left no-repeat;
border: 1px solid #999;
-/* border-top: none;
- border-left: none; */
+ border-top: none;
+ border-left: none;
color: #585858;
}
.formfield input {
@@ -26,6 +25,12 @@
padding: 2px 0px 0px 5px;
}
+.formfield.radio input,
+.formfield.checkbox input {
+ background: none;
+ border: none;
+}
+
.submitline {
text-align: center;
}
--
libgit2 0.21.2