diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-12-31 02:50:36 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-12-31 02:50:36 +0200 |
commit | 010a770b3fa15119b40a994fde6ffdde3acf6d2d (patch) | |
tree | d0d90a2aefe78dae9db490f8b5ca168ce4809e28 /app/views/profiles | |
parent | 16eb3ac360df60469cc9b1a93870c0273c7fe78f (diff) | |
download | gitlab-ce-010a770b3fa15119b40a994fde6ffdde3acf6d2d.tar.gz |
Migrate forms and inputs pt1
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/views/profiles')
-rw-r--r-- | app/views/profiles/accounts/show.html.haml | 7 | ||||
-rw-r--r-- | app/views/profiles/keys/_form.html.haml | 12 | ||||
-rw-r--r-- | app/views/profiles/keys/new.html.haml | 2 | ||||
-rw-r--r-- | app/views/profiles/notifications/_settings.html.haml | 8 | ||||
-rw-r--r-- | app/views/profiles/notifications/show.html.haml | 6 | ||||
-rw-r--r-- | app/views/profiles/passwords/edit.html.haml | 14 | ||||
-rw-r--r-- | app/views/profiles/show.html.haml | 14 |
7 files changed, 32 insertions, 31 deletions
diff --git a/app/views/profiles/accounts/show.html.haml b/app/views/profiles/accounts/show.html.haml index 36cb8b66c1f..d48e266e8b2 100644 --- a/app/views/profiles/accounts/show.html.haml +++ b/app/views/profiles/accounts/show.html.haml @@ -23,8 +23,9 @@ %p.cgray - if current_user.private_token - = text_field_tag "token", current_user.private_token, class: "input-xlarge input-xpadding pull-left" - = f.submit 'Reset', data: { confirm: "Are you sure?" }, class: "btn btn-primary btn-build-token prepend-left-10" + = text_field_tag "token", current_user.private_token, class: "form-control" + %div + = f.submit 'Reset', data: { confirm: "Are you sure?" }, class: "btn btn-primary btn-build-token" - else %span You don`t have one yet. Click generate to fix it. = f.submit 'Generate', class: "btn success btn-build-token" @@ -47,7 +48,7 @@ %p Changing your username will change path to all personal projects! %div - = f.text_field :username, required: true, class: 'input-xlarge input-xpadding' + = f.text_field :username, required: true, class: 'form-control' %span.loading-gif.gl-hide= image_tag "ajax_loader.gif" %p.light diff --git a/app/views/profiles/keys/_form.html.haml b/app/views/profiles/keys/_form.html.haml index 671fd0dfd4e..54d64057922 100644 --- a/app/views/profiles/keys/_form.html.haml +++ b/app/views/profiles/keys/_form.html.haml @@ -1,5 +1,5 @@ %div - = form_for [:profile, @key] do |f| + = form_for [:profile, @key], html: { class: 'form-horizontal' } do |f| - if @key.errors.any? .alert.alert-error %ul @@ -7,14 +7,12 @@ %li= msg .form-group - = f.label :title - .col-sm-10= f.text_field :title, class: "input-xlarge" + = f.label :title, class: 'control-label' + .col-sm-10= f.text_field :title, class: "form-control" .form-group - = f.label :key + = f.label :key, class: 'control-label' .col-sm-10 - %p.light - Paste your public key here. Read more about how to generate a key on #{link_to "the SSH help page", help_ssh_path}. - = f.text_area :key, class: "input-xxlarge thin_area" + = f.text_area :key, class: "form-control", rows: 8 .form-actions diff --git a/app/views/profiles/keys/new.html.haml b/app/views/profiles/keys/new.html.haml index f1b8fe08d5c..3d5a947948d 100644 --- a/app/views/profiles/keys/new.html.haml +++ b/app/views/profiles/keys/new.html.haml @@ -1,4 +1,6 @@ %h3.page-title Add an SSH Key +%p.light + Paste your public key here. Read more about how to generate a key on #{link_to "the SSH help page", help_ssh_path}. %hr = render 'form' diff --git a/app/views/profiles/notifications/_settings.html.haml b/app/views/profiles/notifications/_settings.html.haml index 60fb405471e..ab64d8303a4 100644 --- a/app/views/profiles/notifications/_settings.html.haml +++ b/app/views/profiles/notifications/_settings.html.haml @@ -13,19 +13,19 @@ = hidden_field_tag :notification_type, type, id: dom_id(membership, 'notification_type') = hidden_field_tag :notification_id, membership.id, id: dom_id(membership, 'notification_id') - = label_tag do + = label_tag nil, class: 'radio-inline' do = radio_button_tag :notification_level, Notification::N_GLOBAL, notification.global?, id: dom_id(membership, 'notification_level'), class: 'trigger-submit' %span Use global setting - = label_tag do + = label_tag nil, class: 'radio-inline' do = radio_button_tag :notification_level, Notification::N_DISABLED, notification.disabled?, id: dom_id(membership, 'notification_level'), class: 'trigger-submit' %span Disabled - = label_tag do + = label_tag nil, class: 'radio-inline' do = radio_button_tag :notification_level, Notification::N_PARTICIPATING, notification.participating?, id: dom_id(membership, 'notification_level'), class: 'trigger-submit' %span Participating - = label_tag do + = label_tag nil, class: 'radio-inline' do = radio_button_tag :notification_level, Notification::N_WATCH, notification.watch?, id: dom_id(membership, 'notification_level'), class: 'trigger-submit' %span Watch diff --git a/app/views/profiles/notifications/show.html.haml b/app/views/profiles/notifications/show.html.haml index 519d2aa5937..ea3511f5080 100644 --- a/app/views/profiles/notifications/show.html.haml +++ b/app/views/profiles/notifications/show.html.haml @@ -26,15 +26,15 @@ = form_tag profile_notifications_path, method: :put, remote: true, class: 'update-notifications' do = hidden_field_tag :notification_type, 'global' - = label_tag do + = label_tag nil, class: 'radio-inline' do = radio_button_tag :notification_level, Notification::N_DISABLED, @notification.disabled?, class: 'trigger-submit' %span Disabled - = label_tag do + = label_tag nil, class: 'radio-inline' do = radio_button_tag :notification_level, Notification::N_PARTICIPATING, @notification.participating?, class: 'trigger-submit' %span Participating - = label_tag do + = label_tag nil, class: 'radio-inline' do = radio_button_tag :notification_level, Notification::N_WATCH, @notification.watch?, class: 'trigger-submit' %span Watch diff --git a/app/views/profiles/passwords/edit.html.haml b/app/views/profiles/passwords/edit.html.haml index e5fc5003843..72f6521d92b 100644 --- a/app/views/profiles/passwords/edit.html.haml +++ b/app/views/profiles/passwords/edit.html.haml @@ -3,7 +3,7 @@ Change your password or recover your current one. %hr .update-password - = form_for @user, url: profile_password_path, method: :put do |f| + = form_for @user, url: profile_password_path, method: :put, html: { class: 'form-horizontal' } do |f| %div %p.slead You must provide current password in order to change it. @@ -15,18 +15,18 @@ - @user.errors.full_messages.each do |msg| %li= msg .form-group - = f.label :current_password + = f.label :current_password, class: 'control-label' .col-sm-10 - = f.password_field :current_password, required: true + = f.password_field :current_password, required: true, class: 'form-control' %div = link_to "Forgot your password?", reset_profile_password_path, method: :put .form-group - = f.label :password, 'New password' - .col-sm-10= f.password_field :password, required: true + = f.label :password, 'New password', class: 'control-label' + .col-sm-10= f.password_field :password, required: true, class: 'form-control' .form-group - = f.label :password_confirmation + = f.label :password_confirmation, class: 'control-label' .col-sm-10 - = f.password_field :password_confirmation, required: true + = f.password_field :password_confirmation, required: true, class: 'form-control' .form-actions = f.submit 'Save password', class: "btn btn-save" diff --git a/app/views/profiles/show.html.haml b/app/views/profiles/show.html.haml index 7ecb4e56bc6..4e70820d09d 100644 --- a/app/views/profiles/show.html.haml +++ b/app/views/profiles/show.html.haml @@ -19,18 +19,18 @@ .form-group = f.label :name, class: "control-label" .col-sm-10 - = f.text_field :name, class: "input-xlarge", required: true + = f.text_field :name, class: "form-control", required: true %span.help-block Enter your name, so people you know can recognize you. .form-group = f.label :email, class: "control-label" .col-sm-10 - if @user.ldap_user? - = f.text_field :email, class: "input-xlarge", required: true, readonly: true + = f.text_field :email, class: "form-control", required: true, readonly: true %span.help-block.light Email is read-only for LDAP user - else - = f.text_field :email, class: "input-xlarge", required: true + = f.text_field :email, class: "form-control", required: true - if @user.unconfirmed_email.present? %span.help-block We sent confirmation email to @@ -39,17 +39,17 @@ %span.help-block We also use email for avatar detection if no avatar is uploaded. .form-group = f.label :skype, class: "control-label" - .col-sm-10= f.text_field :skype, class: "input-xlarge" + .col-sm-10= f.text_field :skype, class: "form-control" .form-group = f.label :linkedin, class: "control-label" - .col-sm-10= f.text_field :linkedin, class: "input-xlarge" + .col-sm-10= f.text_field :linkedin, class: "form-control" .form-group = f.label :twitter, class: "control-label" - .col-sm-10= f.text_field :twitter, class: "input-xlarge" + .col-sm-10= f.text_field :twitter, class: "form-control" .form-group = f.label :bio, class: "control-label" .col-sm-10 - = f.text_area :bio, rows: 6, class: "input-xlarge", maxlength: 250 + = f.text_area :bio, rows: 6, class: "form-control", maxlength: 250 %span.help-block Tell us about yourself in fewer than 250 characters. .col-md-5.pull-right |