Project

General

Profile

Actions

Defect #192

closed

Form readOnly and disabled parameters

Added by Ondřej Kopr over 7 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Ondřej Kopr
Category:
Frontend
Target version:
Start date:
11/16/2016
Due date:
% Done:

100%

Estimated time:
Affected versions:
Owner:

Description

  • When add readOnly to component AbstractForm all readOnly components in for are editable
  • Bug found on audit detail for identity
<Basic.AbstractForm ref="form" className="form-horizontal" readOnly={!canEditMap.get('isSaveEnabled') || readOnly}>
    <Basic.TextField ref="username" readOnly label={this.i18n('content.identity.profile.username')} required min={3} max={255}/>
Actions #1

Updated by Vít Švanda over 7 years ago

  • Status changed from New to In Progress
  • Assignee changed from Vít Švanda to Ondřej Kopr

Fixed
- I rewrited method for resolved readOnly, disabled, validation on AbstractFormComponent and AbstractForm.
- Ondra pls do review and repair validations (reenable your tests) for min/max (textField and textArea).

Actions #2

Updated by Ondřej Kopr over 7 years ago

  • Status changed from In Progress to Needs feedback
  • Assignee changed from Ondřej Kopr to Vít Švanda
  • % Done changed from 0 to 90
  • overload method getValidationDefinition in textField and textArea
  • add test with validation combination
Actions #3

Updated by Vít Švanda over 7 years ago

  • Status changed from Needs feedback to In Progress
  • Assignee changed from Vít Švanda to Ondřej Kopr

Not worked in situation where was dynamic changed require parametr. For example on SchemaAttributeHandlingDetail.
- Problem was in getValidation method on TextField/TextArea, where was require attributte taken from this.props.required instead use required attribute given in getValidation method.
- I fixed problems.
- Please extend test for this case (dynamic change of require).

Actions #4

Updated by Ondřej Kopr over 7 years ago

  • Status changed from In Progress to Needs feedback
  • Assignee changed from Ondřej Kopr to Vít Švanda
Feedback:
  • Test - same case as in description is now OK,
  • add new tests for dynamic change required, same asi for dynamicaly change readOnly.

Please check test and close this task, Thank you.

Actions #5

Updated by Vít Švanda over 7 years ago

  • Status changed from Needs feedback to In Progress
  • Assignee changed from Vít Švanda to Ondřej Kopr

- I don't understand why you use "readOnly" in this test. Maybe copy syndrome?
- Required attribute should be tested via empty value and isValid function. Can you improve this test?

Actions #6

Updated by Ondřej Kopr over 7 years ago

  • Status changed from In Progress to Needs feedback
  • Assignee changed from Ondřej Kopr to Vít Švanda
  • Add better solution for testing required with value,
  • please check my solution.
Actions #7

Updated by Vít Švanda over 7 years ago

  • Status changed from Needs feedback to In Progress
  • Assignee changed from Vít Švanda to Ondřej Kopr
  • Target version changed from Beryl to Citrine (7.3.0)
Actions #8

Updated by Ondřej Kopr over 7 years ago

  • Status changed from In Progress to Needs feedback
  • Assignee changed from Ondřej Kopr to Vít Švanda
Actions #9

Updated by Vít Švanda about 7 years ago

  • Status changed from Needs feedback to Closed
  • Assignee changed from Vít Švanda to Ondřej Kopr
  • % Done changed from 90 to 100

I did review for " component change dynamicaly required" test. Look and works fine.

Actions #10

Updated by Radek Tomiška about 5 years ago

  • Tracker changed from Task to Defect
  • Category changed from 20 to Frontend
Actions

Also available in: Atom PDF