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

Empty value removed when the xeditable is disabled #1067

Open
cscmalaga opened this issue Dec 19, 2017 · 1 comment
Open

Empty value removed when the xeditable is disabled #1067

cscmalaga opened this issue Dec 19, 2017 · 1 comment

Comments

@cscmalaga
Copy link

cscmalaga commented Dec 19, 2017

Hi,

When I disable a xeditable element with an empty default value, the value disappears (like in the right element below):

xeditable-disable

Is this the normal behavior or I'm doing something wrong?

This is the code that generates the right element:

            <a href="#"
              class="xeditable"
              data-type="text"
              data-pk="{{ patient.getId() }}"
              data-name="email_manual"
              data-title="{{ 'Email (manual entry)' | t }}"
              data-emptytext="{{ patient.getEmail() | default('n/c') }}">
              {{ patient.getEmailManual() }}
            </a>
@shreyas-sja
Copy link

We have resolved this by using js as follow:
$('#SurveyComplete__c').editable("option", "disabled", true);
$('#SurveyComplete__c').html('n/c');

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants