Browse Source

WIP: impl GrowiZipImportItem

Yuki Takei 6 years ago
parent
commit
2786e8fd56

+ 4 - 5
src/client/js/components/Admin/ImportData/GrowiZipImportForm.jsx

@@ -278,7 +278,7 @@ class GrowiImportForm extends React.Component {
     );
   }
 
-  renderGroups(groupList, groupName, errors, { wellContent, color } = {}) {
+  renderGroups(groupList, groupName, errors, { wellContent } = {}) {
     const collectionNames = groupList.filter((collectionName) => {
       return this.allCollectionNames.includes(collectionName);
     });
@@ -297,7 +297,7 @@ class GrowiImportForm extends React.Component {
             </ul>
           </div>
         ) }
-        { this.renderCheckboxes(collectionNames, color) }
+        { this.renderCheckboxes(collectionNames) }
         { this.renderWarnForGroups(errors, `warnFor${groupName}`) }
       </div>
     );
@@ -311,12 +311,11 @@ class GrowiImportForm extends React.Component {
     return this.renderGroups(collectionNames, 'Other', this.state.errorsForOtherGroups);
   }
 
-  renderCheckboxes(collectionNames, color) {
-    const checkboxColor = color ? `checkbox-${color}` : 'checkbox-info';
+  renderCheckboxes(collectionNames) {
     const { selectedCollections, optionMap } = this.state;
 
     return (
-      <div className={`row checkbox ${checkboxColor}`}>
+      <div className="row">
         {collectionNames.map((collectionName) => {
           return (
             <div className="col-xs-6 my-1" key={collectionName}>

+ 2 - 2
src/client/js/components/Admin/ImportData/GrowiZipImportItem.jsx

@@ -57,7 +57,7 @@ export default class GrowiZipImportItem extends React.Component {
     return (
       <div className="d-flex justify-content-between align-items-center">
         {/* left */}
-        <div>
+        <div className="checkbox checkbox-info">
           <input
             type="checkbox"
             id={collectionName}
@@ -67,7 +67,7 @@ export default class GrowiZipImportItem extends React.Component {
             checked={isSelected}
             onChange={this.changeHandler}
           />
-          <label className="text-capitalize form-check-label ml-3" htmlFor={collectionName}>
+          <label className="text-capitalize form-check-label" htmlFor={collectionName}>
             {collectionName}
           </label>
         </div>