app/views/users/invitations/edit.html.haml in artfully_ose-1.2.0.pre.4 vs app/views/users/invitations/edit.html.haml in artfully_ose-1.2.0.pre.5
- old
+ new
@@ -1,19 +1,68 @@
%h2 Setup Your Account
.instructions.well
The administrator for
- %strong=resource.user_memberships.first.organization.name
+ %strong=resource.user_memberships.first.organization.name
has invited you to join their organization. Enter a password for your account and click 'Sign Up' to begin using Artfully!
-.account-details
- = form_for resource, :as => resource_name, :url => invitation_path(resource_name), :html => { :method => :put } do |f|
+%fieldset.ng-cloak{"ng-controller" => "SignInCtrl"}
+ %ul.nav.nav-tabs
+ %li{"ng-class" => "{active: signinform == 'artfully'}"}
+ %a{href: "#", "ng-click" => "signinform = 'artfully'"} Create Account
+ %li{"ng-class" => "{active: signinform == 'fa'}"}
+ %a{href: "#", "ng-click" => "signinform = 'fa'"} Sign In with Fractured Atlas
+
+ = form_for resource, as: resource_name, url: invitation_path(resource_name), html: {method: :put, class: "form-horizontal", "ng-show" => "signinform == 'artfully'"} do |f|
= devise_error_messages!
= f.hidden_field :invitation_token
+
.control-group
- = f.label :password, :class=>'control-label'
- .controls= f.password_field :password
+ = f.label :first_name, 'First Name', :class => 'control-label'
+ .controls= f.text_field :first_name, :required => true, tabindex: "1"
.control-group
- = f.label :password_confirmation, :class=>'control-label'
- .controls= f.password_field :password_confirmation
+ = f.label :last_name, 'Last Name', :class => 'control-label'
+ .controls= f.text_field :last_name, :required => true, tabindex: "2"
+ .control-group
+ = f.label :email, :class => 'control-label'
+ .controls= f.text_field :email, :placeholder => 'example@fracturedatlas.org', :required => true, tabindex: "3"
+ .control-group
+ = f.label :password, :class => 'control-label'
+ .controls= f.password_field :password, :required => true, tabindex: "4"
+ .control-group
+ = f.label :password_confirmation, "Retype Password", :class => 'control-label'
+ .controls= f.password_field :password_confirmation, :required => true, tabindex: "5"
+ .control-group
+ .controls
+ %label.checkbox
+ = f.check_box :user_agreement, required: true, tabindex: "6"
+ I have read, understand and accept the terms and conditions of the #{link_to "User Agreement", user_agreement_path, :target => "_blank"}
+ .form-actions
+ %p= f.submit "Sign Up", class: "btn btn-primary btn-large", tabindex: "7"
- = f.submit "Sign Up", :class => "btn"
+ = form_for resource, as: resource_name, url: invitation_path(resource_name), html: {method: :put, class: 'form-horizontal', "ng-show" => "signinform == 'fa'"} do |f|
+ = devise_error_messages!
+ = hidden_field_tag :fa, 'true'
+ = f.hidden_field :invitation_token
+
+ .control-group
+ = f.label :email, 'Fractured Atlas Username', class: 'control-label'
+ .controls
+ = f.text_field :email, required: true, tabindex: "8", value: nil
+ .control-group
+ = f.label :password, class: 'control-label'
+ .controls
+ = f.password_field :password, required: true, tabindex: "9"
+ %p.help-block= link_to "Forgot your password?", "http://www.fracturedatlas.org/site/login/forgotten", :target => "_blank"
+
+ .control-group
+ .controls
+ %label.checkbox
+ = f.check_box :user_agreement, required: true, tabindex: "10"
+ I have read, understand and accept the terms and conditions of the #{link_to "User Agreement", user_agreement_path, :target => "_blank"}
+ .form-actions
+ = f.submit "Sign Up", :class => "btn btn-primary btn-large", tabindex: "11"
+:javascript
+ var SignInCtrl = function($scope) {
+ console.log(window);
+ $scope.signinform = window.location.hash.slice(1) || 'artfully';
+ };
\ No newline at end of file