diff options
author | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-01-08 14:23:45 -0200 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-01-14 12:09:31 -0200 |
commit | aac6598482036e12a20b4c75f2a508bd6a017245 (patch) | |
tree | 40efe11ce354a786a4f694a55a7a68ad8ea6cdec /app/views | |
parent | 78f5eb94fb15f7e4cc4208a4871b9533243bec40 (diff) | |
download | gitlab-ce-aac6598482036e12a20b4c75f2a508bd6a017245.tar.gz |
Relax constraints for wiki slug
Since GitHub doesn’t apply these constraints to theirs wiki slug
allowing characters like `,`, `:`, `*`, etc, we need to relax our
constraints or some wiki pages will not be available after they were
imported.
For an example the Devise project have a wiki page with the following
slug: “How To: Add sign_in, sign_out, and sign_up links to your layout
template”
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/projects/wikis/_new.html.haml | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/app/views/projects/wikis/_new.html.haml b/app/views/projects/wikis/_new.html.haml index f0547e9c057..53b37b1104e 100644 --- a/app/views/projects/wikis/_new.html.haml +++ b/app/views/projects/wikis/_new.html.haml @@ -5,12 +5,9 @@ %a.close{href: "#", "data-dismiss" => "modal"} × %h3.page-title New Wiki Page .modal-body - = label_tag :new_wiki_path do - %span Page slug - = text_field_tag :new_wiki_path, nil, placeholder: 'how-to-setup', class: 'form-control', required: true, :'data-wikis-path' => namespace_project_wikis_path(@project.namespace, @project) - %p.hidden.text-danger{data: { error: "slug" }} - The page slug is invalid. Please don't use characters other then: a-z 0-9 _ - and / - %p.hint - Please don't use spaces. + .form-group + = label_tag :new_wiki_path do + %span Page slug + = text_field_tag :new_wiki_path, nil, placeholder: 'how-to-setup', class: 'form-control', required: true, :'data-wikis-path' => namespace_project_wikis_path(@project.namespace, @project) .form-actions = link_to 'Create Page', '#', class: 'build-new-wiki btn btn-create' |