[Xfce4-commits] <moka:master> Make label work.
Nick Schermer
noreply at xfce.org
Sun Nov 20 14:30:45 CET 2011
Updating branch refs/heads/master
to d3fc2862ad192eba9808f7cff26a120a7b330d41 (commit)
from 0b88595b29b0d73b6ed70f1f38ffb69e6ff53a9a (commit)
commit d3fc2862ad192eba9808f7cff26a120a7b330d41
Author: Nick Schermer <nick at xfce.org>
Date: Sat Oct 15 20:21:28 2011 +0200
Make label work.
lib/views/index.haml | 4 +-
lib/views/layout.haml | 2 +
lib/views/login_forgot.haml | 6 ++--
lib/views/login_request.haml | 12 +++++-----
lib/views/maintainer_profile.haml | 44 ++++++++++++++++++++++++------------
lib/views/project.haml | 16 ++++++++++---
lib/views/project_list.haml | 4 +-
7 files changed, 56 insertions(+), 32 deletions(-)
diff --git a/lib/views/index.haml b/lib/views/index.haml
index d7e0654..f34a445 100644
--- a/lib/views/index.haml
+++ b/lib/views/index.haml
@@ -9,10 +9,10 @@
%p.error The username or password you entered is not valid.
%p
%label{:for => "username"} Username:
- %input{:type => "text", :name => "username"}
+ %input{:type => "text", :name => "username", :id => "username"}
%p
%label{:for => "password"} Password:
- %input{:type => "password", :name => "password"}
+ %input{:type => "password", :name => "password", :id => "password"}
%p
%input{:type => "submit", :value => "Log in"}
%a{:href => "/login/forgot"} Forgot Password
diff --git a/lib/views/layout.haml b/lib/views/layout.haml
index 13d889d..9d22c44 100644
--- a/lib/views/layout.haml
+++ b/lib/views/layout.haml
@@ -24,5 +24,7 @@
%a{:href => "/login/request"} Request Account
%li
%a{:href => "http://archive.xfce.org"} Archive
+ %li
+ %a{:href => "https://bugzilla.xfce.org"} Bugzilla
%div{:id => 'main-toolbar-clear'}
=yield
diff --git a/lib/views/login_forgot.haml b/lib/views/login_forgot.haml
index 94bffa0..452d275 100755
--- a/lib/views/login_forgot.haml
+++ b/lib/views/login_forgot.haml
@@ -14,10 +14,10 @@
%form{:method => "post"}
%p
%label{:for => "newpassword"} New password:
- %input{:type => "password", :name => "newpassword"}
+ %input{:type => "password", :id => "newpassword", :name => "newpassword"}
%p
%label{:for => "newpassword2"} Confirm new password:
- %input{:type => "password", :name => "newpassword2"}
+ %input{:type => "password", :id => "newpassword2", :name => "newpassword2"}
%p
%input{:type => "submit", :value => "Submit"}
@@ -46,5 +46,5 @@
%form{:method => "post", :action => "/login/forgot"}
%p
%label{:for => "username"} Username:
- %input{:type => "text", :name => "username"}
+ %input{:type => "text", :name => "username", :id => "username"}
%input{:type => "submit", :value => "Reset Password"}
diff --git a/lib/views/login_request.haml b/lib/views/login_request.haml
index 2f5a9b9..f8d5b3a 100644
--- a/lib/views/login_request.haml
+++ b/lib/views/login_request.haml
@@ -15,22 +15,22 @@
%p.error.quote #{env[:error][:message]}
%p
%label{:for => "username"} Username:
- %input{:type => "text", :name => "username", :value => params[:username]}
+ %input{:type => "text", :name => "username", :id => "username", :value => params[:username]}
%p
%label{:for => "realname"} Real Name:
- %input{:type => "text", :name => "realname", :value => params[:realname]}
+ %input{:type => "text", :name => "realname", :id => "realname", :value => params[:realname]}
%p
%label{:for => "email"} Email Address:
- %input{:type => "text", :name => "email", :value => params[:email]}
+ %input{:type => "text", :name => "email", :id => "email", :value => params[:email]}
%hr
- if env[:error][:newpassword]
%p.error.quote #{env[:error][:newpassword]}
%p
%label{:for => "password"} Password:
- %input{:type => "password", :name => "password"}
+ %input{:type => "password", :id => "password", :name => "password"}
%p
%label{:for => "password2"} Confirm password:
- %input{:type => "password", :name => "password2"}
+ %input{:type => "password", :id => "password2", :name => "password2"}
%hr
%p.quote
The public key is required to push git commits over ssh. Make sure you provide the publickey and
@@ -38,6 +38,6 @@
%a{:href => "/login/request/sshinfo"} here.
%p
%label{:for => "pubkeys"} SSH public-keys:
- %textarea{:name => "pubkeys", :rows => "5", :wrap => "off"} #{params[:pubkeys]}
+ %textarea{:name => "pubkeys", :rows => "5", :id => "pubkeys", :wrap => "off"} #{params[:pubkeys]}
%p
%input{:type => "submit", :value => "Submit"}
diff --git a/lib/views/maintainer_profile.haml b/lib/views/maintainer_profile.haml
index 43d4fe2..1dae2e8 100644
--- a/lib/views/maintainer_profile.haml
+++ b/lib/views/maintainer_profile.haml
@@ -1,7 +1,7 @@
:javascript
function info_submit()
{
- var field = document.getElementById('infopass');
+ var field = document.getElementById('password');
document.getElementById('infosubmit').disabled = !(field.value.length > 0);
}
function admin_delete()
@@ -25,16 +25,19 @@
%p
%label{:for => "username"} Login Name:
%input{:type => "text", :name => "fooname", :disabled => true, :value => @maintainer.username}
- %input{:type => "hidden", :name => "username", :value => @maintainer.username}
+ %input{:type => "hidden",
+ :name => "username",
+ :id => "username",
+ :value => @maintainer.username}
%p
%label{:for => "email"} Email address:
- %input{:type => "text", :name => "email", :value => @maintainer.email}
+ %input{:type => "text", :name => "email", :id => "email", :value => @maintainer.email}
%p
%label{:for => "realname"} Real Name:
- %input{:type => "text", :name => "realname", :value => @maintainer.realname}
+ %input{:type => "text", :name => "realname", :id => "realname", :value => @maintainer.realname}
%p
%label{:for => "pubkeys"} SSH public-keys:
- %textarea{:name => "pubkeys", :rows => "5", :wrap => "off"} #{@maintainer.pubkeys}
+ %textarea{:name => "pubkeys", :id => "pubkeys", :rows => "5", :wrap => "off"} #{@maintainer.pubkeys}
%p.info
Each line of the public keys should start with ssh-dsa or ssh-rsa else
the key is not saved. Updating the keys on the server can take up to 1
@@ -49,17 +52,17 @@
%p.error.quote #{env[:error][:newpassword]}
%p
%label{:for => "new_password"} New password:
- %input{:type => "password", :name => "newpassword" }
+ %input{:type => "password", :id => "new_password", :name => "newpassword" }
%p
%label{:for => "new_password2"} Confirm new password:
- %input{:type => "password", :name => "newpassword2"}
+ %input{:type => "password", :id => "new_password2", :name => "newpassword2"}
%hr
%p Please enter your existing password to confirm account changes.
- if env[:error][:password]
%p.error.quote #{env[:error][:password]}
%p
%label{:for => "password"} Password:
- %input{:type => "password", :name => "password", :id => "infopass", :onkeyup => "info_submit()" }
+ %input{:type => "password", :name => "password", :id => "password", :onkeyup => "info_submit()" }
%p
%input{:type => "submit", :value => "Save", :id => "infosubmit", :disabled => true }
@@ -71,8 +74,12 @@
- if authentication_user.is_admin or @maintainer.roles.include?(role)
- visible_roles = true
%p
- %input{:type => "checkbox", :name => "roles[#{role.name}]", :checked => @maintainer.roles.include?(role), :disabled => !authentication_user.is_admin}
- %label{:for => "roles[#{role.name}]"} #{role.description}
+ %input{:type => "checkbox",
+ :name => "roles[#{role.name}]",
+ :id => "r_#{role.name}",
+ :checked => @maintainer.roles.include?(role),
+ :disabled => !authentication_user.is_admin}
+ %label{:for => "r_#{role.name}"} #{role.description}
- if !visible_roles
%p This user has no roles.
@@ -82,8 +89,12 @@
- if authentication_user.is_admin or @maintainer.collections.include?(collection)
- visible_collections = true
%p
- %input{:type => "checkbox", :name => "collections[#{collection.name}]", :checked => @maintainer.collections.include?(collection), :disabled => !authentication_user.is_admin}
- %label{:for => "collections[#{collection.name}]"} #{collection.display_name}
+ %input{:type => "checkbox",
+ :name => "collections[#{collection.name}]",
+ :id => "c_#{collection.name}",
+ :checked => @maintainer.collections.include?(collection),
+ :disabled => !authentication_user.is_admin}
+ %label{:for => "c_#{collection.name}"} #{collection.display_name}
- if !visible_collections
%p This user is not maintaining a collection.
@@ -93,9 +104,12 @@
- if authentication_user.is_admin or @maintainer.projects.include?(project)
- visible_projects = true
%p
- %input{:type => "checkbox", :name => "projects[#{project.name}]", :checked => @maintainer.projects.include?(project), :disabled => !authentication_user.is_admin}
- %label{:for => "projects[#{project.name}]"}
- %a{:href => "/project/#{project.name}" } #{project.name}
+ %input{:type => "checkbox",
+ :name => "projects[#{project.name}]",
+ :id => "p_#{project.name}",
+ :checked => @maintainer.projects.include?(project),
+ :disabled => !authentication_user.is_admin}
+ %label{:for => "p_#{project.name}"} #{project.name}
- if !visible_projects
%p This users is not maintaining a project.
diff --git a/lib/views/project.haml b/lib/views/project.haml
index 7379dff..d228561 100755
--- a/lib/views/project.haml
+++ b/lib/views/project.haml
@@ -2,13 +2,20 @@
%form{:method => "post", :action => "/project/#{@project.name}/information"}
%p
%label{:for => "website"} Website:
- %input{:type => "text", :name => "website", :value => "#{@project.website}"}
+ %input{:type => "text",
+ :name => "website",
+ :id => "website",
+ :value => "#{@project.website}"}
%p
%label{:for => "description"} Description:
- %textarea{:name => "description"} #{@project.description}
+ %textarea{:name => "description", :id => "description"} #{@project.description}
%p
%label{:for => "maintainers"} Maintainers:
- %input{:type => "text", :name => "maintainers", :disabled => true, :value => "#{maintainer_names(@project)}"}
+ %input{:type => "text",
+ :name => "maintainers",
+ :id => "maintainers",
+ :disabled => true,
+ :value => "#{maintainer_names(@project)}"}
%p.quote
%input{:type => "submit", :value => "Save"}
@@ -17,7 +24,8 @@
%p
%select{:name => "classification"}
- for classification in Classification.find_all
- %option{:name => classification.name, :selected => (@project.classification.eql? classification)} #{classification.name}
+ %option{:name => classification.name,
+ :selected => (@project.classification.eql? classification)} #{classification.name}
%input{:type => "submit", :value => "Change"}
%h2 Releases
diff --git a/lib/views/project_list.haml b/lib/views/project_list.haml
index ffd8326..e286d92 100644
--- a/lib/views/project_list.haml
+++ b/lib/views/project_list.haml
@@ -2,10 +2,10 @@
%form{:method => "post" }
%p
%label{:for => "name"} Name:
- %input{:type => "text", :name => "name" }
+ %input{:type => "text", :name => "name", :id => "name" }
%p
%label{:for => "classification"} Classification:
- %select{:name => "classification"}
+ %select{:name => "classification", :id => "classification"}
- for classification in Classification.find_all
%option{:name => classification.name} #{classification.name}
%p
More information about the Xfce4-commits
mailing list