Sha256: a0b02bd789a9c97629ff853959cbd14ac8cdf0da1652ba52c8350e8867dc76e6

Contents?: true

Size: 1.21 KB

Versions: 18

Compression:

Stored size: 1.21 KB

Contents

<h1>Edit Agent</h1>
<%= render :partial => 'caboose_rets/agents/admin_top_nav' %>

<div id='agent_<%= @agent.id %>_hide'         ></div>
<div id='agent_<%= @agent.id %>_assistant_to' ></div>

<p style='clear: both;'><input type='button' value='< Back' onclick="window.location='/admin/agents';" /></p>

<% content_for :caboose_js do %>
<%= javascript_include_tag "caboose/model/all" %>
<script type='text/javascript'>
$(document).ready(function() {
  m = new ModelBinder({
    name: 'Agent',
    id: <%= @agent.id %>,
    update_url: '/admin/agents/<%= @agent.id %>',
    authenticity_token: '<%= form_authenticity_token %>',
    attributes: [
      { name: 'hide'            , nice_name: 'Hide from website'  , type: 'checkbox'  , value: <%= raw @agent.hide                        %>, width: 400 },
      { name: 'assistant_to'    , nice_name: 'Assistant To'       , type: 'select'    , value: <%= raw Caboose.json(@agent.assistant_to)  %>, width: 400, text: <%= raw Caboose.json(@boss ? "#{@boss.first_name} #{@boss.last_name}" : 'empty') %>, options_url: '/admin/agents/assistant-to-options', empty_text: 'Not an assistant' }
    ]
  });
});
$(window).load(function() {
  var modal = new CabooseModal(800);
});
</script>
<% end %>

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
caboose-rets-0.0.32 app/views/caboose_rets/agents/admin_edit.html.erb
caboose-rets-0.0.31 app/views/caboose_rets/agents/admin_edit.html.erb
caboose-rets-0.0.30 app/views/caboose_rets/agents/admin_edit.html.erb
caboose-rets-0.0.29 app/views/caboose_rets/agents/admin_edit.html.erb
caboose-rets-0.0.28 app/views/caboose_rets/agents/admin_edit.html.erb
caboose-rets-0.0.27 app/views/caboose_rets/agents/admin_edit.html.erb
caboose-rets-0.0.26 app/views/caboose_rets/agents/admin_edit.html.erb
caboose-rets-0.0.25 app/views/caboose_rets/agents/admin_edit.html.erb
caboose-rets-0.0.24 app/views/caboose_rets/agents/admin_edit.html.erb
caboose-rets-0.0.22 app/views/caboose_rets/agents/admin_edit.html.erb
caboose-rets-0.0.21 app/views/caboose_rets/agents/admin_edit.html.erb
caboose-rets-0.0.20 app/views/caboose_rets/agents/admin_edit.html.erb
caboose-rets-0.0.19 app/views/caboose_rets/agents/admin_edit.html.erb
caboose-rets-0.0.18 app/views/caboose_rets/agents/admin_edit.html.erb
caboose-rets-0.0.16 app/views/caboose_rets/agents/admin_edit.html.erb
caboose-rets-0.0.15 app/views/caboose_rets/agents/admin_edit.html.erb
caboose-rets-0.0.14 app/views/caboose_rets/agents/admin_edit.html.erb
caboose-rets-0.0.13 app/views/caboose_rets/agents/admin_edit.html.erb