Skip to content

Commit

Permalink
claustro is not required now
Browse files Browse the repository at this point in the history
  • Loading branch information
xtian7489 committed Jun 8, 2024
1 parent 6c4d7a7 commit f706246
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 3 additions & 3 deletions ext/lib/site/formulario-propuesta/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ class FormularioPropuesta extends Component {
let user = this.props.user.state.value
this.setState({
// facultad: user.facultad._id,
claustro: user.claustro._id,
claustro: user.staff ? null : user.claustro._id,
email: user.email,
documento: user.dni,
nombre: user.firstName + ' ' + user.lastName
Expand Down Expand Up @@ -227,7 +227,7 @@ class FormularioPropuesta extends Component {
if (this.state.titulo === '') return true
if (this.state.problema === '') return true
if (this.state.tag === '' ) return true
if (this.state.claustro === '') return true
//if (this.state.claustro === '') return true
if (this.state.solucion === '') return true
if (this.state.beneficios === '') return true
if (this.state.facultad === '') return true
Expand Down Expand Up @@ -597,7 +597,7 @@ class FormularioPropuesta extends Component {
{this.hasErrorsField('solucion') && <li className="error-li">El campo "Tu idea" no puede quedar vacío</li> }
{this.hasErrorsField('beneficios') && <li className="error-li">El campo "Beneficios" no puede quedar vacío</li>}
{this.hasErrorsField('facultad') && <li className="error-li">El campo "Facultad" no puede quedar vacío</li> }
{this.hasErrorsField('claustro') && <li className="error-li">El campo "Claustro" no puede quedar vacío</li>}
{/* {this.hasErrorsField('claustro') && <li className="error-li">El campo "Claustro" no puede quedar vacío</li>} */}
</ul>
</div>
}
Expand Down
3 changes: 1 addition & 2 deletions lib/api-v2/topics/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,7 @@ middlewares.facultades.findFromBody,
middlewares.tags.findFromBody,
middlewares.topics.parseUpdateableKeys,
middlewares.topics.autoPublish,
function postTopics (req, res, next) {
console.log(req);
function postTopics(req, res, next) {
if (req.forum.config.propuestasAbiertas || req.user.staff || req.forum.hasRole(req.user, 'admin', 'collaborator', 'author')){

if (req.keysToUpdate['action.method'] === 'poll') req.keysToUpdate['action.options'] = req.body['action.options']
Expand Down

0 comments on commit f706246

Please sign in to comment.