parent
c5a7baa454
commit
747fb84ef6
|
@ -12,15 +12,15 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function validate_update(name) {
|
function validate_update(name) {
|
||||||
value1 = document.getElementsByName(name)[0].value;
|
value1 = document.getElementById(name).value;
|
||||||
validate_groupname(value1);
|
validate_groupname(value1);
|
||||||
document.getElementsByName(name)[0].value = "";
|
|
||||||
}
|
}
|
||||||
function validate_add_group() {
|
function validate_add_group() {
|
||||||
value1 = document.getElementsByName("group_name")[0].value;
|
value1 = document.getElementById('group_name').value;
|
||||||
validate_groupname(value1);
|
validate_groupname(value1);
|
||||||
validate_groupname_null(value1);
|
validate_groupname_null(value1);
|
||||||
document.getElementsByName('group_name')[0].value = "";
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@
|
||||||
<li>
|
<li>
|
||||||
<%= form_tag(updategroupname_course_path(@course,:group_id => group.id), method: 'get', remote:true, update: 'group_name') do %>
|
<%= form_tag(updategroupname_course_path(@course,:group_id => group.id), method: 'get', remote:true, update: 'group_name') do %>
|
||||||
<span id="add_tag_<%= group.id %>" style="display:none; vertical-align: middle;" class=" f_l">
|
<span id="add_tag_<%= group.id %>" style="display:none; vertical-align: middle;" class=" f_l">
|
||||||
<%= text_field_tag "group_name", params[:group_name],:name => "group_name#{group.id}", :size=>10, :class=>"isTxt w90 f_l", :style=>"padding: 0px", :max => 20 %>
|
<%= text_field_tag "group_name#{group.id}", params[:group_name],:name => "group_name", :size=>10, :class=>"isTxt w90 f_l", :style=>"padding: 0px", :max => 20 %>
|
||||||
<!--<input type="button" class="submit f_l" onclick="addTag();" style="width: 43px"/>-->
|
<!--<input type="button" class="submit f_l" onclick="addTag();" style="width: 43px"/>-->
|
||||||
<%= submit_tag '', class: "submit f_l", :onclick => "validate_update('group_name#{group.id}')", style: "width: 43px;height: 21px;background: url(/images/btn.png) no-repeat 0 0;" %>
|
<%= submit_tag '', class: "submit f_l", :onclick => "validate_update('group_name#{group.id}')", style: "width: 43px;height: 21px;background: url(/images/btn.png) no-repeat 0 0;" %>
|
||||||
</span>
|
</span>
|
||||||
|
|
Loading…
Reference in New Issue