diff --git a/app/views/plans/_edit_details.html.erb b/app/views/plans/_edit_details.html.erb index 9d9d86a..fabe519 100644 --- a/app/views/plans/_edit_details.html.erb +++ b/app/views/plans/_edit_details.html.erb @@ -10,14 +10,9 @@ title: _('If applying for funding, state the name exactly as in the grant proposal.')) %> -
+
<%= f.hidden_field :visibility %> -
- <%= f.label(:is_test, _('mock project for testing, practice, or educational purposes'), class: 'control-label') %> -
-
- <%= check_box_tag(:is_test,1, @plan.is_test?) %> -
+ <%= f.label(:is_test, raw("#{check_box_tag(:is_test,1, @plan.is_test?)} #{_('mock project for testing, practice, or educational purposes')}"), class: 'control-label') %>
@@ -43,9 +38,9 @@
<%= f.label(:description, _('Project Abstract'), class: 'control-label') %>
-
Questions to consider:
  • What is the nature of your research project?
  • What research questions are you addressing?
  • For what purpose are the data being collected or created?

Guidance:

Briefly summarise the type of study (or studies) to help others understand the purposes for which the data are being collected or created.

").html_safe %>"> +
"> <%= f.text_area( - :description, + :description, rows: 6, class: 'form-control tinymce', "aria-required": false) %>
@@ -95,9 +90,24 @@ "data-validation": "email") %>
+
+
+ <%= f.label(:principal_investigator_phone, _('Phone'), class: 'control-label') %> +
+
+ <%= f.phone_field( + :principal_investigator_phone, + class: 'form-control', + "aria-required": false) %> +
+

<%= _('Data Contact Person') %>

-
+
+ <% checked = ((@plan.data_contact.present? || @plan.data_contact_phone.present? || @plan.data_contact_email.present?) ? 1 : 0) %> + <%= label_tag(:show_data_contact, raw("#{check_box_tag(:show_data_contact, checked, checked == 0)} #{_('Same as Principal Investigator')}"), class: 'control-label') %> +
+
<%= f.label(:data_contact, _('Name'), class: 'control-label') %>
@@ -108,18 +118,7 @@ "aria-required": false) %>
-
-
- <%= f.label(:data_contact_phone, _('Phone'), class: 'control-label') %> -
-
- <%= f.text_field( - :data_contact_phone, - class: 'form-control', - "aria-required": false) %> -
-
-
+
<%= f.label(:data_contact_email, _('Email'), class: 'control-label') %>
@@ -131,6 +130,17 @@ "data-validation": "email") %>
+
+
+ <%= f.label(:data_contact_phone, _('Phone'), class: 'control-label') %> +
+
+ <%= f.phone_field( + :data_contact_phone, + class: 'form-control', + "aria-required": false) %> +
+
<%= f.button(_('Submit'), class: "btn btn-default", type: "submit") %> <% end %>
diff --git a/app/views/plans/_share_form.html.erb b/app/views/plans/_share_form.html.erb index a62fb16..bb58700 100644 --- a/app/views/plans/_share_form.html.erb +++ b/app/views/plans/_share_form.html.erb @@ -3,14 +3,16 @@ <%= form_for @plan, html: {method: :put} do |f| %> > -
- <%= f.label :visibility, raw("#{f.radio_button :visibility, :privately_visible} #{_('Private: restricted to me and my collaborators')}") %> -
-
- <%= f.label :visibility, raw("#{f.radio_button :visibility, :organisationally_visible} #{_('Organisation: anyone at my organisation can view')}") %> -
-
- <%= f.label :visibility, raw("#{f.radio_button :visibility, :publicly_visible} #{_('Public: anyone can view')}") %> +
+
+ <%= f.label :visibility, raw("#{f.radio_button :visibility, :privately_visible} #{_('Private: restricted to me and my collaborators')}") %> +
+
+ <%= f.label :visibility, raw("#{f.radio_button :visibility, :organisationally_visible} #{_('Organisation: anyone at my organisation can view')}") %> +
+
+ <%= f.label :visibility, raw("#{f.radio_button :visibility, :publicly_visible} #{_('Public: anyone can view')}") %> +
<% end %> @@ -19,7 +21,7 @@

<%= _('Invite specific people to read, edit, or administer your plan. Invitees will receive an email notification that they have access to this plan.') %>

<% if @plan.roles.any? then %> - +
@@ -39,7 +41,7 @@ <%= display_role(role) %> <% elsif !role.creator? && role.user != current_user %> <%= form_for role, url: {controller: :roles, action: :update, id: role.id }, html: {method: :put} do |f| %> -
+
<%= f.hidden_field :id %> <%= f.select :access_level, {"#{_('Co-owner')}": 3, "#{_('Editor')}": 2, "#{_('Read only')}": 1}, {}, {id: "#{role.id}-can-edit", class: "toggle-existing-user-access has-tooltip", 'data-toggle': "tooltip", 'title': _('Editors can contribute to plans. Co-owners have additional rights to edit plan details and control access.') } %>
@@ -61,7 +63,7 @@ <% new_role = Role.new %> <% new_role.plan = @plan %> <%= form_for new_role, url: {controller: :roles, action: :create }, html: {method: :post} do |f| %> -
+
<%= f.hidden_field :plan_id %> <%= f.fields_for :user do |user| %> <%= user.label :email, _('Email'), class: 'control-label' %> @@ -69,16 +71,19 @@ <% end %>
-

<%= _('Permissions') %>

-
- <%= f.label :access_level, raw("#{f.radio_button :access_level, 1} #{_('Read only: can view but not make changes')}") %> -
-
- <%= f.label :access_level, raw("#{f.radio_button :access_level, 2} #{_('Editor: can comment and make changes')}") %> -
-
- <%= f.label :access_level, raw("#{f.radio_button :access_level, 3, "aria-required": true} #{_('Co-owner: can edit project details, change visibility, and add collaborators')}") %> +
+

<%= _('Permissions') %>

+
+ <%= f.label :access_level, raw("#{f.radio_button :access_level, 1} #{_('Read only: can view but not make changes')}") %> +
+
+ <%= f.label :access_level, raw("#{f.radio_button :access_level, 2} #{_('Editor: can comment and make changes')}") %> +
+
+ <%= f.label :access_level, raw("#{f.radio_button :access_level, 3, "aria-required": true} #{_('Co-owner: can edit project details, change visibility, and add collaborators')}") %> +
+ + <%= f.button(_('Submit'), class: "btn btn-primary", type: "submit") %>
- <%= f.button(_('Submit'), class: "btn btn-primary", type: "submit") %> <% end %> \ No newline at end of file
<%= _('Email address')%>