These could be chained to:
```
var linkDiv = $('<div/>')
  .append($('<input/>').attr({type: 'checkbox', name: 'linkCheckbox', id: 'linkCheckbox', value: 1}))
  .append($('<label/>').attr('for','linkCheckbox').text(t('core', 'Share with link')))
  .append('<br/>')
  .append($('<input/>').attr({type: 'text', readonly: 'readonly', id: 'linkText'}))
  .append($('<input/>').attr({id: 'showPassword', type: 'checkbox', name: 'showPassword', value: 1}).hide())
  .append($('<label/>').attr('for','showPassword').text(t('core', 'Password protect')));
```