Skip to content

Commit

Permalink
Move question contact button
Browse files Browse the repository at this point in the history
  • Loading branch information
jochenklar committed Jan 31, 2025
1 parent 58243a8 commit 009022a
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@ const Question = ({ settings, templates, page, question, sets, values, siblings,
currentSet, createValue, updateValue, deleteValue, copyValue, fetchContact }) => {
return checkQuestion(question, currentSet) && (
<div className={`interview-question col-md-${question.width || '12'}`}>
<QuestionContact settings={settings} question={question} values={values} fetchContact={fetchContact} />
<QuestionOptional question={question} />
<QuestionText question={question} />
<div className="interview-question-text">
<QuestionText question={question} />
<QuestionContact settings={settings} question={question} values={values} fetchContact={fetchContact} />
</div>
<QuestionHelp question={question} />
<QuestionHelpTemplate templates={templates} />
<QuestionAddValueHelp templates={templates} question={question} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import PropTypes from 'prop-types'

const QuestionContact = ({ settings, question, values, fetchContact }) => {
return settings.project_contact && (
<button className="btn btn-link btn-contact" title={gettext('Contact support.')}
<button className="btn btn-link btn-contact" title={gettext('Contact support')}
onClick={() => fetchContact({ question, values })}>
<i className="fa fa-commenting-o" aria-hidden="true"></i>
</button>
Expand Down
19 changes: 15 additions & 4 deletions rdmo/projects/assets/scss/interview.scss
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,14 @@
p {
margin-bottom: 5px;
}

.interview-question-text {
margin-bottom: 10px;

.form-label {
display: inline;
}
}
}

.interview-questionset {
Expand Down Expand Up @@ -401,13 +409,16 @@
color: #777;
}

.btn-contact {
float: right;
.btn.btn-contact {
opacity: 0.8;
line-height: 20px;
font-size: 14px;
line-height: 16px;

padding: 0;
border: none;
border-radius: 0;

margin-left: 10px;
margin-top: -3px;

&:hover {
opacity: 1;
Expand Down

0 comments on commit 009022a

Please sign in to comment.