improvements
This commit is contained in:
@@ -144,10 +144,12 @@
|
|||||||
[:div.htmx-indicator-hidden.inline-flex.gap-2.items-center.justify-center (into [:div.h-4.w-4] children)]]))
|
[:div.htmx-indicator-hidden.inline-flex.gap-2.items-center.justify-center (into [:div.h-4.w-4] children)]]))
|
||||||
|
|
||||||
(defn a-icon-button- [params & children]
|
(defn a-icon-button- [params & children]
|
||||||
|
(let [class-str (:class params "")
|
||||||
|
has-padding? (re-find #"\bp[x y]?-\d+(\.\d+)?\b" class-str)]
|
||||||
(into
|
(into
|
||||||
[:a (-> params (update :class str " inline-flex items-center justify-center bg-white dark:bg-gray-600 items-center p-3 text-sm font-medium border border-gray-300 dark:border-gray-700 text-center text-gray-500 hover:text-gray-800 rounded-lg dark:text-gray-400 dark:hover:text-gray-100")
|
[:a (-> params (update :class str (if has-padding? "" " p-3") " inline-flex items-center justify-center bg-white dark:bg-gray-600 items-center text-sm font-medium border border-gray-300 dark:border-gray-700 text-center text-gray-500 hover:text-gray-800 rounded-lg dark:text-gray-400 dark:hover:text-gray-100")
|
||||||
(update :href #(or % "")))
|
(update :href #(or % "")))
|
||||||
[:div.h-4.w-4 children]]))
|
[:div.h-4.w-4 children]])))
|
||||||
|
|
||||||
(defn save-button- [params & children]
|
(defn save-button- [params & children]
|
||||||
[:button {:class "text-white bg-green-500 hover:bg-green-700 focus:ring-4 focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center mr-2 dark:bg-green-600 dark:hover:bg-green-700 dark:focus:ring-green-800 inline-flex items-center hover:scale-105 transition duration-300"}
|
[:button {:class "text-white bg-green-500 hover:bg-green-700 focus:ring-4 focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center mr-2 dark:bg-green-600 dark:hover:bg-green-700 dark:focus:ring-green-800 inline-flex items-center hover:scale-105 transition duration-300"}
|
||||||
|
|||||||
@@ -721,7 +721,7 @@
|
|||||||
:current-account-id current-account-id}))))
|
:current-account-id current-account-id}))))
|
||||||
|
|
||||||
(defn save-item-account [request]
|
(defn save-item-account [request]
|
||||||
(let [{:keys [field-name-prefix client-id]} (:query-params request)
|
(let [{:keys [field-name-prefix client-id]} (:params request)
|
||||||
account-input-name (str field-name-prefix "[ledger-mapped/account]")
|
account-input-name (str field-name-prefix "[ledger-mapped/account]")
|
||||||
account-id-str (get-in request [:form-params account-input-name])
|
account-id-str (get-in request [:form-params account-input-name])
|
||||||
account-id (when (and account-id-str (not= account-id-str ""))
|
account-id (when (and account-id-str (not= account-id-str ""))
|
||||||
|
|||||||
Reference in New Issue
Block a user