diff --git a/discover/qml/ReviewDialog.qml b/discover/qml/ReviewDialog.qml --- a/discover/qml/ReviewDialog.qml +++ b/discover/qml/ReviewDialog.qml @@ -11,7 +11,7 @@ property QtObject application readonly property alias rating: ratingInput.rating - readonly property alias summary: summaryInput.text + readonly property alias summary: titleInput.text readonly property alias review: reviewInput.text property QtObject backend: null @@ -29,29 +29,28 @@ visible: reviewDialog.backend.userName.length > 0 text: visible ? i18n("Submission name: %1", reviewDialog.backend.userName) : "" } - Label { text: i18n("Summary:") } + Label { text: i18n("Title:") } TextField { - id: summaryInput + id: titleInput Layout.fillWidth: true - placeholderText: i18n("Short summary...") validator: RegExpValidator { regExp: /.{3,70}/ } } - + Label { text: i18n("Review:") } TextArea { id: reviewInput readonly property bool acceptableInput: inputIssue.length === 0 - readonly property string inputIssue: length < 15 ? i18n("Comment too short") : - length > 3000 ? i18n("Comment too long") : "" + readonly property string inputIssue: length < 15 ? i18n("Keep writing...") : + length > 3000 ? i18n("Too long!") : "" Layout.fillWidth: true Layout.fillHeight: true } Button { id: acceptButton Layout.alignment: Qt.AlignRight - enabled: summaryInput.acceptableInput && reviewInput.acceptableInput - text: summaryInput.acceptableInput && reviewInput.acceptableInput ? i18n("Submit") - : !summaryInput.acceptableInput ? i18n("Improve summary") : reviewInput.inputIssue + enabled: titleInput.acceptableInput && reviewInput.acceptableInput + text: titleInput.acceptableInput && reviewInput.acceptableInput ? i18n("Submit") + : !titleInput.acceptableInput ? i18n("Add a title") : reviewInput.inputIssue onClicked: { reviewDialog.accepted() reviewDialog.sheetOpen = false