mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
28 lines
555 B
JavaScript
28 lines
555 B
JavaScript
(function($) {
|
|
$.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') {
|
|
$('#ExternalURL').hide();
|
|
$('#LinkToID').show();
|
|
} else {
|
|
$('#ExternalURL').show();
|
|
$('#LinkToID').hide();
|
|
}
|
|
}
|
|
});
|
|
});
|
|
})(jQuery);
|
|
|