Page Menu
Home
GRNET
Search
Configure Global Search
Log In
Files
F886269
_form.html.erb
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, Aug 9, 12:15 AM
Size
1 KB
Mime Type
text/plain
Expires
Mon, Aug 11, 12:15 AM (1 d, 2 h)
Engine
blob
Format
Raw Data
Handle
230842
Attached To
rARCHIVING archiving
_form.html.erb
View Options
<%=
bootstrap_form_for
(
@host
,
layout
:
:horizontal
,
label_col
:
'col-xs-3'
,
control_col
:
'col-xs-8'
)
do
|
f
|
%>
<p class="col-xs-10 col-xs-offset-1 help-block text-right">
FQDN should have a valid DNS A record
</p>
<%
if
current_user
.
needs_host_list?
%>
<%=
f
.
select
:fqdn
,
options_for_select
(
@hosts_of_user
,
@host
.
fqdn
),
{
label
:
'FQDN'
},
disabled
:
@host
.
persisted?
%>
<%
else
%>
<%=
f
.
text_field
:fqdn
,
label
:
'FQDN'
,
disabled
:
@host
.
persisted?
%>
<%
end
%>
<%
if
@host
.
persisted?
%>
<%=
f
.
number_field
:port
,
min
:
1
%>
<%
end
%>
<%
emails
=
(
@host
.
users
.
pluck
(
:email
)
+
@host
.
email_recipients
)
.
uniq
.
select
(
&
:present?
)
%>
<%=
f
.
select
:email_recipients
,
options_for_select
(
emails
,
@host
.
email_recipients
),
{},
multiple
:
true
%>
<div class="form-group">
<div class="col-xs-2 col-xs-offset-2">
<%=
link_to
@host
.
persisted?
?
host_path
(
@host
)
:
clients_path
,
class
:
'btn btn-default'
do
%>
<label class="glyphicon glyphicon-edit text-danger"></label>
Cancel
<%
end
%>
</div>
<div class="col-xs-4">
<%
if
@host
.
persisted?
%>
<%=
link_to
regenerate_token_host_path
(
@host
),
method
:
:post
,
class
:
'btn btn-default'
,
data
:
{
confirm
:
'Are you sure you want to regenrate the server token'
}
do
%>
<label class="glyphicon glyphicon-leaf"></label>
Regenerate Token
<%
end
%>
<%
end
%>
</div>
<div class="col-xs-4">
<%=
f
.
submit
'Submit'
,
class
:
'btn btn-success'
%>
</div>
</div>
<%
end
%>
Event Timeline
Log In to Comment