Maryam Ilka commited on
Commit
2b9a4f8
·
verified ·
1 Parent(s): 532da94

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -9
app.py CHANGED
@@ -615,15 +615,15 @@ def attention_check1():
615
  key="att1_radio"
616
  )
617
 
618
- st.markdown("""
619
- <style>
620
- div[data-testid="stButton"] > button[kind="primary"] {
621
- background-color: #28a745 !important;
622
- }
623
- </style>
624
- """, unsafe_allow_html=True)
625
-
626
- if st.button("ادامه", key="continue_green"):
627
  if answer:
628
  st.session_state.attention_check1 = answer
629
  st.session_state.current_page = "random_likert_questions"
 
615
  key="att1_radio"
616
  )
617
 
618
+ # استفاده از کامپوننت HTML برای دکمه سبز
619
+ components.html(f"""
620
+ <button onclick="window.parent.postMessage('continue_green_clicked', '*')"
621
+ style="background-color:#28a745; color:white; border:none; border-radius:8px; padding:10px 20px; font-weight:bold; width:100%; cursor:pointer;">
622
+ ادامه
623
+ </button>
624
+ """, height=45)
625
+
626
+ if st.session_state.get("continue_green_clicked") or st.button("ادامه", key="continue_btn_hidden"):
627
  if answer:
628
  st.session_state.attention_check1 = answer
629
  st.session_state.current_page = "random_likert_questions"