37 lines
1.5 KiB
Plaintext
37 lines
1.5 KiB
Plaintext
|
|
||
|
<%= form_for @user, url: (@user.new? ? CartoDB.url(self, 'create_organization_user', user: current_user) : CartoDB.url(self, 'update_organization_user', params: { id: @user.username }, user: current_user)), :html => {:class => 'Form js-organizationUserForm CDB-Text'} do |f| %>
|
||
|
|
||
|
<%= f.hidden_field :private_tables_enabled %>
|
||
|
<%= hidden_field_tag :show_account_settings_flash, true %>
|
||
|
<%= csrf_meta_tags %>
|
||
|
|
||
|
<span class="FormAccount-separator"></span>
|
||
|
|
||
|
<%= render :partial => 'admin/organization_users/form/user_details', locals:{f:f} %>
|
||
|
|
||
|
<%= render :partial => 'admin/organization_users/form/user_type', locals:{f:f} %>
|
||
|
|
||
|
<%= render :partial => 'admin/organization_users/form/administrator', locals:{f:f} %>
|
||
|
|
||
|
<%= render :partial => 'admin/organization_users/form/mfa', locals:{f:f} %>
|
||
|
|
||
|
<%= render :partial => 'admin/organization_users/form/quotas', locals:{f:f} %>
|
||
|
|
||
|
<%= render :partial => 'admin/organization_users/form/api_key', locals:{f:f} %>
|
||
|
|
||
|
<%= render :partial => 'admin/organization_users/form/submit', locals:{f:f} %>
|
||
|
|
||
|
<% end %>
|
||
|
|
||
|
<script type="text/javascript">
|
||
|
<% if !@user.new? %>
|
||
|
var organization_user_data = <%= safe_js_object @user.data.to_json %>;
|
||
|
<% else %>
|
||
|
<% @user.values[:db_size_in_bytes] = 0 %>
|
||
|
<% @user.values[:organization] = current_user.data[:organization] %>
|
||
|
<% @user.values[:quota_available_for_user] = current_user.data[:organization][:unassigned_quota] + (@user.values[:quota_in_bytes] || 0) %>
|
||
|
|
||
|
var organization_user_data = <%= safe_js_object @user.values.to_json %>;
|
||
|
<% end %>
|
||
|
</script>
|