editor disabling removed
var myCodeMirror;
var scriptDisabled;
jQuery(document).ready(function () {
- var esLink = jQuery("#enableScript");
-
- function changeEditor(checkbox, editor){
- if(jQuery(checkbox).is(':checked')){
- scriptDisabled = false;
- editor.setOption("theme", "default");
- }else{
- scriptDisabled = "nocursor";
- editor.setOption("theme", "default disabled");
- }
- editor.setOption("readOnly", scriptDisabled);
- }
myCodeMirror = CodeMirror.fromTextArea(scriptTextArea, {
keyMap: "sublime",
showCursorWhenSelecting: true,
});
- esLink.click(function(){
- changeEditor(this, myCodeMirror);
- });
-
- changeEditor(esLink, myCodeMirror);
-
});
</script>
<%@ page import="org.wso2.carbon.identity.application.common.model.xsd.AuthenticationStep"%>
@@ -309,7 +291,6 @@ var img = "";
});
$('[data-toggle=template-link]').click(function (e) {
- if(!scriptDisabled) {
e.preventDefault();
var typeName = $(this).data('type-name');
var data;
@@ -334,7 +315,6 @@ var img = "";
ch: line.length - 1
}
doc.replaceRange('\n// ' + tempName + ' from Template...\n\n' + data + '\n\n// End of ' + tempName + '.......\n', pos);
- }
});
$('.type > h2').click(function (e) {
@@ -691,7 +671,7 @@ var img = "";
if (appBean.getServiceProvider().getLocalAndOutBoundAuthenticationConfig().getAuthenticationScriptConfig().getEnabled()) { %>
checked="checked" <% }
}
- }%>/> Enable Script
+ }%>/> Use this Script
</span>
<table style="width: 100%; margin-top: 4px;">
<tr>
