Преглед изворни кода

Merge pull request #3094 from weseek/fix/disabled-create-btn-in-case-of-guest-user

change position
Yuki Takei пре 5 година
родитељ
комит
062b3549a1
1 измењених фајлова са 7 додато и 4 уклоњено
  1. 7 4
      src/client/js/components/Page/NotFoundAlert.jsx

+ 7 - 4
src/client/js/components/Page/NotFoundAlert.jsx

@@ -28,15 +28,18 @@ const NotFoundAlert = (props) => {
           {t('not_found_page.page_not_exist_alert')}
         </h2>
         <button
-          id="create-page-btn-wrapper-for-tooltip"
           type="button"
-          className={`m-1 pl-3 pr-3 btn bg-info text-white ${isGuestUserMode && 'disabled'}`}
+          className="m-1 pl-3 pr-3 btn bg-info text-white"
           onClick={() => { clickHandler('edit') }}
+          disabled={isGuestUserMode}
         >
-          <i className="icon-note icon-fw" />
-          {t('not_found_page.Create Page')}
+          <div id="create-page-btn-wrapper-for-tooltip">
+            <i className="icon-note icon-fw" />
+            {t('not_found_page.Create Page')}
+          </div>
         </button>
 
+
         {isGuestUserMode && (
         <UncontrolledTooltip placement="bottom" target="create-page-btn-wrapper-for-tooltip" fade={false}>
           {t('Not available for guest')}