mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
240627b504
fixing to use entwine/jquery instead of old behaviour
25 lines
503 B
JavaScript
25 lines
503 B
JavaScript
(function($) {
|
|
$.entwine('ss', function($){
|
|
$('#Form_EditForm_RedirectionType input').entwine({
|
|
onmatch: function() {
|
|
var self = $(this);
|
|
if(self.attr('checked')) this.toggle();
|
|
this._super();
|
|
},
|
|
onclick: function() {
|
|
this.toggle();
|
|
},
|
|
toggle: function() {
|
|
if($(this).attr('value') == 'Internal') {
|
|
$('#ExternalURL').hide();
|
|
$('#LinkToID').show();
|
|
} else {
|
|
$('#ExternalURL').show();
|
|
$('#LinkToID').hide();
|
|
}
|
|
}
|
|
});
|
|
});
|
|
})(jQuery);
|
|
|