Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/antd #67

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
650 changes: 647 additions & 3 deletions package-lock.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
],
"author": "Kiho Chang",
"dependencies": {
"antd": "^4.0.0",
"beedle": "^0.8.1",
"classnames": "^2.2.6",
"date-fns": "^2.6.0",
Expand Down
25 changes: 19 additions & 6 deletions src/form-elements-edit.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ export default class FormElementsEdit extends React.Component {
}

const this_checked = this.props.element.hasOwnProperty('required') ? this.props.element.required : false;
const this_multiline = this.props.element.hasOwnProperty('multiple') ? this.props.element.multiple : false;

const this_read_only = this.props.element.hasOwnProperty('readOnly') ? this.props.element.readOnly : false;
const this_default_today = this.props.element.hasOwnProperty('defaultToday') ? this.props.element.defaultToday : false;
const this_show_time_select = this.props.element.hasOwnProperty('showTimeSelect') ? this.props.element.showTimeSelect : false;
Expand Down Expand Up @@ -138,6 +140,10 @@ export default class FormElementsEdit extends React.Component {
<h4 className="pull-left">{this.props.element.text}</h4>
<i className="pull-right fa fa-times dismiss-edit" onClick={this.props.manualEditModeOff}></i>
</div>
<div className="form-group">
<label className="control-label">Field Name:</label>
<input defaultValue={this.props.element.file_path} onBlur={this.updateElement.bind(this)} onChange={this.editElementProp.bind(this, 'name', 'value')}/>
</div>
{ this.props.element.hasOwnProperty('content') &&
<div className="form-group">
<label className="control-label">Text to display:</label>
Expand Down Expand Up @@ -207,6 +213,13 @@ export default class FormElementsEdit extends React.Component {
Required
</label>
</div>
{ this.props.element.hasOwnProperty('options') &&
<div className="checkbox">
<label>
<input type="checkbox" checked={this_multiline} value={false} onChange={this.editElementProp.bind(this, 'multiple', 'checked')} />
Multiple
</label>
</div>}
{ this.props.element.hasOwnProperty('readOnly') &&
<div className="checkbox">
<label>
Expand Down Expand Up @@ -260,8 +273,8 @@ export default class FormElementsEdit extends React.Component {
)
: (<div/>)
}

{canHavePageBreakBefore &&
{/* Rmoved as i don't think it is needed */}
{/* {canHavePageBreakBefore &&
<div className="form-group">
<label className="control-label">Print Options</label>
<div className="checkbox">
Expand All @@ -271,9 +284,9 @@ export default class FormElementsEdit extends React.Component {
</label>
</div>
</div>
}

{canHaveAlternateForm &&
} */}
{/* TODO removed for now */}
{/* {canHaveAlternateForm &&
<div className="form-group">
<label className="control-label">Alternate/Signature Page</label>
<div className="checkbox">
Expand All @@ -283,7 +296,7 @@ export default class FormElementsEdit extends React.Component {
</label>
</div>
</div>
}
} */}

{ this.props.element.hasOwnProperty('step') &&
<div className="form-group">
Expand Down
Loading