parent
12c19e2bfe
commit
230b377cad
|
@ -3,8 +3,8 @@
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(document).ready(
|
$(document).ready(
|
||||||
function(){
|
function(){
|
||||||
$("#province_lean").attr("href", "#WOpenWindow")
|
$("#province").attr("href", "#WOpenWindow")
|
||||||
$("#province_lean").leanModal({top: 100, closeButton: ".modal_close"});
|
$("#province").leanModal({top: 100, closeButton: ".modal_close"});
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
</script>
|
</script>
|
||||||
|
@ -13,7 +13,6 @@
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
function get_options(value){
|
function get_options(value){
|
||||||
$("#province_lean").click();
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type :"POST",
|
type :"POST",
|
||||||
url :'/school/get_options/'+encodeURIComponent(value),
|
url :'/school/get_options/'+encodeURIComponent(value),
|
||||||
|
@ -110,18 +109,23 @@
|
||||||
|
|
||||||
|
|
||||||
<p style="width:357px;padding-left: 26px;">
|
<p style="width:357px;padding-left: 26px;">
|
||||||
<div class="hidden" id='province_lean' ></div>
|
|
||||||
<% unless User.current.user_extensions.school.nil? %>
|
<% unless User.current.user_extensions.school.nil? %>
|
||||||
<%= l(:field_occupation) %> <span class="required">*</span><%= select_tag "province", options_from_collection_for_select(School.find_by_sql("select distinct province from schools"), :province, :province, User.current.user_extensions.school.province), :onchange => "get_options(this.value)" %>
|
<%= l(:field_occupation) %> <span class="required">*</span><%= select_tag "province", options_from_collection_for_select(School.find_by_sql("select distinct province from schools"), :province, :province, User.current.user_extensions.school.province), :onchange => "get_options(this.value)" %>
|
||||||
<input id="occupation" name="occupation" type="hidden" value="<%=User.current.user_extensions.school.id%>" />
|
<input id="occupation" name="occupation" type="hidden" value="<%=User.current.user_extensions.school.id%>" />
|
||||||
<input id="occupation_name" type="text" value="<%=User.current.user_extensions.school.name%>" readonly />
|
<input id="occupation_name" type="text" value="<%=User.current.user_extensions.school.name%>" readonly />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!--<%= select_tag "occupation",
|
||||||
|
options_for_select([[User.current.user_extensions.school.name, User.current.user_extensions.school.id]]) %>-->
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= l(:field_occupation) %> <span class="required">*</span><%= select_tag "province", options_from_collection_for_select(School.find_by_sql("select distinct province from schools"), :province, :province), :onchange => "get_options(this.value)" %>
|
<%= l(:field_occupation) %> <span class="required">*</span><%= select_tag "province", options_from_collection_for_select(School.find_by_sql("select distinct province from schools"), :province, :province), :onchange => "get_options(this.value)" %>
|
||||||
|
|
||||||
<input id="occupation" name="occupation" type="hidden" />
|
<input id="occupation" name="occupation" type="hidden" />
|
||||||
<input id="occupation_name" type="text" readonly />
|
<input id="occupation_name" type="text" readonly />
|
||||||
<% end %>
|
<% end %>
|
||||||
|
<!-- <input id="occupation" readonly />-->
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div id="WOpenWindow">
|
<div id="WOpenWindow">
|
||||||
|
|
Loading…
Reference in New Issue