forked from saurabh/orbit4-5
Merge branch 'master' of gitlab.tp.rulingcom.com:saurabh/orbit4-5 into gravity
This commit is contained in:
commit
ee4f7e06e8
|
@ -5,7 +5,7 @@
|
|||
<% if params[:action] == "new" %>
|
||||
<%= f.label :name, content_tag(:i, nil, :class => "icons-star") + t(:page)+' ID' %>
|
||||
<div class="controls">
|
||||
<%= f.text_field :page_id, class:"input-xlarge change", data: {"fv-validation" => "required;nospace;pageid_validation;detect_chinese;", "fv-messages" => "Cannot be empty.;Cannot have blank spaces.;Page id is already taken.;Page ID cannot be in chinese.;"} %>
|
||||
<%= f.text_field :page_id, class:"input-xlarge change", data: {"fv-validation" => "required;nospace;pageid_validation;detect_chinese;cannot_have_dash;", "fv-messages" => "Cannot be empty.;Cannot have blank spaces.;Page id is already taken.;Page ID cannot be in chinese.;Cannot have dash (-) in Page ID.;"} %>
|
||||
<span><%= t("front_page.name_field_helper") %></span>
|
||||
</div>
|
||||
<% end %>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<% if params[:action] == "new" %>
|
||||
<%= f.label :name, content_tag(:i, nil, :class => "icons-star")+t(:link)+' ID' %>
|
||||
<div class="controls">
|
||||
<%= f.text_field :page_id, class: "input-xlarge change", data: {"fv-validation" => "required;nospace;pageid_validation;", "fv-messages" => "Cannot be empty.;Cannot have blank spaces;Page id is already taken.;"} %>
|
||||
<%= f.text_field :page_id, class: "input-xlarge change", data: {"fv-validation" => "required;nospace;pageid_validation;detect_chinese;cannot_have_dash;", "fv-messages" => "Cannot be empty.;Cannot have blank spaces;Page id is already taken.;Page ID cannot be in chinese.;Cannot have dash (-) in Page ID.;"} %>
|
||||
<span class="help-block"><%= t("front_page.name_field_helper") %></span>
|
||||
</div>
|
||||
<% end %>
|
||||
|
|
|
@ -23,5 +23,9 @@ $(document).ready(function(){
|
|||
re2 = new RegExp("^[\uE7C7-\uE7F3]*$"); //Chinese character range
|
||||
return (!(re1.test(value) && (! re2.test(value))));
|
||||
}
|
||||
|
||||
fromvalidator.validate_functions.cannot_have_dash = function(value){
|
||||
return (value.indexOf("-") == -1 ? true : false);
|
||||
}
|
||||
})
|
||||
</script>
|
Loading…
Reference in New Issue