<%-# Fedena #Copyright 2010 Foradian Technologies Private Limited # #This product includes software developed at #Project Fedena - http://www.projectfedena.org/ # #Licensed under the Apache License, Version 2.0 (the "License"); #you may not use this file except in compliance with the License. #You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # #Unless required by applicable law or agreed to in writing, #software distributed under the License is distributed on an #"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY #KIND, either express or implied. See the License for the #specific language governing permissions and limitations #under the License. -%>
<%= image_tag("/images/show_settings.png") %>

<%= t('configuration_text') %>

<%= t('general_settings') %>

<%= link_to_function image_tag("/images/buttons/back.png",:border => 0), "history.back()" %>
<% unless flash[:notice].nil? %>

<%= flash[:notice] %>

<% end %> <%= error_messages_for :school_detail %> <% form_for(:configuration,:html=> {:multipart=>true}) do |c| %>
<%= text_field :configuration, :institution_name, :value => @config[:institution_name] %>
<%= text_field :configuration, :institution_address, :value => @config[:institution_address] %>
<%= text_field :configuration, :institution_phone_no, :value => @config[:institution_phone_no] %>
<%= select :configuration, :student_attendance_type, [["#{t('daily_text')}", "Daily"], ["#{t('subject_wise_text')}", "SubjectWise"]], :selected => @config[:student_attendance_type] %>
<%= calendar_date_select_tag 'configuration[financial_year_start_date]', @config[:financial_year_start_date], :year_range => 15.years.ago..5.years.from_now, :readonly=>true, :popup=>"force" %>
<%= calendar_date_select_tag 'configuration[financial_year_end_date]', @config[:financial_year_end_date], :year_range => 15.years.ago..5.years.from_now, :readonly=>true, :popup=>"force" %>
<%= select :configuration, :locale, available_language_options, :selected => @config[:locale] %>
<%= select :configuration, :time_zone, @time_zones.map{|t| ["#{t.name}(#{t.code}) - GMT#{t.difference_type}#{Time.at(t.time_difference).gmtime.strftime('%R')}",t.id]},:selected =>@config[:time_zone].to_i %>
<% selected_value = @config[:default_country].present? ? @config[:default_country].to_i : 76 %> <%= select :configuration, :default_country, @countries.map {|c| [c.name, c.id]}, :selected=> selected_value.to_i %>
<%= text_field :configuration, :currency_type, :value => @config[:currency_type] %>
<%= file_field 'school_detail','school_logo', :size=>12 %>
<%= select :configuration, :network_state, [["#{t('online')}","Online"],["#{t('offline')}","Offline"]],:selected =>@config[:network_state] %>
<%= t('select') %>: <%= link_to_function t('all'), "$$('input.batches_box').each(function(checkbox) { checkbox.checked = true; });" %>, <%= link_to_function t('none'), "$$('input.batches_box').each(function(checkbox) { checkbox.checked = false; });" %>
<% @grading_types.each do |key,val| %>
<%= check_box :configuration, val.underscore , :checked => (@enabled_grading_types.include? key),:class=>'batches_box' %>
<% end %>
<% FedenaPlugin::REGISTERED_HOOKS[:general_settings_form].each do |mod| %> <%= render :partial=>mod.camelize.constantize.send("general_settings_form") %> <% end %>

<% if @config[:admission_number_auto_increment] == '1' %> <%= check_box :configuration, :admission_number_auto_increment, :checked => true %><%= t('student_admission_auto') %> <% else %> <%= check_box :configuration, :admission_number_auto_increment, :checked => false %><%= t('student_admission_auto') %> <% end %>
<% if Configuration.available_modules.include?('HR') %> <% if @config[:employee_number_auto_increment] == '1' %> <%= check_box :configuration, :employee_number_auto_increment, :checked => true %> <%= t('employee_admission_auto') %> <% else %> <%= check_box :configuration, :employee_number_auto_increment, :checked => false %><%= t('employee_admission_auto') %> <% end %> <% end %>
<% if @config[:enable_news_comment_moderation] == '1' %> <%= check_box :configuration, :enable_news_comment_moderation, :checked => true %><%= t('enable_news_comment_moderation') %> <% else %> <%= check_box :configuration, :enable_news_comment_moderation, :checked => false %><%= t('enable_news_comment_moderation') %> <% end %> <% FedenaPlugin::REGISTERED_HOOKS[:general_settings_checkbox].each do |mod| %>
<%= render :partial=>mod.camelize.constantize.send("general_settings_checkbox") %> <% end %>
<%= submit_tag "â–º #{t('update')}" %>
<% end %>