mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-06-24 13:39:36 +02:00
d2a5d073e2
* Enhancement switch to the shared webpack config * upgrade to new webpack-config
28 lines
613 B
JavaScript
28 lines
613 B
JavaScript
import $ from 'jquery';
|
|
|
|
$.entwine('ss', function($){
|
|
$('#Form_EditForm_RedirectionType input').entwine({
|
|
onmatch: function() {
|
|
var self = $(this);
|
|
if(self.attr('checked')) this.toggle();
|
|
this._super();
|
|
},
|
|
onunmatch: function() {
|
|
this._super();
|
|
},
|
|
onclick: function() {
|
|
this.toggle();
|
|
},
|
|
toggle: function() {
|
|
if($(this).attr('value') == 'Internal') {
|
|
$('#Form_EditForm_ExternalURL_Holder').hide();
|
|
$('#Form_EditForm_LinkToID_Holder').show();
|
|
} else {
|
|
$('#Form_EditForm_ExternalURL_Holder').show();
|
|
$('#Form_EditForm_LinkToID_Holder').hide();
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|