Sha256: 67a2287fcd285188da5761bdc4b17055fd41637a67264d797076ad2fcca6ffbb

Contents?: true

Size: 1.45 KB

Versions: 35

Compression:

Stored size: 1.45 KB

Contents

<h1>My Account</h1>

<p><div id='user_<%= @user.id %>_first_name' ></div></p>
<p><div id='user_<%= @user.id %>_last_name'  ></div></p>
<p><div id='user_<%= @user.id %>_email'      ></div></p>
<p><div id='user_<%= @user.id %>_phone'      ></div></p>
<div id='message'></div>

<p>
<% if @site.use_store %>
  <input type='button' value='Order History' class='btn' onclick="window.location='/my-account/orders';" />
<% end %>
</p>

<% content_for :caboose_js do %>
<%= javascript_include_tag "caboose/model/all" %>
<script type='text/javascript'>

$(document).ready(function() {
  new ModelBinder({
    name: 'User',
    id: <%= @user.id %>,
    update_url: '/my-account',
    authenticity_token: '<%= form_authenticity_token %>',
    attributes: [
      { name: 'first_name' , nice_name: 'First name'   , type: 'text', value: <%= raw Caboose.json(@user.first_name) %>, width: 400 },
      { name: 'last_name'  , nice_name: 'Last name'    , type: 'text', value: <%= raw Caboose.json(@user.last_name)  %>, width: 400 },      
      { name: 'email'      , nice_name: 'Email'        , type: 'text', value: <%= raw Caboose.json(@user.email)      %>, width: 400 },
      { name: 'phone'      , nice_name: 'Phone Number' , type: 'text', value: <%= raw Caboose.json(@user.phone)      %>, width: 400 }
    ],
    on_load: function() { modal.autosize(); }
  });  
});

</script>
<% end %>
<%= content_for :caboose_css do %>
<%= stylesheet_link_tag "caboose/my-account", :media => "all" %>
<% end %>

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
caboose-cms-0.5.158 app/views/caboose/my_account/index.html.erb
caboose-cms-0.5.156 app/views/caboose/my_account/index.html.erb
caboose-cms-0.5.155 app/views/caboose/my_account/index.html.erb
caboose-cms-0.5.154 app/views/caboose/my_account/index.html.erb
caboose-cms-0.5.153 app/views/caboose/my_account/index.html.erb
caboose-cms-0.5.152 app/views/caboose/my_account/index.html.erb
caboose-cms-0.5.151 app/views/caboose/my_account/index.html.erb
caboose-cms-0.5.150 app/views/caboose/my_account/index.html.erb
caboose-cms-0.5.149 app/views/caboose/my_account/index.html.erb
caboose-cms-0.5.148 app/views/caboose/my_account/index.html.erb
caboose-cms-0.5.147 app/views/caboose/my_account/index.html.erb
caboose-cms-0.5.146 app/views/caboose/my_account/index.html.erb
caboose-cms-0.5.145 app/views/caboose/my_account/index.html.erb
caboose-cms-0.5.144 app/views/caboose/my_account/index.html.erb
caboose-cms-0.5.143 app/views/caboose/my_account/index.html.erb
caboose-cms-0.5.142 app/views/caboose/my_account/index.html.erb
caboose-cms-0.5.141 app/views/caboose/my_account/index.html.erb
caboose-cms-0.5.140 app/views/caboose/my_account/index.html.erb
caboose-cms-0.5.139 app/views/caboose/my_account/index.html.erb
caboose-cms-0.5.138 app/views/caboose/my_account/index.html.erb