GSMEthesis commited on
Commit
6caf429
·
verified ·
1 Parent(s): 19d2b1c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -0
app.py CHANGED
@@ -738,6 +738,16 @@ h3 {
738
  """, unsafe_allow_html=True)
739
 
740
  # ========== توابع اصلی ==========
 
 
 
 
 
 
 
 
 
 
741
  def enhanced_likert_scale(question_data):
742
  """لیکرت اسکیل با خط و نقاط - کاملاً واکنش‌گرا"""
743
  question = question_data["question"]
@@ -1181,6 +1191,7 @@ def map_view():
1181
  st.rerun()
1182
 
1183
  def attention_check1():
 
1184
  """سوال توجه اول با دکمه سبز کاملاً عملی"""
1185
  # 1. تزریق استایل‌های سفارشی
1186
  st.markdown("""
@@ -1242,6 +1253,7 @@ def attention_check1():
1242
  st.warning("لطفاً یک گزینه را انتخاب کنید")
1243
 
1244
  def random_likert_questions():
 
1245
  """نمایش سوالات لیکرت با دکمه‌های دایره‌ای"""
1246
  question_groups = [
1247
  {
 
738
  """, unsafe_allow_html=True)
739
 
740
  # ========== توابع اصلی ==========
741
+ def add_js_for_hidden_button():
742
+ st.markdown("""
743
+ <script>
744
+ function handleClick() {
745
+ // فعال کردن دکمه مخفی Streamlit
746
+ parent.document.querySelector('div[data-testid="stButton"] > button[kind="primary"]').click();
747
+ }
748
+ </script>
749
+ """, unsafe_allow_html=True)
750
+
751
  def enhanced_likert_scale(question_data):
752
  """لیکرت اسکیل با خط و نقاط - کاملاً واکنش‌گرا"""
753
  question = question_data["question"]
 
1191
  st.rerun()
1192
 
1193
  def attention_check1():
1194
+ add_js_for_hidden_button()
1195
  """سوال توجه اول با دکمه سبز کاملاً عملی"""
1196
  # 1. تزریق استایل‌های سفارشی
1197
  st.markdown("""
 
1253
  st.warning("لطفاً یک گزینه را انتخاب کنید")
1254
 
1255
  def random_likert_questions():
1256
+ add_js_for_hidden_button()
1257
  """نمایش سوالات لیکرت با دکمه‌های دایره‌ای"""
1258
  question_groups = [
1259
  {