Show More
Commit Description:
MERGED 308:HEAD from http://theory.cpe.ku.ac.th/grader/web/branches/ytopc08-2/, removed some registration info...
Commit Description:
MERGED 308:HEAD from http://theory.cpe.ku.ac.th/grader/web/branches/ytopc08-2/, removed some registration info git-svn-id: http://theory.cpe.ku.ac.th/grader/web/trunk@359 6386c4cd-e34a-4fa8-8920-d93eb39b512e
File last commit:
Show/Diff file:
Action:
app/views/site/login.html.haml | 39 lines | 1.4 KiB | text/x-haml | HamlLexer |
jittat
MERGED 308:HEAD from http://theory.cpe.ku.ac.th/grader/web/branches/ytopc08-2/, removed some registration info...
r162 %script{:type => 'text/javascript'}
var siteList = new Array();
- @countries.each do |country|
= "siteList[#{country.id}] = new Array();"
- country.sites.each do |site|
= "siteList[#{country.id}][#{site.id}] = \"#{site.name}\";"
var allSiteList = new Array();
- @site_select.each do |sel|
= "allSiteList[#{sel[1]}]=\"#{sel[0]}\";"
%script{:type => 'text/javascript', :src => '/javascripts/site_update.js'}
%div{ :style => "border: solid 1px gray; padding: 2px; background: #f0f0f0;"}
%h2 For Site Administrator.
- if @default_site
- form_for :login, nil, :url => {:controller => 'login', :action => 'site_login'} do |f|
%b Log in for default site.
= f.hidden_field :site_id, :value => @default_site.id
%br/
Password:
= f.password_field :password
= submit_tag "Site Administrator Login"
- else
Please select your country and site and login.
- form_for :login, nil, :url => {:controller => 'login', :action => 'site_login'} do |f|
Country:
= select :site_country, :id, @country_select_with_all, {}, {:onchange => "updateSiteList();", :onclick => "updateSiteList();" }
Site:
= select :login, :site_id, @site_select
%br/
Password:
= f.password_field :password
= submit_tag "Site Administrator Login"
%script{:type => 'text/javascript'}
updateSiteList();