Skip to content

Commit

Permalink
Sharing: Pre-check pw/expiry if the server requires it
Browse files Browse the repository at this point in the history
Since the check boxes are disabled users can't check them themselves.

For #7246
  • Loading branch information
ckamm committed Jun 16, 2019
1 parent 7d84208 commit 6290bd2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/gui/sharelinkwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,10 @@ void ShareLinkWidget::slotShareSelectionChanged()
_ui->checkBox_password->setChecked(true);
_ui->lineEdit_password->setPlaceholderText("********");
_ui->lineEdit_password->setEnabled(true);
} else if (createNew && _passwordRequired) {
_ui->checkBox_password->setChecked(true);
_ui->lineEdit_password->setPlaceholderText(tr("Please Set Password"));
_ui->lineEdit_password->setEnabled(true);
} else {
_ui->checkBox_password->setChecked(false);
_ui->lineEdit_password->setPlaceholderText(QString());
Expand All @@ -356,6 +360,9 @@ void ShareLinkWidget::slotShareSelectionChanged()
_ui->checkBox_expire->setChecked(true);
_ui->calendar->setDate(share->getExpireDate());
_ui->calendar->setEnabled(true);
} else if (createNew && _expiryRequired) {
_ui->checkBox_expire->setChecked(true);
_ui->calendar->setEnabled(true);
} else {
_ui->checkBox_expire->setChecked(false);
_ui->calendar->setEnabled(false);
Expand Down

0 comments on commit 6290bd2

Please sign in to comment.