member for THU
This commit is contained in:
1 parent
579c7b5e81
commit
0a1a9d2c2e
14 files changed
+162
-123
No files matched your search
@@ -19,6 +19,7 @@
|
||||
<li>disabled<%= f.check_box :disabled,{},true,false %></li>
|
||||
<li>add_more<%= f.check_box :add_more,{},true,false %></li>
|
||||
<li>neutral_title<%= f.text_field :neutral_title,:size=>50 %></li>
|
||||
<li>neutral_for<%= f.select :neutral_for, VALID_LOCALES, {}, {:style => "width:90px"} %> </li>
|
||||
<!--
|
||||
<li><%#= attribute_field[:markup].eql?('select') ? nil : "style='display:none'"%> </li>
|
||||
<li><%#= t('admin.options') %>: <%#= f.text_field :markup_value%></li>
|
||||
|
||||
@@ -16,4 +16,39 @@
|
||||
</div>
|
||||
|
||||
<%= render :partial=>"infos"%>
|
||||
<%= render :partial=>"roles"%>
|
||||
<%#= render :partial=>"roles"%>
|
||||
|
||||
<% content_for :page_specific_javascript do -%>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
// $("a.submit_btn").click(function(){
|
||||
// value = $("a.submit_btn").parents("form").find("input[disabled='disabled']")
|
||||
// jQuery.each(value, function() {
|
||||
// index = $(this).attr("for");
|
||||
// console.log(index);
|
||||
// $("input[for='"+ index +"']").remove();
|
||||
// });
|
||||
// value.remove();
|
||||
// $(this).parents("form")[0].submit();
|
||||
// });
|
||||
|
||||
$(".onoff").click(function(){
|
||||
var dom = $(this).attr("for");
|
||||
if($(this).hasClass("disabled")){
|
||||
$(".controls-block[for="+dom+"] input").removeAttr("disabled");
|
||||
$(".controls-block[for="+dom+"]").slideDown();
|
||||
$(this).removeClass("disabled");
|
||||
$(this).text("OFF");
|
||||
}else{
|
||||
$(this).addClass("disabled");
|
||||
$(".controls-block[for="+dom+"]").slideUp();
|
||||
$(".controls-block[for="+dom+"] input").attr("disabled","disabled");
|
||||
|
||||
$(this).text("ON");
|
||||
}
|
||||
|
||||
return false;
|
||||
})
|
||||
})
|
||||
</script>
|
||||
<% end -%>
|
||||
@@ -3,12 +3,14 @@
|
||||
<div class="form-horizontal">
|
||||
|
||||
|
||||
<% role.sub_roles.each do |sub_role| %>
|
||||
<div id="le">
|
||||
<legend><button class="onoff pull-right">ON</button><%= sub_role.title %></legend>
|
||||
|
||||
<% role.sub_roles.each do |sub_role| %>
|
||||
<% sub_role_disable = @disable_all_field ? true : !check_user_role_enable(sub_role.attribute_fields) %>
|
||||
<%#= hidden_field_tag("[user][new_attribute_values][sub_role][disable][#{sub_role.id}]",sub_role_disable)%>
|
||||
<legend><button for=<%=@form_index%> class="onoff pull-right <%= sub_role_disable ? 'disabled' : '' %> "><%= sub_role_disable ? 'ON' : 'OFF' %></button><%= sub_role.title %></legend>
|
||||
<div class="controls-block <%= sub_role_disable ? 'hide' : '' %>" for=<%=@form_index%> >
|
||||
<% sub_role.attribute_fields.each do |af|%>
|
||||
<%= af.block_helper(@user,@form_index)%>
|
||||
<%= af.block_helper(@user,@form_index,sub_role_disable)%>
|
||||
<% @form_index = @form_index +1 %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
@@ -51,9 +51,9 @@
|
||||
<div class="viewport">
|
||||
<div class="overview">
|
||||
<%= render :partial=> "user_role",:locals=>{:role_class=>"basic",:i18n=>"admin.new_admin.users.profile",:items=>@profile_data} %>
|
||||
<%= render :partial=> "user_role",:locals=>{:role_class=>"teacher",:i18n=>"admin.new_admin.users.roles.teacher",:items=>@teacher_data} %>
|
||||
<%= render :partial=> "user_role",:locals=>{:role_class=>"student",:i18n=>"admin.new_admin.users.roles.student",:items=>@student_data}%>
|
||||
<%= render :partial=> "user_role",:locals=>{:role_class=>"staff",:i18n=>"admin.new_admin.users.roles.staff",:items=>@staff_data} %>
|
||||
<%#= render :partial=> "user_role",:locals=>{:role_class=>"teacher",:i18n=>"admin.new_admin.users.roles.teacher",:items=>@teacher_data} %>
|
||||
<%#= render :partial=> "user_role",:locals=>{:role_class=>"student",:i18n=>"admin.new_admin.users.roles.student",:items=>@student_data}%>
|
||||
<%#= render :partial=> "user_role",:locals=>{:role_class=>"staff",:i18n=>"admin.new_admin.users.roles.staff",:items=>@staff_data} %>
|
||||
</div>
|
||||
<div>
|
||||
</div>
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
<p class="alert hide">You need to sign in or sign up before continuing.</p>
|
||||
<div class="main">
|
||||
<div class="control-group clear">
|
||||
<%= f.label :nccu_ldap_uid ,t("nccu_c.nccu_ldap_uid")%>
|
||||
<%= f.text_field :nccu_ldap_uid, :placeholder => t("nccu_c.nccu_ldap_uid"), :style => "width: 330px;" %>
|
||||
<%= f.label :login ,t("admin.user_new_interface.email")%>
|
||||
<%= f.text_field :login, :placeholder => t("admin.user_new_interface.email"), :style => "width: 330px;" %>
|
||||
<span class="help-inline">Please correct the error</span>
|
||||
</div>
|
||||
<div class="control-group clear">
|
||||
|
||||
Reference in new issue
Block a user