aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2013-09-13 11:24:21 +0100
committerPaul Eggleton <paul.eggleton@linux.intel.com>2013-09-13 11:29:32 +0100
commitaa2c67c92dd4a9a2a37dc3ee3f18d72d9a29ef2a (patch)
treeeb98268240ddb503799c720f2da917a1d83e1005 /templates
parent97cf2f8afbeb5a6f21ecc8613b92f7d729b4bf6d (diff)
downloadopenembedded-core-contrib-aa2c67c92dd4a9a2a37dc3ee3f18d72d9a29ef2a.tar.gz
Fix fields not saving their values when disabled
We grey out some fields because we don't want to allow the user to change them. However, we were setting the "disabled" jQuery property to do this, and this results in the read value for the form field being blank and thus the field in the database being blank. Set the "readonly" property instead to get the correct behaviour. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Diffstat (limited to 'templates')
-rw-r--r--templates/layerindex/classicrecipedetail.html12
-rw-r--r--templates/layerindex/editlayer.html12
2 files changed, 12 insertions, 12 deletions
diff --git a/templates/layerindex/classicrecipedetail.html b/templates/layerindex/classicrecipedetail.html
index f37db37c8d..9df9a844e8 100644
--- a/templates/layerindex/classicrecipedetail.html
+++ b/templates/layerindex/classicrecipedetail.html
@@ -142,16 +142,16 @@
enable_value_field = function() {
cover_status = $('#id_cover_status').val()
if( cover_status == 'U' || cover_status == 'N' ) {
- $('#id_cover_pn').prop('disabled', true);
- $('#id_cover_layerbranch').prop('disabled', true);
- $('#id_cover_verified').prop('disabled', true);
+ $('#id_cover_pn').prop('readonly', true);
+ $('#id_cover_layerbranch').prop('readonly', true);
+ $('#id_cover_verified').prop('readonly', true);
$('#id_label_cover_verified').addClass('muted');
$('#id_span_cover_opts').addClass('muted');
}
else {
- $('#id_cover_pn').prop('disabled', false);
- $('#id_cover_layerbranch').prop('disabled', false);
- $('#id_cover_verified').prop('disabled', false);
+ $('#id_cover_pn').prop('readonly', false);
+ $('#id_cover_layerbranch').prop('readonly', false);
+ $('#id_cover_verified').prop('readonly', false);
$('#id_label_cover_verified').removeClass('muted');
$('#id_span_cover_opts').removeClass('muted');
}
diff --git a/templates/layerindex/editlayer.html b/templates/layerindex/editlayer.html
index e2b4fcb53a..b7ff5dc4c9 100644
--- a/templates/layerindex/editlayer.html
+++ b/templates/layerindex/editlayer.html
@@ -221,14 +221,14 @@
$('#id_vcs_web_tree_base_url').val(awf.vcs_web_tree_base_url)
$('#id_vcs_web_file_base_url').val(awf.vcs_web_file_base_url)
}
- $('#id_vcs_web_url').prop('disabled', true);
- $('#id_vcs_web_tree_base_url').prop('disabled', true);
- $('#id_vcs_web_file_base_url').prop('disabled', true);
+ $('#id_vcs_web_url').prop('readonly', true);
+ $('#id_vcs_web_tree_base_url').prop('readonly', true);
+ $('#id_vcs_web_file_base_url').prop('readonly', true);
}
else {
- $('#id_vcs_web_url').prop('disabled', false);
- $('#id_vcs_web_tree_base_url').prop('disabled', false);
- $('#id_vcs_web_file_base_url').prop('disabled', false);
+ $('#id_vcs_web_url').prop('readonly', false);
+ $('#id_vcs_web_tree_base_url').prop('readonly', false);
+ $('#id_vcs_web_file_base_url').prop('readonly', false);
}
};