small fix for portfolio

This commit is contained in:
Harry Bomrah 2018-01-03 12:35:13 +08:00
parent 47772a6417
commit 65a5a1302a
1 changed files with 10 additions and 2 deletions

View File

@ -50,7 +50,7 @@
<%= render :partial => "dashboard_header" %>
<h3 class="header-title">Employee Portfolio</h3>
<hr>
<%= form_for @profile, url: {:action => "updateprofile"}, html: {:class => "form-horizontal main-forms"} do |f| %>
<%= form_for @profile, url: {:action => "updateprofile"}, html: {:class => "form-horizontal main-forms", :id => "portfolioForm"} do |f| %>
<ul class="nav nav-pills language-nav">
<% @site_in_use_locales.each_with_index do |locale, i| %>
@ -194,3 +194,11 @@
</div>
<% end %>
</div>
<script type="text/javascript">
$(function() {
$("#portfolioForm").submit(function() {
$(this).find(":input").filter(function(){ return !this.value; }).attr("disabled", "disabled");
return true; // ensure form still submits
});
});
</script>