Fix form label for ssl requests
This commit is contained in:
parent
52d8ed9e4f
commit
e241d1e670
|
@ -11,6 +11,14 @@ module ApplicationHelper
|
||||||
true
|
true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def request_protocol
|
||||||
|
request.ssl? ? "https" : "http"
|
||||||
|
end
|
||||||
|
|
||||||
|
def web_app_url
|
||||||
|
"#{request_protocol}://#{GIT_HOST["host"]}/"
|
||||||
|
end
|
||||||
|
|
||||||
def body_class(default_class = nil)
|
def body_class(default_class = nil)
|
||||||
main = content_for(:body_class).blank? ?
|
main = content_for(:body_class).blank? ?
|
||||||
default_class :
|
default_class :
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
Code
|
Code
|
||||||
.input
|
.input
|
||||||
.input-prepend
|
.input-prepend
|
||||||
%span.add-on= "http://#{GIT_HOST["host"]}/"
|
%span.add-on= web_app_url
|
||||||
= f.text_field :code, :placeholder => "example"
|
= f.text_field :code, :placeholder => "example"
|
||||||
|
|
||||||
- unless @admin_project.new_record?
|
- unless @admin_project.new_record?
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
Code
|
Code
|
||||||
.input
|
.input
|
||||||
.input-prepend
|
.input-prepend
|
||||||
%span.add-on= "http://#{GIT_HOST["host"]}/"
|
%span.add-on= web_app_url
|
||||||
= f.text_field :code, :placeholder => "example"
|
= f.text_field :code, :placeholder => "example"
|
||||||
|
|
||||||
- unless @project.new_record? || @project.heads.empty?
|
- unless @project.new_record? || @project.heads.empty?
|
||||||
|
|
Loading…
Reference in a new issue