How to use the choerodon-ui.Form.create function in choerodon-ui

To help you get started, we’ve selected a few choerodon-ui examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github choerodon / iam-service / react / src / app / iam / containers / organization / application / Application.js View on Github external
import React, { Component } from 'react';
import { Button, Form, Table, Tooltip, Icon, Modal, Spin, Input } from 'choerodon-ui';
import { inject, observer } from 'mobx-react';
import { withRouter } from 'react-router-dom';
import { Action, Content, Header, Page, axios } from '@choerodon/boot';
import { injectIntl, FormattedMessage } from 'react-intl';
import './Application.scss';
import MouseOverWrapper from '../../../components/mouseOverWrapper';
import StatusTag from '../../../components/statusTag';
import EditSider from './EditSider';
import { callbackify } from 'util';

const intlPrefix = 'organization.application';

@Form.create({})
@withRouter
@injectIntl
@inject('AppState')
@observer
export default class Application extends Component {
  state = {
    curToken: '',
    createToken: false,
    hasToken: false,
    interfaceName: '',
    showTokenModal: false,
  };

  componentDidMount() {
    this.setState({
      curToken: '',
github choerodon / iam-service / react / src / app / iam / containers / global / send-setting / SendSetting.js View on Github external
class SendSettingType {
  constructor(context) {
    this.context = context;
    const { AppState } = this.context.props;
    this.data = AppState.currentMenuType;
    const { type, id, name } = this.data;
    const codePrefix = type === 'organization' ? 'organization' : 'global';
    this.code = `${codePrefix}.sendsetting`;
    this.values = { name: name || AppState.getSiteInfo.systemName || 'Choerodon' };
    this.type = type;
    this.orgId = id;
  }
}


@Form.create()
@withRouter
@injectIntl
@inject('AppState')
@observer
export default class SendSetting extends Component {
  state = this.getInitState();

  componentWillMount() {
    this.initSendSetting();
    this.loadSettingList();
  }

  componentWillUnmount() {
    SendSettingStore.setTemplate([]);
    SendSettingStore.setPmTemplate([]);
  }
github choerodon / iam-service / iam-service / react / src / iam / containers / user / password / Password.js View on Github external
const FormItem = Form.Item;
const intlPrefix = 'user.changepwd';
const formItemLayout = {
  labelCol: {
    xs: { span: 24 },
    sm: { span: 100 },
  },
  wrapperCol: {
    xs: { span: 24 },
    sm: { span: 9 },
  },
};

const inputWidth = 512;

@Form.create({})
@withRouter
@injectIntl
@inject('AppState')
@observer
export default class Password extends Component {
  constructor(props) {
    super(props);
    this.editFocusInput = React.createRef();
  }
  state = {
    submitting: false,
    confirmDirty: null,
  };

  componentWillMount() {
    this.loadUserInfo();
github choerodon / devops-service / react / routes / resource / main-view / contents / network / modals / network-edit / index.js View on Github external
disabled={!envId}
              type="primary"
              funcType="flat"
              onClick={() => this.addGroup('portKeys')}
              icon="add"
            >
              
            
          
        
      
    );
  }
}

export default Form.create({})(withRouter(injectIntl(EditNetwork)));
github choerodon / iam-service / iam-service / react / src / iam / containers / organization / application / Application.js View on Github external
import React, { Component } from 'react';
import { Button, Form, Modal, Table, Tooltip, Radio, Select, Input } from 'choerodon-ui';
import { inject, observer } from 'mobx-react';
import { withRouter } from 'react-router-dom';
import { Content, Header, Page, Permission, stores } from 'choerodon-boot-combine';
import { injectIntl, FormattedMessage } from 'react-intl';
import './Application.scss';
import MouseOverWrapper from '../../../components/mouseOverWrapper';
import StatusTag from '../../../components/statusTag';

const intlPrefix = 'organization.application';

@Form.create({})
@withRouter
@injectIntl
@inject('AppState')
@observer
export default class Application extends Component {
  componentDidMount() {
    this.refresh();
  }

  refresh = () => {
    const { ApplicationStore } = this.props;
    ApplicationStore.refresh();
  }

  handleopenTab = (record, operation) => {
    const { ApplicationStore, AppState: { currentMenuType: { name, id } } } = this.props;
github choerodon / iam-service / react / src / app / iam / containers / organization / client / Client.js View on Github external
xs: { span: 24 },
    sm: { span: 10 },
  },
};
const formItemNumLayout = {
  labelCol: {
    xs: { span: 24 },
    sm: { span: 100 },
  },
  wrapperCol: {
    xs: { span: 24 },
    sm: { span: 10 },
  },
};

@Form.create({})
@withRouter
@injectIntl
@inject('AppState')
@observer
export default class Client extends Component {
  constructor(props) {
    super(props);
    this.editFocusInput = React.createRef();
  }

  state = this.getInitState();
  getInitState() {
    return {
      submitting: false,
      page: 1,
      open: false,
github choerodon / devops-service / react / routes / devConsole / devConsoleHome / DevConsole.js View on Github external
isDevConsole
          />}
          {BranchStore.createBranchShow === 'edit' && } : } type="app" />}
      
    );
  }
}

export default Form.create({})(withRouter(injectIntl(DevConsole)));
github choerodon / agile-service-old / react / routes / stateMachine / editConfig / EditConfig.js View on Github external
)
                    }

                  
                
              )
            }
          
        
      
    );
  }
}

export default Form.create({})(withRouter(injectIntl(EditConfig)));
github choerodon / iam-service / react / src / app / iam / containers / organization / role / RoleEdit.js View on Github external
import { withRouter } from 'react-router-dom';
import { inject, observer } from 'mobx-react';
import { Button, Col, Form, Input, Modal, Row, Select, Table } from 'choerodon-ui';
import { injectIntl, FormattedMessage } from 'react-intl';
import { Content, Header, Page } from '@choerodon/boot';
import _ from 'lodash';
import RoleStore from '../../../stores/organization/role/RoleStore';
import MouseOverWrapper from '../../../components/mouseOverWrapper';
import './Role.scss';

const { Option } = Select;
const { Sidebar } = Modal;
const FormItem = Form.Item;
const intlPrefix = 'organization.role';

@Form.create({})
@withRouter
@injectIntl
@inject('AppState')
@observer
export default class EditRole extends Component {
  constructor(props) {
    super(props);
    this.state = {
      roleData: {},
      visible: false,
      submitting: false,
      id: this.props.match.params.id,
      currentPermission: [],
      permissionParams: [],
    };
  }
github choerodon / choerodon-front-devops / devops / src / app / devops / containers / project / networkConfig / createNetwork / CreateNetwork.js View on Github external
maxLength={30}
                    type="text"
                    label={}
                  />
                )}
              
            
            
          
        
      
    );
  }
}

export default Form.create({})(withRouter(injectIntl(CreateNetwork)));