diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..c1617b1 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,127 @@ +## Introduction +The goal of the DMPRoadmap project is to provide the community with a reliable and stable platform for managing data management plans. This means that all development efforts should adhere to some basic tenets to ensure that the system remains stable and provides functionality for the community as a whole. + +These guidelines are an attempt to ensure that we are able to provide the community with a reliable system, stable APIs, a clear roadmap, and a predictable release schedule. + +* If you would like to contribute to the project. Please follow these steps to submit a contribution: + * Comment on the Github issue (or create one if one does not exist) and let us know that you're working on it. + * Fork the project (if you have not already) or rebase your fork so that it is up to date with the current repository's '_**development**_' branch + * Create a new branch in your fork. This will ensure that you are able to work at your own pace and continue to pull in any updates made to this project. + * Make your changes in the new branch + * When you have finished your work, make sure that your version of the '_**development**_' branch is still up to date with this project. Then merge your new branch into your '_**development**_' branch. + * Then create a new Pull Request (PR) to this project's '_**contributions**_' branch in GitHub + * The project team will then review your PR and communicate with you to convey any additional changes that would ensure that your work adheres to our guidelines. + +Table of contents: +* [Github Workflow](#github-workflow) +* [Pull Requests](#pull-requests) +* [Testing Guidelines](#testing-guidelines) +* [Coding Style/Guidelines](#coding-style) + +## GitHub Workflow +A contribution consists of any work that is voluntarily submitted to the project. This includes bug fixes, enhancements and documentation that is intended as an improvement to the DMP Roadmap system. + +Any individual with a GitHub account may propose a Contribution by submitting a Pull Request (PR) to this project's '_**contributions**_' branch. The project team will evaluate each PR as time permits and communicate with the contributor via comments on the PR. We will not accept a contribution until it adheres to the guidelines outlined in this document. If your contribution fits well with the development roadmap, the team will merge it into the project and schedule it for the next upcoming release. + +![GitHub Workflow ](https://github.com/DMPRoadmap/roadmap/blob/master/public/github-contributor-infographic-final.png) + +## Pull Requests +Please use these checklists to help you prepare your Pull Request for submission. + +ALL Pull Requests MUST be made to the '_**contributions**_' branch! + +#### Checklist for changes to a database table and/or its corresponding model +* Did you include the appropriate database migration? ```> rails g migration AddTwitterIdToUsers``` +* Did you update/add the Unit tests? +* Did your change require you to transform data? For example moving data from one field to another like moving users.organisation_id to a join table called users_organisations. If so, did you include a rake task to help others migrate their data over to the new model (along with instructions)? +* Does the schema.rb include the changes? +* Did you remember to update the seeds.rb file to reflect the change? + +#### Checklist for changes to a controller +* Did you update/add the Functional tests? +* Did you update/add the Routing tests (if applicable)? +* Did you update the corresponding view(s)? +* Did you include any updates/additions to localisation text config/locales/pot file? + +#### Checklist for changes to a view +* Did you include any updates/additions to localisation text config/locales/pot file? +* Did you update the corresponding controller? +* Did you manually test the change in multiple browsers? +* Did your change require modifications to the CSS, JS or image files? If so did you include them in your branded file locations or in the core system files? For example: lib/assets/javascripts is the default javascript directory. app/assets/javascripts are specific to your local installation. (See [Branding](https://github.com/DMPRoadmap/roadmap/wiki/Branding) for more information) + +## Testing Guidelines +First and foremost, all of the existing tests must pass before we accept your contribution. If your work has made a change to an object that results in failed tests then you should update those tests so that they are accurate. + +To run the tests: +```shell +# Make sure that your test DB has all of the current database migrations: +> rake db:migrate RAILS_ENV=test + +# To run all of the tests: +> rake test +# To run all of a specific type of tests: +> rake test test/unit/ +# To run a specific test: +> rake test test/unit/users_test.rb +``` + +If you are adding a new feature to the system you must build out the appropriate tests before we will accept your contribution. For example, if I add a new field to the User table that stores the user's Twitter id, I should update the test/unit/users_test.rb Unit test. If my contribution included changes to the User Profile page that allowed the user to enter this new Twitter id then I should update the test/functional/registrations_controller_test.rb Functional controller test. + +DMP Roadmap uses the Travis CI framework to verify that are tests are passing. When you create your PR you will see a note stating that the tests are pending. Check back after a few minutes to give the Travis system time to run its tests. + +**Please Note:** We will not review your PR until the tests are passing and GitHub notes that there are no merge conflicts + +The original DMP Roadmap codebase did not include a full suite of tests. The project team has been busy adding them in when we can but we still have a long way to go. The requirements mentioned above are in place for pieces of the system that already have tests. For example, if your work involves an enhancement to an existing controller that has no functional test in the current codebase, we do not expect you to write tests for the entire controller (although we would welcome the help!). In cases like this, we only ask that you write tests for the endpoints that you have updated. + +We do not currently have testing for the UI components. We plan to add tests for these in the near future using a headless browser like PhantomJS. We welcome any contributors who are willing to begin work in this area! + +#### Unit tests: +* The model can be Created, Read/Loaded, Updated and Deleted (CRUD) +* Required fields are required and that the model cannot be saved without those fields +* Any other validations are working as expected (e.g. email address is in the email format) +* Associations are functioning properly. Use the helper methods in test/test_helper.rb +* All other functions that are defined within the model are tested +* You should update or create the corresponding fixtures for the model you are testing + +#### Functional Controller tests: +* The correct HTTP response was received (200 success, 302 redirect, 401 unauthorized, etc.) +* The user was redirected to the correct page (if applicable) +* All of the instance variables set within the controller were properly defined +* All flash messaging is correct + +#### Integration tests: +* Complex workflows that involve multiple pieces of the system should have an integration test. This can include interaction with gem dependencies or external services. For example email, login/logout, etc. + +#### Helper/Service tests: +* Each method within the helper or service should be tested for both success and failure conditions + +#### Routing tests: +New controller/API endpoints should have tests within the test/routing_test.rb + +#### General Notes and Advice: +* You should use the Rails URL and Path helpers instead of hard-coding them in your tests. (e.g. edit_plans_path(@plan) instead of '/plans/123/edit' +* You should use the I18n.t method to validate flash messaging rather than hard-coding messages in your tests +* You should include assertions that test both success and failure conditions + +## Coding style +We realize that every developer has their own style and we encourage a bit of individuality. However, we do impose some of the following rules to contributions to this project. + +* We quite like the principle of [DRY (Don't Repeat Yourself)](https://en.wikipedia.org/wiki/Don't_repeat_yourself) so please always look through the existing code to make sure you are not reinventing something that has already been done. Also clever bits of code or reuse of existing ones to avoid copying and pasting is always appreciated. +* Include database migrations when you are altering the database model. Use the following command to create a new migration and be specific about what it does in the name of the file + + ```shell + > rails g migration AddTwitterIdToUsers + ``` +* You do not need to comment every line of your code but we do expect to see inline comments explaining the intent of your if blocks and loops. +* We do not want to see Tab characters. Tabs should be converted to a double space. If you are working on a file that has Tabs already, please convert them for us before making your Pull Request +* If a line is going to go beyond 100 characters please break it out onto multiple lines. For example: + + ```ruby + # This is preferable + users = [{email: @user.email, password: 'bAd_pas$word1', remember_me: true}, + {email: 'unknown@institution.org', password: 'password123', remember_me: true}] + + # to this long line that requires scrolling + users = [{email: @user.email, password: 'bAd_pas$word1', remember_me: true}, {email: 'unknown@institution.org', password: 'password123', remember_me: true}] + ``` +* Finally, please make sure your code is properly indented as this enhances readability. diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index a1ff6ad..2d3dcb0 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -33,7 +33,7 @@ if FastGettext.default_available_locales.include?(params[:locale]) session[:locale] = params[:locale] end - redirect_to root_path + redirect_to(request.referer || root_path) #redirects the user to URL where she/he was when the request to this resource was made or root if none is encountered end def store_location diff --git a/app/controllers/guidances_controller.rb b/app/controllers/guidances_controller.rb index 2bbf7ec..1acc096 100644 --- a/app/controllers/guidances_controller.rb +++ b/app/controllers/guidances_controller.rb @@ -15,7 +15,7 @@ authorize @guidance @themes = Theme.all.order('title') @guidance_groups = GuidanceGroup.where(org_id: current_user.org_id).order('name ASC') - end + end ## # GET /guidances/1/edit @@ -32,19 +32,11 @@ @guidance = Guidance.new(guidance_params) authorize @guidance @guidance.text = params["guidance-text"] - + @guidance.themes = [] if !guidance_params[:theme_ids].nil? guidance_params[:theme_ids].map{|t| @guidance.themes << Theme.find(t.to_i) unless t.empty? } end - - if @guidance.published == true then - @gg = GuidanceGroup.find(@guidance.guidance_group_id) - if @gg.published == false || @gg.published.nil? then - @gg.published = true - @gg.save - end - end if @guidance.save redirect_to admin_edit_guidance_path(@guidance), notice: _('Guidance was successfully created.') @@ -59,12 +51,12 @@ ## # PUT /guidances/1 def admin_update - @guidance = Guidance.find(params[:id]) + @guidance = Guidance.find(params[:id]) authorize @guidance - @guidance.text = params["guidance-text"] - - if @guidance.save(guidance_params) - redirect_to admin_edit_guidance_path(params[:guidance]), notice: _('Guidance was successfully updated.') + @guidance.text = params["guidance-text"] + + if @guidance.update_attributes(guidance_params) + redirect_to admin_show_guidance_path(params[:guidance]), notice: _('Guidance was successfully updated.') else flash[:notice] = failed_update_error(@guidance, _('guidance')) @themes = Theme.all.order('title') @@ -77,14 +69,14 @@ ## # DELETE /guidances/1 def admin_destroy - @guidance = Guidance.find(params[:id]) + @guidance = Guidance.find(params[:id]) authorize @guidance if @guidance.destroy redirect_to admin_index_guidance_path, notice: _('Guidance was successfully deleted.') else redirect_to admin_index_guidance_path, notice: failed_destroy_error(@guidance, _('guidance')) end - end + end private diff --git a/app/controllers/phases_controller.rb b/app/controllers/phases_controller.rb index 4abba8b..15d45f3 100644 --- a/app/controllers/phases_controller.rb +++ b/app/controllers/phases_controller.rb @@ -23,14 +23,14 @@ # get the ids of the dynamically selected guidance groups # and keep a map of them so we can extract the names later guidance_groups_ids = @plan.guidance_groups.map{|pgg| pgg.id} - guidance_groups = GuidanceGroup.includes({guidances: :themes}).find(guidance_groups_ids) + guidance_groups = GuidanceGroup.includes({guidances: :themes}).where(published: true, id: guidance_groups_ids) # create a map from theme to array of guidances # where guidance is a hash with the text and the org name theme_guidance = {} guidance_groups.each do |guidance_group| - guidance_group.guidances.each do |guidance| + guidance_group.guidances.where(published: true).each do |guidance| guidance.themes.each do |theme| title = theme.title if !theme_guidance.has_key?(title) diff --git a/app/controllers/plans_controller.rb b/app/controllers/plans_controller.rb index 41e502d..9f5d37f 100644 --- a/app/controllers/plans_controller.rb +++ b/app/controllers/plans_controller.rb @@ -30,7 +30,6 @@ flash[:notice] = "#{_('This is a')} #{_('test plan')}" if params[:test] @is_test = params[:test] ||= false - respond_to :html end @@ -69,13 +68,13 @@ if @plan.save @plan.assign_creator(current_user) - + # pre-select org's guidance - ggs = GuidanceGroup.where(org_id: plan_params[:org_id], - optional_subset: false, + ggs = GuidanceGroup.where(org_id: plan_params[:org_id], + optional_subset: false, published: true) - if !ggs.blank? then @plan.guidance_groups << ggs end - + if !ggs.blank? then @plan.guidance_groups << ggs end + default = Template.find_by(is_default: true) msg = "#{_('Plan was successfully created.')} " @@ -495,7 +494,7 @@ funder = Org.find(funder_id) # Load the funder's template(s) @templates = Template.valid.where(published: true, org: funder).to_a - + unless org_id.blank? org = Org.find(org_id) diff --git a/app/controllers/questions_controller.rb b/app/controllers/questions_controller.rb index dbc5613..f3250bb 100644 --- a/app/controllers/questions_controller.rb +++ b/app/controllers/questions_controller.rb @@ -56,10 +56,21 @@ if guidance.blank? guidance = @question.annotations.build guidance.type = :guidance + guidance.org_id = current_user.org_id end guidance.text = params["question-guidance-#{params[:id]}"] guidance.save end + example_answer = @question.get_example_answer(current_user.org_id) + if params["question"]["annotations_attributes"].present? && params["question"]["annotations_attributes"]["0"]["id"].present? + if example_answer.blank? + example_answer = @question.annotations.build + example_answer.type = :example_answer + example_answer.org_id = current_user.org_id + end + example_answer.text = params["question"]["annotations_attributes"]["0"]["text"] + example_answer.save + end if @question.question_format.textfield? @question.default_value = params["question-default-value-textfield"] elsif @question.question_format.textarea? diff --git a/app/models/plan.rb b/app/models/plan.rb index b8f3d35..3abf98e 100644 --- a/app/models/plan.rb +++ b/app/models/plan.rb @@ -139,7 +139,8 @@ section.questions.each do |question| question.themes.each do |theme| theme.guidances.each do |guidance| - ggroups << guidance.guidance_group + ggroups << guidance.guidance_group if guidance.guidance_group.published + # only show published guidance groups end end end @@ -163,7 +164,8 @@ section.questions.each do |question| question.themes.each do |theme| theme.guidances.each do |guidance| - ggroups << guidance.guidance_group + ggroups << guidance.guidance_group if guidance.guidance_group.published + # only show published guidance groups end end end diff --git a/app/views/guidance_groups/admin_edit.html.erb b/app/views/guidance_groups/admin_edit.html.erb index c1f9779..4235b74 100644 --- a/app/views/guidance_groups/admin_edit.html.erb +++ b/app/views/guidance_groups/admin_edit.html.erb @@ -11,7 +11,7 @@ <%= f.label :name %> <%= f.text_field :name, as: :string, class: 'input-medium required' %>
- <%= link_to(image_tag('help_button.png'), '#', class: 'guidance_group_title_popover', rel: "popover", 'data-html' => "true", 'data-content' => _('Add an appropriate name for your guidance group. This name will be used to tell the end user where the guidance has come from. It will be appended to text identifying the theme e.g. "[guidance group name]: guidance on data sharing" so we suggest you just use the institution or department name.')) %> + <%= link_to(image_tag('help_button.png'), '#', "data-toggle": "popover", rel: "popover", 'data-html' => "true", 'data-content' => _('Add an appropriate name for your guidance group. This name will be used to tell the end user where the guidance has come from. It will be appended to text identifying the theme e.g. "[guidance group name]: guidance on data sharing" so we suggest you just use the institution or department name.')) %>
@@ -30,7 +30,7 @@ <%= f.label :optional_subset %> <%= f.check_box :optional_subset %> <%= _('e.g. School/ Department') %>
- <%= link_to(image_tag('help_button.png'), '#', class: 'guidance_group_subset_popover', rel: "popover", 'data-html' => "true", 'data-content' => _("If the guidance is only meant for a subset of users e.g. those in a specific college or institute, check this box. Users will be able to select to display this subset guidance when answering questions in the 'create plan' wizard.")) %> + <%= link_to(image_tag('help_button.png'), '#', "data-toggle": "popover", rel: "popover", 'data-html' => "true", 'data-content' => _("If the guidance is only meant for a subset of users e.g. those in a specific college or institute, check this box. Users will be able to select to display this subset guidance when answering questions in the 'create plan' wizard.")) %>
diff --git a/app/views/guidance_groups/admin_new.html.erb b/app/views/guidance_groups/admin_new.html.erb index 539fa1f..3563060 100644 --- a/app/views/guidance_groups/admin_new.html.erb +++ b/app/views/guidance_groups/admin_new.html.erb @@ -1,33 +1,33 @@ <% javascript 'admin.js' %>

- <%= _('Guidance group') %> + <%= _('Guidance group') %>

- <%= form_for :guidance_group, url: {action: "admin_create"}, html: {class: 'roadmap-form bordered'} do |f| %> + <%= form_for :guidance_group, url: {action: "admin_create"}, html: {class: 'roadmap-form bordered'} do |f| %>
<%= f.label :name %> - <%= f.text_field :name, as: :string, class: "input-medium required" %> -
- <%= link_to( image_tag("help_button.png"), "#", class: 'guidance_group_title_popover', rel: "popover", 'data-html' => "true", 'data-content' => _('Add an appropriate name for your guidance group. This name will be used to tell the end user where the guidance has come from. It will be appended to text identifying the theme e.g. "[guidance group name]: guidance on data sharing" so we suggest you just use the institution or department name.'))%> -
-
-
- <%= f.label :optional_subset %> - <%= f.check_box :optional_subset %> <%= _('e.g. School/ Department') %> -
- <%= link_to( image_tag('help_button.png'), '#', class: 'guidance_group_subset_popover', rel: "popover", 'data-html' => "true", 'data-content' => _("If the guidance is only meant for a subset of users e.g. those in a specific college or institute, check this box. Users will be able to select to display this subset guidance when answering questions in the 'create plan' wizard."))%> -
-
- - + <%= f.text_field :name, as: :string, class: "input-medium required" %> +
+ <%= link_to( image_tag("help_button.png"), "#", "data-toggle": "popover", rel: "popover", 'data-html' => "true", 'data-content' => _('Add an appropriate name for your guidance group. This name will be used to tell the end user where the guidance has come from. It will be appended to text identifying the theme e.g. "[guidance group name]: guidance on data sharing" so we suggest you just use the institution or department name.'))%> +
+
+
+ <%= f.label :optional_subset %> + <%= f.check_box :optional_subset %> <%= _('e.g. School/ Department') %> +
+ <%= link_to( image_tag('help_button.png'), '#', "data-toggle": "popover", rel: "popover", 'data-html' => "true", 'data-content' => _("If the guidance is only meant for a subset of users e.g. those in a specific college or institute, check this box. Users will be able to select to display this subset guidance when answering questions in the 'create plan' wizard."))%> +
+
+ +
- <%= f.submit _('Save'), name: "draft", class: "btn btn-primary" %> -
- - <% end %> + <%= f.submit _('Save'), name: "draft", class: "btn btn-primary" %> + + + <% end %> diff --git a/app/views/guidances/_add_guidance.html.erb b/app/views/guidances/_add_guidance.html.erb index bd036d2..ca49a90 100644 --- a/app/views/guidances/_add_guidance.html.erb +++ b/app/views/guidances/_add_guidance.html.erb @@ -9,7 +9,7 @@ <%= text_area_tag("guidance-text", "", class: "tinymce") %>
- <%= link_to( image_tag("help_button.png"), "#", class: "guidance_text_popover", rel: "popover", "data-html" => "true", "data-content" => _('Enter your guidance here. You can include links where needed.'))%> + <%= link_to( image_tag("help_button.png"), "#", "data-toggle": "popover", rel: "popover", "data-html" => "true", "data-content" => _('Enter your guidance here. You can include links where needed.'))%>
@@ -24,7 +24,7 @@ :id, :title, {prompt: false, include_blank: _('None')}, {multiple: true})%>
- <%= link_to( image_tag("help_button.png"), "#", class: "guidance_by_themes_popover", rel: "popover", "data-html" => "true", "data-content" => _('Select which theme(s) this guidance relates to.'))%> + <%= link_to( image_tag("help_button.png"), "#", "data-toggle": "popover", rel: "popover", "data-html" => "true", "data-content" => _('Select which theme(s) this guidance relates to.'))%>
@@ -47,7 +47,7 @@ :id, :name, {prompt: false, include_blank: _('None')}, {multiple: false})%>
- <%= link_to( image_tag("help_button.png"), "#", class: "guidance_group_select_popover", rel: "popover", "data-html" => "true", "data-content" => _('Select which group this guidance relates to.'))%> + <%= link_to( image_tag("help_button.png"), "#", "data-toggle": "popover", rel: "popover", "data-html" => "true", "data-content" => _('Select which group this guidance relates to.'))%>
diff --git a/app/views/guidances/admin_edit.html.erb b/app/views/guidances/admin_edit.html.erb index c8e7e47..2874554 100644 --- a/app/views/guidances/admin_edit.html.erb +++ b/app/views/guidances/admin_edit.html.erb @@ -11,7 +11,7 @@ <%= f.label _('Text'), for: @guidance.text %> <%= text_area_tag("guidance-text", @guidance.text, class: "tinymce") %>
- <%= link_to( image_tag('help_button.png'), '#', class: 'guidance_text_popover', rel: "popover", 'data-html' => "true", 'data-content' => _('Enter your guidance here. You can include links where needed.'))%> + <%= link_to( image_tag('help_button.png'), '#', "data-toggle": "popover", rel: "popover", 'data-html' => "true", 'data-content' => _('Enter your guidance here. You can include links where needed.'))%>
@@ -19,7 +19,7 @@ <%= f.collection_select(:theme_ids, @themes, :id, :title, {prompt: false, include_blank: 'None'}, {multiple: true})%>
- <%= link_to( image_tag('help_button.png'), '#', class: 'guidance_by_themes_popover input-medium', rel: "popover", 'data-html' => "true", 'data-content' => _('Select which theme(s) this guidance relates to.'))%> + <%= link_to( image_tag('help_button.png'), '#', class: 'input-medium', "data-toggle": "popover", rel: "popover", 'data-html' => "true", 'data-content' => _('Select which theme(s) this guidance relates to.'))%>
@@ -31,14 +31,14 @@ <%= f.collection_select(:guidance_group_id, @guidance_groups, :id, :name, {prompt: false, include_blank: 'None'}, {multiple: false})%>
- <%= link_to( image_tag('help_button.png'), '#', class: 'guidance_group_select_popover input-medium', rel: "popover", 'data-html' => "true", 'data-content' => _('Select which group this guidance relates to.'))%> + <%= link_to( image_tag('help_button.png'), '#', class: 'input-medium', "data-toggle": "popover", rel: "popover", 'data-html' => "true", 'data-content' => _('Select which group this guidance relates to.'))%>

- - + +
<%end%> diff --git a/app/views/guidances/admin_new.html.erb b/app/views/guidances/admin_new.html.erb index 6a2f7de..7774ab7 100644 --- a/app/views/guidances/admin_new.html.erb +++ b/app/views/guidances/admin_new.html.erb @@ -2,55 +2,55 @@ <% javascript 'views/guidances/admin_edit.js' %>

- <%= _('New guidance') %> + <%= _('New guidance') %>

- <%= form_for :guidance, url: {action: 'admin_create'}, html: {id: 'edit_guidance_form', class: 'roadmap-form bordered'} do |f| %> -
-
- <%= f.label :text %> - <%= text_area_tag("guidance-text", "", class: "tinymce") %> -
- <%= link_to( image_tag('help_button.png'), '#', class: 'guidance_text_popover', rel: "popover", 'data-html' => "true", 'data-content' => _('Enter your guidance here. You can include links where needed.'))%> -
-
-
- <%= f.label _('Themes'), for: :theme_ids %> - <%= f.collection_select(:theme_ids, @themes, - :id, :title, {prompt: false, include_blank: 'None'}, {multiple: true}) %> -
- <%= link_to( image_tag('help_button.png'), '#', class: 'guidance_by_themes_popover', rel: "popover", 'data-html' => "true", 'data-content' => _('Select which theme(s) this guidance relates to.'))%> -
-
+ <%= form_for :guidance, url: {action: 'admin_create'}, html: {id: 'edit_guidance_form', class: 'roadmap-form bordered'} do |f| %> +
+
+ <%= f.label :text %> + <%= text_area_tag("guidance-text", "", class: "tinymce") %> +
+ <%= link_to( image_tag('help_button.png'), '#', "data-toggle": "popover", rel: "popover", 'data-html' => "true", 'data-content' => _('Enter your guidance here. You can include links where needed.'))%> +
+
+
+ <%= f.label _('Themes'), for: :theme_ids %> + <%= f.collection_select(:theme_ids, @themes, + :id, :title, {prompt: false, include_blank: 'None'}, {multiple: true}) %> +
+ <%= link_to( image_tag('help_button.png'), '#', "data-toggle": "popover", rel: "popover", 'data-html' => "true", 'data-content' => _('Select which theme(s) this guidance relates to.'))%> +
+
<%= f.label :published %> <%= f.check_box :published , as: :check_boxes%>
- <%= link_to( image_tag('help_button.png'), '#', class: 'guidance_group_subset_popover', rel: "popover", 'data-html' => "true", 'data-content' => _("Check this box when you are ready for this guidance to appear on user's plans."))%> + <%= link_to( image_tag('help_button.png'), '#', "data-toggle": "popover", rel: "popover", 'data-html' => "true", 'data-content' => _("Check this box when you are ready for this guidance to appear on user's plans."))%>
-
- <%= f.label _('Guidance group'), for: :guidance_group_id %> - <%= f.collection_select(:guidance_group_id, @guidance_groups, - :id, :name, {prompt: false, include_blank: 'None'}, {multiple: false})%> -
- <%= link_to( image_tag('help_button.png'), '#', class: 'guidance_group_select_popover', rel: "popover", 'data-html' => "true", 'data-content' => _('Select which group this guidance relates to.'))%> -
-
- -
-
- - -
-
- <% end %> +
+ <%= f.label _('Guidance group'), for: :guidance_group_id %> + <%= f.collection_select(:guidance_group_id, @guidance_groups, + :id, :name, {prompt: false, include_blank: 'None'}, {multiple: false})%> +
+ <%= link_to( image_tag('help_button.png'), '#', "data-toggle": "popover", rel: "popover", 'data-html' => "true", 'data-content' => _('Select which group this guidance relates to.'))%> +
+
+ +
+
+ + +
+
+ <% end %>
<%= tinymce :content_css => asset_path('application.css') %> \ No newline at end of file diff --git a/app/views/phases/_edit_phase.html.erb b/app/views/phases/_edit_phase.html.erb index 46239e9..6aa8fbb 100644 --- a/app/views/phases/_edit_phase.html.erb +++ b/app/views/phases/_edit_phase.html.erb @@ -26,7 +26,7 @@ <%= text_area_tag("phase-desc", phase.description, class: "tinymce") %>
- <%= link_to( image_tag('help_button.png'), '#', class: 'phase_desc_popover', rel: "popover", 'data-html' => "true", 'data-content' => _("Enter a basic description. This will be presented to users on the 'Admin Plan' tab, above the summary of the sections and questions which they will be asked to answer."))%> + <%= link_to( image_tag('help_button.png'), '#', "data-toggle": "popover", rel: "popover", 'data-html' => "true", 'data-content' => _("Enter a basic description. This will be presented to users on the 'Admin Plan' tab, above the summary of the sections and questions which they will be asked to answer."))%>
diff --git a/app/views/phases/admin_add.html.erb b/app/views/phases/admin_add.html.erb index 99f2a2f..9735587 100644 --- a/app/views/phases/admin_add.html.erb +++ b/app/views/phases/admin_add.html.erb @@ -41,7 +41,7 @@ <%= f.label :description %> <%= text_area_tag("phase-desc","" , class: "tinymce") %>
- <%= link_to( image_tag("help_button.png"), "#", class: "phase_desc_popover", rel: "popover", "data-html" => "true", "data-content" => _("Enter a basic description. This will be presented to users on the 'Admin Plan' tab, above the summary of the sections and questions which they will be asked to answer."))%> + <%= link_to( image_tag("help_button.png"), "#", 'data-toggle': 'popover', rel: "popover", "data-html" => "true", "data-content" => _("Enter a basic description. This will be presented to users on the 'Admin Plan' tab, above the summary of the sections and questions which they will be asked to answer."))%>
diff --git a/app/views/plans/_plan_details.html.erb b/app/views/plans/_plan_details.html.erb index d4e45b5..a8db978 100644 --- a/app/views/plans/_plan_details.html.erb +++ b/app/views/plans/_plan_details.html.erb @@ -77,4 +77,4 @@ <%= @important_ggs.inspect %> -<% end %> +<% end %> \ No newline at end of file diff --git a/app/views/plans/export.docx.erb b/app/views/plans/export.docx.erb index be267a8..69602bb 100644 --- a/app/views/plans/export.docx.erb +++ b/app/views/plans/export.docx.erb @@ -21,9 +21,7 @@ %>

<%= section.title %>

<% questions.each do |question| %> -

<%= raw question.text %> -

<% answer = @plan.answer(question.id, false) %> <% if answer.nil? %>

<%= _('Question not answered') %>

@@ -42,6 +40,7 @@ <%= raw answer.text %> <% end %> <% end%> +

<% end %> <% end %> <% end %> diff --git a/app/views/questions/_add_question.html.erb b/app/views/questions/_add_question.html.erb index 96b894f..6675827 100644 --- a/app/views/questions/_add_question.html.erb +++ b/app/views/questions/_add_question.html.erb @@ -43,7 +43,7 @@ {}, class: "question_format" %>
- <%= link_to( image_tag("help_button.png"), "#", class: "question_format_popover", rel: "popover", "data-html" => "true", "data-content" => _("You can choose from:"))%> + <%= link_to( image_tag("help_button.png"), "#", "data-toggle": "popover", rel: "popover", "data-html" => "true", "data-content" => _("You can choose from:"))%>
@@ -55,7 +55,7 @@ <%= _('Order')%> <%= _('Text')%> <%= _('Default')%> - <%= link_to( image_tag("help_button.png"), "#", class: "question_options_popover", rel: "popover", "data-html" => "true", "data-content" => _('Enter any options that you wish to display. If you want to pre-set one option as selected, check the default box.'))%> + <%= link_to( image_tag("help_button.png"), "#", class: "question_options_popover", "data-toggle": "popover",rel: "popover", "data-html" => "true", "data-content" => _('Enter any options that you wish to display. If you want to pre-set one option as selected, check the default box.'))%> @@ -97,7 +97,7 @@
- <%= link_to( image_tag("help_button.png"), "#", class: "default_answer_popover", rel: "popover", "data-html" => "true", "data-content" => _('Anything you enter here will display in the answer box. If you want an answer in a certain format (e.g. tables), you can enter that style here.'))%> + <%= link_to( image_tag("help_button.png"), "#", "data-toggle": "popover", rel: "popover", "data-html" => "true", "data-content" => _('Anything you enter here will display in the answer box. If you want an answer in a certain format (e.g. tables), you can enter that style here.'))%>
@@ -113,7 +113,7 @@ <%= text_area_tag(:example_answer, "", class: "tinymce") %>
- <%= link_to( image_tag("help_button.png"), "#", class: "suggested_answer_popover", rel: "popover", "data-html" => "true", "data-content" => _('You can add an example answer to help users respond. These will be presented above the answer box and can be copied/ pasted.'))%> + <%= link_to( image_tag("help_button.png"), "#", "data-toggle": "popover", rel: "popover", "data-html" => "true", "data-content" => _('You can add an example answer to help users respond. These will be presented above the answer box and can be copied/ pasted.'))%>
@@ -127,7 +127,7 @@ <%= text_area_tag(:guidance, "", class: "tinymce") %>
- <%= link_to( image_tag("help_button.png"), "#", class: "question_guidance_popover", rel: "popover", "data-html" => "true", "data-content" => _("Enter specific guidance to accompany this question. If you have guidance by themes too, this will be pulled in based on your selections below so it's best not to duplicate too much text."))%> + <%= link_to( image_tag("help_button.png"), "#", "data-toggle": "popover", rel: "popover", "data-html" => "true", "data-content" => _("Enter specific guidance to accompany this question. If you have guidance by themes too, this will be pulled in based on your selections below so it's best not to duplicate too much text."))%>
@@ -143,7 +143,7 @@ :id, :title, {prompt: false, include_blank: _('None')}, {multiple: true})%>
- <%= link_to( image_tag("help_button.png"), "#", class: "question_themes_popover", rel: "popover", "data-html" => "true", "data-content" => _("

Select themes that are relevant to this question.

This allows your generic institution-level guidance to be drawn in, as well as that from other sources e.g. the %{organisation_abbreviation} or any Schools/Departments that you provide guidance for.

You can select multiple themes by using the CTRL button.

"))%> + <%= link_to( image_tag("help_button.png"), "#", "data-toggle": "popover", rel: "popover", "data-html" => "true", "data-content" => _("

Select themes that are relevant to this question.

This allows your generic institution-level guidance to be drawn in, as well as that from other sources e.g. the %{organisation_abbreviation} or any Schools/Departments that you provide guidance for.

You can select multiple themes by using the CTRL button.

"))%>
diff --git a/app/views/questions/_edit_question.html.erb b/app/views/questions/_edit_question.html.erb index c46d932..0d721d4 100644 --- a/app/views/questions/_edit_question.html.erb +++ b/app/views/questions/_edit_question.html.erb @@ -38,7 +38,7 @@ {}, class: "question_format", id: "#{question.id}-select-format"%>
- <%= link_to( image_tag("help_button.png"), "#", class: "question_format_popover", rel: "popover", "data-html" => "true", "data-content" => _("You can choose from:"))%> + <%= link_to( image_tag("help_button.png"), "#", "data-toggle": "popover", rel: "popover", "data-html" => "true", "data-content" => _("You can choose from:"))%>
@@ -51,7 +51,7 @@ <%= _('Order')%> <%= _('Text')%> <%= _('Default')%> - <%= link_to( image_tag("help_button.png"), "#", class: "question_options_popover", rel: "popover", "data-html" => "true", "data-content" => _('Enter any options that you wish to display. If you want to pre-set one option as selected, check the default box.'))%> + <%= link_to( image_tag("help_button.png"), "#", class: "question_options_popover", "data-toggle": "popover",rel: "popover", "data-html" => "true", "data-content" => _('Enter any options that you wish to display. If you want to pre-set one option as selected, check the default box.'))%> @@ -92,7 +92,7 @@
- <%= link_to( image_tag("help_button.png"), "#", class: "default_answer_popover", rel: "popover", "data-html" => "true", "data-content" => _('Anything you enter here will display in the answer box. If you want an answer in a certain format (e.g. tables), you can enter that style here.'))%> + <%= link_to( image_tag("help_button.png"), "#", "data-toggle": "popover", rel: "popover", "data-html" => "true", "data-content" => _('Anything you enter here will display in the answer box. If you want an answer in a certain format (e.g. tables), you can enter that style here.'))%>
@@ -116,7 +116,7 @@ <% end %>
- <%= link_to( image_tag("help_button.png"), "#", class: "suggested_answer_popover", rel: "popover", "data-html" => "true", "data-content" => _('You can add an example or suggested answer to help users respond. These will be presented above the answer box and can be copied/ pasted.'))%> + <%= link_to( image_tag("help_button.png"), "#", "data-toggle": "popover", rel: "popover", "data-html" => "true", "data-content" => _('You can add an example or suggested answer to help users respond. These will be presented above the answer box and can be copied/ pasted.'))%>
@@ -132,7 +132,7 @@ <%= text_area_tag("question-guidance-#{question.id}", guidance_text , class: "tinymce") %>
- <%= link_to( image_tag("help_button.png"), "#", class: "question_guidance_popover", rel: "popover", "data-html" => "true", "data-content" => _("Enter specific guidance to accompany this question. If you have guidance by themes too, this will be pulled in based on your selections below so it's best not to duplicate too much text."))%> + <%= link_to( image_tag("help_button.png"), "#", "data-toggle": "popover", rel: "popover", "data-html" => "true", "data-content" => _("Enter specific guidance to accompany this question. If you have guidance by themes too, this will be pulled in based on your selections below so it's best not to duplicate too much text."))%>
@@ -147,7 +147,7 @@ :id, :title, {prompt: false, include_blank: "None"}, {multiple: true})%>
- <%= link_to( image_tag("help_button.png"), "#", class: "question_themes_popover", rel: "popover", "data-html" => "true", "data-content" => _("

Select themes that are relevant to this question.

This allows your generic institution-level guidance to be drawn in, as well as that from other sources e.g. the %{organisation_abbreviation} or any Schools/Departments that you provide guidance for.

You can select multiple themes by using the CTRL button.

"))%> + <%= link_to( image_tag("help_button.png"), "#", "data-toggle": "popover", rel: "popover", "data-html" => "true", "data-content" => _("

Select themes that are relevant to this question.

This allows your generic institution-level guidance to be drawn in, as well as that from other sources e.g. the %{organisation_abbreviation} or any Schools/Departments that you provide guidance for.

You can select multiple themes by using the CTRL button.

"))%>
diff --git a/app/views/sections/_add_section.html.erb b/app/views/sections/_add_section.html.erb index 4bbed72..93564b8 100644 --- a/app/views/sections/_add_section.html.erb +++ b/app/views/sections/_add_section.html.erb @@ -25,7 +25,8 @@ <%= _('Order of display') %> - <%= f.number_field :number, in: 1..15, class: "number_field has-tooltip", "data-toggle" => "tooltip", title: _('This allows you to order sections.') %> + <% range = @phase.template.customization_of.present? ? 0..15 : 1..15 %> + <%= f.number_field :number, in: range, class: "number_field has-tooltip", "data-toggle" => "tooltip", title: _('This allows you to order sections.') %> @@ -35,7 +36,7 @@ <%= text_area_tag("section-desc", "" , class: "tinymce") %>
- <%= link_to( image_tag("help_button.png"), "#", class: "section_desc_popover", rel: "popover", "data-html" => "true", "data-content" => _("
Enter a basic description. This could be a summary of what is covered in the section or instructions on how to answer. This text will be displayed in the coloured banner once a section is opened to edit.
"))%> + <%= link_to( image_tag("help_button.png"), "#", "data-toggle": "popover", rel: "popover", "data-html" => "true", "data-content" => _("
Enter a basic description. This could be a summary of what is covered in the section or instructions on how to answer. This text will be displayed in the coloured banner once a section is opened to edit.
"))%>
diff --git a/app/views/sections/_edit_section.html.erb b/app/views/sections/_edit_section.html.erb index 2bae777..0fff8f5 100644 --- a/app/views/sections/_edit_section.html.erb +++ b/app/views/sections/_edit_section.html.erb @@ -20,7 +20,7 @@ <%= s.label :description %> <%= text_area_tag("section-desc-#{section.id}", section.description , class: "tinymce") %>
- <%= link_to( image_tag('help_button.png'), '#', class: 'section_desc_popover', rel: "popover", 'data-html' => "true", 'data-content' => _("
Enter a basic description. This could be a summary of what is covered in the section or instructions on how to answer. This text will be displayed in the coloured banner once a section is opened to edit.
"))%> + <%= link_to( image_tag('help_button.png'), '#', "data-toggle": "popover", rel: "popover", 'data-html' => "true", 'data-content' => _("
Enter a basic description. This could be a summary of what is covered in the section or instructions on how to answer. This text will be displayed in the coloured banner once a section is opened to edit.
"))%>
diff --git a/app/views/shared/_register_form.html.erb b/app/views/shared/_register_form.html.erb index 6502ff5..675d540 100644 --- a/app/views/shared/_register_form.html.erb +++ b/app/views/shared/_register_form.html.erb @@ -24,6 +24,18 @@ +
+ <%= collection_select(:user, :org_id, Org.where("parent_id IS NULL").order("sort_name ASC, name ASC"), :id, :name, {include_blank: _('Organisation')}, { :class => 'typeahead org_sign_up', 'data-allow-clear': false }) %> +
+ + <% other_organisations = Org.where("parent_id IS ? AND is_other = ?", nil, true).pluck(:id) %> + +
diff --git a/app/views/templates/_edit_annotations.html.erb b/app/views/templates/_edit_annotations.html.erb index 8273f4d..e69961f 100644 --- a/app/views/templates/_edit_annotations.html.erb +++ b/app/views/templates/_edit_annotations.html.erb @@ -59,7 +59,7 @@ <% end %>
- <%= link_to( image_tag("help_button.png"), "#", class: "suggested_answer_popover", rel: "popover", "data-html" => "true", "data-content" => _('You can add an example or suggested answer to help users respond. These will be presented above the answer box and can be copied/ pasted.'))%> + <%= link_to( image_tag("help_button.png"), "#", "data-toggle": "popover", rel: "popover", "data-html" => "true", "data-content" => _('You can add an example or suggested answer to help users respond. These will be presented above the answer box and can be copied/ pasted.'))%>
@@ -74,7 +74,7 @@ <%= text_area_tag("question-guidance-#{question.id}", question.guidance , class: "tinymce") %>
- <%= link_to( image_tag("help_button.png"), "#", class: "question_guidance_popover", rel: "popover", "data-html" => "true", "data-content" => _("Enter specific guidance to accompany this question. If you have guidance by themes too, this will be pulled in based on your selections below so it's best not to duplicate too much text."))%> + <%= link_to( image_tag("help_button.png"), "#", "data-toggle": "popover", rel: "popover", "data-html" => "true", "data-content" => _("Enter specific guidance to accompany this question. If you have guidance by themes too, this will be pulled in based on your selections below so it's best not to duplicate too much text."))%>
diff --git a/app/views/templates/_edit_template.html.erb b/app/views/templates/_edit_template.html.erb index a660e7b..dab4241 100644 --- a/app/views/templates/_edit_template.html.erb +++ b/app/views/templates/_edit_template.html.erb @@ -15,7 +15,7 @@ <%= text_area_tag("template-desc", template.description, class: "tinymce") %>
- <%= link_to( image_tag('help_button.png'), '#', class: 'template_desc_popover', rel: "popover", 'data-html' => "true", 'data-content' => _('Enter a description that helps you to differentiate between templates e.g. if you have ones for different audiences'))%> + <%= link_to( image_tag('help_button.png'), '#', "data-toggle": "popover", rel: "popover", 'data-html' => "true", 'data-content' => _('Enter a description that helps you to differentiate between templates e.g. if you have ones for different audiences'))%>
diff --git a/app/views/templates/admin_new.html.erb b/app/views/templates/admin_new.html.erb index 02d5cde..0acf208 100644 --- a/app/views/templates/admin_new.html.erb +++ b/app/views/templates/admin_new.html.erb @@ -29,7 +29,7 @@ <%= text_area_tag("template-desc", "", class: "tinymce") %>
- <%= link_to( image_tag("help_button.png"), "#", class: "template_desc_popover", rel: "popover", "data-html" => "true", "data-content" => _("
Enter a description that helps you to differentiate between templates e.g. if you have ones for different audiences.
"))%> + <%= link_to( image_tag("help_button.png"), "#", "data-toggle": "popover", rel: "popover", "data-html" => "true", "data-content" => _("
Enter a description that helps you to differentiate between templates e.g. if you have ones for different audiences.
"))%>
diff --git a/config/locale/app.pot b/config/locale/app.pot index 30adcde..1f6401d 100644 --- a/config/locale/app.pot +++ b/config/locale/app.pot @@ -8,8 +8,8 @@ msgstr "" "Project-Id-Version: app 1.0.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-06-15 12:42+0000\n" -"PO-Revision-Date: 2017-06-15 12:42+0000\n" +"POT-Creation-Date: 2017-06-27 12:05+0000\n" +"PO-Revision-Date: 2017-06-27 12:05+0000\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: \n" @@ -42,9 +42,6 @@ msgid " by" msgstr "" -msgid " by " -msgstr "" - msgid " has been removed by " msgstr "" @@ -186,9 +183,6 @@ msgid "

When you login to %{application_name} you will be directed to the 'My plans' page. From here you can edit, share, export or delete any of your plans. You will also see plans that have been shared with you by others.

Create a plan

To create a plan, click the 'Create plan' button from the 'My plans' page or the top menu. Select options from the drop-down menus and tickboxes to determine what questions and guidance you should be presented with. Confirm your selection by clicking 'Yes, create plan'

Write your plan

The tabbed interface allows you to navigate through different functions when editing your plan.

When viewing any of the question tabs, you will see the different sections of your plan displayed. Click into these in turn to answer the questions. You can format your responses using the text editing buttons.

Guidance is displayed in the right-hand panel. Click the '+' symbol to view this.

Remember to 'save' your responses before moving on.

Share plans

Insert the email address of any collaborators you would like to invite to read or edit your plan. Set the level of permissions you would like to grant them via the drop-down options and click to 'Add collaborator'

Export plans

From here you can download your plan in various formats. This may be useful if you need to submit your plan as part of a grant application. Choose what format you would like to view/download your plan in and click to export. When you login to %{application_name} you will be directed to the 'My plans' page. From here you can edit, share, export or delete any of your plans. You will also see plans that have been shared with you by others.

" msgstr "" -msgid "

You are about to unlink %{application_name} of your institutional credentials, would you like to continue?

" -msgstr "" - msgid "

You can give other people access to your plan here. There are three permission levels.

Add each collaborator in turn by entering their email address below, choosing a permission level and clicking \"Add collaborator\".

Those you invite will receive an email notification that they have access to this plan, inviting them to register with %{application_name} if they don't already have an account. A notification is also issued when a user's permission level is changed.

" msgstr "" @@ -519,9 +513,6 @@ msgid "Edit phase" msgstr "" -msgid "Edit phase details" -msgstr "" - msgid "Edit plan details" msgstr "" @@ -636,6 +627,9 @@ msgid "Guidance" msgstr "" +msgid "Guidance Choices" +msgstr "" + msgid "Guidance choices saved." msgstr "" @@ -1314,9 +1308,6 @@ msgid "This plan is based on:" msgstr "" -msgid "This section is locked for editing by " -msgstr "" - msgid "Title" msgstr "" @@ -1347,12 +1338,6 @@ msgid "Unknown margin. Can only be 'top', 'bottom', 'left' or 'right'" msgstr "" -msgid "Unlink account" -msgstr "" - -msgid "Unlink institutional credentials alert" -msgstr "" - msgid "Unlock my account" msgstr "" @@ -1503,9 +1488,6 @@ msgid "You have un-published changes" msgstr "" -msgid "You have unsaved answers in the following sections:" -msgstr "" - msgid "You must accept the terms and conditions to register." msgstr "" diff --git a/config/locale/de/app.po b/config/locale/de/app.po index b28632b..5e22290 100644 --- a/config/locale/de/app.po +++ b/config/locale/de/app.po @@ -43,9 +43,6 @@ msgid " by" msgstr " von " -msgid " by " -msgstr " von " - #, fuzzy msgid " has been removed by " msgstr " von " @@ -199,9 +196,6 @@ msgid "

When you login to %{application_name} you will be directed to the 'My plans' page. From here you can edit, share, export or delete any of your plans. You will also see plans that have been shared with you by others.

Create a plan

To create a plan, click the 'Create plan' button from the 'My plans' page or the top menu. Select options from the drop-down menus and tickboxes to determine what questions and guidance you should be presented with. Confirm your selection by clicking 'Yes, create plan'

Write your plan

The tabbed interface allows you to navigate through different functions when editing your plan.

When viewing any of the question tabs, you will see the different sections of your plan displayed. Click into these in turn to answer the questions. You can format your responses using the text editing buttons.

Guidance is displayed in the right-hand panel. Click the '+' symbol to view this.

Remember to 'save' your responses before moving on.

Share plans

Insert the email address of any collaborators you would like to invite to read or edit your plan. Set the level of permissions you would like to grant them via the drop-down options and click to 'Add collaborator'

Export plans

From here you can download your plan in various formats. This may be useful if you need to submit your plan as part of a grant application. Choose what format you would like to view/download your plan in and click to export. When you login to %{application_name} you will be directed to the 'My plans' page. From here you can edit, share, export or delete any of your plans. You will also see plans that have been shared with you by others.

" msgstr "

Nach der Anmeldung in DMPonline werden sie zur 'Meine Pläne'-Seite weitergeleitet. Dies ist der Startpunkt, um ihre Pläne zu Edieren, zu Teilen oder zu löschen. Sie sehen außerdem, welche Pläne sie mit anderen geteilt haben.

Pläne erstellen

Um einen Plan zu erstellen, klicken sie auf den 'Plan erstellen'-Knopf auf der 'Meine Pläne'-Seite, oder im Hauptmenü. Wählen sie die passenden Optionen in den Ausklappmenüs und Auswahlboxen aus, um zu bestimmen, welche Fragen und Hilfestellungen ihnen angezeigt werden sollen. Bestätigen sie ihre Auswahl durch das Klicken von 'Ja, Plan erstellen'.

Pläne schreiben

Die Reiter der Benutzerschnittstelle erlauben ihnen durch die verschiedenen Bereiche zu navigieren wenn sie ihren Plan bearbeiten.

In den Fragereitern sind die verschiedenen Abschnitte ihres Plans dargestellt, die sich durch anklicken zur Bearbeitung auswählen lassen. Die Antworttexte können mit den Textbearbeitungsknöpfen formatiert werden.

Hilfestellungen werden rechts von den Fragen durch klicken des '+'-Symbols angezeigt.

Bitte vergessen sie nicht ihre Antworten zu speichern, bevor sie die Seite verlassen.

Pläne teilen

Geben sie die E-Mail-Adresse der Person an, die ihren Plan lesen oder bearbeiten können sollen. Mithilfe des Ausklappmenüs können sie die Befugnisse, die die Person im Bezug auf den Plan haben soll, auswählen. Klicken sie abschließend auf 'Mitarbeitende(n) hinzufügen'.

Pläne exportieren

Wählen sie das Dateiformat aus, in das sie ihren Plan exportieren möchten und klicken sie 'Export'. Unterhalb des Dialogs können sie durch klicken auf das '+'-Symbol detaillierte Einstellungen zum Export vornehmen.

" -msgid "

You are about to unlink %{application_name} of your institutional credentials, would you like to continue?

" -msgstr "

You are about to unlink DMP Builder of your institutional credentials, would you like to continue?

" - #, fuzzy msgid "

You can give other people access to your plan here. There are three permission levels.

Add each collaborator in turn by entering their email address below, choosing a permission level and clicking \"Add collaborator\".

Those you invite will receive an email notification that they have access to this plan, inviting them to register with %{application_name} if they don't already have an account. A notification is also issued when a user's permission level is changed.

" msgstr "

Sie können anderen Zugriff zu Ihren Plan gewähren. Es gibt hierbei drei Abstufungen des Zugriffs.

Neue Mitarbeitende können durch die Angabe ihrer E-Mail-Adresse und das Wählen des Zugriffsrechts hinzugefugt werden. Bestätigen Sie Ihre Angaben mit 'Mitarbeitende(n) hinzufügen'

Eingeladene Mitarbeitende erhalten eine E-Mail, die sie darüber informiert, dass sie Zugriff zu Ihrem Plan erhalten haben; sofern Mitarbeitende noch nicht bei DMPonline registriert sind, erhalten sie eine Einladung zur Registrierung. Wenn die Zugriffsrechte geändert werden wird ebenfalls eine Benachrichtigungs-E-Mail versand.

" @@ -556,9 +550,6 @@ msgid "Edit phase" msgstr "Phase bearbeiten" -msgid "Edit phase details" -msgstr "Details der Phase bearbeiten" - msgid "Edit plan details" msgstr "Plandetails bearbeiten" @@ -680,6 +671,10 @@ msgstr "Hilfestellung" #, fuzzy +msgid "Guidance Choices" +msgstr "Hilfestellung" + +#, fuzzy msgid "Guidance choices saved." msgstr "Hilfestellung" @@ -1385,9 +1380,6 @@ msgid "This plan is based on:" msgstr "Dieser Plan basiert auf:" -msgid "This section is locked for editing by " -msgstr "Dieser Abschnitt ist gespert wegen Bearbeitung durch " - msgid "Title" msgstr "Titel" @@ -1419,12 +1411,6 @@ msgid "Unknown margin. Can only be 'top', 'bottom', 'left' or 'right'" msgstr "Unbekannter Rand. Kann nur 'oben', 'unten', 'links' oder 'rechts' sein" -msgid "Unlink account" -msgstr "Trenne Zugang" - -msgid "Unlink institutional credentials alert" -msgstr "Unlink institutional credentials alert" - msgid "Unlock my account" msgstr "Unlock my account" @@ -1590,11 +1576,6 @@ msgid "You have un-published changes" msgstr "" -#, fuzzy -msgid "You have unsaved answers in the following sections:" -msgstr "" -"You have unsaved answers in the following sections:\n" - msgid "You must accept the terms and conditions to register." msgstr "" diff --git a/config/locale/domain.pot b/config/locale/domain.pot new file mode 100644 index 0000000..3069d0f --- /dev/null +++ b/config/locale/domain.pot @@ -0,0 +1,3 @@ +# Some descriptive title +msgid "" +msgstr "" \ No newline at end of file diff --git a/config/locale/en_GB/app.po b/config/locale/en_GB/app.po index 0d6a6e3..50e9e8e 100644 --- a/config/locale/en_GB/app.po +++ b/config/locale/en_GB/app.po @@ -44,9 +44,6 @@ msgid " by" msgstr " by" -msgid " by " -msgstr " by " - msgid " has been removed by " msgstr " has been removed by " @@ -194,9 +191,6 @@ msgid "

When you login to %{application_name} you will be directed to the 'My plans' page. From here you can edit, share, export or delete any of your plans. You will also see plans that have been shared with you by others.

Create a plan

To create a plan, click the 'Create plan' button from the 'My plans' page or the top menu. Select options from the drop-down menus and tickboxes to determine what questions and guidance you should be presented with. Confirm your selection by clicking 'Yes, create plan'

Write your plan

The tabbed interface allows you to navigate through different functions when editing your plan.

When viewing any of the question tabs, you will see the different sections of your plan displayed. Click into these in turn to answer the questions. You can format your responses using the text editing buttons.

Guidance is displayed in the right-hand panel. Click the '+' symbol to view this.

Remember to 'save' your responses before moving on.

Share plans

Insert the email address of any collaborators you would like to invite to read or edit your plan. Set the level of permissions you would like to grant them via the drop-down options and click to 'Add collaborator'

Export plans

From here you can download your plan in various formats. This may be useful if you need to submit your plan as part of a grant application. Choose what format you would like to view/download your plan in and click to export. When you login to %{application_name} you will be directed to the 'My plans' page. From here you can edit, share, export or delete any of your plans. You will also see plans that have been shared with you by others.

" msgstr "

When you login to %{application_name} you will be directed to the 'My plans' page. From here you can edit, share, export or delete any of your plans. You will also see plans that have been shared with you by others.

Create a plan

To create a plan, click the 'Create plan' button from the 'My plans' page or the top menu. Select options from the drop-down menus and tickboxes to determine what questions and guidance you should be presented with. Confirm your selection by clicking 'Yes, create plan'

Write your plan

The tabbed interface allows you to navigate through different functions when editing your plan.

When viewing any of the question tabs, you will see the different sections of your plan displayed. Click into these in turn to answer the questions. You can format your responses using the text editing buttons.

Guidance is displayed in the right-hand panel. Click the '+' symbol to view this.

Remember to 'save' your responses before moving on.

Share plans

Insert the email address of any collaborators you would like to invite to read or edit your plan. Set the level of permissions you would like to grant them via the drop-down options and click to 'Add collaborator'

Export plans

From here you can download your plan in various formats. This may be useful if you need to submit your plan as part of a grant application. Choose what format you would like to view/download your plan in and click to export. When you login to %{application_name} you will be directed to the 'My plans' page. From here you can edit, share, export or delete any of your plans. You will also see plans that have been shared with you by others.

" -msgid "

You are about to unlink %{application_name} of your institutional credentials, would you like to continue?

" -msgstr "

You are about to unlink %{application_name} of your institutional credentials, would you like to continue?

" - msgid "

You can give other people access to your plan here. There are three permission levels.

Add each collaborator in turn by entering their email address below, choosing a permission level and clicking \"Add collaborator\".

Those you invite will receive an email notification that they have access to this plan, inviting them to register with %{application_name} if they don't already have an account. A notification is also issued when a user's permission level is changed.

" msgstr "

You can give other people access to your plan here. There are three permission levels.

Add each collaborator in turn by entering their email address below, choosing a permission level and clicking \"Add collaborator\".

Those you invite will receive an email notification that they have access to this plan, inviting them to register with %{application_name} if they don't already have an account. A notification is also issued when a user's permission level is changed.

" @@ -540,9 +534,6 @@ msgid "Edit phase" msgstr "Edit phase" -msgid "Edit phase details" -msgstr "Edit phase details" - msgid "Edit plan details" msgstr "Edit plan details" @@ -662,6 +653,10 @@ msgstr "Guidance" #, fuzzy +msgid "Guidance Choices" +msgstr "Guidance" + +#, fuzzy msgid "Guidance choices saved." msgstr "Guidance" @@ -1363,9 +1358,6 @@ msgid "This plan is based on:" msgstr "This plan is based on:" -msgid "This section is locked for editing by " -msgstr "This section is locked for editing by " - msgid "Title" msgstr "Title" @@ -1396,12 +1388,6 @@ msgid "Unknown margin. Can only be 'top', 'bottom', 'left' or 'right'" msgstr "Unknown margin. Can only be 'top', 'bottom', 'left' or 'right'" -msgid "Unlink account" -msgstr "Unlink account" - -msgid "Unlink institutional credentials alert" -msgstr "Unlink institutional credentials alert" - msgid "Unlock my account" msgstr "Unlock my account" @@ -1561,9 +1547,6 @@ msgid "You have un-published changes" msgstr "" -msgid "You have unsaved answers in the following sections:" -msgstr "" - msgid "You must accept the terms and conditions to register." msgstr "You must accept the terms and conditions to register." diff --git a/config/locale/en_US/app.po b/config/locale/en_US/app.po index d1e5e4e..0f7a346 100644 --- a/config/locale/en_US/app.po +++ b/config/locale/en_US/app.po @@ -44,9 +44,6 @@ msgid " by" msgstr " by" -msgid " by " -msgstr " by " - msgid " has been removed by " msgstr " has been removed by " @@ -194,9 +191,6 @@ msgid "

When you login to %{application_name} you will be directed to the 'My plans' page. From here you can edit, share, export or delete any of your plans. You will also see plans that have been shared with you by others.

Create a plan

To create a plan, click the 'Create plan' button from the 'My plans' page or the top menu. Select options from the drop-down menus and tickboxes to determine what questions and guidance you should be presented with. Confirm your selection by clicking 'Yes, create plan'

Write your plan

The tabbed interface allows you to navigate through different functions when editing your plan.

When viewing any of the question tabs, you will see the different sections of your plan displayed. Click into these in turn to answer the questions. You can format your responses using the text editing buttons.

Guidance is displayed in the right-hand panel. Click the '+' symbol to view this.

Remember to 'save' your responses before moving on.

Share plans

Insert the email address of any collaborators you would like to invite to read or edit your plan. Set the level of permissions you would like to grant them via the drop-down options and click to 'Add collaborator'

Export plans

From here you can download your plan in various formats. This may be useful if you need to submit your plan as part of a grant application. Choose what format you would like to view/download your plan in and click to export. When you login to %{application_name} you will be directed to the 'My plans' page. From here you can edit, share, export or delete any of your plans. You will also see plans that have been shared with you by others.

" msgstr "

When you login to %{application_name} you will be directed to the 'My plans' page. From here you can edit, share, export or delete any of your plans. You will also see plans that have been shared with you by others.

Create a plan

To create a plan, click the 'Create plan' button from the 'My plans' page or the top menu. Select options from the drop-down menus and tickboxes to determine what questions and guidance you should be presented with. Confirm your selection by clicking 'Yes, create plan'

Write your plan

The tabbed interface allows you to navigate through different functions when editing your plan.

When viewing any of the question tabs, you will see the different sections of your plan displayed. Click into these in turn to answer the questions. You can format your responses using the text editing buttons.

Guidance is displayed in the right-hand panel. Click the '+' symbol to view this.

Remember to 'save' your responses before moving on.

Share plans

Insert the email address of any collaborators you would like to invite to read or edit your plan. Set the level of permissions you would like to grant them via the drop-down options and click to 'Add collaborator'

Export plans

From here you can download your plan in various formats. This may be useful if you need to submit your plan as part of a grant application. Choose what format you would like to view/download your plan in and click to export. When you login to %{application_name} you will be directed to the 'My plans' page. From here you can edit, share, export or delete any of your plans. You will also see plans that have been shared with you by others.

" -msgid "

You are about to unlink %{application_name} of your institutional credentials, would you like to continue?

" -msgstr "

You are about to unlink %{application_name} of your institutional credentials, would you like to continue?

" - msgid "

You can give other people access to your plan here. There are three permission levels.

Add each collaborator in turn by entering their email address below, choosing a permission level and clicking \"Add collaborator\".

Those you invite will receive an email notification that they have access to this plan, inviting them to register with %{application_name} if they don't already have an account. A notification is also issued when a user's permission level is changed.

" msgstr "

You can give other people access to your plan here. There are three permission levels.

Add each collaborator in turn by entering their email address below, choosing a permission level and clicking \"Add collaborator\".

Those you invite will receive an email notification that they have access to this plan, inviting them to register with %{application_name} if they don't already have an account. A notification is also issued when a user's permission level is changed.

" @@ -540,9 +534,6 @@ msgid "Edit phase" msgstr "Edit phase" -msgid "Edit phase details" -msgstr "Edit phase details" - msgid "Edit plan details" msgstr "Edit plan details" @@ -662,6 +653,10 @@ msgstr "Guidance" #, fuzzy +msgid "Guidance Choices" +msgstr "Guidance" + +#, fuzzy msgid "Guidance choices saved." msgstr "Guidance" @@ -1363,9 +1358,6 @@ msgid "This plan is based on:" msgstr "This plan is based on:" -msgid "This section is locked for editing by " -msgstr "This section is locked for editing by " - msgid "Title" msgstr "Title" @@ -1396,12 +1388,6 @@ msgid "Unknown margin. Can only be 'top', 'bottom', 'left' or 'right'" msgstr "Unknown margin. Can only be 'top', 'bottom', 'left' or 'right'" -msgid "Unlink account" -msgstr "Unlink account" - -msgid "Unlink institutional credentials alert" -msgstr "Unlink institutional credentials alert" - msgid "Unlock my account" msgstr "Unlock my account" @@ -1561,9 +1547,6 @@ msgid "You have un-published changes" msgstr "" -msgid "You have unsaved answers in the following sections:" -msgstr "" - msgid "You must accept the terms and conditions to register." msgstr "You must accept the terms and conditions to register." diff --git a/config/locale/es/app.po b/config/locale/es/app.po index c921f5c..ffda90d 100644 --- a/config/locale/es/app.po +++ b/config/locale/es/app.po @@ -43,9 +43,6 @@ msgid " by" msgstr " por " -msgid " by " -msgstr " por " - #, fuzzy msgid " has been removed by " msgstr " por " @@ -196,9 +193,6 @@ msgid "

When you login to %{application_name} you will be directed to the 'My plans' page. From here you can edit, share, export or delete any of your plans. You will also see plans that have been shared with you by others.

Create a plan

To create a plan, click the 'Create plan' button from the 'My plans' page or the top menu. Select options from the drop-down menus and tickboxes to determine what questions and guidance you should be presented with. Confirm your selection by clicking 'Yes, create plan'

Write your plan

The tabbed interface allows you to navigate through different functions when editing your plan.

When viewing any of the question tabs, you will see the different sections of your plan displayed. Click into these in turn to answer the questions. You can format your responses using the text editing buttons.

Guidance is displayed in the right-hand panel. Click the '+' symbol to view this.

Remember to 'save' your responses before moving on.

Share plans

Insert the email address of any collaborators you would like to invite to read or edit your plan. Set the level of permissions you would like to grant them via the drop-down options and click to 'Add collaborator'

Export plans

From here you can download your plan in various formats. This may be useful if you need to submit your plan as part of a grant application. Choose what format you would like to view/download your plan in and click to export. When you login to %{application_name} you will be directed to the 'My plans' page. From here you can edit, share, export or delete any of your plans. You will also see plans that have been shared with you by others.

" msgstr "" -msgid "

You are about to unlink %{application_name} of your institutional credentials, would you like to continue?

" -msgstr "

Va a desvincular DMPonline de las credenciales de su institución, ¿Quiere continuar?

" - #, fuzzy msgid "

You can give other people access to your plan here. There are three permission levels.

Add each collaborator in turn by entering their email address below, choosing a permission level and clicking \"Add collaborator\".

Those you invite will receive an email notification that they have access to this plan, inviting them to register with %{application_name} if they don't already have an account. A notification is also issued when a user's permission level is changed.

" msgstr "

Aquí puede dar a otras personas acceso a su plan. Hay tres niveles de permiso.

Añada cada colaborador individualmente introduciendo su dirección de correo electrónico, seleccionando un nivel de permiso y haciendo clic en \"Añadir colaborador\".

Aquellos a quienes invite recibirán un aviso por correo electrónico indicando que tienen acceso al plan e invitándoles a registrarse en DMPonline si no tienen ya una cuenta. También se envia un aviso si se cambia el nivel de permiso de un usuario.

" @@ -552,9 +546,6 @@ msgid "Edit phase" msgstr "Editar fase" -msgid "Edit phase details" -msgstr "Editar los detalles de las fase" - msgid "Edit plan details" msgstr "Editar los detalles del plan" @@ -676,6 +667,10 @@ msgstr "Guía" #, fuzzy +msgid "Guidance Choices" +msgstr "Guía" + +#, fuzzy msgid "Guidance choices saved." msgstr "Guía" @@ -1378,9 +1373,6 @@ msgid "This plan is based on:" msgstr "Este plan está basado en:" -msgid "This section is locked for editing by " -msgstr "Esta sección está bloqueda para su edición por " - msgid "Title" msgstr "Título" @@ -1412,12 +1404,6 @@ msgid "Unknown margin. Can only be 'top', 'bottom', 'left' or 'right'" msgstr "Margen desconocido. Sólo puede ser 'superior', 'inferior', 'izquierdo' or 'derecho'" -msgid "Unlink account" -msgstr "Desvincular cuenta" - -msgid "Unlink institutional credentials alert" -msgstr "Desvincule las alertas relacionadas con las credenciales de su institución" - msgid "Unlock my account" msgstr "" @@ -1583,9 +1569,6 @@ msgid "You have un-published changes" msgstr "" -msgid "You have unsaved answers in the following sections:" -msgstr "" - msgid "You must accept the terms and conditions to register." msgstr "" diff --git a/config/locale/fr/app.po b/config/locale/fr/app.po index 26cbc38..d7706f1 100644 --- a/config/locale/fr/app.po +++ b/config/locale/fr/app.po @@ -43,9 +43,6 @@ msgid " by" msgstr " par " -msgid " by " -msgstr " par " - #, fuzzy msgid " has been removed by " msgstr " par " @@ -195,9 +192,6 @@ msgid "

When you login to %{application_name} you will be directed to the 'My plans' page. From here you can edit, share, export or delete any of your plans. You will also see plans that have been shared with you by others.

Create a plan

To create a plan, click the 'Create plan' button from the 'My plans' page or the top menu. Select options from the drop-down menus and tickboxes to determine what questions and guidance you should be presented with. Confirm your selection by clicking 'Yes, create plan'

Write your plan

The tabbed interface allows you to navigate through different functions when editing your plan.

When viewing any of the question tabs, you will see the different sections of your plan displayed. Click into these in turn to answer the questions. You can format your responses using the text editing buttons.

Guidance is displayed in the right-hand panel. Click the '+' symbol to view this.

Remember to 'save' your responses before moving on.

Share plans

Insert the email address of any collaborators you would like to invite to read or edit your plan. Set the level of permissions you would like to grant them via the drop-down options and click to 'Add collaborator'

Export plans

From here you can download your plan in various formats. This may be useful if you need to submit your plan as part of a grant application. Choose what format you would like to view/download your plan in and click to export. When you login to %{application_name} you will be directed to the 'My plans' page. From here you can edit, share, export or delete any of your plans. You will also see plans that have been shared with you by others.

" msgstr "

Lorsque vous vous connectez à l'Assistant PGD, vous serez dirigé vers la page « Mes plans ». À partir de cette page, vous pouvez modifier, partager, exporter ou supprimer l'un ou l'autre de vos plans. Vous verrez également les plans qui ont été partagés avec vous par d'autres personnes.

Créer un plan

Pour créer un plan, cliquez sur le bouton « Créer un plan » à la page « Mes plans » ou dans le menu du haut. Faites des choix dans les listes déroulantes et les cases à cocher afin de déterminer les questions et les directives qui seront affichées. Confirmez votre choix en cliquant sur « Oui, créer un plan ».

Rédiger votre plan

L'interface à onglets vous permet de naviguer dans diverses fonctions lorsque vous mettez au point votre plan.

Lorsque vous consultez l'un ou l'autre des onglets de questions, vous verrez les différentes sections de votre plan affichées. Cliquez sur ces onglets à tour de rôle pour répondre aux questions. Vous pouvez choisir le format de vos réponses à l'aide des boutons de mise en forme.

Les directives sont affichées dans la partie de droite. Cliquez sur le symbole « + » pour les consulter.

N'oubliez pas d'enregistrer vos réponses avant de poursuivre.

Partager les plans

Inscrivez l'adresse électronique de tout collaborateur que vous aimeriez inviter à lire ou à modifier votre plan. Choisissez le niveau d'autorisation que vous souhaitez lui accorder dans les options de la liste déroulante et cliquez sur « Ajouter un collaborateur ».

Exporter les plans

En choisissant cette option, vous pouvez télécharger votre plan en divers formats, ce qui peut être utile si vous devez joindre votre plan à une demande de subvention. Choisissez le format dans lequel vous aimeriez voir ou télécharger votre plan et cliquez pour l'exporter. Lorsque vous vous connectez à l'Assistant PGD, vous êtes dirigé vers la page « Mes plans ». À partir de cette page, vous pouvez modifier, partager, exporter ou supprimer l'un ou l'autre de vos plans. Vous voyez également les plans qui ont été partagés avec vous par d'autres personnes.

" -msgid "

You are about to unlink %{application_name} of your institutional credentials, would you like to continue?

" -msgstr "

Vous allez détacher DMPonline de votre authentfiant détablissement, voulez-vous continuer ?

" - #, fuzzy msgid "

You can give other people access to your plan here. There are three permission levels.

Add each collaborator in turn by entering their email address below, choosing a permission level and clicking \"Add collaborator\".

Those you invite will receive an email notification that they have access to this plan, inviting them to register with %{application_name} if they don't already have an account. A notification is also issued when a user's permission level is changed.

" msgstr "

À ce niveau, vous pouvez donner accès à votre plan à dautres personnes. Trois niveaux dautorisation sont possibles.

Ajoutez chacun des collaborateurs en saisissant leurs courriels lun après lautre, en choisissant un niveau dautorisation et en cliquant sur \"Ajouter le collaborateur\".

Ceux qui sont invités recevront un avis par courriel leur indiquant quils ont accès à ce plan, invitant ceux qui nont pas de compte dans DMPonline à senregistrer. Lutilisateur reçoit aussi un avis quand ces droits sont changés.

" @@ -550,9 +544,6 @@ msgid "Edit phase" msgstr "Modifier la phase" -msgid "Edit phase details" -msgstr "Modifiez les détails de la phase" - msgid "Edit plan details" msgstr "Modifier des détails du plan" @@ -674,6 +665,10 @@ msgstr "Conseils" #, fuzzy +msgid "Guidance Choices" +msgstr "Conseils" + +#, fuzzy msgid "Guidance choices saved." msgstr "Conseils" @@ -1375,9 +1370,6 @@ msgid "This plan is based on:" msgstr "Ce plan sinspire de :" -msgid "This section is locked for editing by " -msgstr "La modification de cette section a été verrouillée par " - msgid "Title" msgstr "Titre" @@ -1409,12 +1401,6 @@ msgid "Unknown margin. Can only be 'top', 'bottom', 'left' or 'right'" msgstr "Marge inconnue. Seules marges possibles : Haut, Bas, Gauche et Droite" -msgid "Unlink account" -msgstr "Délier le compte" - -msgid "Unlink institutional credentials alert" -msgstr "Alerte de détachement dauthentifiant détablissement" - msgid "Unlock my account" msgstr "" @@ -1580,9 +1566,6 @@ msgid "You have un-published changes" msgstr "" -msgid "You have unsaved answers in the following sections:" -msgstr "" - msgid "You must accept the terms and conditions to register." msgstr "" diff --git a/config/tinymce.yml b/config/tinymce.yml index 8002f2e..ce9069d 100644 --- a/config/tinymce.yml +++ b/config/tinymce.yml @@ -7,6 +7,8 @@ - autoresize - link - paste + - advlist +advlist_bullet_styles: "circle,disc,square" #only disc bullets display on htmltoword target_list: false autoresize_min_height: 130 autoresize_bottom_margin: 10 diff --git a/lib/assets/javascripts/views/shared/register_form.js b/lib/assets/javascripts/views/shared/register_form.js index 8968c7b..e55917a 100644 --- a/lib/assets/javascripts/views/shared/register_form.js +++ b/lib/assets/javascripts/views/shared/register_form.js @@ -25,6 +25,28 @@ var typ = $("form.register-form #user_password").attr('type'); $("form.register-form #user_password").attr('type', (typ === 'password' ? 'text' : 'password')); }); + + $('#user_org_id').on("change", function(e) { + e.preventDefault(); + var selected_org = $(this).select2("val"); + var other_orgs = $("#other-org-name").attr("data-orgs").split(","); + var index = $.inArray(selected_org, other_orgs); + if (index > -1) { + $("#other-org-name").show(); + $("#user_other_organisation").focus(); + } + else { + $("#other-org-name").hide(); + $("#user_other_organisation").val(""); + } + }); + $("#other-org-link > a").click(function(e){ + e.preventDefault(); + var other_org = $("#other-org-name").attr("data-orgs").split(","); + $("#user_org_id").select2("val", other_org); + $("#user_org_id").change(); + //$("#other-org-link").hide(); + }); // Run the validations in case the page was refreshed toggleInputError($("form.register-form #user_email"),