Yeah, since this is one-liner currently I agree.

But Dominic points out also on the +Add Interface and similar buttons,
then the function can get more complicated. I'd rather keep it separate.

Please confirm if you like this pure-javascript approach and I will go
ahead and remove all the static things in vmware form and add button
handling.

LZ

On Mon, Oct 21, 2013 at 01:01:57AM -0700, Ohad Levy wrote:
> > @@ -14,4 +14,8 @@
> >      </div>
> >    <% end%>
> >    <%= hidden_field_tag 'capabilities', compute_resource.capabilities %>
> > +
> > +  <% if @host && !compute_resource.supports_update? %>
> > +    <script type="text/javascript">$(document).ready(disable_vm_form_fields)</script>
> 
> not sure i follow? this would be in the same place? just making the js more generic instead?
> 
> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/theforeman/foreman/pull/959/files#r7087496

-- 
Later,

 Lukas "lzap" Zapletal
 irc: lzap #theforeman