forked from shibao/cannery
		
	add debounces to more fields
This commit is contained in:
		@@ -37,11 +37,12 @@
 | 
			
		||||
 | 
			
		||||
    <%= label(f, :notes, gettext("Notes"), class: "title text-lg text-primary-600") %>
 | 
			
		||||
    <%= textarea(f, :notes,
 | 
			
		||||
      id: "add-shot-record-form-notes",
 | 
			
		||||
      class: "input input-primary col-span-2",
 | 
			
		||||
      id: "add-shot-record-form-notes",
 | 
			
		||||
      maxlength: 255,
 | 
			
		||||
      placeholder: gettext("Really great weather"),
 | 
			
		||||
      phx_update: "ignore"
 | 
			
		||||
      phx_debounce: 300,
 | 
			
		||||
      phx_update: "ignore",
 | 
			
		||||
      placeholder: gettext("Really great weather")
 | 
			
		||||
    ) %>
 | 
			
		||||
    <%= error_tag(f, :notes, "col-span-3") %>
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -21,34 +21,38 @@
 | 
			
		||||
    <%= label(f, :name, gettext("Name"), class: "title text-lg text-primary-600") %>
 | 
			
		||||
    <%= text_input(f, :name,
 | 
			
		||||
      class: "input input-primary col-span-2",
 | 
			
		||||
      placeholder: gettext("My cool ammo can"),
 | 
			
		||||
      maxlength: 255
 | 
			
		||||
      maxlength: 255,
 | 
			
		||||
      phx_debounce: 300,
 | 
			
		||||
      placeholder: gettext("My cool ammo can")
 | 
			
		||||
    ) %>
 | 
			
		||||
    <%= error_tag(f, :name, "col-span-3 text-center") %>
 | 
			
		||||
 | 
			
		||||
    <%= label(f, :desc, gettext("Description"), class: "title text-lg text-primary-600") %>
 | 
			
		||||
    <%= textarea(f, :desc,
 | 
			
		||||
      id: "container-form-desc",
 | 
			
		||||
      class: "input input-primary col-span-2",
 | 
			
		||||
      placeholder: gettext("Metal ammo can with the anime girl sticker"),
 | 
			
		||||
      phx_update: "ignore"
 | 
			
		||||
      id: "container-form-desc",
 | 
			
		||||
      phx_debounce: 300,
 | 
			
		||||
      phx_update: "ignore",
 | 
			
		||||
      placeholder: gettext("Metal ammo can with the anime girl sticker")
 | 
			
		||||
    ) %>
 | 
			
		||||
    <%= error_tag(f, :desc, "col-span-3 text-center") %>
 | 
			
		||||
 | 
			
		||||
    <%= label(f, :type, gettext("Type"), class: "title text-lg text-primary-600") %>
 | 
			
		||||
    <%= text_input(f, :type,
 | 
			
		||||
      class: "input input-primary col-span-2",
 | 
			
		||||
      placeholder: gettext("Magazine, Clip, Ammo Box, etc"),
 | 
			
		||||
      maxlength: 255
 | 
			
		||||
      maxlength: 255,
 | 
			
		||||
      phx_debounce: 300,
 | 
			
		||||
      placeholder: gettext("Magazine, Clip, Ammo Box, etc")
 | 
			
		||||
    ) %>
 | 
			
		||||
    <%= error_tag(f, :type, "col-span-3 text-center") %>
 | 
			
		||||
 | 
			
		||||
    <%= label(f, :location, gettext("Location"), class: "title text-lg text-primary-600") %>
 | 
			
		||||
    <%= textarea(f, :location,
 | 
			
		||||
      id: "container-form-location",
 | 
			
		||||
      class: "input input-primary col-span-2",
 | 
			
		||||
      placeholder: gettext("On the bookshelf"),
 | 
			
		||||
      phx_update: "ignore"
 | 
			
		||||
      id: "container-form-location",
 | 
			
		||||
      phx_debounce: 300,
 | 
			
		||||
      phx_update: "ignore",
 | 
			
		||||
      placeholder: gettext("On the bookshelf")
 | 
			
		||||
    ) %>
 | 
			
		||||
    <%= error_tag(f, :location, "col-span-3 text-center") %>
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -28,10 +28,10 @@
 | 
			
		||||
      >
 | 
			
		||||
        <%= text_input(f, :search_term,
 | 
			
		||||
          class: "grow input input-primary",
 | 
			
		||||
          value: @search,
 | 
			
		||||
          role: "search",
 | 
			
		||||
          phx_debounce: 300,
 | 
			
		||||
          placeholder: gettext("Search containers")
 | 
			
		||||
          placeholder: gettext("Search containers"),
 | 
			
		||||
          role: "search",
 | 
			
		||||
          value: @search
 | 
			
		||||
        ) %>
 | 
			
		||||
      </.form>
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -22,7 +22,10 @@
 | 
			
		||||
      class: "title text-lg text-primary-600",
 | 
			
		||||
      maxlength: 255
 | 
			
		||||
    ) %>
 | 
			
		||||
    <%= text_input(f, :name, class: "input input-primary col-span-2") %>
 | 
			
		||||
    <%= text_input(f, :name,
 | 
			
		||||
      class: "input input-primary col-span-2",
 | 
			
		||||
      phx_debounce: 300
 | 
			
		||||
    ) %>
 | 
			
		||||
    <%= error_tag(f, :name, "col-span-3") %>
 | 
			
		||||
 | 
			
		||||
    <%= label(f, :uses_left, gettext("Uses left"), class: "title text-lg text-primary-600") %>
 | 
			
		||||
 
 | 
			
		||||
@@ -42,7 +42,8 @@
 | 
			
		||||
    <%= label(f, :lot_number, gettext("Lot number"), class: "title text-lg text-primary-600") %>
 | 
			
		||||
    <%= text_input(f, :lot_number,
 | 
			
		||||
      class: "text-center col-span-2 input input-primary",
 | 
			
		||||
      maxlength: 255
 | 
			
		||||
      maxlength: 255,
 | 
			
		||||
      phx_debounce: 300
 | 
			
		||||
    ) %>
 | 
			
		||||
    <%= error_tag(f, :price_paid, "col-span-3 text-center") %>
 | 
			
		||||
 | 
			
		||||
@@ -56,8 +57,9 @@
 | 
			
		||||
 | 
			
		||||
    <%= label(f, :notes, gettext("Notes"), class: "title text-lg text-primary-600") %>
 | 
			
		||||
    <%= textarea(f, :notes,
 | 
			
		||||
      id: "pack-form-notes",
 | 
			
		||||
      class: "text-center col-span-2 input input-primary",
 | 
			
		||||
      id: "pack-form-notes",
 | 
			
		||||
      phx_debounce: 300,
 | 
			
		||||
      phx_update: "ignore"
 | 
			
		||||
    ) %>
 | 
			
		||||
    <%= error_tag(f, :notes, "col-span-3 text-center") %>
 | 
			
		||||
 
 | 
			
		||||
@@ -75,10 +75,10 @@
 | 
			
		||||
        >
 | 
			
		||||
          <%= text_input(f, :search_term,
 | 
			
		||||
            class: "grow input input-primary",
 | 
			
		||||
            value: @search,
 | 
			
		||||
            role: "search",
 | 
			
		||||
            phx_debounce: 300,
 | 
			
		||||
            placeholder: gettext("Search ammo")
 | 
			
		||||
            placeholder: gettext("Search ammo"),
 | 
			
		||||
            role: "search",
 | 
			
		||||
            value: @search
 | 
			
		||||
          ) %>
 | 
			
		||||
        </.form>
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -29,11 +29,12 @@
 | 
			
		||||
 | 
			
		||||
    <%= label(f, :notes, gettext("Notes"), class: "title text-lg text-primary-600") %>
 | 
			
		||||
    <%= textarea(f, :notes,
 | 
			
		||||
      id: "shot-record-form-notes",
 | 
			
		||||
      class: "input input-primary col-span-2",
 | 
			
		||||
      id: "shot-record-form-notes",
 | 
			
		||||
      maxlength: 255,
 | 
			
		||||
      placeholder: gettext("Really great weather"),
 | 
			
		||||
      phx_update: "ignore"
 | 
			
		||||
      phx_debounce: 300,
 | 
			
		||||
      phx_update: "ignore",
 | 
			
		||||
      placeholder: gettext("Really great weather")
 | 
			
		||||
    ) %>
 | 
			
		||||
    <%= error_tag(f, :notes, "col-span-3") %>
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -108,10 +108,10 @@
 | 
			
		||||
      >
 | 
			
		||||
        <%= text_input(f, :search_term,
 | 
			
		||||
          class: "grow input input-primary",
 | 
			
		||||
          value: @search,
 | 
			
		||||
          role: "search",
 | 
			
		||||
          phx_debounce: 300,
 | 
			
		||||
          placeholder: gettext("Search shot records")
 | 
			
		||||
          placeholder: gettext("Search shot records"),
 | 
			
		||||
          role: "search",
 | 
			
		||||
          value: @search
 | 
			
		||||
        ) %>
 | 
			
		||||
      </.form>
 | 
			
		||||
    </div>
 | 
			
		||||
 
 | 
			
		||||
@@ -19,7 +19,11 @@
 | 
			
		||||
    </div>
 | 
			
		||||
 | 
			
		||||
    <%= label(f, :name, gettext("Name"), class: "title text-lg text-primary-600") %>
 | 
			
		||||
    <%= text_input(f, :name, class: "input input-primary col-span-2", maxlength: 255) %>
 | 
			
		||||
    <%= text_input(f, :name,
 | 
			
		||||
      class: "input input-primary col-span-2",
 | 
			
		||||
      maxlength: 255,
 | 
			
		||||
      phx_debounce: 300
 | 
			
		||||
    ) %>
 | 
			
		||||
    <%= error_tag(f, :name, "col-span-3") %>
 | 
			
		||||
 | 
			
		||||
    <%= label(f, :bg_color, gettext("Background color"), class: "title text-lg text-primary-600") %>
 | 
			
		||||
 
 | 
			
		||||
@@ -30,10 +30,10 @@
 | 
			
		||||
      >
 | 
			
		||||
        <%= text_input(f, :search_term,
 | 
			
		||||
          class: "grow input input-primary",
 | 
			
		||||
          value: @search,
 | 
			
		||||
          role: "search",
 | 
			
		||||
          phx_debounce: 300,
 | 
			
		||||
          placeholder: gettext("Search tags")
 | 
			
		||||
          placeholder: gettext("Search tags"),
 | 
			
		||||
          role: "search",
 | 
			
		||||
          value: @search
 | 
			
		||||
        ) %>
 | 
			
		||||
      </.form>
 | 
			
		||||
    </div>
 | 
			
		||||
 
 | 
			
		||||
@@ -31,14 +31,16 @@
 | 
			
		||||
    <%= label(f, :name, gettext("Name"), class: "title text-lg text-primary-600") %>
 | 
			
		||||
    <%= text_input(f, :name,
 | 
			
		||||
      class: "text-center col-span-2 input input-primary",
 | 
			
		||||
      maxlength: 255
 | 
			
		||||
      maxlength: 255,
 | 
			
		||||
      phx_debounce: 300
 | 
			
		||||
    ) %>
 | 
			
		||||
    <%= error_tag(f, :name, "col-span-3 text-center") %>
 | 
			
		||||
 | 
			
		||||
    <%= label(f, :desc, gettext("Description"), class: "title text-lg text-primary-600") %>
 | 
			
		||||
    <%= textarea(f, :desc,
 | 
			
		||||
      id: "type-form-desc",
 | 
			
		||||
      class: "text-center col-span-2 input input-primary",
 | 
			
		||||
      id: "type-form-desc",
 | 
			
		||||
      phx_debounce: 300,
 | 
			
		||||
      phx_update: "ignore"
 | 
			
		||||
    ) %>
 | 
			
		||||
    <%= error_tag(f, :desc, "col-span-3 text-center") %>
 | 
			
		||||
@@ -52,6 +54,7 @@
 | 
			
		||||
      <%= text_input(f, :cartridge,
 | 
			
		||||
        class: "text-center col-span-2 input input-primary",
 | 
			
		||||
        maxlength: 255,
 | 
			
		||||
        phx_debounce: 300,
 | 
			
		||||
        placeholder: gettext("5.56x46mm NATO")
 | 
			
		||||
      ) %>
 | 
			
		||||
      <%= error_tag(f, :cartridge, "col-span-3 text-center") %>
 | 
			
		||||
@@ -71,6 +74,7 @@
 | 
			
		||||
    <%= text_input(f, :caliber,
 | 
			
		||||
      class: "text-center col-span-2 input input-primary",
 | 
			
		||||
      maxlength: 255,
 | 
			
		||||
      phx_debounce: 300,
 | 
			
		||||
      placeholder: gettext(".223")
 | 
			
		||||
    ) %>
 | 
			
		||||
    <%= error_tag(f, :caliber, "col-span-3 text-center") %>
 | 
			
		||||
@@ -81,7 +85,8 @@
 | 
			
		||||
      ) %>
 | 
			
		||||
      <%= text_input(f, :unfired_length,
 | 
			
		||||
        class: "text-center col-span-2 input input-primary",
 | 
			
		||||
        maxlength: 255
 | 
			
		||||
        maxlength: 255,
 | 
			
		||||
        phx_debounce: 300
 | 
			
		||||
      ) %>
 | 
			
		||||
      <%= error_tag(f, :unfired_length, "col-span-3 text-center") %>
 | 
			
		||||
 | 
			
		||||
@@ -90,7 +95,8 @@
 | 
			
		||||
      ) %>
 | 
			
		||||
      <%= text_input(f, :brass_height,
 | 
			
		||||
        class: "text-center col-span-2 input input-primary",
 | 
			
		||||
        maxlength: 255
 | 
			
		||||
        maxlength: 255,
 | 
			
		||||
        phx_debounce: 300
 | 
			
		||||
      ) %>
 | 
			
		||||
      <%= error_tag(f, :brass_height, "col-span-3 text-center") %>
 | 
			
		||||
 | 
			
		||||
@@ -99,7 +105,8 @@
 | 
			
		||||
      ) %>
 | 
			
		||||
      <%= text_input(f, :chamber_size,
 | 
			
		||||
        class: "text-center col-span-2 input input-primary",
 | 
			
		||||
        maxlength: 255
 | 
			
		||||
        maxlength: 255,
 | 
			
		||||
        phx_debounce: 300
 | 
			
		||||
      ) %>
 | 
			
		||||
      <%= error_tag(f, :chamber_size, "col-span-3 text-center") %>
 | 
			
		||||
    <% else %>
 | 
			
		||||
@@ -136,6 +143,7 @@
 | 
			
		||||
      <%= text_input(f, :bullet_type,
 | 
			
		||||
        class: "text-center col-span-2 input input-primary",
 | 
			
		||||
        maxlength: 255,
 | 
			
		||||
        phx_debounce: 300,
 | 
			
		||||
        placeholder: gettext("FMJ")
 | 
			
		||||
      ) %>
 | 
			
		||||
      <%= error_tag(f, :bullet_type, "col-span-3 text-center") %>
 | 
			
		||||
@@ -155,6 +163,7 @@
 | 
			
		||||
    <%= text_input(f, :bullet_core,
 | 
			
		||||
      class: "text-center col-span-2 input input-primary",
 | 
			
		||||
      maxlength: 255,
 | 
			
		||||
      phx_debounce: 300,
 | 
			
		||||
      placeholder: gettext("Steel")
 | 
			
		||||
    ) %>
 | 
			
		||||
    <%= error_tag(f, :bullet_core, "col-span-3 text-center") %>
 | 
			
		||||
@@ -164,6 +173,7 @@
 | 
			
		||||
      <%= text_input(f, :jacket_type,
 | 
			
		||||
        class: "text-center col-span-2 input input-primary",
 | 
			
		||||
        maxlength: 255,
 | 
			
		||||
        phx_debounce: 300,
 | 
			
		||||
        placeholder: gettext("Bimetal")
 | 
			
		||||
      ) %>
 | 
			
		||||
      <%= error_tag(f, :jacket_type, "col-span-3 text-center") %>
 | 
			
		||||
@@ -177,6 +187,7 @@
 | 
			
		||||
    <%= text_input(f, :case_material,
 | 
			
		||||
      class: "text-center col-span-2 input input-primary",
 | 
			
		||||
      maxlength: 255,
 | 
			
		||||
      phx_debounce: 300,
 | 
			
		||||
      placeholder: gettext("Brass")
 | 
			
		||||
    ) %>
 | 
			
		||||
    <%= error_tag(f, :case_material, "col-span-3 text-center") %>
 | 
			
		||||
@@ -185,7 +196,8 @@
 | 
			
		||||
      <%= label(f, :wadding, gettext("Wadding"), class: "title text-lg text-primary-600") %>
 | 
			
		||||
      <%= text_input(f, :wadding,
 | 
			
		||||
        class: "text-center col-span-2 input input-primary",
 | 
			
		||||
        maxlength: 255
 | 
			
		||||
        maxlength: 255,
 | 
			
		||||
        phx_debounce: 300
 | 
			
		||||
      ) %>
 | 
			
		||||
      <%= error_tag(f, :wadding, "col-span-3 text-center") %>
 | 
			
		||||
 | 
			
		||||
@@ -193,6 +205,7 @@
 | 
			
		||||
      <%= text_input(f, :shot_type,
 | 
			
		||||
        class: "text-center col-span-2 input input-primary",
 | 
			
		||||
        maxlength: 255,
 | 
			
		||||
        phx_debounce: 300,
 | 
			
		||||
        placeholder: gettext("Target, bird, buck, etc")
 | 
			
		||||
      ) %>
 | 
			
		||||
      <%= error_tag(f, :shot_type, "col-span-3 text-center") %>
 | 
			
		||||
@@ -202,14 +215,16 @@
 | 
			
		||||
      ) %>
 | 
			
		||||
      <%= text_input(f, :shot_material,
 | 
			
		||||
        class: "text-center col-span-2 input input-primary",
 | 
			
		||||
        maxlength: 255
 | 
			
		||||
        maxlength: 255,
 | 
			
		||||
        phx_debounce: 300
 | 
			
		||||
      ) %>
 | 
			
		||||
      <%= error_tag(f, :shot_material, "col-span-3 text-center") %>
 | 
			
		||||
 | 
			
		||||
      <%= label(f, :shot_size, gettext("Shot size"), class: "title text-lg text-primary-600") %>
 | 
			
		||||
      <%= text_input(f, :shot_size,
 | 
			
		||||
        class: "text-center col-span-2 input input-primary",
 | 
			
		||||
        maxlength: 255
 | 
			
		||||
        maxlength: 255,
 | 
			
		||||
        phx_debounce: 300
 | 
			
		||||
      ) %>
 | 
			
		||||
      <%= error_tag(f, :shot_size, "col-span-3 text-center") %>
 | 
			
		||||
 | 
			
		||||
@@ -226,7 +241,8 @@
 | 
			
		||||
      ) %>
 | 
			
		||||
      <%= text_input(f, :shot_charge_weight,
 | 
			
		||||
        class: "text-center col-span-2 input input-primary",
 | 
			
		||||
        maxlength: 255
 | 
			
		||||
        maxlength: 255,
 | 
			
		||||
        phx_debounce: 300
 | 
			
		||||
      ) %>
 | 
			
		||||
      <%= error_tag(f, :shot_charge_weight, "col-span-3 text-center") %>
 | 
			
		||||
    <% else %>
 | 
			
		||||
@@ -245,7 +261,8 @@
 | 
			
		||||
    <%= label(f, :powder_type, gettext("Powder type"), class: "title text-lg text-primary-600") %>
 | 
			
		||||
    <%= text_input(f, :powder_type,
 | 
			
		||||
      class: "text-center col-span-2 input input-primary",
 | 
			
		||||
      maxlength: 255
 | 
			
		||||
      maxlength: 255,
 | 
			
		||||
      phx_debounce: 300
 | 
			
		||||
    ) %>
 | 
			
		||||
    <%= error_tag(f, :powder_type, "col-span-3 text-center") %>
 | 
			
		||||
 | 
			
		||||
@@ -267,6 +284,7 @@
 | 
			
		||||
    <%= text_input(f, :pressure,
 | 
			
		||||
      class: "text-center col-span-2 input input-primary",
 | 
			
		||||
      maxlength: 255,
 | 
			
		||||
      phx_debounce: 300,
 | 
			
		||||
      placeholder: gettext("+P")
 | 
			
		||||
    ) %>
 | 
			
		||||
    <%= error_tag(f, :pressure, "col-span-3 text-center") %>
 | 
			
		||||
@@ -277,7 +295,8 @@
 | 
			
		||||
      ) %>
 | 
			
		||||
      <%= text_input(f, :dram_equivalent,
 | 
			
		||||
        class: "text-center col-span-2 input input-primary",
 | 
			
		||||
        maxlength: 255
 | 
			
		||||
        maxlength: 255,
 | 
			
		||||
        phx_debounce: 300
 | 
			
		||||
      ) %>
 | 
			
		||||
      <%= error_tag(f, :dram_equivalent, "col-span-3 text-center") %>
 | 
			
		||||
    <% else %>
 | 
			
		||||
@@ -306,6 +325,7 @@
 | 
			
		||||
    <%= text_input(f, :primer_type,
 | 
			
		||||
      class: "text-center col-span-2 input input-primary",
 | 
			
		||||
      maxlength: 255,
 | 
			
		||||
      phx_debounce: 300,
 | 
			
		||||
      placeholder: gettext("Boxer")
 | 
			
		||||
    ) %>
 | 
			
		||||
    <%= error_tag(f, :primer_type, "col-span-3 text-center") %>
 | 
			
		||||
@@ -314,6 +334,7 @@
 | 
			
		||||
    <%= text_input(f, :firing_type,
 | 
			
		||||
      class: "text-center col-span-2 input input-primary",
 | 
			
		||||
      maxlength: 255,
 | 
			
		||||
      phx_debounce: 300,
 | 
			
		||||
      placeholder: gettext("Centerfire")
 | 
			
		||||
    ) %>
 | 
			
		||||
    <%= error_tag(f, :firing_type, "col-span-3 text-center") %>
 | 
			
		||||
@@ -345,14 +366,16 @@
 | 
			
		||||
    <%= label(f, :manufacturer, gettext("Manufacturer"), class: "title text-lg text-primary-600") %>
 | 
			
		||||
    <%= text_input(f, :manufacturer,
 | 
			
		||||
      class: "text-center col-span-2 input input-primary",
 | 
			
		||||
      maxlength: 255
 | 
			
		||||
      maxlength: 255,
 | 
			
		||||
      phx_debounce: 300
 | 
			
		||||
    ) %>
 | 
			
		||||
    <%= error_tag(f, :manufacturer, "col-span-3 text-center") %>
 | 
			
		||||
 | 
			
		||||
    <%= label(f, :upc, gettext("UPC"), class: "title text-lg text-primary-600") %>
 | 
			
		||||
    <%= text_input(f, :upc,
 | 
			
		||||
      class: "text-center col-span-2 input input-primary",
 | 
			
		||||
      maxlength: 255
 | 
			
		||||
      maxlength: 255,
 | 
			
		||||
      phx_debounce: 300
 | 
			
		||||
    ) %>
 | 
			
		||||
    <%= error_tag(f, :upc, "col-span-3 text-center") %>
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -54,10 +54,10 @@
 | 
			
		||||
      >
 | 
			
		||||
        <%= text_input(f, :search_term,
 | 
			
		||||
          class: "grow input input-primary",
 | 
			
		||||
          value: @search,
 | 
			
		||||
          role: "search",
 | 
			
		||||
          phx_debounce: 300,
 | 
			
		||||
          placeholder: gettext("Search catalog")
 | 
			
		||||
          placeholder: gettext("Search catalog"),
 | 
			
		||||
          role: "search",
 | 
			
		||||
          value: @search
 | 
			
		||||
        ) %>
 | 
			
		||||
      </.form>
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user