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

fix/ set input attribute to readonly or disable. #576

Merged
merged 10 commits into from
Oct 12, 2018

Conversation

ibelar
Copy link
Contributor

@ibelar ibelar commented Oct 8, 2018

Add two new attribute to input tag: readonly and disabled

fixes: #575

screen shot 2018-10-08 at 5 43 20 pm

Use:

$f = $app->add(new \atk4\ui\Form('segment'));

$f->addField('readonly', ['readonly' => true])->set('read only');
$f->addField('disabled', [ 'disabled' => true])->set('disabled');

@ibelar ibelar changed the title feature/ set input attribute to readonly or disable. fix/ set input attribute to readonly or disable. Oct 8, 2018
Copy link
Member

@romaninsh romaninsh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need documentation and examples

@@ -24,6 +24,9 @@ class Input extends Generic

public $iconLeft = null;

public $disabled = false;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

php doc needed /**

@DarkSide666 DarkSide666 self-requested a review October 9, 2018 10:49
@DarkSide666 DarkSide666 self-assigned this Oct 9, 2018
DarkSide666 and others added 8 commits October 9, 2018 14:50
fix for checkbox, radio, dropdown, file upload, lookup fields
prevents autocomplete and lookup to have tab enable when readonly or disabled.
Fix Calendar input when readonly.
Copy link
Member

@romaninsh romaninsh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's some useful work done thene!!

@DarkSide666 DarkSide666 merged commit da40dd2 into develop Oct 12, 2018
@DarkSide666 DarkSide666 deleted the feature/input-readonly-disabled branch October 12, 2018 06:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Disabled fields can still be focused and edited
3 participants