diff --git a/plugins/custom_forms/controllers/custom_forms_plugin_myprofile_controller.rb b/plugins/custom_forms/controllers/custom_forms_plugin_myprofile_controller.rb
index b908810..b0a19ef 100644
--- a/plugins/custom_forms/controllers/custom_forms_plugin_myprofile_controller.rb
+++ b/plugins/custom_forms/controllers/custom_forms_plugin_myprofile_controller.rb
@@ -1,4 +1,6 @@
class CustomFormsPluginMyprofileController < MyProfileController
+
+ protect 'post_content', :profile
def index
@forms = CustomFormsPlugin::Form.from(profile)
end
diff --git a/plugins/custom_forms/views/custom_forms_plugin_myprofile/_edit_select.html.erb b/plugins/custom_forms/views/custom_forms_plugin_myprofile/_edit_select.html.erb
index 7f1c96b..03af42e 100644
--- a/plugins/custom_forms/views/custom_forms_plugin_myprofile/_edit_select.html.erb
+++ b/plugins/custom_forms/views/custom_forms_plugin_myprofile/_edit_select.html.erb
@@ -1,6 +1,6 @@
<% elem_id = "edit-select-#{counter}" %>
class='edit-information'>
-
<%= _('Options') %>
+
<%= _('Options') %>
<%= _('Name') %> |
@@ -14,15 +14,15 @@
<% end %>
<%= render :partial => 'empty_option', :locals => {:counter => counter, :option_counter => option_counter} %>
- <%= link_to(_('NEW OPTION'), '#', :class => 'new-option', :field_id => counter)%> |
+
+ <%= button(:add, _('Add a new option'), '#', :class => 'new-option', :field_id => counter)%>
+ |
-
<%= _('Type') %>
- <%#= labelled_check_box _('List'), "fields[#{counter}][list]", true, field.list %>
- <%#= labelled_check_box _('Multiple'), "fields[#{counter}][multiple]", true, field.multiple %>
+
<%= _('Type') %>
<%= labelled_radio_button 'Radio', "fields[#{counter}][kind]", 'radio', !field.multiple && !field.list %>
- <%= labelled_radio_button 'Check Box', "fields[#{counter}][kind]", 'check_box', field.multiple && !field.list %>
+ <%= labelled_radio_button 'Checkbox', "fields[#{counter}][kind]", 'check_box', field.multiple && !field.list %>
<%= labelled_radio_button 'Select', "fields[#{counter}][kind]", 'select', !field.multiple && field.list %>
<%= labelled_radio_button 'Multiple Select', "fields[#{counter}][kind]", 'multiple_select', field.multiple && field.list %>
diff --git a/plugins/custom_forms/views/custom_forms_plugin_myprofile/_edit_text.html.erb b/plugins/custom_forms/views/custom_forms_plugin_myprofile/_edit_text.html.erb
index 968bfdf..c84aeaf 100644
--- a/plugins/custom_forms/views/custom_forms_plugin_myprofile/_edit_text.html.erb
+++ b/plugins/custom_forms/views/custom_forms_plugin_myprofile/_edit_text.html.erb
@@ -1,5 +1,6 @@
<% elem_id = "edit-text-#{counter}" %>
class='edit-information'>
+
<%= _('Default value') %>
<%= labelled_form_field _('Default value'), text_field("fields[#{counter}]", :default_value, :value => field.default_value) %>
<% button_bar do %>
diff --git a/plugins/custom_forms/views/custom_forms_plugin_myprofile/_empty_field.html.erb b/plugins/custom_forms/views/custom_forms_plugin_myprofile/_empty_field.html.erb
index dad3033..2ebc66d 100644
--- a/plugins/custom_forms/views/custom_forms_plugin_myprofile/_empty_field.html.erb
+++ b/plugins/custom_forms/views/custom_forms_plugin_myprofile/_empty_field.html.erb
@@ -1,5 +1,5 @@
>
- <%= text_field "fields[#{counter}]", :name %> |
+ <%= text_field "fields[#{counter}]", :name, :size => 25 %> |
<%= select "fields[#{counter}]", :type, type_options, :selected => type_for_options(field.class) %> |
<%= check_box "fields[#{counter}]", :mandatory %> |
<%= hidden_field "fields[#{counter}]", :form_id, :value => @form.id %>
diff --git a/plugins/custom_forms/views/custom_forms_plugin_myprofile/_empty_option.html.erb b/plugins/custom_forms/views/custom_forms_plugin_myprofile/_empty_option.html.erb
index d1c9c76..5028f50 100644
--- a/plugins/custom_forms/views/custom_forms_plugin_myprofile/_empty_option.html.erb
+++ b/plugins/custom_forms/views/custom_forms_plugin_myprofile/_empty_option.html.erb
@@ -1,6 +1,6 @@
option_id=<%= option_counter %> style="display: none;">
<%= text_field_tag("fields[#{counter}][choices][#{option_counter}][name]") %> |
- <%= text_field_tag("fields[#{counter}][choices][#{option_counter}][value]") %> |
+ <%= text_field_tag("fields[#{counter}][choices][#{option_counter}][value]", nil, :size => 15) %> |
<%= button_without_text :remove, _('Remove'), '#', :class => 'remove-option', :field_id => counter, :option_id => option_counter, :confirm => _('Are you sure you want to remove this option?') %>
|
diff --git a/plugins/custom_forms/views/custom_forms_plugin_myprofile/_field.html.erb b/plugins/custom_forms/views/custom_forms_plugin_myprofile/_field.html.erb
index 68ca736..573e9c7 100644
--- a/plugins/custom_forms/views/custom_forms_plugin_myprofile/_field.html.erb
+++ b/plugins/custom_forms/views/custom_forms_plugin_myprofile/_field.html.erb
@@ -1,5 +1,5 @@
>
- <%= text_field "fields[#{counter}]", :name, :value => field.name %> |
+ <%= text_field "fields[#{counter}]", :name, :value => field.name, :size => 25 %> |
<%= type_to_label(field.type) %> |
<%= hidden_field "fields[#{counter}]", :type, :value => type_for_options(field.class) %>
<%= check_box "fields[#{counter}]", :mandatory, :checked => field.mandatory %> |
diff --git a/plugins/custom_forms/views/custom_forms_plugin_myprofile/_form.html.erb b/plugins/custom_forms/views/custom_forms_plugin_myprofile/_form.html.erb
index b739633..af0363f 100644
--- a/plugins/custom_forms/views/custom_forms_plugin_myprofile/_form.html.erb
+++ b/plugins/custom_forms/views/custom_forms_plugin_myprofile/_form.html.erb
@@ -32,7 +32,9 @@
<% end %>
<%= render :partial => 'empty_field', :locals => {:field => @empty_field, :counter => counter} %>
- <%= link_to(_('NEW FIELD'), '#', :id => 'new-field')%> |
+
+ <%= button(:add, _('Add a new field'), '#', :id => 'new-field')%>
+ |
diff --git a/plugins/custom_forms/views/custom_forms_plugin_myprofile/index.html.erb b/plugins/custom_forms/views/custom_forms_plugin_myprofile/index.html.erb
index 54fcb9e..cbb3427 100644
--- a/plugins/custom_forms/views/custom_forms_plugin_myprofile/index.html.erb
+++ b/plugins/custom_forms/views/custom_forms_plugin_myprofile/index.html.erb
@@ -11,7 +11,7 @@
<% @forms.each do |form| %>
- <%= form.name %> |
+ <%= link_to form.name, {:controller => 'custom_forms_plugin_profile', :action => 'show', :id => form.id} %> |
<%= period_range(form) %> |
<%= form.submissions.count > 0 ? link_to(form.submissions.count, {:action => 'submissions', :id => form.id}) : 0 %> |
<%= access_text(form) %> |
@@ -21,6 +21,8 @@
<% end %>
- <%= link_to(_('NEW FORM'), :action => 'create')%> |
+
+ <%= button(:add, _('Add a new form'), :action => 'create')%>
+ |
--
libgit2 0.21.2