<commit_before>= js_include_tag "jquery.colorPicker.js"
= js_include_tag "tiny_mce/tiny_mce.js"
= js_include_tag "mce_editor.js"
= css_include_tag "colorPicker.css"
= error_messages_for @mfi
= form_for(@mfi, :action => url(:controller => :admin, :action => :update), :enctype => "multipart/form-data") do
  %div.tab_container
    %ul.tabs
      %li#contact Contact details
      %li#operational Operational details
      %li#security Access control & Security
      %li#info Main page
    %div.tab
      %table.wide
        %tr
          %td
            Name of the mfi
          %td
            = text_field :name
        %tr
          %td
            Select Color for this name
          %td
            = text_field :color
        %tr
          %td
            and choose a logo
        %tr
          %td
            Upload Logo
          %td
            - if @mfi.logo_name and not @mfi.logo_name.blank?          
              %div#logo_file_name
                = image_tag("logos/#{@mfi.logo_name}", :height => 50)
                %input{:type => "hidden", :name => "mfi[logo_name]", :value => @mfi.logo_name}          
                %br
                %a{:href => "javascript: $('div#logo_file_name').remove()"}
                  Remove Image
              Change Image 
            %input{:name => "mfi[logo]", :size => "20",  :type => "file", :value => @mfi.logo_name}
            %ul
            %li==Height of the image should not be more than 50 pixels
            %li==Only gif, jpg and png type images are allowed
            %li==Maximum size is 100kb
        %tr
          %td
            Address of MFI HQ
          %td
            = text_area :address
        %tr
          %td
            Website (if any)
          %td
            = text_field :website
        %tr
          %td
            Telephone number
          %td
            = text_field :telephone
    %div.tab
      %table
        %tr
          %td{:colspan => "2"}
            %h3 
              Operational details (these will help us build a suitable system for you) 
        %tr
          %td
            Number of clients
          %td
            = text_field :number_of_clients
        %tr
          %td
            Number of centers
          %td
            = text_field :number_of_centers
        %tr
          %td
            In operation since
          %td
            = date_select_for @mfi, :in_operation_since, {:min_date => Date.parse("2000-01-01")}
        %tr
          %td
            Allow dates in past upto
          %td
            = text_field :number_of_past_days, :size => 3
            days from
            = select :min_date_from, :collection => Mfi::MinDateFrom.to_a
        %tr
          %td
            Allow dates for transactions in future upto
          %td
            = text_field :number_of_future_transaction_days, :size => 3
            days from today
            %p.greytext
              (for loan application, approval, disbursal, client joining date, branch & center creation date etc)
        %tr
          %td
            Allow farthest dates in future 
          %td
            = text_field :number_of_future_days, :size => 3
            days from today
        %tr
          %td
            Allow date box to be editable?
          %td
            = check_box :date_box_editable
        %tr
          %td
            Default repayment style
          %td
            = select :default_repayment_style, :collection => [[NORMAL_REPAYMENT_STYLE,"fees=>int=>prin"], [PRORATA_REPAYMENT_STYLE,"pro rata"]]
        %tr
          %td
            Allow choice of repayment style in weeksheets?
          %td
            = check_box :allow_choice_of_repayment_style
        %tr
          %td
            Allow GRT date on new client form
          %td
            = check_box :allow_grt_date_on_form
        %tr
          %td
            Do accounting ?
          %td
            = check_box :accounting_enabled
        %tr
          %td
            Defer loan history re-generation ?
            %br
            %span.greytext
              results in faster turn around time for data entry
          %td
            = check_box :dirty_queue_enabled
        %tr
          %td
            Enable Maps ?
          %td
            = check_box :map_enabled
        %tr
          %td{:colspan => 2}
            %hr
        %tr
          %td
            %h3 Day Sheet Generation
        %tr
          %td
            Generate Day Sheet before 
          %td
            = text_field :generate_day_sheet_before, :size => 1
            day(s)
        %tr
          %td{:colspan => 2}
            %hr
        %tr
          %td
            %h3 Branch Registers
        %tr
          %td
            Enable Branch Diary ?
          %td
            = check_box :branch_diary_enabled
        %tr
          %td
            Enable Stock Register ?
          %td
            = check_box :stock_register_enabled
        %tr
          %td
            Enable Asset Register ?
          %td
            = check_box :asset_register_enabled
        %tr
          %td{:colspan => 2}
            %hr
        %tr
          %td
            Email address
          %td
            = text_field :email
        %tr
          %td
            Specify prefered date format
          %td<commit_msg>Email address field now in contact details rather than operational details<commit_after>= js_include_tag "jquery.colorPicker.js"
= js_include_tag "tiny_mce/tiny_mce.js"
= js_include_tag "mce_editor.js"
= css_include_tag "colorPicker.css"
= error_messages_for @mfi
= form_for(@mfi, :action => url(:controller => :admin, :action => :update), :enctype => "multipart/form-data") do
  %div.tab_container
    %ul.tabs
      %li#contact Contact details
      %li#operational Operational details
      %li#security Access control & Security
      %li#info Main page
    %div.tab
      %table.wide
        %tr
          %td
            Name of the mfi
          %td
            = text_field :name
        %tr
          %td
            Select Color for this name
          %td
            = text_field :color
        %tr
          %td
            and choose a logo
        %tr
          %td
            Upload Logo
          %td
            - if @mfi.logo_name and not @mfi.logo_name.blank?          
              %div#logo_file_name
                = image_tag("logos/#{@mfi.logo_name}", :height => 50)
                %input{:type => "hidden", :name => "mfi[logo_name]", :value => @mfi.logo_name}          
                %br
                %a{:href => "javascript: $('div#logo_file_name').remove()"}
                  Remove Image
              Change Image 
            %input{:name => "mfi[logo]", :size => "20",  :type => "file", :value => @mfi.logo_name}
            %ul
            %li==Height of the image should not be more than 50 pixels
            %li==Only gif, jpg and png type images are allowed
            %li==Maximum size is 100kb
        %tr
          %td
            Address of MFI HQ
          %td
            = text_area :address
        %tr
          %td
            Website (if any)
          %td
            = text_field :website
        %tr
          %td
            Telephone number
          %td
            = text_field :telephone
        %tr
          %td
            Email address
          %td
            = text_field :email
    %div.tab
      %table
        %tr
          %td{:colspan => "2"}
            %h3 
              Operational details (these will help us build a suitable system for you) 
        %tr
          %td
            Number of clients
          %td
            = text_field :number_of_clients
        %tr
          %td
            Number of centers
          %td
            = text_field :number_of_centers
        %tr
          %td
            In operation since
          %td
            = date_select_for @mfi, :in_operation_since, {:min_date => Date.parse("2000-01-01")}
        %tr
          %td
            Allow dates in past upto
          %td
            = text_field :number_of_past_days, :size => 3
            days from
            = select :min_date_from, :collection => Mfi::MinDateFrom.to_a
        %tr
          %td
            Allow dates for transactions in future upto
          %td
            = text_field :number_of_future_transaction_days, :size => 3
            days from today
            %p.greytext
              (for loan application, approval, disbursal, client joining date, branch & center creation date etc)
        %tr
          %td
            Allow farthest dates in future 
          %td
            = text_field :number_of_future_days, :size => 3
            days from today
        %tr
          %td
            Allow date box to be editable?
          %td
            = check_box :date_box_editable
        %tr
          %td
            Default repayment style
          %td
            = select :default_repayment_style, :collection => [[NORMAL_REPAYMENT_STYLE,"fees=>int=>prin"], [PRORATA_REPAYMENT_STYLE,"pro rata"]]
        %tr
          %td
            Allow choice of repayment style in weeksheets?
          %td
            = check_box :allow_choice_of_repayment_style
        %tr
          %td
            Allow GRT date on new client form
          %td
            = check_box :allow_grt_date_on_form
        %tr
          %td
            Do accounting ?
          %td
            = check_box :accounting_enabled
        %tr
          %td
            Defer loan history re-generation ?
            %br
            %span.greytext
              results in faster turn around time for data entry
          %td
            = check_box :dirty_queue_enabled
        %tr
          %td
            Enable Maps ?
          %td
            = check_box :map_enabled
        %tr
          %td{:colspan => 2}
            %hr
        %tr
          %td
            %h3 Day Sheet Generation
        %tr
          %td
            Generate Day Sheet before 
          %td
            = text_field :generate_day_sheet_before, :size => 1
            day(s)
        %tr
          %td{:colspan => 2}
            %hr
        %tr
          %td
            %h3 Branch Registers
        %tr
          %td
            Enable Branch Diary ?
          %td
            = check_box :branch_diary_enabled
        %tr
          %td
            Enable Stock Register ?
          %td
            = check_box :stock_register_enabled
        %tr
          %td
            Enable Asset Register ?
          %td
            = check_box :asset_register_enabled
        %tr
          %td{:colspan => 2}
            %hr
        %tr
          %td
            Specify prefered date format
          %td
{'fraction_non_alphanumeric': 0.07983469521931061, 'fraction_numerical': 0.005259697567389875, 'mean_word_length': 1.2290140255390412, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 55, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4600847', 'n_tokens_mistral': 3059, 'n_tokens_neox': 2958, 'n_words': 829}