# HG changeset patch # User RhodeCode Admin # Date 2021-04-20 11:45:03 # Node ID 52d2949fd595ebe3de24c55e9846bdf34c95c986 # Parent 2e951f8df4a9064d23db1b6862b8fb3fe44f89da gists: block id input for public gists. fixes #5655 diff --git a/rhodecode/templates/admin/gists/gist_index.mako b/rhodecode/templates/admin/gists/gist_index.mako --- a/rhodecode/templates/admin/gists/gist_index.mako +++ b/rhodecode/templates/admin/gists/gist_index.mako @@ -27,13 +27,13 @@ diff --git a/rhodecode/templates/admin/gists/gist_new.mako b/rhodecode/templates/admin/gists/gist_new.mako --- a/rhodecode/templates/admin/gists/gist_new.mako +++ b/rhodecode/templates/admin/gists/gist_new.mako @@ -65,11 +65,11 @@
- + ${_('Private Gist')} - + ${_('Public Gist')}
@@ -99,5 +99,14 @@ setCodeMirrorModeFromInput( modes_select, filename_selector, myCodeMirror, null); + setGistId = function(gistType) { + if (gistType === 'private') { + $('#gistid').removeAttr('disabled'); + } + else { + $('#gistid').val(''); + $('#gistid').attr('disabled', 'disabled') + } + }