Don't show links option in dropdown if disabled

This commit is contained in:
Michael Gapczynski 2013-05-02 11:45:12 -04:00 committed by Morris Jobke
parent 4cf328e3b9
commit a2c80bbc68
1 changed files with 6 additions and 1 deletions

View File

@ -203,7 +203,12 @@ OC.Share={
html += '<input id="shareWith" type="text" placeholder="'+t('core', 'Share with')+'" />';
html += '<ul id="shareWithList">';
html += '</ul>';
if (link) {
var linksAllowed = false;
$.ajax({type: 'GET', url: OC.filePath('core', 'ajax', 'appconfig.php'), data: { action:'getValue', app:'core', key:'shareapi_allow_links', defaultValue:'yes' }, async: false, success: function(result) {
if (result && result.status === 'success' && result.data === 'yes') {
linksAllowed = true;
}
}});
html += '<div id="link">';
html += '<input type="checkbox" name="linkCheckbox" id="linkCheckbox" value="1" /><label for="linkCheckbox">'+t('core', 'Share with link')+'</label>';
html += '<br />';