neiam
/apollos_crib
It's Apollo's Crib
public · Issues · Pulls 1 · Labels · Forks · Compare · Actions failure · Badges · Packages
Log in to mark this repository.
form theming work, made modal biggerer
8d22488 · gmorell · 2022-07-30 21:35
Files changed
modified
apps/room_sanctum/assets/css/app.css
+9
−9
| 33 | 33 | .alert:empty { |
| 34 | 34 | display: none; |
| 35 | 35 | } |
| 36 | −.invalid-feedback { | |
| 37 | − color: #a94442; | |
| 38 | − display: block; | |
| 39 | − margin: -1rem 0 2rem; | |
| 40 | −} | |
| 36 | +/*.invalid-feedback {*/ | |
| 37 | +/* color: #a94442;*/ | |
| 38 | +/* display: block;*/ | |
| 39 | +/* margin: -1rem 0 2rem;*/ | |
| 40 | +/*}*/ | |
| 41 | 41 | |
| 42 | 42 | /* LiveView specific classes for your customization */ |
| 43 | −.phx-no-feedback.invalid-feedback, | |
| 44 | −.phx-no-feedback .invalid-feedback { | |
| 45 | − display: none; | |
| 46 | −} | |
| 43 | +/*.phx-no-feedback.invalid-feedback,*/ | |
| 44 | +/*.phx-no-feedback .invalid-feedback {*/ | |
| 45 | +/* display: none;*/ | |
| 46 | +/*}*/ | |
| 47 | 47 | |
| 48 | 48 | .phx-click-loading { |
| 49 | 49 | opacity: 0.5; |
modified
apps/room_sanctum/lib/room_sanctum/configuration/configs/aqi.ex
+3
−3
| 5 | 5 | @primary_key false |
| 6 | 6 | |
| 7 | 7 | embedded_schema do |
| 8 | − field :api_key, :string | |
| 8 | +# field :api_key, :string | |
| 9 | 9 | end |
| 10 | 10 | |
| 11 | 11 | def changeset(source, params) do |
| 12 | 12 | source |
| 13 | − |> cast(params, ~w(api_key)a) | |
| 14 | − |> validate_required(:api_key) | |
| 13 | + |> cast(params, []) | |
| 14 | + |> validate_required([]) | |
| 15 | 15 | end |
| 16 | 16 | end |
modified
apps/room_sanctum/lib/room_sanctum_web/live/cfg_foci_live/form_component.html.heex
+26
−10
| 7 | 7 | crossorigin=""></script> |
| 8 | 8 | <script type="text/javascript" src={Routes.static_path(@socket, "/assets/leaflet-centermarker.js")}></script> |
| 9 | 9 | |
| 10 | − <h2><%= @title %></h2> | |
| 10 | + <h2 class="text-2xl font-bold text-accent"><%= @title %></h2> | |
| 11 | 11 | |
| 12 | 12 | <.form |
| 13 | 13 | let={f} |
| 17 | 17 | phx-change="validate" |
| 18 | 18 | phx-submit="save"> |
| 19 | 19 | |
| 20 | − <%= label f, :name %> | |
| 21 | − <%= text_input f, :name %> | |
| 22 | − <%= error_tag f, :name %> | |
| 23 | − | |
| 24 | − <%= label f, :place %> | |
| 25 | − <div id="structural-shim" phx-update="ignore"> | |
| 26 | − <div id="map" style="height: 400px; width: 600px" phx-hook="mkMap" data-latlng={@foci |>getlatlng}></div> | |
| 20 | + <div class="flex"> | |
| 21 | + <div class="w-full"> | |
| 22 | + <div class="form-control"> | |
| 23 | + <%= label f, :name %> | |
| 24 | + <%= text_input f, :name, class: "input w-full max-w-xs"%> | |
| 25 | + <label class="label"> | |
| 26 | + <span class="label-text-alt text-error"> | |
| 27 | + <%= error_tag f, :name %> | |
| 28 | + </span> | |
| 29 | + </label> | |
| 30 | + </div> | |
| 31 | + </div> | |
| 32 | + </div> | |
| 33 | + <div> | |
| 34 | + <div class="w-full"> | |
| 35 | + <div class="form-control"> | |
| 36 | + <%= label f, :place %> | |
| 37 | + <div id="structural-shim" phx-update="ignore"> | |
| 38 | + <div id="map" style="height: 400px; width: 600px" phx-hook="mkMap" data-latlng={@foci |>getlatlng} class="rounded-sm"></div> | |
| 39 | + </div> | |
| 40 | + <%= error_tag f, :place %> | |
| 41 | + </div> | |
| 42 | + </div> | |
| 27 | 43 | </div> |
| 28 | − <%= error_tag f, :place %> | |
| 44 | + | |
| 29 | 45 | |
| 30 | 46 | <div> |
| 31 | − <%= submit "Save", phx_disable_with: "Saving..." %> | |
| 47 | + <%= submit "Save", phx_disable_with: "Saving...", class: "btn btn-secondary" %> | |
| 32 | 48 | </div> |
| 33 | 49 | </.form> |
| 34 | 50 |
modified
apps/room_sanctum/lib/room_sanctum_web/live/cfg_query_live/form_component.html.heex
+117
−74
| 1 | 1 | <div> |
| 2 | − <h2><%= @title %></h2> | |
| 2 | + <h2 class="text-2xl font-bold text-accent"><%= @title %></h2> | |
| 3 | 3 | |
| 4 | 4 | <.form |
| 5 | 5 | let={f} |
| 9 | 9 | phx-change="validate" |
| 10 | 10 | phx-submit="save"> |
| 11 | 11 | |
| 12 | − <%= label f, :source_id %> | |
| 13 | − <%= select f, :source_id, @cfg_sources_sel %> | |
| 14 | − <%= error_tag f, :source_id %> | |
| 15 | − | |
| 16 | − <%= label f, :name %> | |
| 17 | − <%= text_input f, :name %> | |
| 18 | − <%= error_tag f, :name %> | |
| 19 | − | |
| 20 | − <%= label f, :notes %> | |
| 21 | − <%= text_input f, :notes %> | |
| 22 | − <%= error_tag f, :notes %> | |
| 12 | + <div class="flex"> | |
| 13 | + <div class="w-full"> | |
| 14 | + <div class="form-control"> | |
| 15 | + <%= label f, :source_id, "Offering" %> | |
| 16 | + <%= select f, :source_id, @cfg_sources_sel, class: "select w-full max-w-xs" %> | |
| 17 | + <label class="label"> | |
| 18 | + <span class="label-text-alt text-error"> | |
| 19 | + <%= error_tag f, :source_id %> | |
| 20 | + </span> | |
| 21 | + </label> | |
| 22 | + </div> | |
| 23 | 23 | |
| 24 | + <div class="form-control"> | |
| 25 | + <%= label f, :name %> | |
| 26 | + <%= text_input f, :name, class: "input w-full max-w-xs"%> | |
| 27 | + <label class="label"> | |
| 28 | + <span class="label-text-alt text-error"> | |
| 29 | + <%= error_tag f, :name %> | |
| 30 | + </span> | |
| 31 | + </label> | |
| 32 | + </div> | |
| 33 | + | |
| 34 | + <div class="form-control"> | |
| 35 | + <%= label f, :notes %> | |
| 36 | + <%= text_input f, :notes, class: "input w-full max-w-xs" %> | |
| 37 | + <label class="label"> | |
| 38 | + <span class="label-text-alt text-error"> | |
| 39 | + <%= error_tag f, :notes %> | |
| 40 | + </span> | |
| 41 | + </label> | |
| 42 | + </div> | |
| 43 | + </div> | |
| 44 | + </div> | |
| 45 | + <div class="flex"> | |
| 46 | + <div class="w-full"> | |
| 24 | 47 | <%= case get_current_type(@changeset) do %> |
| 25 | 48 | <%= :aqi -> %> |
| 26 | 49 | <%= polymorphic_embed_inputs_for f, :query, :aqi, fn aqi_form -> %> |
| 27 | − <div class="foci-inputs"> | |
| 50 | + <div class="form-control"> | |
| 28 | 51 | <label>Foci</label> |
| 29 | − <%= select aqi_form, :foci_id, @cfg_foci_sel %> | |
| 30 | − <div class="error"> | |
| 52 | + <%= select aqi_form, :foci_id, @cfg_foci_sel, class: "select w-full max-w-xs" %> | |
| 53 | + <label class="label"> | |
| 54 | + <span class="label-text-alt text-error"> | |
| 31 | 55 | <%= error_tag aqi_form, :foci_id %> |
| 32 | − </div> | |
| 56 | + </span> | |
| 57 | + </label> | |
| 33 | 58 | </div> |
| 34 | 59 | <% end %> |
| 35 | 60 | <%= :calendar -> %> |
| 36 | 61 | <%= polymorphic_embed_inputs_for f, :query, :calendar, fn cal_form -> %> |
| 37 | − <!-- <div class="filter-inputs"> | |
| 38 | − <label>filters?</label> | |
| 39 | − <%= text_input cal_form, :filters %> | |
| 40 | − <div class="error"> | |
| 41 | − <%= error_tag cal_form, :filters %> | |
| 42 | − </div> | |
| 43 | − </div> --> | |
| 44 | − <div class="day-inputs"> | |
| 45 | − <label>Number of days to get</label> | |
| 46 | − <%= number_input cal_form, :days %> | |
| 47 | − <div class="error"> | |
| 62 | + <div class="form-control"> | |
| 63 | + <label>Max of days to get</label> | |
| 64 | + <%= number_input cal_form, :days, class: "input w-full max-w-xs" %> | |
| 65 | + <label class="label"> | |
| 66 | + <span class="label-text-alt text-error"> | |
| 48 | 67 | <%= error_tag cal_form, :days %> |
| 49 | − </div> | |
| 68 | + </span> | |
| 69 | + </label> | |
| 50 | 70 | </div> |
| 51 | − <div class="limit-inputs"> | |
| 52 | − <label>Limit</label> | |
| 53 | − <%= number_input cal_form, :limit %> | |
| 54 | − <div class="error"> | |
| 71 | + <div class="form-control"> | |
| 72 | + <label>Max events</label> | |
| 73 | + <%= number_input cal_form, :limit, class: "input w-full max-w-xs" %> | |
| 74 | + <label class="label"> | |
| 75 | + <span class="label-text-alt text-error"> | |
| 55 | 76 | <%= error_tag cal_form, :limit %> |
| 56 | − </div> | |
| 77 | + </span> | |
| 78 | + </label> | |
| 57 | 79 | </div> |
| 58 | − <div class="foci-inputs"> | |
| 80 | + <div class="form-control"> | |
| 59 | 81 | <label>Foci</label> |
| 60 | − <%= select cal_form, :foci_id, @cfg_foci_sel %> | |
| 61 | − <div class="error"> | |
| 82 | + <%= select cal_form, :foci_id, @cfg_foci_sel, class: "select w-full max-w-xs" %> | |
| 83 | + <label class="label"> | |
| 84 | + <span class="label-text-alt text-error"> | |
| 62 | 85 | <%= error_tag cal_form, :foci_id %> |
| 63 | − </div> | |
| 86 | + </span> | |
| 87 | + </label> | |
| 64 | 88 | </div> |
| 65 | 89 | <% end %> |
| 66 | 90 | |
| 67 | 91 | <%= :ephem -> %> |
| 68 | 92 | <%= polymorphic_embed_inputs_for f, :query, :ephem, fn ephem_form -> %> |
| 69 | − <div class="foci-inputs"> | |
| 93 | + <div class="form-control"> | |
| 70 | 94 | <label>Foci</label> |
| 71 | − <%= select ephem_form, :foci_id, @cfg_foci_sel %> | |
| 72 | − <div class="error"> | |
| 73 | − <%= error_tag ephem_form, :foci_id %> | |
| 74 | − </div> | |
| 95 | + <%= select ephem_form, :foci_id, @cfg_foci_sel, class: "select w-full max-w-xs" %> | |
| 96 | + <label class="label"> | |
| 97 | + <span class="label-text-alt text-error"> | |
| 98 | + <%= error_tag ephem_form, :foci_id %> | |
| 99 | + </span> | |
| 100 | + </label> | |
| 75 | 101 | </div> |
| 76 | 102 | <% end %> |
| 77 | 103 | |
| 78 | 104 | <%= :gbfs -> %> |
| 79 | 105 | <%= polymorphic_embed_inputs_for f, :query, :gbfs, fn gbfs_form -> %> |
| 80 | − <div class="url-inputs"> | |
| 106 | + <div class="form-control"> | |
| 81 | 107 | <label>Stop ID</label> |
| 82 | − <%= text_input gbfs_form, :stop_id %> | |
| 83 | − <div class="error"> | |
| 84 | − <%= error_tag gbfs_form, :stop_id %> | |
| 85 | − </div> | |
| 108 | + <%= text_input gbfs_form, :stop_id, class: "input w-full max-w-xs" %> | |
| 109 | + <label class="label"> | |
| 110 | + <span class="label-text-alt text-error"> | |
| 111 | + <%= error_tag gbfs_form, :stop_id %> | |
| 112 | + </span> | |
| 113 | + </label> | |
| 86 | 114 | </div> |
| 87 | 115 | <% end %> |
| 88 | 116 | |
| 89 | 117 | <%= :gtfs -> %> |
| 90 | 118 | <%= polymorphic_embed_inputs_for f, :query, :gtfs, fn gtfs_form -> %> |
| 91 | − <div class="stop-inputs"> | |
| 119 | + <div class="form-control"> | |
| 92 | 120 | <label>Stop</label> |
| 93 | − <%= text_input gtfs_form, :stop %> | |
| 94 | − <div class="error"> | |
| 121 | + <%= text_input gtfs_form, :stop, class: "input w-full max-w-xs" %> | |
| 122 | + <label class="label"> | |
| 123 | + <span class="label-text-alt text-error"> | |
| 95 | 124 | <%= error_tag gtfs_form, :stop %> |
| 96 | − </div> | |
| 125 | + </span> | |
| 126 | + </label> | |
| 97 | 127 | </div> |
| 98 | − <div class="routes-inputs"> | |
| 99 | − <label>Routes</label> | |
| 100 | − <%= text_input gtfs_form, :routes %> | |
| 101 | − <div class="error"> | |
| 128 | + <div class="form-control"> | |
| 129 | + <label>Route Filter</label> | |
| 130 | + <%= text_input gtfs_form, :routes, class: "input w-full max-w-xs" %> | |
| 131 | + <label class="label"> | |
| 132 | + <span class="label-text-alt text-error"> | |
| 102 | 133 | <%= error_tag gtfs_form, :routes %> |
| 103 | − </div> | |
| 134 | + </span> | |
| 135 | + </label> | |
| 104 | 136 | </div> |
| 105 | 137 | <% end %> |
| 106 | 138 | |
| 107 | 139 | <%= :hass -> %> |
| 108 | 140 | <%= polymorphic_embed_inputs_for f, :query, :hass, fn hass_form -> %> |
| 109 | − <div class="entity-inputs"> | |
| 141 | + <div class="form-control"> | |
| 110 | 142 | <label>Entity</label> |
| 111 | − <%= text_input hass_form, :entity %> | |
| 112 | − <div class="error"> | |
| 143 | + <%= text_input hass_form, :entity, class: "input w-full max-w-xs" %> | |
| 144 | + <label class="label"> | |
| 145 | + <span class="label-text-alt text-error"> | |
| 113 | 146 | <%= error_tag hass_form, :entity %> |
| 114 | − </div> | |
| 147 | + </span> | |
| 148 | + </label> | |
| 115 | 149 | </div> |
| 116 | 150 | |
| 117 | − <div class="property-inputs"> | |
| 151 | + <div class="form-control"> | |
| 118 | 152 | <label>Properties</label> |
| 119 | − <%= text_input hass_form, :properties %> | |
| 120 | − <div class="error"> | |
| 153 | + <%= text_input hass_form, :properties, class: "input w-full max-w-xs" %> | |
| 154 | + <label class="label"> | |
| 155 | + <span class="label-text-alt text-error"> | |
| 121 | 156 | <%= error_tag hass_form, :properties %> |
| 122 | − </div> | |
| 157 | + </span> | |
| 158 | + </label> | |
| 123 | 159 | </div> |
| 124 | 160 | <% end %> |
| 125 | 161 | |
| 126 | 162 | <%= :rideshare -> %> |
| 127 | 163 | <%= polymorphic_embed_inputs_for f, :query, :rideshare, fn rs_form -> %> |
| 128 | 164 | <div class="provider-inputs"> |
| 165 | + TODOTODOTODO | |
| 129 | 166 | <label>Provider</label> |
| 130 | 167 | <%= text_input rs_form, :provider %> |
| 131 | 168 | <div class="error"> |
| 142 | 179 | <% end %> |
| 143 | 180 | <%= :tidal -> %> |
| 144 | 181 | <%= polymorphic_embed_inputs_for f, :query, :tidal, fn tidal_form -> %> |
| 145 | − <div class="url-inputs"> | |
| 182 | + <div class="form-control"> | |
| 146 | 183 | <label>Station ID</label> |
| 147 | − <%= text_input tidal_form, :station_id %> | |
| 148 | − <div class="error"> | |
| 184 | + <%= text_input tidal_form, :station_id, class: "input w-full max-w-xs" %> | |
| 185 | + <label class="label"> | |
| 186 | + <span class="label-text-alt text-error"> | |
| 149 | 187 | <%= error_tag tidal_form, :station_id %> |
| 150 | − </div> | |
| 188 | + </span> | |
| 189 | + </label> | |
| 151 | 190 | </div> |
| 152 | 191 | <% end %> |
| 153 | 192 | <%= :weather -> %> |
| 154 | 193 | <%= polymorphic_embed_inputs_for f, :query, :weather, fn weather_form -> %> |
| 155 | − <div class="foci-inputs"> | |
| 194 | + <div class="form-control"> | |
| 156 | 195 | <label>Foci</label> |
| 157 | − <%= select weather_form, :foci_id, @cfg_foci_sel %> | |
| 158 | − <div class="error"> | |
| 196 | + <%= select weather_form, :foci_id, @cfg_foci_sel, class: "select w-full max-w-xs" %> | |
| 197 | + <label class="label"> | |
| 198 | + <span class="label-text-alt text-error"> | |
| 159 | 199 | <%= error_tag weather_form, :foci_id %> |
| 160 | − </div> | |
| 200 | + </span> | |
| 201 | + </label> | |
| 161 | 202 | </div> |
| 162 | 203 | <% end %> |
| 163 | 204 | <% _ -> %> |
| 164 | − nada | |
| 205 | + <span class="text-xs">Pick an offering above</span> | |
| 165 | 206 | <% end %> |
| 207 | + </div> | |
| 208 | + </div> | |
| 166 | 209 | <div> |
| 167 | − <%= submit "Save", phx_disable_with: "Saving..." %> | |
| 210 | + <%= submit "Save", phx_disable_with: "Saving...", class: "btn btn-secondary" %> | |
| 168 | 211 | </div> |
| 169 | 212 | </.form> |
| 170 | 213 | </div> |
modified
apps/room_sanctum/lib/room_sanctum_web/live/cfg_source_live/form_component.html.heex
+118
−78
| 1 | 1 | <div> |
| 2 | − <h2><%= @title %></h2> | |
| 2 | + <h2 class="text-2xl font-bold text-accent"><%= @title %></h2> | |
| 3 | 3 | |
| 4 | 4 | <.form |
| 5 | 5 | let={f} |
| 9 | 9 | phx-change="validate" |
| 10 | 10 | phx-submit="save"> |
| 11 | 11 | |
| 12 | − <%= label f, :name %> | |
| 13 | − <%= text_input f, :name %> | |
| 14 | − <%= error_tag f, :name %> | |
| 15 | − | |
| 16 | − <%= label f, :notes %> | |
| 17 | − <%= text_input f, :notes %> | |
| 18 | − <%= error_tag f, :notes %> | |
| 12 | + <div class="flex"> | |
| 13 | + <div class="w-full"> | |
| 14 | + <div class="form-control"> | |
| 15 | + <%= label f, :name %> | |
| 16 | + <%= text_input f, :name, class: "input w-full max-w-xs"%> | |
| 17 | + <label class="label"> | |
| 18 | + <span class="label-text-alt text-error"> | |
| 19 | + <%= error_tag f, :name %> | |
| 20 | + </span> | |
| 21 | + </label> | |
| 22 | + </div> | |
| 19 | 23 | |
| 20 | − <%= label f, :type %> | |
| 21 | − <%= select f, :type, Ecto.Enum.values(RoomSanctum.Configuration.Source, :type), prompt: "Choose a value" %> | |
| 22 | − <%= error_tag f, :type %> | |
| 24 | + <div class="form-control"> | |
| 25 | + <%= label f, :notes %> | |
| 26 | + <%= text_input f, :notes, class: "input w-full max-w-xs" %> | |
| 27 | + <label class="label"> | |
| 28 | + <span class="label-text-alt text-error"> | |
| 29 | + <%= error_tag f, :notes %> | |
| 30 | + </span> | |
| 31 | + </label> | |
| 32 | + </div> | |
| 23 | 33 | |
| 24 | − <%= label f, :enabled %> | |
| 25 | − <%= checkbox f, :enabled %> | |
| 26 | − <%= error_tag f, :enabled %> | |
| 34 | + <div class="form-control"> | |
| 35 | + <%= label f, :type %> | |
| 36 | + <%= select f, :type, Ecto.Enum.values(RoomSanctum.Configuration.Source, :type), prompt: "Choose a value", class: "select w-full max-w-xs" %> | |
| 37 | + <label class="label"> | |
| 38 | + <span class="label-text-alt text-error"> | |
| 39 | + <%= error_tag f, :type %> | |
| 40 | + </span> | |
| 41 | + </label> | |
| 42 | + </div> | |
| 43 | + </div> | |
| 44 | + <div class="w-1/4"> | |
| 45 | + <div class="form-control m-10"> | |
| 46 | + <%= label f, :enabled %> | |
| 47 | + <%= checkbox f, :enabled, class: "toggle" %> | |
| 48 | + <label class="label"> | |
| 49 | + <span class="label-text-alt text-error"> | |
| 50 | + <%= error_tag f, :enabled %> | |
| 51 | + </span> | |
| 52 | + </label> | |
| 53 | + </div> | |
| 54 | + </div> | |
| 55 | + </div> | |
| 27 | 56 | |
| 28 | 57 | |
| 29 | 58 | <%= case @changeset.changes |> Map.get(:type) || @changeset.data |> Map.get(:type) do %> |
| 30 | 59 | <%= :aqi -> %> |
| 31 | 60 | <%= polymorphic_embed_inputs_for f, :config, :aqi, fn aqi_form -> %> |
| 32 | − <div class="key-inputs"> | |
| 33 | − <label>AirNow API Key</label> | |
| 34 | − <%= text_input aqi_form, :api_key %> | |
| 35 | − <div class="error"> | |
| 36 | − <%= error_tag aqi_form, :api_key %> | |
| 37 | − </div> | |
| 38 | − </div> | |
| 39 | 61 | <% end %> |
| 40 | 62 | |
| 41 | 63 | <%= :calendar -> %> |
| 42 | 64 | <%= polymorphic_embed_inputs_for f, :config, :calendar, fn cal_form -> %> |
| 43 | − <div class="url-inputs"> | |
| 65 | + <div class="form-control"> | |
| 44 | 66 | <label>iCal URL</label> |
| 45 | − <%= text_input cal_form, :url %> | |
| 46 | − <div class="error"> | |
| 67 | + <%= text_input cal_form, :url, class: "input w-full max-w-xs" %> | |
| 68 | + <label class="label"> | |
| 69 | + <span class="label-text-alt text-error"> | |
| 47 | 70 | <%= error_tag cal_form, :url %> |
| 48 | − </div> | |
| 71 | + </span> | |
| 72 | + </label> | |
| 49 | 73 | </div> |
| 50 | 74 | <% end %> |
| 51 | 75 |
| 54 | 78 | <% end %> |
| 55 | 79 | |
| 56 | 80 | <%= :gtfs -> %> |
| 57 | − <%= polymorphic_embed_inputs_for f, :config, :gtfs, fn gtfs_form -> %> | |
| 58 | − <div class="url-inputs"> | |
| 59 | − <label>URL</label> | |
| 60 | − <%= text_input gtfs_form, :url %> | |
| 61 | − <div class="error"> | |
| 81 | + <%= polymorphic_embed_inputs_for f, :config, :gtfs, fn gtfs_form -> %> | |
| 82 | + <div class="form-control"> | |
| 83 | + <label>URL</label> | |
| 84 | + <%= text_input gtfs_form, :url, class: "input w-full max-w-xs" %> | |
| 85 | + <label class="label"> | |
| 86 | + <span class="label-text-alt text-error"> | |
| 62 | 87 | <%= error_tag gtfs_form, :url %> |
| 63 | − </div> | |
| 64 | − </div> | |
| 65 | − <div class="url-inputs"> | |
| 66 | − <label>TZ</label> | |
| 67 | − <%= select gtfs_form, :tz, Tzdata.zone_lists_grouped |> Enum.into([]) %> | |
| 68 | − <div class="error"> | |
| 88 | + </span> | |
| 89 | + </label> | |
| 90 | + </div> | |
| 91 | + <div class="form-control"> | |
| 92 | + <label>TZ</label> | |
| 93 | + <%= select gtfs_form, :tz, Tzdata.zone_lists_grouped |> Enum.into([]), class: "select w-full max-w-xs" %> | |
| 94 | + <label class="label"> | |
| 95 | + <span class="label-text-alt text-error"> | |
| 69 | 96 | <%= error_tag gtfs_form, :tz %> |
| 70 | − </div> | |
| 71 | − </div> | |
| 72 | − <% end %> | |
| 97 | + </span> | |
| 98 | + </label> | |
| 99 | + </div> | |
| 100 | + <% end %> | |
| 73 | 101 | <%= :gbfs -> %> |
| 74 | − <%= polymorphic_embed_inputs_for f, :config, :gbfs, fn gbfs_form -> %> | |
| 75 | − <div class="url-inputs"> | |
| 76 | − <label>URL</label> | |
| 77 | − <%= text_input gbfs_form, :url %> | |
| 78 | − <div class="error"> | |
| 79 | − <%= error_tag gbfs_form, :url %> | |
| 80 | − </div> | |
| 81 | − </div> | |
| 82 | − <div class="url-inputs"> | |
| 83 | − <label>Language</label> | |
| 84 | − <small style="color: blue">TODO Add URL query support...</small> <br /> | |
| 85 | − <%= select gbfs_form, :lang, [:en, :es, :fr, :pt, :it]%> | |
| 86 | − <div class="error"> | |
| 87 | − <%= error_tag gbfs_form, :lang %> | |
| 88 | − </div> | |
| 89 | − </div> | |
| 90 | − <% end %> | |
| 102 | + <%= polymorphic_embed_inputs_for f, :config, :gbfs, fn gbfs_form -> %> | |
| 103 | + <div class="form-control"> | |
| 104 | + <label>URL</label> | |
| 105 | + <%= text_input gbfs_form, :url, class: "input w-full max-w-xs" %> | |
| 106 | + <label class="label"> | |
| 107 | + <span class="label-text-alt text-error"> | |
| 108 | + <%= error_tag gbfs_form, :url %> | |
| 109 | + </span> | |
| 110 | + </label> | |
| 111 | + </div> | |
| 112 | + <div class="form-control"> | |
| 113 | + <label>Language</label> | |
| 114 | + <small style="color: blue">TODO Add URL query support...</small> <br/> | |
| 115 | + <%= select gbfs_form, :lang, [:en, :es, :fr, :pt, :it], class: "select w-full max-w-xs"%> | |
| 116 | + <label class="label"> | |
| 117 | + <span class="label-text-alt text-error"> | |
| 118 | + <%= error_tag gbfs_form, :lang %> | |
| 119 | + </span> | |
| 120 | + </label> | |
| 121 | + </div> | |
| 122 | + <% end %> | |
| 91 | 123 | |
| 92 | 124 | <%= :hass -> %> |
| 93 | 125 | <%= polymorphic_embed_inputs_for f, :config, :hass, fn hass_form -> %> |
| 94 | − <div class="url-inputs"> | |
| 126 | + <div class="form-control"> | |
| 95 | 127 | <label>URL</label> |
| 96 | − <%= text_input hass_form, :url %> | |
| 97 | − <div class="error"> | |
| 128 | + <%= text_input hass_form, :url, class: "input w-full max-w-xs" %> | |
| 129 | + <label class="label"> | |
| 130 | + <span class="label-text-alt text-error"> | |
| 98 | 131 | <%= error_tag hass_form, :url %> |
| 99 | − </div> | |
| 132 | + </span> | |
| 133 | + </label> | |
| 100 | 134 | </div> |
| 101 | 135 | |
| 102 | − <div class="property-inputs"> | |
| 136 | + <div class="form-control"> | |
| 103 | 137 | <label>API Key</label> |
| 104 | − <%= text_input hass_form, :api_key %> | |
| 105 | − <div class="error"> | |
| 138 | + <%= text_input hass_form, :api_key, class: "input w-full max-w-xs" %> | |
| 139 | + <label class="label"> | |
| 140 | + <span class="label-text-alt text-error"> | |
| 106 | 141 | <%= error_tag hass_form, :api_key %> |
| 107 | − </div> | |
| 142 | + </span> | |
| 143 | + </label> | |
| 108 | 144 | </div> |
| 109 | 145 | <% end %> |
| 110 | 146 | |
| 111 | 147 | <%= :rideshare -> %> |
| 112 | 148 | <%= polymorphic_embed_inputs_for f, :config, :rideshare, fn rs_form -> %> |
| 113 | − <div class="provider-inputs"> | |
| 149 | + <div class="form-control"> | |
| 114 | 150 | <label>Provider</label> |
| 115 | − <%= text_input rs_form, :provider %> | |
| 116 | − <div class="error"> | |
| 151 | + <%= text_input rs_form, :provider, class: "input w-full max-w-xs" %> | |
| 152 | + <label class="label"> | |
| 153 | + <span class="label-text-alt text-error"> | |
| 117 | 154 | <%= error_tag rs_form, :provider %> |
| 118 | − </div> | |
| 155 | + </span> | |
| 156 | + </label> | |
| 119 | 157 | </div> |
| 120 | − <div class="api-key-inputs"> | |
| 158 | + <div class="form-control"> | |
| 121 | 159 | <label>API Key</label> |
| 122 | − <%= text_input rs_form, :api_key %> | |
| 123 | − <div class="error"> | |
| 160 | + <%= text_input rs_form, :api_key, class: "input w-full max-w-xs" %> | |
| 161 | + <label class="label"> | |
| 162 | + <span class="label-text-alt text-error"> | |
| 124 | 163 | <%= error_tag rs_form, :api_key %> |
| 125 | − </div> | |
| 164 | + </span> | |
| 165 | + </label> | |
| 126 | 166 | </div> |
| 127 | 167 | <% end %> |
| 128 | 168 | <%= :tidal -> %> |
| 130 | 170 | <% end %> |
| 131 | 171 | <%= :weather -> %> |
| 132 | 172 | <%= polymorphic_embed_inputs_for f, :config, :weather, fn weather_form -> %> |
| 133 | − <div class="api-key-inputs"> | |
| 173 | + <div class="form-control"> | |
| 134 | 174 | <label>OpenWeatherMap API Key</label> |
| 135 | − <%= text_input weather_form, :api_key %> | |
| 175 | + <%= text_input weather_form, :api_key, class: "input w-full max-w-xs" %> | |
| 136 | 176 | <div class="error"> |
| 137 | 177 | <%= error_tag weather_form, :api_key %> |
| 138 | 178 | </div> |
| 139 | 179 | </div> |
| 140 | − <div class="unit-inputs"> | |
| 180 | + <div class="form-control"> | |
| 141 | 181 | <label>Units</label> |
| 142 | − <%= select weather_form, :units, [:standard, :metric, :imperial] %> | |
| 182 | + <%= select weather_form, :units, [:standard, :metric, :imperial], class: "select w-full max-w-xs" %> | |
| 143 | 183 | <div class="error"> |
| 144 | 184 | <%= error_tag weather_form, :units %> |
| 145 | 185 | </div> |
| 146 | 186 | </div> |
| 147 | 187 | <% end %> |
| 148 | 188 | <% _ -> %> |
| 149 | − nada | |
| 189 | + <span class="text-xs">Pick an offering type above</span> | |
| 150 | 190 | <% end %> |
| 151 | 191 | |
| 152 | 192 | <div> |
| 153 | − <%= submit "Save", phx_disable_with: "Saving..." %> | |
| 193 | + <%= submit "Save", phx_disable_with: "Saving...", class: "btn btn-secondary" %> | |
| 154 | 194 | </div> |
| 155 | 195 | </.form> |
| 156 | 196 | </div> |
modified
apps/room_sanctum/lib/room_sanctum_web/live/cfg_vision_live/form_component.html.heex
+53
−28
Click to load diff…
modified
apps/room_sanctum/lib/room_sanctum_web/live/live_helpers.ex
+3
−2
Click to load diff…
modified
apps/room_sanctum/lib/room_sanctum_web/templates/layout/app.html.heex
+1
−1
Click to load diff…
modified
apps/room_sanctum/lib/room_sanctum_web/templates/layout/live.html.heex
+1
−1
Click to load diff…
modified
apps/room_sanctum/lib/room_sanctum_web/templates/layout/root.html.heex
+1
−1
Click to load diff…
modified
apps/room_sanctum/lib/room_sanctum_web/templates/user_registration/new.html.heex
+42
−22
Click to load diff…
modified
apps/room_sanctum/lib/room_sanctum_web/templates/user_reset_password/edit.html.heex
+42
−23
Click to load diff…
modified
apps/room_sanctum/lib/room_sanctum_web/templates/user_reset_password/new.html.heex
+28
−12
Click to load diff…
modified
apps/room_sanctum/lib/room_sanctum_web/templates/user_session/new.html.heex
+44
−23
Click to load diff…
modified
apps/room_sanctum/lib/room_sanctum_web/templates/user_settings/edit.html.heex
+82
−40
Click to load diff…
Parents: 345baf0