Skip to content

Commit

Permalink
Add new class for html editor styles, add link styles
Browse files Browse the repository at this point in the history
Signed-off-by: Tomás Castillo <[email protected]>
  • Loading branch information
tomrndom committed May 30, 2024
1 parent 03892ef commit f463fe9
Show file tree
Hide file tree
Showing 21 changed files with 37 additions and 27 deletions.
4 changes: 2 additions & 2 deletions src/components/forms/badge-feature-type-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ class BadgeFeatureTypeForm extends React.Component {
<div className="row form-group">
<div className="col-md-12">
<label> {T.translate("edit_badge_feature.description")} *</label>
<TextEditor
<TextEditor className="html-editor"
id="description"
value={entity.description}
onChange={this.handleChange}
Expand All @@ -124,7 +124,7 @@ class BadgeFeatureTypeForm extends React.Component {
<div className="row form-group">
<div className="col-md-12">
<label> {T.translate("edit_badge_feature.template_content")} *</label>
<TextEditor
<TextEditor className="html-editor"
id="template_content"
value={entity.template_content}
onChange={this.handleChange}
Expand Down
6 changes: 3 additions & 3 deletions src/components/forms/company-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,19 +236,19 @@ class CompanyForm extends React.Component {
<div className="row form-group">
<div className="col-md-12">
<label> {T.translate("edit_company.description")} </label>
<TextEditor id="description" value={entity.description} onChange={this.handleChange} />
<TextEditor className="html-editor" id="description" value={entity.description} onChange={this.handleChange} />
</div>
</div>
<div className="row form-group">
<div className="col-md-12">
<label> {T.translate("edit_company.overview")} </label>
<TextEditor id="overview" value={entity.overview} onChange={this.handleChange} />
<TextEditor className="html-editor" id="overview" value={entity.overview} onChange={this.handleChange} />
</div>
</div>
<div className="row form-group">
<div className="col-md-12">
<label> {T.translate("edit_company.commitment")} </label>
<TextEditor id="commitment" value={entity.commitment} onChange={this.handleChange} />
<TextEditor className="html-editor" id="commitment" value={entity.commitment} onChange={this.handleChange} />
</div>
</div>
{entity.id > 0 && window.APP_CLIENT_NAME == 'openstack' &&
Expand Down
2 changes: 1 addition & 1 deletion src/components/forms/event-category-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ class EventCategoryForm extends React.Component {
<div className="row form-group">
<div className="col-md-12">
<label> {T.translate("edit_event_category.description")} </label>
<TextEditor
<TextEditor className="html-editor"
id="description"
value={entity.description}
onChange={this.handleChange}
Expand Down
2 changes: 1 addition & 1 deletion src/components/forms/event-category-group-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ class EventCategoryGroupForm extends React.Component {
<div className="row form-group">
<div className="col-md-12">
<label> {T.translate("edit_event_category_group.description")} </label>
<TextEditor
<TextEditor className="html-editor"
id="description"
value={entity.description}
onChange={this.handleChange}
Expand Down
4 changes: 2 additions & 2 deletions src/components/forms/event-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -761,7 +761,7 @@ render() {
<div className="row form-group">
<div className="col-md-12">
<label> {T.translate("edit_event.short_description")}</label>
<TextEditor
<TextEditor className="html-editor"
id="description"
value={entity.description}
onChange={this.handleChange}
Expand All @@ -782,7 +782,7 @@ render() {
<div className="row form-group">
<div className="col-md-12">
<label> {T.translate("edit_event.expect_to_learn")} </label>
<TextEditor id="attendees_expected_learnt" value={entity.attendees_expected_learnt}
<TextEditor className="html-editor" id="attendees_expected_learnt" value={entity.attendees_expected_learnt}
onChange={this.handleChange} />
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/forms/event-material-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ class EventMaterialForm extends React.Component {
<div className="row form-group">
<div className="col-md-12">
<label> {T.translate("edit_event_material.description")} *</label>
<TextEditor
<TextEditor className="html-editor"
id="description"
value={entity.description}
onChange={this.handleChange}
Expand Down
2 changes: 1 addition & 1 deletion src/components/forms/extra-question-form/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ class ExtraQuestionForm extends React.Component {
<div className="row form-group">
<div className="col-md-12">
<label> {T.translate("question_form.visible_question")} *</label>
<TextEditor
<TextEditor className="html-editor"
id="label"
value={entity.label}
onChange={this.handleChange}
Expand Down
2 changes: 1 addition & 1 deletion src/components/forms/floor-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ class FloorForm extends React.Component {
<div className="row form-group">
<div className="col-md-12">
<label> {T.translate("edit_floor.description")} </label>
<TextEditor
<TextEditor className="html-editor"
id="description"
value={entity.description}
onChange={this.handleChange}
Expand Down
2 changes: 1 addition & 1 deletion src/components/forms/image-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ class ImageForm extends React.Component {
<div className="row form-group">
<div className="col-md-12">
<label> {T.translate("general.description")} </label>
<TextEditor
<TextEditor className="html-editor"
id="description"
value={entity.description}
onChange={this.handleChange}
Expand Down
4 changes: 2 additions & 2 deletions src/components/forms/location-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ class LocationForm extends React.Component {
<div className="row form-group">
<div className="col-md-12">
<label> {T.translate("edit_location.description")} </label>
<TextEditor id="description" value={entity.description} onChange={this.handleChange} error={this.hasErrors('description')} />
<TextEditor className="html-editor" id="description" value={entity.description} onChange={this.handleChange} error={this.hasErrors('description')} />
</div>
</div>

Expand Down Expand Up @@ -348,7 +348,7 @@ class LocationForm extends React.Component {
{this.display('location_message') &&
<div className="col-md-12">
<label> {T.translate("edit_location.location_message")}</label>
<TextEditor id="location_message" value={entity.location_message} onChange={this.handleChange}
<TextEditor className="html-editor" id="location_message" value={entity.location_message} onChange={this.handleChange}
error={this.hasErrors('location_message')}/>
</div>
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/forms/marketing-setting-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ class MarketingSettingForm extends React.Component {
{entity.type === 'TEXTAREA' &&
<div className="col-md-8">
<label> {T.translate("marketing.html")} *</label>
<TextEditorV2
<TextEditor className="html-editor"V2
id="value"
value={entity.value}
onChange={this.handleChange}
Expand Down
2 changes: 1 addition & 1 deletion src/components/forms/media-upload-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ class MediaUploadForm extends React.Component {
<div className="row form-group">
<div className="col-md-8">
<label> {T.translate("media_upload.description")}</label>
<TextEditor
<TextEditor className="html-editor"
id="description"
value={entity.description}
onChange={this.handleChange}
Expand Down
2 changes: 1 addition & 1 deletion src/components/forms/room-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ class RoomForm extends React.Component {
<div className="row form-group">
<div className="col-md-12">
<label> {T.translate("edit_room.description")} </label>
<TextEditor
<TextEditor className="html-editor"
id="description"
value={entity.description}
onChange={this.handleChange}
Expand Down
4 changes: 2 additions & 2 deletions src/components/forms/selection-plan-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ class SelectionPlanForm extends React.Component {
<div className="row form-group">
<div className="col-md-12">
<label> {T.translate("edit_selection_plan.submission_period_disclaimer")} *</label>
<TextEditor
<TextEditor className="html-editor"
id="submission_period_disclaimer"
value={entity.submission_period_disclaimer}
onChange={this.handleChange}
Expand Down Expand Up @@ -782,7 +782,7 @@ class SelectionPlanForm extends React.Component {
<i className="fa fa-info-circle" aria-hidden="true"
title={T.translate("edit_selection_plan.cfp_presentation_edition_custom_message_info")}/>
</label>
<TextEditor
<TextEditor className="html-editor"
id="cfp_presentation_edition_custom_message"
error={this.hasErrors('cfp_presentation_edition_custom_message')}
onChange={this.handleChange}
Expand Down
2 changes: 1 addition & 1 deletion src/components/forms/speaker-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ class SpeakerForm extends React.Component {
<div className="row form-group">
<div className="col-md-12">
<label> {T.translate("edit_speaker.bio")} </label>
<TextEditor id="bio" value={entity.bio} onChange={this.handleChange} />
<TextEditor className="html-editor" id="bio" value={entity.bio} onChange={this.handleChange} />
</div>
</div>
{entity.id !== 0 && entity.member && this.props.entity.member && entity.member.id === this.props.entity.member.id &&
Expand Down
2 changes: 1 addition & 1 deletion src/components/forms/sponsor-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ class SponsorForm extends React.Component {
<div className="row form-group">
<div className="col-md-12">
<label> {T.translate("edit_sponsor.intro")} </label>
<TextEditor id="intro" value={entity.intro} onChange={this.handleChange} />
<TextEditor className="html-editor" id="intro" value={entity.intro} onChange={this.handleChange} />
</div>
</div>
<div className="row form-group">
Expand Down
2 changes: 1 addition & 1 deletion src/components/forms/sponsored-project-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ class SponsoredProjectForm extends React.Component {
<div className="row form-group">
<div className="col-md-12">
<label> {T.translate("edit_sponsored_project.description")} </label>
<TextEditor id="description" value={entity.description} onChange={this.handleChange} />
<TextEditor className="html-editor" id="description" value={entity.description} onChange={this.handleChange} />
</div>
</div>
{entity.id !== 0 &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ class SponsoredProjectSponsorshipTypeForm extends React.Component {
<div className="row form-group">
<div className="col-md-12">
<label> {T.translate("edit_sponsored_project_sponsorship_type.description")} </label>
<TextEditor id="description" value={entity.description} onChange={this.handleChange} />
<TextEditor className="html-editor" id="description" value={entity.description} onChange={this.handleChange} />
</div>
</div>
{entity.id !== 0 &&
Expand Down
4 changes: 2 additions & 2 deletions src/components/forms/summit-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ class SummitForm extends React.Component {
onChange={this.handleChange}
className="form-control"
/>*/}
<TextEditor id="registration_disclaimer_content" value={entity.registration_disclaimer_content} onChange={this.handleChange} />
<TextEditor className="html-editor" id="registration_disclaimer_content" value={entity.registration_disclaimer_content} onChange={this.handleChange} />
</div>
</div>
<div className="row form-group">
Expand Down Expand Up @@ -960,7 +960,7 @@ class SummitForm extends React.Component {
</label>&nbsp;
<i className="fa fa-info-circle" aria-hidden="true"
title={T.translate("edit_summit.reg_lite_no_allowed_tickets_message_info")} />
<TextEditor
<TextEditor className="html-editor"
id="REG_LITE_NO_ALLOWED_TICKETS_MESSAGE"
value={regLiteMarketingSettings?.REG_LITE_NO_ALLOWED_TICKETS_MESSAGE?.value}
onChange={this.handleChange}
Expand Down
2 changes: 1 addition & 1 deletion src/components/forms/view-type-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ class ViewTypeForm extends React.Component {
<div className="row form-group">
<div className="col-md-12">
<label> {T.translate("edit_view_type.description")}</label>
<TextEditor
<TextEditor className="html-editor"
id="description"
value={entity.description}
onChange={this.handleChange}
Expand Down
10 changes: 10 additions & 0 deletions src/styles/general.less
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,16 @@ h3 {
}
}

.html-editor {
a {
color: #337ab7;
&:hover, a:focus {
color: #23527c;
text-decoration: underline;
}
}
}

.panel a.collapsed {
.panel-heading {
background-color: #f5f5f5;
Expand Down

0 comments on commit f463fe9

Please sign in to comment.