Skip to content

Commit

Permalink
Prevent readonly fields from being hidden on load, e.g. page history
Browse files Browse the repository at this point in the history
  • Loading branch information
unclecheese committed Oct 7, 2014
1 parent 051a860 commit 4dbd674
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion javascript/display_logic.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@



$('.field.display-logic').entwine({
$('.field.display-logic:not(.readonly)').entwine({
onmatch: function () {
masters = this.getMasters();
for(m in masters) {
Expand Down

5 comments on commit 4dbd674

@Zauberfisch
Copy link
Contributor

Choose a reason for hiding this comment

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

this change breaks display-logic for all read-only fields.
I see why you did it, but in some cases it is on purpose that a read-only field is hidden. I think we need some other way of handling this.
the module already hooks into FormField, how about overwriting performReadonlyTransformation() and disabling display-logic at that point?
this way we would only disable display-logic at places where a field was normal and has been transformed to read-only, but not those that where read-only already.

@Zauberfisch
Copy link
Contributor

Choose a reason for hiding this comment

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

@unclecheese any comment? should I create an issue out of this?

@unclecheese
Copy link
Owner

Choose a reason for hiding this comment

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

Have you used the dev-master branch? I just made a whole pile of changes that should mitigate this issue, most notably, no more custom templates.

@Zauberfisch
Copy link
Contributor

Choose a reason for hiding this comment

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

oh, thanks.
no, I haven't. hard coded the commit before this one as dependency. will update now and see if it's fixed.

@Zauberfisch
Copy link
Contributor

Choose a reason for hiding this comment

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

@unclecheese no, this issue is still present. read only fields are still not being handled.

Please sign in to comment.