From 84f213454a7e00461c839d3850db62b3c3ef21c0 Mon Sep 17 00:00:00 2001 From: ivan Date: Fri, 25 May 2018 21:13:38 -0300 Subject: [PATCH 1/4] Fix TextEditor CSS --- client/package.json | 2 +- client/src/scss/_react-draft-wysiwyg.scss | 1251 +++++++++------------ 2 files changed, 560 insertions(+), 693 deletions(-) diff --git a/client/package.json b/client/package.json index 85ed781b..1897e18a 100644 --- a/client/package.json +++ b/client/package.json @@ -69,7 +69,7 @@ "react-chartjs-2": "^2.0.0", "react-document-title": "^1.0.2", "react-dom": "^15.4.2", - "react-draft-wysiwyg": "^1.7.6", + "react-draft-wysiwyg": "^1.12.13", "react-google-recaptcha": "^0.5.2", "react-motion": "^0.4.7", "react-redux": "^4.4.5", diff --git a/client/src/scss/_react-draft-wysiwyg.scss b/client/src/scss/_react-draft-wysiwyg.scss index 87c4199e..273ee4ba 100644 --- a/client/src/scss/_react-draft-wysiwyg.scss +++ b/client/src/scss/_react-draft-wysiwyg.scss @@ -1,976 +1,843 @@ .rdw-option-wrapper { - border: 1px solid #F1F1F1; - padding: 5px; - min-width: 25px; - height: 20px; - border-radius: 2px; - margin: 0 4px; - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-pack: center; - -ms-flex-pack: center; - justify-content: center; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - cursor: pointer; - background: white; - text-transform: capitalize; + border: 1px solid #F1F1F1; + padding: 5px; + min-width: 25px; + height: 20px; + border-radius: 2px; + margin: 0 4px; + display: flex; + justify-content: center; + align-items: center; + cursor: pointer; + background: white; + text-transform: capitalize; } .rdw-option-wrapper:hover { - box-shadow: 1px 1px 0px #BFBDBD; + box-shadow: 1px 1px 0px #BFBDBD; } .rdw-option-wrapper:active { - box-shadow: 1px 1px 0px #BFBDBD inset; + box-shadow: 1px 1px 0px #BFBDBD inset; } .rdw-option-active { - box-shadow: 1px 1px 0px #BFBDBD inset; + box-shadow: 1px 1px 0px #BFBDBD inset; } .rdw-option-disabled { - opacity: 0.3; - cursor: default; + opacity: 0.3; + cursor: default; } .rdw-dropdown-wrapper { - height: 30px; - background: white; - cursor: pointer; - border: 1px solid #F1F1F1; - border-radius: 2px; - margin: 0 3px; - text-transform: capitalize; - background: white; + height: 30px; + background: white; + cursor: pointer; + border: 1px solid #F1F1F1; + border-radius: 2px; + margin: 0 3px; + text-transform: capitalize; + background: white; } .rdw-dropdown-wrapper:focus { - outline: none; + outline: none; } .rdw-dropdown-wrapper:hover { - box-shadow: 1px 1px 0px #BFBDBD; - background-color: #FFFFFF; + box-shadow: 1px 1px 0px #BFBDBD; + background-color: #FFFFFF; } .rdw-dropdown-wrapper:active { - box-shadow: 1px 1px 0px #BFBDBD inset; + box-shadow: 1px 1px 0px #BFBDBD inset; } .rdw-dropdown-carettoopen { - height: 0px; - width: 0px; - position: absolute; - top: 35%; - right: 10%; - border-top: 6px solid black; - border-left: 5px solid transparent; - border-right: 5px solid transparent; + height: 0px; + width: 0px; + position: absolute; + top: 35%; + right: 10%; + border-top: 6px solid black; + border-left: 5px solid transparent; + border-right: 5px solid transparent; } .rdw-dropdown-carettoclose { - height: 0px; - width: 0px; - position: absolute; - top: 35%; - right: 10%; - border-bottom: 6px solid black; - border-left: 5px solid transparent; - border-right: 5px solid transparent; + height: 0px; + width: 0px; + position: absolute; + top: 35%; + right: 10%; + border-bottom: 6px solid black; + border-left: 5px solid transparent; + border-right: 5px solid transparent; } .rdw-dropdown-selectedtext { - display: -webkit-box; - display: -ms-flexbox; - display: flex; - position: relative; - height: 100%; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - padding: 0 5px; + display: flex; + position: relative; + height: 100%; + align-items: center; + padding: 0 5px; } .rdw-dropdown-optionwrapper { - z-index: 100; - position: relative; - border: 1px solid #F1F1F1; - width: 98%; - background: white; - border-radius: 2px; - margin: 0; - padding: 0; + z-index: 100; + position: relative; + border: 1px solid #F1F1F1; + width: 98%; + background: white; + border-radius: 2px; + margin: 0; + padding: 0; + max-height: 250px; + overflow-y: scroll; } .rdw-dropdown-optionwrapper:hover { - box-shadow: 1px 1px 0px #BFBDBD; - background-color: #FFFFFF; + box-shadow: 1px 1px 0px #BFBDBD; + background-color: #FFFFFF; } .rdw-dropdownoption-default { - min-height: 25px; - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - padding: 0 5px; + min-height: 25px; + display: flex; + align-items: center; + padding: 0 5px; } .rdw-dropdownoption-highlighted { - background: #F1F1F1; + background: #F1F1F1; } .rdw-dropdownoption-active { - background: #f5f5f5; + background: #f5f5f5; } .rdw-dropdownoption-disabled { - opacity: 0.3; - cursor: default; + opacity: 0.3; + cursor: default; } .rdw-inline-wrapper { - display: -webkit-box; - display: -ms-flexbox; - display: flex; - margin-bottom: 6px; + display: flex; + align-items: center; + margin-bottom: 6px; } .rdw-inline-dropdown { - width: 50px; + width: 50px; } .rdw-inline-dropdownoption { - height: 40px; - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-pack: center; - -ms-flex-pack: center; - justify-content: center; + height: 40px; + display: flex; + justify-content: center; } .rdw-block-wrapper { - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - margin-bottom: 6px; + display: flex; + align-items: center; + margin-bottom: 6px; } .rdw-block-dropdown { - width: 110px; + width: 110px; } .rdw-fontsize-wrapper { - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - margin-bottom: 6px; + display: flex; + align-items: center; + margin-bottom: 6px; } .rdw-fontsize-dropdown { - min-width: 40px; + min-width: 40px; } .rdw-fontsize-option { - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-pack: center; - -ms-flex-pack: center; - justify-content: center; + display: flex; + justify-content: center; } .rdw-fontfamily-wrapper { - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - margin-bottom: 6px; + display: flex; + align-items: center; + margin-bottom: 6px; } .rdw-fontfamily-dropdown { - width: 115px; + width: 115px; } .rdw-fontfamily-placeholder { - white-space: nowrap; - max-width: 90px; - overflow: hidden; - text-overflow: ellipsis; + white-space: nowrap; + max-width: 90px; + overflow: hidden; + text-overflow: ellipsis; } .rdw-fontfamily-optionwrapper { - width: 140px; + width: 140px; } .rdw-list-wrapper { - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - margin-bottom: 6px; + display: flex; + align-items: center; + margin-bottom: 6px; } .rdw-list-dropdown { - width: 50px; - z-index: 90; + width: 50px; + z-index: 90; } .rdw-list-dropdownOption { - height: 40px; - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-pack: center; - -ms-flex-pack: center; - justify-content: center; + height: 40px; + display: flex; + justify-content: center; } .rdw-text-align-wrapper { - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - margin-bottom: 6px; + display: flex; + align-items: center; + margin-bottom: 6px; } .rdw-text-align-dropdown { - width: 50px; - z-index: 90; + width: 50px; + z-index: 90; } .rdw-text-align-dropdownOption { - height: 40px; - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-pack: center; - -ms-flex-pack: center; - justify-content: center; + height: 40px; + display: flex; + justify-content: center; } .rdw-right-aligned-block { - text-align: right; + text-align: right; } .rdw-left-aligned-block { - text-align: left; + text-align: left !important; } .rdw-center-aligned-block { - text-align: center; + text-align: center !important; } .rdw-justify-aligned-block { - text-align: justify; + text-align: justify !important; } .rdw-right-aligned-block > div { - display: inline; + display: inline-block; } .rdw-left-aligned-block > div { - display: inline; + display: inline-block; } .rdw-center-aligned-block > div { - display: inline; + display: inline-block; } .rdw-justify-aligned-block > div { - display: inline; + display: inline-block; } .rdw-colorpicker-wrapper { - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - margin-bottom: 6px; - position: relative; + display: flex; + align-items: center; + margin-bottom: 6px; + position: relative; } .rdw-colorpicker-modal { - position: absolute; - top: 35px; - left: 5px; - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - -ms-flex-direction: column; - flex-direction: column; - width: 175px; - height: 175px; - border: 1px solid #F1F1F1; - padding: 15px; - border-radius: 2px; - z-index: 100; - background: white; - box-shadow: 3px 3px 5px #BFBDBD; + position: absolute; + top: 35px; + left: 5px; + display: flex; + flex-direction: column; + width: 175px; + height: 175px; + border: 1px solid #F1F1F1; + padding: 15px; + border-radius: 2px; + z-index: 100; + background: white; + box-shadow: 3px 3px 5px #BFBDBD; } .rdw-colorpicker-modal-header { - display: -webkit-box; - display: -ms-flexbox; - display: flex; - padding-bottom: 5px; + display: flex; + padding-bottom: 5px; } .rdw-colorpicker-modal-style-label { - font-size: 15px; - width: 50%; - text-align: center; - cursor: pointer; - padding: 0 10px 5px; + font-size: 15px; + width: 50%; + text-align: center; + cursor: pointer; + padding: 0 10px 5px; } .rdw-colorpicker-modal-style-label-active { - border-bottom: 2px solid #0a66b7; + border-bottom: 2px solid #0a66b7; } .rdw-colorpicker-modal-options { - margin: 5px auto; - display: -webkit-box; - display: -ms-flexbox; - display: flex; - width: 170px; - -ms-flex-wrap: wrap; - flex-wrap: wrap; + margin: 5px auto; + display: flex; + width: 100%; + height: 100%; + flex-wrap: wrap; + overflow: scroll; } .rdw-colorpicker-cube { - width: 22px; - height: 22px; - border: 1px solid #F1F1F1; + width: 22px; + height: 22px; + border: 1px solid #F1F1F1; } .rdw-colorpicker-option { - margin: 3px; - padding: 0; - min-height: 20px; - border: none; - width: 22px; - height: 22px; - min-width: 22px; - box-shadow: 1px 2px 1px #BFBDBD inset; + margin: 3px; + padding: 0; + min-height: 20px; + border: none; + width: 22px; + height: 22px; + min-width: 22px; + box-shadow: 1px 2px 1px #BFBDBD inset; } .rdw-colorpicker-option:hover { - box-shadow: 1px 2px 1px #BFBDBD; + box-shadow: 1px 2px 1px #BFBDBD; } .rdw-colorpicker-option:active { - box-shadow: -1px -2px 1px #BFBDBD; + box-shadow: -1px -2px 1px #BFBDBD; } .rdw-colorpicker-option-active { - box-shadow: 0px 0px 2px 2px #BFBDBD; + box-shadow: 0px 0px 2px 2px #BFBDBD; } .rdw-link-wrapper { - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - margin-bottom: 6px; - position: relative; + display: flex; + align-items: center; + margin-bottom: 6px; + position: relative; } .rdw-link-dropdown { - width: 50px; + width: 50px; } .rdw-link-dropdownOption { - height: 40px; - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-pack: center; - -ms-flex-pack: center; - justify-content: center; + height: 40px; + display: flex; + justify-content: center; } .rdw-link-dropdownPlaceholder { - margin-left: 8px; + margin-left: 8px; } .rdw-link-modal { - position: absolute; - top: 35px; - left: 5px; - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - -ms-flex-direction: column; - flex-direction: column; - width: 235px; - height: 180px; - border: 1px solid #F1F1F1; - padding: 15px; - border-radius: 2px; - z-index: 100; - background: white; - box-shadow: 3px 3px 5px #BFBDBD; + position: absolute; + top: 35px; + left: 5px; + display: flex; + flex-direction: column; + width: 235px; + height: 205px; + border: 1px solid #F1F1F1; + padding: 15px; + border-radius: 2px; + z-index: 100; + background: white; + box-shadow: 3px 3px 5px #BFBDBD; } .rdw-link-modal-label { - font-size: 15px; + font-size: 15px; } .rdw-link-modal-input { - margin-top: 5px; - border-radius: 2px; - border: 1px solid #F1F1F1; - height: 25px; - margin-bottom: 15px; - padding: 0 5px; + margin-top: 5px; + border-radius: 2px; + border: 1px solid #F1F1F1; + height: 25px; + margin-bottom: 15px; + padding: 0 5px; } .rdw-link-modal-input:focus { - outline: none; + outline: none; } .rdw-link-modal-buttonsection { - margin: 0 auto; + margin: 0 auto; +} +.rdw-link-modal-target-option { + margin-bottom: 20px; +} +.rdw-link-modal-target-option > span { + margin-left: 5px; } .rdw-link-modal-btn { - margin-left: 10px; - width: 75px; - height: 30px; - border: 1px solid #F1F1F1; - border-radius: 2px; - cursor: pointer; - background: white; - text-transform: capitalize; + margin-left: 10px; + width: 75px; + height: 30px; + border: 1px solid #F1F1F1; + border-radius: 2px; + cursor: pointer; + background: white; + text-transform: capitalize; } .rdw-link-modal-btn:hover { - box-shadow: 1px 1px 0px #BFBDBD; + box-shadow: 1px 1px 0px #BFBDBD; } .rdw-link-modal-btn:active { - box-shadow: 1px 1px 0px #BFBDBD inset; + box-shadow: 1px 1px 0px #BFBDBD inset; } .rdw-link-modal-btn:focus { - outline: none !important; + outline: none !important; } .rdw-link-modal-btn:disabled { - background: #ece9e9; + background: #ece9e9; } .rdw-link-dropdownoption { - height: 40px; - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-pack: center; - -ms-flex-pack: center; - justify-content: center; + height: 40px; + display: flex; + justify-content: center; } .rdw-history-dropdown { - width: 50px; + width: 50px; } .rdw-embedded-wrapper { - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - margin-bottom: 6px; - position: relative; + display: flex; + align-items: center; + margin-bottom: 6px; + position: relative; } .rdw-embedded-modal { - position: absolute; - top: 35px; - left: 5px; - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - -ms-flex-direction: column; - flex-direction: column; - width: 235px; - height: 180px; - border: 1px solid #F1F1F1; - padding: 15px; - border-radius: 2px; - z-index: 100; - background: white; - -webkit-box-pack: justify; - -ms-flex-pack: justify; - justify-content: space-between; - box-shadow: 3px 3px 5px #BFBDBD; + position: absolute; + top: 35px; + left: 5px; + display: flex; + flex-direction: column; + width: 235px; + height: 180px; + border: 1px solid #F1F1F1; + padding: 15px; + border-radius: 2px; + z-index: 100; + background: white; + justify-content: space-between; + box-shadow: 3px 3px 5px #BFBDBD; } .rdw-embedded-modal-header { - font-size: 15px; - display: -webkit-box; - display: -ms-flexbox; - display: flex; + font-size: 15px; + display: flex; } .rdw-embedded-modal-header-option { - width: 50%; - cursor: pointer; - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-pack: center; - -ms-flex-pack: center; - justify-content: center; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - -ms-flex-direction: column; - flex-direction: column; + width: 50%; + cursor: pointer; + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; } .rdw-embedded-modal-header-label { - width: 95px; - border: 1px solid #f1f1f1; - margin-top: 5px; - background: #6EB8D4; - border-bottom: 2px solid #0a66b7; + width: 95px; + border: 1px solid #f1f1f1; + margin-top: 5px; + background: #6EB8D4; + border-bottom: 2px solid #0a66b7; } .rdw-embedded-modal-link-section { - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - -ms-flex-direction: column; - flex-direction: column; + display: flex; + flex-direction: column; } .rdw-embedded-modal-link-input { - width: 95%; - height: 35px; - margin: 10px 0; - border: 1px solid #F1F1F1; - border-radius: 2px; - font-size: 15px; - padding: 0 5px; + width: 88%; + height: 35px; + margin: 10px 0; + border: 1px solid #F1F1F1; + border-radius: 2px; + font-size: 15px; + padding: 0 5px; +} +.rdw-embedded-modal-link-input-wrapper { + display: flex; + align-items: center; } .rdw-embedded-modal-link-input:focus { - outline: none; + outline: none; } .rdw-embedded-modal-btn-section { - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-pack: center; - -ms-flex-pack: center; - justify-content: center; + display: flex; + justify-content: center; } .rdw-embedded-modal-btn { - margin: 0 3px; - width: 75px; - height: 30px; - border: 1px solid #F1F1F1; - border-radius: 2px; - cursor: pointer; - background: white; - text-transform: capitalize; + margin: 0 3px; + width: 75px; + height: 30px; + border: 1px solid #F1F1F1; + border-radius: 2px; + cursor: pointer; + background: white; + text-transform: capitalize; } .rdw-embedded-modal-btn:hover { - box-shadow: 1px 1px 0px #BFBDBD; + box-shadow: 1px 1px 0px #BFBDBD; } .rdw-embedded-modal-btn:active { - box-shadow: 1px 1px 0px #BFBDBD inset; + box-shadow: 1px 1px 0px #BFBDBD inset; } .rdw-embedded-modal-btn:focus { - outline: none !important; + outline: none !important; } .rdw-embedded-modal-btn:disabled { - background: #ece9e9; + background: #ece9e9; } .rdw-embedded-modal-size { - display: -webkit-box; - display: -ms-flexbox; - display: flex; - margin: 5px 0 10px; - -webkit-box-pack: justify; - -ms-flex-pack: justify; - justify-content: space-between; + align-items: center; + display: flex; + margin: 8px 0; + justify-content: space-between; } .rdw-embedded-modal-size-input { - width: 45%; - height: 20px; - border: 1px solid #F1F1F1; - border-radius: 2px; - font-size: 12px; + width: 80%; + height: 20px; + border: 1px solid #F1F1F1; + border-radius: 2px; + font-size: 12px; } .rdw-embedded-modal-size-input:focus { - outline: none; + outline: none; } .rdw-emoji-wrapper { - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - margin-bottom: 6px; - position: relative; + display: flex; + align-items: center; + margin-bottom: 6px; + position: relative; } .rdw-emoji-modal { - overflow: auto; - position: absolute; - top: 35px; - left: 5px; - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -ms-flex-wrap: wrap; - flex-wrap: wrap; - width: 235px; - height: 180px; - border: 1px solid #F1F1F1; - padding: 15px; - border-radius: 2px; - z-index: 100; - background: white; - box-shadow: 3px 3px 5px #BFBDBD; + overflow: auto; + position: absolute; + top: 35px; + left: 5px; + display: flex; + flex-wrap: wrap; + width: 235px; + height: 180px; + border: 1px solid #F1F1F1; + padding: 15px; + border-radius: 2px; + z-index: 100; + background: white; + box-shadow: 3px 3px 5px #BFBDBD; } .rdw-emoji-icon { - margin: 2.5px; - height: 24px; - width: 24px; - cursor: pointer; - font-size: 22px; - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-pack: center; - -ms-flex-pack: center; - justify-content: center; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; + margin: 2.5px; + height: 24px; + width: 24px; + cursor: pointer; + font-size: 22px; + display: flex; + justify-content: center; + align-items: center; } .rdw-spinner { - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - -webkit-box-pack: center; - -ms-flex-pack: center; - justify-content: center; - height: 100%; - width: 100%; + display: flex; + align-items: center; + justify-content: center; + height: 100%; + width: 100%; } .rdw-spinner > div { - width: 12px; - height: 12px; - background-color: #333; + width: 12px; + height: 12px; + background-color: #333; - border-radius: 100%; - display: inline-block; - -webkit-animation: sk-bouncedelay 1.4s infinite ease-in-out both; - animation: sk-bouncedelay 1.4s infinite ease-in-out both; + border-radius: 100%; + display: inline-block; + -webkit-animation: sk-bouncedelay 1.4s infinite ease-in-out both; + animation: sk-bouncedelay 1.4s infinite ease-in-out both; } .rdw-spinner .rdw-bounce1 { - -webkit-animation-delay: -0.32s; - animation-delay: -0.32s; + -webkit-animation-delay: -0.32s; + animation-delay: -0.32s; } .rdw-spinner .rdw-bounce2 { - -webkit-animation-delay: -0.16s; - animation-delay: -0.16s; + -webkit-animation-delay: -0.16s; + animation-delay: -0.16s; } @-webkit-keyframes sk-bouncedelay { - 0%, 80%, 100% { -webkit-transform: scale(0) } - 40% { -webkit-transform: scale(1.0) } + 0%, 80%, 100% { -webkit-transform: scale(0) } + 40% { -webkit-transform: scale(1.0) } } @keyframes sk-bouncedelay { - 0%, 80%, 100% { - -webkit-transform: scale(0); - transform: scale(0); - } 40% { - -webkit-transform: scale(1.0); - transform: scale(1.0); - } + 0%, 80%, 100% { + -webkit-transform: scale(0); + transform: scale(0); + } 40% { + -webkit-transform: scale(1.0); + transform: scale(1.0); + } } .rdw-image-wrapper { - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - margin-bottom: 6px; - position: relative; + display: flex; + align-items: center; + margin-bottom: 6px; + position: relative; } .rdw-image-modal { - position: absolute; - top: 35px; - left: 5px; - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - -ms-flex-direction: column; - flex-direction: column; - width: 235px; - height: 200px; - border: 1px solid #F1F1F1; - padding: 15px; - border-radius: 2px; - z-index: 100; - background: white; - box-shadow: 3px 3px 5px #BFBDBD; + position: absolute; + top: 35px; + left: 5px; + display: flex; + flex-direction: column; + width: 235px; + border: 1px solid #F1F1F1; + padding: 15px; + border-radius: 2px; + z-index: 100; + background: white; + box-shadow: 3px 3px 5px #BFBDBD; } .rdw-image-modal-header { - font-size: 15px; - margin: 10px 0; - display: -webkit-box; - display: -ms-flexbox; - display: flex; + font-size: 15px; + margin: 10px 0; + display: flex; } .rdw-image-modal-header-option { - width: 50%; - cursor: pointer; - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-pack: center; - -ms-flex-pack: center; - justify-content: center; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - -ms-flex-direction: column; - flex-direction: column; + width: 50%; + cursor: pointer; + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; } .rdw-image-modal-header-label { - width: 80px; - background: #f1f1f1; - border: 1px solid #f1f1f1; - margin-top: 5px; + width: 80px; + background: #f1f1f1; + border: 1px solid #f1f1f1; + margin-top: 5px; } .rdw-image-modal-header-label-highlighted { - background: #6EB8D4; - border-bottom: 2px solid #0a66b7; + background: #6EB8D4; + border-bottom: 2px solid #0a66b7; } .rdw-image-modal-upload-option { - height: 65px; - width: 100%; - color: gray; - cursor: pointer; - display: -webkit-box; - display: -ms-flexbox; - display: flex; - border: none; - font-size: 15px; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - -webkit-box-pack: center; - -ms-flex-pack: center; - justify-content: center; - background-color: #f1f1f1; - outline: 2px dashed gray; - outline-offset: -10px; - margin: 10px 0; + width: 100%; + color: gray; + cursor: pointer; + display: flex; + border: none; + font-size: 15px; + align-items: center; + justify-content: center; + background-color: #f1f1f1; + outline: 2px dashed gray; + outline-offset: -10px; + margin: 10px 0; + padding: 9px 0; } .rdw-image-modal-upload-option-highlighted { - outline: 2px dashed #0a66b7; + outline: 2px dashed #0a66b7; } .rdw-image-modal-upload-option-label { - cursor: pointer; - height: 100%; - width: 100%; - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-pack: center; - -ms-flex-pack: center; - justify-content: center; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; + cursor: pointer; + height: 100%; + width: 100%; + display: flex; + justify-content: center; + align-items: center; + padding: 15px; +} +.rdw-image-modal-upload-option-label span{ + padding: 0 20px; +} +.rdw-image-modal-upload-option-image-preview { + max-width: 100%; + max-height: 200px; } .rdw-image-modal-upload-option-input { - width: 0.1px; - height: 0.1px; - opacity: 0; - overflow: hidden; - position: absolute; - z-index: -1; + width: 0.1px; + height: 0.1px; + opacity: 0; + overflow: hidden; + position: absolute; + z-index: -1; } .rdw-image-modal-url-section { - display: -webkit-box; - display: -ms-flexbox; - display: flex; + display: flex; + align-items: center; } .rdw-image-modal-url-input { - width: 95%; - height: 35px; - margin: 25px 0 5px; - border: 1px solid #F1F1F1; - border-radius: 2px; - font-size: 15px; - padding: 0 5px; + width: 90%; + height: 35px; + margin: 15px 0 12px; + border: 1px solid #F1F1F1; + border-radius: 2px; + font-size: 15px; + padding: 0 5px; } .rdw-image-modal-btn-section { - margin: 10px auto 0; + margin: 10px auto 0; } .rdw-image-modal-url-input:focus { - outline: none; + outline: none; } .rdw-image-modal-btn { - margin: 0 5px; - width: 75px; - height: 30px; - border: 1px solid #F1F1F1; - border-radius: 2px; - cursor: pointer; - background: white; - text-transform: capitalize; + margin: 0 5px; + width: 75px; + height: 30px; + border: 1px solid #F1F1F1; + border-radius: 2px; + cursor: pointer; + background: white; + text-transform: capitalize; } .rdw-image-modal-btn:hover { - box-shadow: 1px 1px 0px #BFBDBD; + box-shadow: 1px 1px 0px #BFBDBD; } .rdw-image-modal-btn:active { - box-shadow: 1px 1px 0px #BFBDBD inset; + box-shadow: 1px 1px 0px #BFBDBD inset; } .rdw-image-modal-btn:focus { - outline: none !important; + outline: none !important; } .rdw-image-modal-btn:disabled { - background: #ece9e9; + background: #ece9e9; } .rdw-image-modal-spinner { - position: absolute; - top: -3px; - left: 0; - width: 100%; - height: 100%; - opacity: 0.5; + position: absolute; + top: -3px; + left: 0; + width: 100%; + height: 100%; + opacity: 0.5; +} +.rdw-image-modal-alt-input { + width: 70%; + height: 20px; + border: 1px solid #F1F1F1; + border-radius: 2px; + font-size: 12px; + margin-left: 5px; +} +.rdw-image-modal-alt-input:focus { + outline: none; +} +.rdw-image-modal-alt-lbl { + font-size: 12px; +} +.rdw-image-modal-size { + align-items: center; + display: flex; + margin: 8px 0; + justify-content: space-between; +} +.rdw-image-modal-size-input { + width: 40%; + height: 20px; + border: 1px solid #F1F1F1; + border-radius: 2px; + font-size: 12px; +} +.rdw-image-modal-size-input:focus { + outline: none; +} +.rdw-image-mandatory-sign { + color: red; + margin-left: 3px; + margin-right: 3px; } .rdw-remove-wrapper { - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - margin-bottom: 6px; - position: relative; + display: flex; + align-items: center; + margin-bottom: 6px; + position: relative; } .rdw-history-wrapper { - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - margin-bottom: 6px; + display: flex; + align-items: center; + margin-bottom: 6px; } .rdw-history-dropdownoption { - height: 40px; - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-pack: center; - -ms-flex-pack: center; - justify-content: center; + height: 40px; + display: flex; + justify-content: center; } .rdw-history-dropdown { - width: 50px; + width: 50px; } .rdw-link-decorator-wrapper { - position: relative; + position: relative; } .rdw-link-decorator-icon { - position: absolute; - left: 40%; - top: 0; - cursor: pointer; - background-color: white; + position: absolute; + left: 40%; + top: 0; + cursor: pointer; + background-color: white; } .rdw-mention-link { - text-decoration: none; - color: #1236ff; - background-color: #f0fbff; - padding: 1px 2px; - border-radius: 2px; + text-decoration: none; + color: #1236ff; + background-color: #f0fbff; + padding: 1px 2px; + border-radius: 2px; } .rdw-suggestion-wrapper { - position: relative; + position: relative; } .rdw-suggestion-dropdown { - position: absolute; - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - -ms-flex-direction: column; - flex-direction: column; - border: 1px solid #F1F1F1; - min-width: 100px; - max-height: 150px; - overflow: auto; - background: white; - z-index: 100; + position: absolute; + display: flex; + flex-direction: column; + border: 1px solid #F1F1F1; + min-width: 100px; + max-height: 150px; + overflow: auto; + background: white; + z-index: 100; } .rdw-suggestion-option { - padding: 7px 5px; - border-bottom: 1px solid #f1f1f1; + padding: 7px 5px; + border-bottom: 1px solid #f1f1f1; } .rdw-suggestion-option-active { - background-color: #F1F1F1; + background-color: #F1F1F1; } .rdw-hashtag-link { - text-decoration: none; - color: #1236ff; - background-color: #f0fbff; - padding: 1px 2px; - border-radius: 2px; + text-decoration: none; + color: #1236ff; + background-color: #f0fbff; + padding: 1px 2px; + border-radius: 2px; } .rdw-image-alignment-options-popup { - position: absolute;; - background: white; - display: -webkit-box; - display: -ms-flexbox; - display: flex; - padding: 5px 2px; - border-radius: 2px; - border: 1px solid #F1F1F1; - width: 105px; - cursor: pointer; - z-index: 100; + position: absolute;; + background: white; + display: flex; + padding: 5px 2px; + border-radius: 2px; + border: 1px solid #F1F1F1; + width: 105px; + cursor: pointer; + z-index: 100; } .rdw-alignment-option-left { - -webkit-box-pack: start; - -ms-flex-pack: start; - justify-content: flex-start; + justify-content: flex-start; } .rdw-image-alignment-option { - height: 15px; - width: 15px; - min-width: 15px; + height: 15px; + width: 15px; + min-width: 15px; } .rdw-image-alignment { - position: relative; + position: relative; } .rdw-image-imagewrapper { - position: relative; + position: relative; } .rdw-image-center { - float: none; - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-pack: center; - -ms-flex-pack: center; - justify-content: center; + display: flex; + justify-content: center; } .rdw-image-left { - float: left; + display: flex; } .rdw-image-right { - float: right; + display: flex; + justify-content: flex-end; +} +.rdw-image-alignment-options-popup-right { + right: 0; } .rdw-editor-main { - height: 100%; - width: 100%; - overflow: auto; - box-sizing: content-box; + height: 100%; + overflow: auto; + box-sizing: border-box; } .rdw-editor-toolbar { - padding: 6px 5px 0; - border-radius: 2px; - border: 1px solid #F1F1F1; - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-pack: start; - -ms-flex-pack: start; - justify-content: flex-start; - width: 100%; - background: white; - -ms-flex-wrap: wrap; - flex-wrap: wrap; - font-size: 15px; - margin-bottom: 5px; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; + padding: 6px 5px 0; + border-radius: 2px; + border: 1px solid #F1F1F1; + display: flex; + justify-content: flex-start; + background: white; + flex-wrap: wrap; + font-size: 15px; + margin-bottom: 5px; + user-select: none; } .public-DraftStyleDefault-block { - margin: 1em 0; + margin: 1em 0; } .rdw-editor-wrapper:focus { - outline: none; + outline: none; } -/** +.rdw-editor-wrapper { + box-sizing: content-box; +} +.rdw-editor-main blockquote { + border-left: 5px solid #f1f1f1; + padding-left: 5px; +} +.rdw-editor-main pre { + background: #f1f1f1; + border-radius: 3px; + padding: 1px 10px; +}/** * Draft v0.9.1 * * Copyright (c) 2013-present, Facebook, Inc. @@ -980,6 +847,6 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. */ -.DraftEditor-editorContainer, .DraftEditor-root, .public-DraftEditor-content{height:inherit;text-align:initial}.public-DraftEditor-content[contenteditable=true]{-webkit-user-modify:read-write-plaintext-only}.DraftEditor-root{position:relative}.DraftEditor-editorContainer{background-color:rgba(255,255,255,0);border-left:.1px solid transparent;position:relative;z-index:1}.public-DraftEditor-block{position:relative}.DraftEditor-alignLeft .public-DraftStyleDefault-block{text-align:left}.DraftEditor-alignLeft .public-DraftEditorPlaceholder-root{left:0;text-align:left}.DraftEditor-alignCenter .public-DraftStyleDefault-block{text-align:center}.DraftEditor-alignCenter .public-DraftEditorPlaceholder-root{margin:0 auto;text-align:center;width:100%}.DraftEditor-alignRight .public-DraftStyleDefault-block{text-align:right}.DraftEditor-alignRight .public-DraftEditorPlaceholder-root{right:0;text-align:right}.public-DraftEditorPlaceholder-root{color:#9197a3;position:absolute;z-index:0}.public-DraftEditorPlaceholder-hasFocus{color:#bdc1c9}.DraftEditorPlaceholder-hidden{display:none}.public-DraftStyleDefault-block{position:relative;white-space:pre-wrap}.public-DraftStyleDefault-ltr{direction:ltr;text-align:left}.public-DraftStyleDefault-rtl{direction:rtl;text-align:right}.public-DraftStyleDefault-listLTR{direction:ltr}.public-DraftStyleDefault-listRTL{direction:rtl}.public-DraftStyleDefault-ol, .public-DraftStyleDefault-ul{margin:16px 0;padding:0}.public-DraftStyleDefault-depth0.public-DraftStyleDefault-listLTR{margin-left:1.5em}.public-DraftStyleDefault-depth0.public-DraftStyleDefault-listRTL{margin-right:1.5em}.public-DraftStyleDefault-depth1.public-DraftStyleDefault-listLTR{margin-left:3em}.public-DraftStyleDefault-depth1.public-DraftStyleDefault-listRTL{margin-right:3em}.public-DraftStyleDefault-depth2.public-DraftStyleDefault-listLTR{margin-left:4.5em}.public-DraftStyleDefault-depth2.public-DraftStyleDefault-listRTL{margin-right:4.5em}.public-DraftStyleDefault-depth3.public-DraftStyleDefault-listLTR{margin-left:6em}.public-DraftStyleDefault-depth3.public-DraftStyleDefault-listRTL{margin-right:6em}.public-DraftStyleDefault-depth4.public-DraftStyleDefault-listLTR{margin-left:7.5em}.public-DraftStyleDefault-depth4.public-DraftStyleDefault-listRTL{margin-right:7.5em}.public-DraftStyleDefault-unorderedListItem{list-style-type:square;position:relative}.public-DraftStyleDefault-unorderedListItem.public-DraftStyleDefault-depth0{list-style-type:disc}.public-DraftStyleDefault-unorderedListItem.public-DraftStyleDefault-depth1{list-style-type:circle}.public-DraftStyleDefault-orderedListItem{list-style-type:none;position:relative}.public-DraftStyleDefault-orderedListItem.public-DraftStyleDefault-listLTR:before{left:-36px;position:absolute;text-align:right;width:30px}.public-DraftStyleDefault-orderedListItem.public-DraftStyleDefault-listRTL:before{position:absolute;right:-36px;text-align:left;width:30px}.public-DraftStyleDefault-orderedListItem:before{content:counter(ol0) ". ";counter-increment:ol0}.public-DraftStyleDefault-orderedListItem.public-DraftStyleDefault-depth1:before{content:counter(ol1) ". ";counter-increment:ol1}.public-DraftStyleDefault-orderedListItem.public-DraftStyleDefault-depth2:before{content:counter(ol2) ". ";counter-increment:ol2}.public-DraftStyleDefault-orderedListItem.public-DraftStyleDefault-depth3:before{content:counter(ol3) ". ";counter-increment:ol3}.public-DraftStyleDefault-orderedListItem.public-DraftStyleDefault-depth4:before{content:counter(ol4) ". ";counter-increment:ol4}.public-DraftStyleDefault-depth0.public-DraftStyleDefault-reset{counter-reset:ol0}.public-DraftStyleDefault-depth1.public-DraftStyleDefault-reset{counter-reset:ol1}.public-DraftStyleDefault-depth2.public-DraftStyleDefault-reset{counter-reset:ol2}.public-DraftStyleDefault-depth3.public-DraftStyleDefault-reset{counter-reset:ol3}.public-DraftStyleDefault-depth4.public-DraftStyleDefault-reset{counter-reset:ol4} +.DraftEditor-editorContainer,.DraftEditor-root,.public-DraftEditor-content{height:inherit;text-align:initial}.public-DraftEditor-content[contenteditable=true]{-webkit-user-modify:read-write-plaintext-only}.DraftEditor-root{position:relative}.DraftEditor-editorContainer{background-color:rgba(255,255,255,0);border-left:.1px solid transparent;position:relative;z-index:1}.public-DraftEditor-block{position:relative}.DraftEditor-alignLeft .public-DraftStyleDefault-block{text-align:left}.DraftEditor-alignLeft .public-DraftEditorPlaceholder-root{left:0;text-align:left}.DraftEditor-alignCenter .public-DraftStyleDefault-block{text-align:center}.DraftEditor-alignCenter .public-DraftEditorPlaceholder-root{margin:0 auto;text-align:center;width:100%}.DraftEditor-alignRight .public-DraftStyleDefault-block{text-align:right}.DraftEditor-alignRight .public-DraftEditorPlaceholder-root{right:0;text-align:right}.public-DraftEditorPlaceholder-root{color:#9197a3;position:absolute;z-index:0}.public-DraftEditorPlaceholder-hasFocus{color:#bdc1c9}.DraftEditorPlaceholder-hidden{display:none}.public-DraftStyleDefault-block{position:relative;white-space:pre-wrap}.public-DraftStyleDefault-ltr{direction:ltr;text-align:left}.public-DraftStyleDefault-rtl{direction:rtl;text-align:right}.public-DraftStyleDefault-listLTR{direction:ltr}.public-DraftStyleDefault-listRTL{direction:rtl}.public-DraftStyleDefault-ol,.public-DraftStyleDefault-ul{margin:16px 0;padding:0}.public-DraftStyleDefault-depth0.public-DraftStyleDefault-listLTR{margin-left:1.5em}.public-DraftStyleDefault-depth0.public-DraftStyleDefault-listRTL{margin-right:1.5em}.public-DraftStyleDefault-depth1.public-DraftStyleDefault-listLTR{margin-left:3em}.public-DraftStyleDefault-depth1.public-DraftStyleDefault-listRTL{margin-right:3em}.public-DraftStyleDefault-depth2.public-DraftStyleDefault-listLTR{margin-left:4.5em}.public-DraftStyleDefault-depth2.public-DraftStyleDefault-listRTL{margin-right:4.5em}.public-DraftStyleDefault-depth3.public-DraftStyleDefault-listLTR{margin-left:6em}.public-DraftStyleDefault-depth3.public-DraftStyleDefault-listRTL{margin-right:6em}.public-DraftStyleDefault-depth4.public-DraftStyleDefault-listLTR{margin-left:7.5em}.public-DraftStyleDefault-depth4.public-DraftStyleDefault-listRTL{margin-right:7.5em}.public-DraftStyleDefault-unorderedListItem{list-style-type:square;position:relative}.public-DraftStyleDefault-unorderedListItem.public-DraftStyleDefault-depth0{list-style-type:disc}.public-DraftStyleDefault-unorderedListItem.public-DraftStyleDefault-depth1{list-style-type:circle}.public-DraftStyleDefault-orderedListItem{list-style-type:none;position:relative}.public-DraftStyleDefault-orderedListItem.public-DraftStyleDefault-listLTR:before{left:-36px;position:absolute;text-align:right;width:30px}.public-DraftStyleDefault-orderedListItem.public-DraftStyleDefault-listRTL:before{position:absolute;right:-36px;text-align:left;width:30px}.public-DraftStyleDefault-orderedListItem:before{content:counter(ol0) ". ";counter-increment:ol0}.public-DraftStyleDefault-orderedListItem.public-DraftStyleDefault-depth1:before{content:counter(ol1) ". ";counter-increment:ol1}.public-DraftStyleDefault-orderedListItem.public-DraftStyleDefault-depth2:before{content:counter(ol2) ". ";counter-increment:ol2}.public-DraftStyleDefault-orderedListItem.public-DraftStyleDefault-depth3:before{content:counter(ol3) ". ";counter-increment:ol3}.public-DraftStyleDefault-orderedListItem.public-DraftStyleDefault-depth4:before{content:counter(ol4) ". ";counter-increment:ol4}.public-DraftStyleDefault-depth0.public-DraftStyleDefault-reset{counter-reset:ol0}.public-DraftStyleDefault-depth1.public-DraftStyleDefault-reset{counter-reset:ol1}.public-DraftStyleDefault-depth2.public-DraftStyleDefault-reset{counter-reset:ol2}.public-DraftStyleDefault-depth3.public-DraftStyleDefault-reset{counter-reset:ol3}.public-DraftStyleDefault-depth4.public-DraftStyleDefault-reset{counter-reset:ol4} -/*# sourceMappingURL=react-draft-wysiwyg.css.map*/ \ No newline at end of file +/*# sourceMappingURL=react-draft-wysiwyg.css.map*/ From 17bdcc66d5af0174d77da517f1ecd39ec969762b Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 4 Jun 2018 18:04:03 -0300 Subject: [PATCH 2/4] WIP --- server/controllers/system/test-smtp.php | 4 ++-- server/controllers/ticket/comment.php | 19 +++++++++++++------ .../data/mail-templates/ticket-responded.html | 6 +++--- 3 files changed, 18 insertions(+), 11 deletions(-) diff --git a/server/controllers/system/test-smtp.php b/server/controllers/system/test-smtp.php index 6e4c4131..86343b5d 100644 --- a/server/controllers/system/test-smtp.php +++ b/server/controllers/system/test-smtp.php @@ -44,11 +44,11 @@ class TestSMTPController extends Controller { Controller::request('smtp-password'), Controller::request('no-reply-email') ); - + if($mailSender->isConnected()) { Response::respondSuccess(); } else { throw new Exception(ERRORS::SMTP_CONNECTION); } } -} \ No newline at end of file +} diff --git a/server/controllers/ticket/comment.php b/server/controllers/ticket/comment.php index 6f26b214..4319cceb 100755 --- a/server/controllers/ticket/comment.php +++ b/server/controllers/ticket/comment.php @@ -5,7 +5,7 @@ DataValidator::with('CustomValidations', true); /** * @api {post} /ticket/comment Comment ticket * @apiVersion 4.1.0 - * + * * @apiName Comment ticket * * @apiGroup Ticket @@ -22,7 +22,7 @@ DataValidator::with('CustomValidations', true); * @apiUse INVALID_TICKET * @apiUse INVALID_TOKEN * - * @apiSuccess {Object} data Empty object + * @apiSuccess {Object} data Empty object * */ @@ -86,7 +86,7 @@ class CommentController extends Controller { } Log::createLog('COMMENT', $this->ticket->ticketNumber); - + Response::respondSuccess(); } else { Response::respondError(ERRORS::NO_PERMISSION); @@ -132,14 +132,21 @@ class CommentController extends Controller { $name = $this->ticket->owner->name; } + $url = Setting::getSetting('url')->getValue(); + + if(!Controller::isUserSystemEnabled()) { + $url .= '/check-ticket/' . $this->ticket->ticketNumber; + $url .= '/' . $email; + } + $mailSender->setTemplate(MailTemplate::TICKET_RESPONDED, [ 'to' => $email, 'name' => $name, - 'ticketNumber' => $this->ticket->ticketNumber, 'title' => $this->ticket->title, - 'url' => Setting::getSetting('url')->getValue() + 'ticketNumber' => $this->ticket->ticketNumber, + 'url' => $url ]); $mailSender->send(); } -} \ No newline at end of file +} diff --git a/server/data/mail-templates/ticket-responded.html b/server/data/mail-templates/ticket-responded.html index 1a50eb0c..3b3e014f 100755 --- a/server/data/mail-templates/ticket-responded.html +++ b/server/data/mail-templates/ticket-responded.html @@ -334,7 +334,7 @@ - +
@@ -346,11 +346,11 @@ From a5555b2596c8ca8bbb21414246d1a80e9f8d645d Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 5 Jun 2018 21:52:22 -0300 Subject: [PATCH 3/4] Fix email links --- .../controllers/system/disable-user-system.php | 17 +++++++++-------- .../controllers/system/enable-user-system.php | 3 ++- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/server/controllers/system/disable-user-system.php b/server/controllers/system/disable-user-system.php index b1245c94..a5da2419 100755 --- a/server/controllers/system/disable-user-system.php +++ b/server/controllers/system/disable-user-system.php @@ -17,8 +17,8 @@ * @apiUse NO_PERMISSION * @apiUse INVALID_PASSWORD * @apiUse SYSTEM_USER_IS_ALREADY_DISABLED - * - * @apiSuccess {Object} data Empty object + * + * @apiSuccess {Object} data Empty object * */ @@ -53,12 +53,12 @@ class DisableUserSystemController extends Controller { foreach($userList as $user) { $ticketNumberList = ''; - + foreach($user->sharedTicketList as $ticket) { $ticket->authorEmail = $user->email; $ticket->authorName = $user->name; $ticket->author = null; - + $ticketNumberList .= $ticket->ticketNumber . ' - ' . $ticket->title . '
'; $ticket->store(); } @@ -68,14 +68,15 @@ class DisableUserSystemController extends Controller { $mailSender->setTemplate(MailTemplate::USER_SYSTEM_DISABLED, [ 'to' => $user->email, 'name' => $user->name, - 'tickets' => $ticketNumberList + 'tickets' => $ticketNumberList, + 'url' => Setting::getSetting('url')->getValue() ]); $mailSender->send(); - + $user->delete(); } - + Response::respondSuccess(); } -} \ No newline at end of file +} diff --git a/server/controllers/system/enable-user-system.php b/server/controllers/system/enable-user-system.php index d1d96c03..a29ad339 100755 --- a/server/controllers/system/enable-user-system.php +++ b/server/controllers/system/enable-user-system.php @@ -91,7 +91,8 @@ class EnableUserSystemController extends Controller { $mailSender->setTemplate(MailTemplate::USER_SYSTEM_ENABLED, [ 'to' => $email, 'name' => $name, - 'password' => $password + 'password' => $password, + 'url' => Setting::getSetting('url')->getValue(), ]); $mailSender->send(); From 7ec6f96879165b69227652bde9394d3e1c0cc2f3 Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 5 Jun 2018 22:05:30 -0300 Subject: [PATCH 4/4] Fix removal of smtp password when updating settings --- .../settings/admin-panel-system-preferences.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/client/src/app/admin/panel/settings/admin-panel-system-preferences.js b/client/src/app/admin/panel/settings/admin-panel-system-preferences.js index 20a98729..e93d515a 100644 --- a/client/src/app/admin/panel/settings/admin-panel-system-preferences.js +++ b/client/src/app/admin/panel/settings/admin-panel-system-preferences.js @@ -25,7 +25,8 @@ class AdminPanelSystemPreferences extends React.Component { loading: true, message: null, values: { - maintenance: false + maintenance: false, + 'smtp-pass': 'HIDDEN', } }; @@ -73,7 +74,7 @@ class AdminPanelSystemPreferences extends React.Component {
- +
@@ -173,7 +174,7 @@ class AdminPanelSystemPreferences extends React.Component { 'smtp-host': form['smtp-host'], 'smtp-port': form['smtp-port'], 'smtp-user': form['smtp-user'], - 'smtp-pass': form['smtp-pass'], + [ form['smtp-pass'] !== 'HIDDEN' ? 'smtp-pass' : null]: form['smtp-pass'], 'maintenance-mode': form['maintenance-mode'] * 1, 'allow-attachments': form['allow-attachments'] * 1, 'max-size': form['max-size'], @@ -219,7 +220,7 @@ class AdminPanelSystemPreferences extends React.Component { 'smtp-host': result.data['smtp-host'], 'smtp-port': result.data['smtp-port'], 'smtp-user': result.data['smtp-user'], - 'smtp-pass': '', + 'smtp-pass': 'HIDDEN', 'maintenance-mode': !!(result.data['maintenance-mode'] * 1), 'allow-attachments': !!(result.data['allow-attachments'] * 1), 'max-size': result.data['max-size'], @@ -236,7 +237,7 @@ class AdminPanelSystemPreferences extends React.Component { message: 'error' }); } - + onDiscardChangesSubmit(event) { event.preventDefault(); this.setState({loading: true}); @@ -244,4 +245,4 @@ class AdminPanelSystemPreferences extends React.Component { } } -export default AdminPanelSystemPreferences; \ No newline at end of file +export default AdminPanelSystemPreferences;