.appendTo($linkSection);
$("<div>")
- .attr("class", "form-row")
+ .attr("class", "standard-form-row")
.appendTo($form)
.append(
$("<label>")
});
$("<div>")
- .attr("class", "form-row share-tab")
+ .attr("class", "standard-form-row share-tab")
.css("display", "block")
.appendTo($form)
.append($("<input>")
.on("click", select));
$("<div>")
- .attr("class", "form-row share-tab")
+ .attr("class", "standard-form-row share-tab")
.appendTo($form)
.append($("<input>")
.attr("id", "short_input")
.on("click", select));
$("<div>")
- .attr("class", "form-row share-tab")
+ .attr("class", "standard-form-row share-tab")
.appendTo($form)
.append(
$("<textarea>")
.appendTo($imageSection);
$("<div>")
- .attr("class", "form-row")
+ .attr("class", "standard-form-row")
.appendTo($form)
.append(
$("<label>")
.append(I18n.t("javascripts.share.custom_dimensions")));
$("<div>")
- .attr("class", "form-row")
+ .attr("class", "standard-form-row")
.appendTo($form)
.append(
$("<label>")
.append($("<option>").val("pdf").text("PDF")));
$("<div>")
- .attr("class", "form-row")
+ .attr("class", "standard-form-row")
.appendTo($form)
.append($("<label>")
.attr("for", "mapnik_scale")
/* Rules for the edit trace form */
.edit_trace {
- .form-row p {
+ .standard-form-row p {
margin-bottom: 0px;
}
padding-top: $lineheight;
border-top: 1px solid $lightgrey;
}
- .horizontal-list .form-row {
+ .horizontal-list .standard-form-row {
float: left;
padding-right: 10px;
}
- .form-row {
+ .standard-form-row {
margin-bottom: $lineheight/2;
}
.form-list {
<div class="diary_entry standard-form">
<fieldset>
- <div class='form-row'>
+ <div class='standard-form-row'>
<label class="standard-label"><%= t ".subject" -%></label>
<%= f.text_field :title, :class => "richtext_title" %>
</div>
- <div class='form-row'>
+ <div class='standard-form-row'>
<label class="standard-label"><%= t ".body" -%></label>
<%= richtext_area :diary_entry, :body, :cols => 80, :rows => 20, :format => @diary_entry.body_format %>
</div>
- <div class='form-row'>
+ <div class='standard-form-row'>
<label class="standard-label"><%= t ".language" -%></label>
<%= f.collection_select :language_code, Language.order(:english_name), :code, :name %>
</div>
<fieldset class='location'>
<label class="standard-label"><%= t ".location" -%></label>
<%= content_tag "div", "", :id => "map", :data => { :lat => @lat, :lon => @lon, :zoom => @zoom } %>
- <div class='form-row clearfix'>
+ <div class='standard-form-row clearfix'>
<div class='form-column'>
<label class="secondary standard-label"><%= t ".latitude" -%></label>
<%= f.text_field :latitude, :size => 20, :id => "latitude" %>
<%= form_for @message, :html => { :class => "standard-form" } do |f| %>
<%= hidden_field_tag :display_name, @message.recipient.display_name %>
<fieldset>
- <div class='form-row'>
+ <div class='standard-form-row'>
<label class="standard-label" for="message_title"><%= t ".subject" %></label>
<%= f.text_field :title, :size => 60, :class => "richtext_title" %>
</div>
- <div class='form-row'>
+ <div class='standard-form-row'>
<label class="standard-label" for="message_body"><%= t ".body" %></label>
<%= richtext_area :message, :body, :cols => 80, :rows => 20 %>
</div>
<div class='standard-form'>
<fieldset>
- <div class="form-row">
+ <div class="standard-form-row">
<label class='standard-label' for="client_application_name"><%= t ".name" %> (<%= t ".required" %>)</label>
<%= f.text_field :name %>
</div>
- <div class="form-row">
+ <div class="standard-form-row">
<label class='standard-label' for="client_application_url"><%= t ".url" %> (<%= t ".required" %>)</label>
<%= f.text_field :url %>
</div>
- <div class="form-row">
+ <div class="standard-form-row">
<label class='standard-label' for="client_application_callback_url"><%= t ".callback_url" %></label>
<%= f.text_field :callback_url %>
</div>
- <div class="form-row">
+ <div class="standard-form-row">
<label class='standard-label' for="client_application_support_url"><%= t ".support_url" %></label>
<%= f.text_field :support_url %>
</div>
<fieldset class='form-divider'>
<p><%= t ".requests" %></p>
<% ClientApplication.all_permissions.each do |perm| %>
- <div class="form-row">
+ <div class="standard-form-row">
<%= f.check_box perm %>
<label class='standard-label' for="client_application_<%= perm.to_s %>"><%= t("." + perm.to_s) %></label>
</div>
<%= issue_form.hidden_field :reportable_type %>
<% end %>
- <div class='form-row'>
+ <div class='standard-form-row'>
<p><%= t(".select") %></p>
<ul>
<% Report.categories_for(@report.issue.reportable).each do |c| %>
</ul>
</div>
- <div class='form-row'>
+ <div class='standard-form-row'>
<%= text_area :report, :details, :cols => 20, :rows => 5, :placeholder => t(".details") %>
</div>
<div id='edit-trace-form' class='standard-form'>
<fieldset>
- <div class='form-row'>
+ <div class='standard-form-row'>
<label class='standard-label'><%= t ".filename" %></label>
<p class='deemphasize'><%= @trace.name %> (<%= link_to t(".download"), trace_data_path(@trace) %>)</p>
</div>
- <div class='form-row'>
+ <div class='standard-form-row'>
<label class='standard-label'><%= t ".uploaded_at" %></label>
<p class='deemphasize'><%= l @trace.timestamp, :format => :friendly %></p>
</div>
<% if @trace.inserted? %>
- <div class='form-row'>
+ <div class='standard-form-row'>
<label class='standard-label'><%= t ".points" %></label>
<p class='deemphasize'><%= @trace.size.to_s.gsub(/(\d)(?=(\d{3})+$)/, '\1,') %></p>
</div>
- <div class='form-row'>
+ <div class='standard-form-row'>
<label class='standard-label'><%= t ".start_coord" %></label>
</div>
<div class="geo">
</div>
(<%= link_to t(".map"), :controller => "site", :action => "index", :anchor => "map=14/#{@trace.latitude}/#{@trace.longitude}" %> / <%= link_to t(".edit"), :controller => "site", :action => "edit", :gpx => @trace.id, :anchor => "map=14/#{@trace.latitude}/#{@trace.longitude}" %>)
<% end %>
- <div class='form-row'>
+ <div class='standard-form-row'>
<label class='standard-label'><%= t ".owner" %></label>
<p class='deemphasize'><%= link_to h(@trace.user.display_name), user_path(@trace.user) %></p>
</div>
- <div class='form-row'>
+ <div class='standard-form-row'>
<label class='standard-label'><%= t ".description" %></label>
<%= f.text_field :description %>
</div>
- <div class='form-row'>
+ <div class='standard-form-row'>
<label class='standard-label'><%= t ".tags" %></label>
<%= f.text_field :tagstring %> (<%= t ".tags_help" %>)
</div>
- <div class='form-row'>
+ <div class='standard-form-row'>
<label class='standard-label'><%= t ".visibility" %></label>
<%= f.select :visibility, [[t("traces.visibility.private"), "private"], [t("traces.visibility.public"), "public"], [t("traces.visibility.trackable"), "trackable"], [t("traces.visibility.identifiable"), "identifiable"]] %> (<a href="<%= t ".visibility_help_url" %>"><%= t ".visibility_help" %></a>)
</div>
<%= form_for @trace, :url => { :action => "create" }, :html => { :multipart => true } do |f| %>
<div class="standard-form">
<fieldset>
- <div class='form-row'>
+ <div class='standard-form-row'>
<label for="trace_gpx_file" class="standard-label"><%= t ".upload_gpx" %></label>
<%= f.file_field :gpx_file %>
</div>
- <div class='form-row'>
+ <div class='standard-form-row'>
<label class="standard-label"><%= t ".description" %></label>
<%= f.text_field :description %>
</div>
- <div class='form-row'>
+ <div class='standard-form-row'>
<label class="standard-label"><%= t ".tags" %></label>
<%= f.text_field :tagstring %>
<span class="form-help deemphasize">(<%= t ".tags_help" %>)</span>
</div>
- <div class='form-row'>
+ <div class='standard-form-row'>
<label class="standard-label"><%= t ".visibility" %></label>
<%= f.select :visibility, [[t("traces.visibility.private"), "private"], [t("traces.visibility.public"), "public"], [t("traces.visibility.trackable"), "trackable"], [t("traces.visibility.identifiable"), "identifiable"]] %>
<span class="form-help deemphasize">(<a href="<%= t ".visibility_help_url" %>"><%= t ".visibility_help" %></a>)</span>
<%= error_messages_for current_user %>
<%= form_for current_user, :url => { :action => :account }, :method => :post, :html => { :multipart => true, :id => "accountForm", :class => "standard-form", :autocomplete => :off } do |f| %>
<fieldset>
- <div class="form-row">
+ <div class="standard-form-row">
<label class="standard-label"><%= t "users.new.display name" %></label>
<%= f.text_field :display_name %>
</div>
</fieldset>
<fieldset>
- <div class="form-row">
+ <div class="standard-form-row">
<label class="standard-label"><%= t ".current email address" %></label>
<input type="email" disabled value="<%= current_user.email %>" />
<span class="form-help deemphasize"><%= t ".email never displayed publicly" %></span>
</div>
- <div class="form-row">
+ <div class="standard-form-row">
<label class="standard-label"><%= t ".new email address" %></label>
<%= f.email_field :new_email, :autocomplete => :off %>
<span class="form-help deemphasize"><%= t ".email never displayed publicly" %></span>
</fieldset>
<fieldset>
- <div class="form-row">
+ <div class="standard-form-row">
<label class="standard-label"><%= t "users.new.password" %></label>
<%= f.password_field :pass_crypt, :value => "", :autocomplete => :off %>
</div>
- <div class="form-row">
+ <div class="standard-form-row">
<label class="standard-label"><%= t "users.new.confirm password" %></label>
<%= f.password_field :pass_crypt_confirmation, :value => "", :autocomplete => :off %>
</div>
</fieldset>
<fieldset>
- <div class="form-row">
+ <div class="standard-form-row">
<label class="standard-label"><%= t ".external auth" %></label>
<%= f.select :auth_provider, Auth::PROVIDERS %>
<%= f.text_field :auth_uid %>
</fieldset>
<fieldset class="form-divider">
- <div class="form-row">
+ <div class="standard-form-row">
<label class="standard-label"><%= t ".public editing.heading" %></label>
<span class="form-help deemphasize">
<% if current_user.data_public? %>
</span>
</div>
- <div class="form-row">
+ <div class="standard-form-row">
<label class="standard-label"><%= t ".contributor terms.heading" %></label>
<span class="form-help deemphasize">
<% if current_user.terms_agreed? %>
<% end %>
</span>
</div>
- <div class="form-row">
+ <div class="standard-form-row">
<label class="standard-label"><%= t ".preferred editor" %></label>
<%= f.select :preferred_editor, [[t("editor.default", :name => t("editor.#{Settings.default_editor}.name")), "default"]] + Editors::ALL_EDITORS.collect { |e| [t("editor.#{e}.description"), e] } %>
</div>
</fieldset>
<fieldset class="form-divider">
- <div class='form-row'>
+ <div class='standard-form-row'>
<label class="standard-label"><%= t ".profile description" %></label>
<%= richtext_area :user, :description, :object => current_user, :cols => 80, :rows => 20 %>
</div>
- <div class="form-row">
+ <div class="standard-form-row">
<label class="standard-label"><%= t ".preferred languages" %></label>
<%= f.text_field :languages %>
</div>
- <div class='form-row accountImage'>
+ <div class='standard-form-row accountImage'>
<label class="standard-label"><%= t ".image" %></label>
<%= user_image current_user %>
<ul class='form-list accountImage-options'>
</fieldset>
<fieldset class="form-divider">
- <div class='form-row location clearfix'>
+ <div class='standard-form-row location clearfix'>
<label class="standard-label"><%= t ".home location" %></label>
<div id="homerow" <% unless current_user.home_lat and current_user.home_lon %> class="nohome"<% end %>>
<p class="message form-help deemphasize"><%= t ".no home location" %></p>
</div>
</div>
- <div class="form-row">
+ <div class="standard-form-row">
<input type="checkbox" name="updatehome" value="1" <% unless current_user.home_lat and current_user.home_lon %> checked="checked" <% end %> id="updatehome" />
<label class="standard-label" for="updatehome"><%= t ".update home location on click" %></label>
</div>
<div id="loginForm" class="standard-form">
<fieldset>
- <div class="form-row">
+ <div class="standard-form-row">
<label for="username" class="standard-label">
<%= t ".email or username" %>
</label>
<%= text_field_tag "username", params[:username], :tabindex => 1 %>
</div>
- <div class="form-row">
+ <div class="standard-form-row">
<label for="password" class="standard-label">
<%= t ".password" %>
</label>
<li><%= auth_button "aol", "openid", :openid_url => "aol.com" %></li>
</ul>
- <div id='login_openid_url' class='form-row'>
+ <div id='login_openid_url' class='standard-form-row'>
<label for='openid_url' class="standard-label"><%= t ".openid_html", :logo => openid_logo %></label>
<%= hidden_field_tag("openid_referer", params[:referer]) if params[:referer] %>
<%= text_field_tag("openid_url", "", :tabindex => 3, :class => "openid_url") %>
<%= hidden_field_tag("referer", h(@referer)) unless @referer.nil? %>
<fieldset>
- <div class="form-row">
+ <div class="standard-form-row">
<label for="email" class="standard-label">
<%= t ".email address" %>
</label>
<%= f.email_field(:email, :tabindex => 1) %>
<%= f.error_message_on(:email) %>
</div>
- <div class="form-row">
+ <div class="standard-form-row">
<label for="email_confirmation" class="standard-label">
<%= t ".confirm email address" %>
</label>
</fieldset>
<fieldset>
- <div class="form-row">
+ <div class="standard-form-row">
<label for="display_name" class="standard-label">
<%= t ".display name" %>
</label>
</fieldset>
<fieldset class="form-divider" id="auth_field">
- <div class="form-row">
+ <div class="standard-form-row">
<label for="openid_url" class="standard-label">
<%= t ".external auth" %>
</label>
</fieldset>
<fieldset>
- <div class="form-row">
+ <div class="standard-form-row">
<label for='user[pass_crypt]' class="standard-label">
<%= t ".password" %>
</label>
<%= f.password_field(:pass_crypt, :tabindex => 6) %>
<%= f.error_message_on(:pass_crypt) %>
</div>
- <div class="form-row">
+ <div class="standard-form-row">
<label class="standard-label">
<%= t ".confirm password" %>
</label>
</div>
</fieldset>
- <div id="auth_prompt" class="form-row">
+ <div id="auth_prompt" class="standard-form-row">
<%= link_to t(".use external auth"), "#", :id => "auth_enable" %>
</div>
<h4>
<%= t ".heading_ct" %>
</h4>
- <div class='form-row horizontal-list clearfix'>
+ <div class='standard-form-row horizontal-list clearfix'>
<p class="deemphasize"><%= t ".contributor_terms_explain" %></p>
<label class="standard-label">
<%= t ".legale_select" %>
</label>
<% [%w[france FR], %w[italy IT], %w[rest_of_world GB]].each do |name, legale| %>
- <div class="form-row">
+ <div class="standard-form-row">
<label for="legale_<%= legale %>">
<%= radio_button_tag "legale", legale, @legale == legale, :data => { :url => url_for(:legale => legale) } %>
<%= t(".legale_names." + name) %>
:translations => "https://www.osmfoundation.org/wiki/License/Contributor_Terms/Informal_Translations" %>
</p>
</div>
- <div class="form-row">
+ <div class="standard-form-row">
<label for="read_ct">
<%= check_box_tag "read_ct" %>
<%= t ".read_ct" %>
<%= t "layouts.tou" %>
</h4>
<p class="deemphasize"><%= t ".tou_explain_html", :tou_link => link_to(t("layouts.tou"), "https://wiki.osmfoundation.org/wiki/Terms_of_Use", :target => :new) %></p>
- <div class="form-row">
+ <div class="standard-form-row">
<label for="read_tou">
<%= check_box_tag "read_tou" %>
<%= t ".read_tou" %>
<%= hidden_field_tag("referer", h(params[:referer])) unless params[:referer].nil? %>
- <div class="buttons form-row py-3 clearfix">
+ <div class="buttons standard-form-row py-3 clearfix">
<%= submit_tag("Continue", :name => "continue", :id => "continue", :disabled => true) %>
<%= submit_tag("Cancel", :name => "decline", :id => "decline") %>
</div>
assert_response :success
assert_template "new"
- assert_select "form > fieldset > div.form-row > input.field_with_errors#user_email"
+ assert_select "form > fieldset > div.standard-form-row > input.field_with_errors#user_email"
end
def test_new_duplicate_email_uppercase
assert_response :success
assert_template "new"
- assert_select "form > fieldset > div.form-row > input.field_with_errors#user_email"
+ assert_select "form > fieldset > div.standard-form-row > input.field_with_errors#user_email"
end
def test_new_duplicate_name
assert_response :success
assert_template "new"
- assert_select "form > fieldset > div.form-row > input.field_with_errors#user_display_name"
+ assert_select "form > fieldset > div.standard-form-row > input.field_with_errors#user_display_name"
end
def test_new_duplicate_name_uppercase
assert_response :success
assert_template "new"
- assert_select "form > fieldset > div.form-row > input.field_with_errors#user_display_name"
+ assert_select "form > fieldset > div.standard-form-row > input.field_with_errors#user_display_name"
end
def test_new_blocked_domain
assert_template :account
assert_select "div#errorExplanation", false
assert_select ".notice", /^User information updated successfully/
- assert_select "form#accountForm > fieldset > div.form-row > div#user_description_container > div#user_description_content > textarea#user_description", user.description
+ assert_select "form#accountForm > fieldset > div.standard-form-row > div#user_description_container > div#user_description_content > textarea#user_description", user.description
# Changing to a invalid editor should fail
user.preferred_editor = "unknown"
assert_template :account
assert_select ".notice", false
assert_select "div#errorExplanation"
- assert_select "form#accountForm > fieldset > div.form-row > select#user_preferred_editor > option[selected]", false
+ assert_select "form#accountForm > fieldset > div.standard-form-row > select#user_preferred_editor > option[selected]", false
# Changing to a valid editor should work
user.preferred_editor = "potlatch2"
assert_template :account
assert_select "div#errorExplanation", false
assert_select ".notice", /^User information updated successfully/
- assert_select "form#accountForm > fieldset > div.form-row > select#user_preferred_editor > option[selected][value=?]", "potlatch2"
+ assert_select "form#accountForm > fieldset > div.standard-form-row > select#user_preferred_editor > option[selected][value=?]", "potlatch2"
# Changing to the default editor should work
user.preferred_editor = "default"
assert_template :account
assert_select "div#errorExplanation", false
assert_select ".notice", /^User information updated successfully/
- assert_select "form#accountForm > fieldset > div.form-row > select#user_preferred_editor > option[selected]", false
+ assert_select "form#accountForm > fieldset > div.standard-form-row > select#user_preferred_editor > option[selected]", false
# Changing to an uploaded image should work
image = Rack::Test::UploadedFile.new("test/gpx/fixtures/a.gif", "image/gif")
assert_template :account
assert_select "div#errorExplanation", false
assert_select ".notice", /^User information updated successfully/
- assert_select "form#accountForm > fieldset > div.form-row.accountImage input[name=avatar_action][checked][value=?]", "keep"
+ assert_select "form#accountForm > fieldset > div.standard-form-row.accountImage input[name=avatar_action][checked][value=?]", "keep"
# Changing to a gravatar image should work
post :account, :params => { :display_name => user.display_name, :avatar_action => "gravatar", :user => user.attributes }, :session => { :user => user }
assert_template :account
assert_select "div#errorExplanation", false
assert_select ".notice", /^User information updated successfully/
- assert_select "form#accountForm > fieldset > div.form-row.accountImage input[name=avatar_action][checked][value=?]", "gravatar"
+ assert_select "form#accountForm > fieldset > div.standard-form-row.accountImage input[name=avatar_action][checked][value=?]", "gravatar"
# Removing the image should work
post :account, :params => { :display_name => user.display_name, :avatar_action => "delete", :user => user.attributes }, :session => { :user => user }
assert_template :account
assert_select "div#errorExplanation", false
assert_select ".notice", /^User information updated successfully/
- assert_select "form#accountForm > fieldset > div.form-row.accountImage input[name=avatar_action][checked]", false
+ assert_select "form#accountForm > fieldset > div.standard-form-row.accountImage input[name=avatar_action][checked]", false
# Adding external authentication should redirect to the auth provider
post :account, :params => { :display_name => user.display_name, :user => user.attributes.merge(:auth_provider => "openid", :auth_uid => "gmail.com") }, :session => { :user => user }
assert_template :account
assert_select ".notice", false
assert_select "div#errorExplanation"
- assert_select "form#accountForm > fieldset > div.form-row > input.field_with_errors#user_display_name"
+ assert_select "form#accountForm > fieldset > div.standard-form-row > input.field_with_errors#user_display_name"
# Changing name to one that exists should fail, regardless of case
new_attributes = user.attributes.dup.merge(:display_name => create(:user).display_name.upcase)
assert_template :account
assert_select ".notice", false
assert_select "div#errorExplanation"
- assert_select "form#accountForm > fieldset > div.form-row > input.field_with_errors#user_display_name"
+ assert_select "form#accountForm > fieldset > div.standard-form-row > input.field_with_errors#user_display_name"
# Changing name to one that doesn't exist should work
new_attributes = user.attributes.dup.merge(:display_name => "new tester")
assert_template :account
assert_select "div#errorExplanation", false
assert_select ".notice", /^User information updated successfully/
- assert_select "form#accountForm > fieldset > div.form-row > input#user_display_name[value=?]", "new tester"
+ assert_select "form#accountForm > fieldset > div.standard-form-row > input#user_display_name[value=?]", "new tester"
# Record the change of name
user.display_name = "new tester"
assert_template :account
assert_select ".notice", false
assert_select "div#errorExplanation"
- assert_select "form#accountForm > fieldset > div.form-row > input.field_with_errors#user_new_email"
+ assert_select "form#accountForm > fieldset > div.standard-form-row > input.field_with_errors#user_new_email"
# Changing email to one that exists should fail, regardless of case
user.new_email = create(:user).email.upcase
assert_template :account
assert_select ".notice", false
assert_select "div#errorExplanation"
- assert_select "form#accountForm > fieldset > div.form-row > input.field_with_errors#user_new_email"
+ assert_select "form#accountForm > fieldset > div.standard-form-row > input.field_with_errors#user_new_email"
# Changing email to one that doesn't exist should work
user.new_email = "new_tester@example.com"
assert_template :account
assert_select "div#errorExplanation", false
assert_select ".notice", /^User information updated successfully/
- assert_select "form#accountForm > fieldset > div.form-row > input#user_new_email[value=?]", user.new_email
+ assert_select "form#accountForm > fieldset > div.standard-form-row > input#user_new_email[value=?]", user.new_email
email = ActionMailer::Base.deliveries.first
assert_equal 1, email.to.count
assert_equal user.new_email, email.to.first
assert_response :success
assert_template "users/new"
assert_equal locale.to_s, response.headers["Content-Language"] unless locale == :root
- assert_select "form > fieldset > div.form-row > input.field_with_errors#user_email"
+ assert_select "form > fieldset > div.standard-form-row > input.field_with_errors#user_email"
assert_no_missing_translations
end
end
end
assert_response :success
assert_template "users/new"
- assert_select "form > fieldset > div.form-row > input.field_with_errors#user_display_name"
+ assert_select "form > fieldset > div.standard-form-row > input.field_with_errors#user_display_name"
assert_no_missing_translations
end
end