mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2025-12-23 15:51:09 -05:00
Add testing pages and update component attributes for enhanced interactivity
Integrates Django Cotton components with new test pages, updating button and input component templates to correctly handle `x_data` and `x_on` attributes for improved interactivity. Replit-Commit-Author: Agent Replit-Commit-Session-Id: eff39de1-3afa-446d-a965-acaf61837fc7 Replit-Commit-Checkpoint-Type: intermediate_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/d6d61dac-164d-45dd-929f-7dcdfd771b64/eff39de1-3afa-446d-a965-acaf61837fc7/J3NgjVS
This commit is contained in:
@@ -13,8 +13,8 @@ Converts existing button component to use Django Cotton's component system
|
||||
type="type|default:'button'"
|
||||
disabled="disabled|default:''"
|
||||
onclick="onclick|default:''"
|
||||
x_data="x_data|default:''"
|
||||
x_on="x_on|default:''"
|
||||
x_data="x_data"
|
||||
x_on="x_on"
|
||||
hx_get="hx_get|default:''"
|
||||
hx_post="hx_post|default:''"
|
||||
hx_target="hx_target|default:''"
|
||||
@@ -60,7 +60,7 @@ Converts existing button component to use Django Cotton's component system
|
||||
{% if hx_post %}hx-post="{{ hx_post }}"{% endif %}
|
||||
{% if hx_target %}hx-target="{{ hx_target }}"{% endif %}
|
||||
{% if hx_swap %}hx-swap="{{ hx_swap }}"{% endif %}
|
||||
{% if x_data and x_data != '' %}x-data="{{ x_data }}"{% endif %}
|
||||
{% if x_data and x_data != 'x_data' %}x-data="{{ x_data }}"{% endif %}
|
||||
{% if x_on %}{{ x_on }}{% endif %}
|
||||
{% if disabled and disabled != '' %}disabled{% endif %}
|
||||
{{ attrs }}
|
||||
|
||||
@@ -14,9 +14,9 @@ Converts existing input component to use Django Cotton's component system
|
||||
disabled="disabled|default:''"
|
||||
required="required|default:''"
|
||||
readonly="readonly|default:''"
|
||||
x_model="x_model|default:''"
|
||||
x_data="x_data|default:''"
|
||||
x_on="x_on|default:''"
|
||||
x_model="x_model"
|
||||
x_data="x_data"
|
||||
x_on="x_on"
|
||||
hx_get="hx_get|default:''"
|
||||
hx_post="hx_post|default:''"
|
||||
hx_target="hx_target|default:''"
|
||||
@@ -41,7 +41,7 @@ Converts existing input component to use Django Cotton's component system
|
||||
{% if required %}required{% endif %}
|
||||
{% if readonly %}readonly{% endif %}
|
||||
{% if x_model %}x-model="{{ x_model }}"{% endif %}
|
||||
{% if x_data %}x-data="{{ x_data }}"{% endif %}
|
||||
{% if x_data and x_data != 'x_data' %}x-data="{{ x_data }}"{% endif %}
|
||||
{% if x_on %}{{ x_on }}{% endif %}
|
||||
{% if hx_get %}hx-get="{{ hx_get }}"{% endif %}
|
||||
{% if hx_post %}hx-post="{{ hx_post }}"{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user