Files
directory/app/views/admin/local_network/index.erb
T

71 lines
4.8 KiB
Plaintext
Raw Normal View History

2026-06-12 15:40:12 -04:00
<form action="/admin/local_network" method="POST">
<div class="text-4xl mb-10">
Local Network Settings
</div>
2026-06-17 22:30:32 -04:00
<% unless @editing %>
2026-06-12 15:40:12 -04:00
<div class="w-1/2 flex flex-none items-center justify-between ml-5 mb-2">
2026-06-17 22:30:32 -04:00
<div class="flex-none text-xl text-[#<%= @accent_hex %>]">Edit</div>
<div class="grow h-[1px] mt-1 bg-[#<%= @accent_hex %>]"></div>
2026-06-12 15:40:12 -04:00
</div>
<% end %>
<div class="flex ml-10 space-x-2">
<input type="hidden" name="local_network[id]" value="<%= @local_network.id %>">
<div class="flex flex-col items-center">
2026-06-17 22:30:32 -04:00
<input class='h-8 border-2 border-[#<%= @light_hex %>] rounded-lg text-center <%= "text-[##{@accent_hex}]" if !@editing %>' type="text" id="local_network_name" name="local_network[name]" value="<%= @local_network.name %>" <%= 'readonly' if @editing %> >
<div class='<%= "text-[##{@accent_hex}]" if @editing %>'>Name</div>
2026-06-12 15:40:12 -04:00
</div>
<div class="flex flex-col items-center">
2026-06-17 22:30:32 -04:00
<input class='h-8 border-2 border-[#<%= @light_hex %>] rounded-lg text-center <%= "text-[##{@accent_hex}]" if !@editing %>' type="text" id="local_network_subnet" name="local_network[subnet]" value="<%= @local_network.subnet %>" <%= 'readonly' if @editing %> >
<div class='<%= "text-[##{@accent_hex}]" if @editing %>'>Subnet</div>
2026-06-12 15:40:12 -04:00
</div>
<div class="flex flex-col items-center">
2026-06-17 22:30:32 -04:00
<input class='h-8 border-2 border-[#<%= @light_hex %>] rounded-lg text-center <%= "text-[##{@accent_hex}]" if !@editing %>' type="text" id="local_network_tld" name="local_network[tld]" value="<%= @local_network.tld %>" <%= 'readonly' if @editing %> >
<div class='<%= "text-[##{@accent_hex}]" if @editing %>'>Top Level Domain</div>
</div>
<div class="flex flex-col items-center">
<input class='h-8 border-2 border-[#<%= @light_hex %>] rounded-lg text-center <%= @editing ? "text-[##{@local_network.primary_dark_hex}] bg-white" : "text-[##{@accent_hex}]" %>' type="text" id="local_network_primary_dark_hex" name="local_network[primary_dark_hex]" value="<%= @local_network.primary_dark_hex %>" <%= 'readonly' if @editing %> >
<div class='<%= "text-[##{@accent_hex}]" if @editing %>'>Site Primary Dark Hex</div>
</div>
<div class="flex flex-col items-center">
<input class='h-8 border-2 border-[#<%= @light_hex %>] rounded-lg text-center <%= @editing ? "text-[##{@local_network.primary_light_hex}]" : "text-[##{@accent_hex}]" %>' type="text" id="local_network_primary_light_hex" name="local_network[primary_light_hex]" value="<%= @local_network.primary_light_hex %>" <%= 'readonly' if @editing %> >
<div class='<%= "text-[##{@accent_hex}]" if @editing %>'>Site Primary Light Hex</div>
</div>
<div class="flex flex-col items-center">
<input class='h-8 border-2 border-[#<%= @light_hex %>] rounded-lg text-center <%= @editing ? "text-[##{@local_network.accent_hex}]" : "text-[##{@accent_hex}]" %>' type="text" id="local_network_accent_hex" name="local_network[accent_hex]" value="<%= @local_network.accent_hex %>" <%= 'readonly' if @editing %> >
<div class='<%= "text-[##{@accent_hex}]" if @editing %>'>Site Accent Hex</div>
2026-06-12 15:40:12 -04:00
</div>
</div>
<div class="flex flex-col space-y-2 mt-10">
2026-06-17 22:30:32 -04:00
<% if @editing %>
<div class="w-1/2 flex ml-10 space-x-5">
<a href="/admin/local_network/edit" class="inline-block w-50 px-3 py-1 mt-20 text-center font-semibold text-[#<%= @dark_hex %>] bg-[#<%= @light_hex %>] border-2 border-[#<%= @light_hex %>] rounded-lg hover:text-[#<%= @accent_hex %>] hover:bg-[#<%= @dark_hex %>] hover:border-[#<%= @accent_hex %>] transition-colors duration-200">
2026-06-12 15:40:12 -04:00
Edit Local Network
</a>
2026-06-17 22:30:32 -04:00
<a href="/admin" class="inline-block w-50 px-3 py-1 mt-20 text-center font-semibold text-[#<%= @dark_hex %>] bg-[#F80800] border-2 border-[#F80800] rounded-lg hover:text-[#F80800] hover:bg-[#<%= @dark_hex %>] hover:border-[#F80800] transition-colors duration-200">
Back To Admin
</a>
2026-06-12 15:40:12 -04:00
</div>
<% else %>
2026-06-17 22:30:32 -04:00
<div class="w-1/2 flex ml-10 space-x-5">
<button type="submit" class="inline-block w-50 px-3 py-1 mt-20 text-center font-semibold text-[#<%= @dark_hex %>] bg-[#<%= @light_hex %>] border-2 border-[#<%= @light_hex %>] rounded-lg hover:text-[#<%= @accent_hex %>] hover:bg-[#<%= @dark_hex %>] hover:border-[#<%= @accent_hex %>] transition-colors duration-200">
2026-06-12 15:40:12 -04:00
Save Local Network
</button>
2026-06-17 22:30:32 -04:00
<a href="/admin/local_network" class="inline-block w-50 px-3 py-1 mt-20 text-center font-semibold text-[#<%= @dark_hex %>] bg-[#F80800] border-2 border-[#F80800] rounded-lg hover:text-[#F80800] hover:bg-[#<%= @dark_hex %>] hover:border-[#F80800] transition-colors duration-200">
2026-06-12 15:40:12 -04:00
Cancel
</a>
</div>
<% end %>
</div>
</form>