Browse Source

modify questionnaire settings form to follow other setting forms

Futa Arai 1 year ago
parent
commit
7ff1523f2c

+ 18 - 20
apps/app/src/client/components/Admin/App/PageBulkExportSettings.tsx

@@ -86,27 +86,25 @@ const PageBulkExportSettings = (): JSX.Element => {
           </div>
           </div>
 
 
           <div className="mb-4">
           <div className="mb-4">
-            <div className="container">
-              <div className="row">
-                <label
-                  className="text-start text-md-end col-md-3 col-form-label"
+            <div className="row">
+              <label
+                className="text-start text-md-end col-md-3 col-form-label"
+              >
+                {t('app_setting.page_bulk_export_storage_period')}
+              </label>
+
+              <div className="col-md-2">
+                <select
+                  className="form-select"
+                  value={(bulkExportDownloadExpirationSeconds ?? 0) / (24 * 60 * 60)}
+                  onChange={(e) => { changeBulkExportDownloadExpirationSeconds(Number(e.target.value)) }}
                 >
                 >
-                  {t('app_setting.page_bulk_export_storage_period')}
-                </label>
-
-                <div className="col-md-2">
-                  <select
-                    className="form-select"
-                    value={(bulkExportDownloadExpirationSeconds ?? 0) / (24 * 60 * 60)}
-                    onChange={(e) => { changeBulkExportDownloadExpirationSeconds(Number(e.target.value)) }}
-                  >
-                    {Array.from({ length: 7 }, (_, i) => i + 1).map(number => (
-                      <option key={`be-download-expiration-option-${number}`} value={number}>
-                        {number}{t('admin:days')}
-                      </option>
-                    ))}
-                  </select>
-                </div>
+                  {Array.from({ length: 7 }, (_, i) => i + 1).map(number => (
+                    <option key={`be-download-expiration-option-${number}`} value={number}>
+                      {number}{t('admin:days')}
+                    </option>
+                  ))}
+                </select>
               </div>
               </div>
             </div>
             </div>
 
 

+ 42 - 28
apps/app/src/client/components/Admin/App/QuestionnaireSettings.tsx

@@ -72,37 +72,51 @@ const QuestionnaireSettings = (): JSX.Element => {
 
 
       {!isLoading && (
       {!isLoading && (
         <>
         <>
-          <div className="my-4">
-            <div className="form-check form-switch form-check-info">
-              <input
-                type="checkbox"
-                className="form-check-input"
-                id="isQuestionnaireEnabled"
-                checked={isQuestionnaireEnabled}
-                onChange={onChangeIsQuestionnaireEnabledHandler}
-              />
-              <label className="form-label form-check-label" htmlFor="isQuestionnaireEnabled">
-                {t('app_setting.enable_questionnaire')}
-              </label>
+          <div className="my-4 row">
+            <label
+              className="text-start text-md-end col-md-3 col-form-label"
+            >
+            </label>
+
+            <div className="col-md-6">
+              <div className="form-check form-switch form-check-info">
+                <input
+                  type="checkbox"
+                  className="form-check-input"
+                  id="isQuestionnaireEnabled"
+                  checked={isQuestionnaireEnabled}
+                  onChange={onChangeIsQuestionnaireEnabledHandler}
+                />
+                <label className="form-label form-check-label" htmlFor="isQuestionnaireEnabled">
+                  {t('app_setting.enable_questionnaire')}
+                </label>
+              </div>
             </div>
             </div>
           </div>
           </div>
 
 
-          <div className="my-4">
-            <div className="form-check form-check-info">
-              <input
-                type="checkbox"
-                className="form-check-input"
-                id="isAppSiteUrlHashed"
-                checked={isAppSiteUrlHashed}
-                onChange={onChangeisAppSiteUrlHashedHandler}
-                disabled={!isQuestionnaireEnabled}
-              />
-              <label className="form-label form-check-label" htmlFor="isAppSiteUrlHashed">
-                {t('app_setting.anonymize_app_site_url')}
-              </label>
-              <p className="form-text text-muted small">
-                {t('app_setting.url_anonymization_explanation')}
-              </p>
+          <div className="my-4 row">
+            <label
+              className="text-start text-md-end col-md-3 col-form-label"
+            >
+            </label>
+
+            <div className="col-md-6">
+              <div className="form-check form-check-info">
+                <input
+                  type="checkbox"
+                  className="form-check-input"
+                  id="isAppSiteUrlHashed"
+                  checked={isAppSiteUrlHashed}
+                  onChange={onChangeisAppSiteUrlHashedHandler}
+                  disabled={!isQuestionnaireEnabled}
+                />
+                <label className="form-label form-check-label" htmlFor="isAppSiteUrlHashed">
+                  {t('app_setting.anonymize_app_site_url')}
+                </label>
+                <p className="form-text text-muted small">
+                  {t('app_setting.url_anonymization_explanation')}
+                </p>
+              </div>
             </div>
             </div>
           </div>
           </div>