Skip to content
This repository has been archived by the owner on May 17, 2021. It is now read-only.

fix(jobs): change job command input field to textarea #241

Merged
merged 1 commit into from
Oct 15, 2016
Merged

fix(jobs): change job command input field to textarea #241

merged 1 commit into from
Oct 15, 2016

Conversation

dmlittle
Copy link
Contributor

@dmlittle dmlittle commented Oct 9, 2016

What

This PR changes the edit job view to make use of a textarea tag instead of an input tag for the job command field.

Why

The command doesn't have any HTML escaping and therefore might cut short the value displayed in the input tag. For example, if the command of a job was command "some text", the displayed HTML command would be command as the value property of the input tag was closed by the double quote in the command value, causing the rest of the command to be added as attributes to the input field. I considered escaping the HTML and displaying the entire command in an input field but that meant that when saving the command all HTML entities would now be stored as escaped HTML rather than their characters. A textarea seemed better suited for the job and provided the additional benefit of the command input being re-sizeable.

Overall this change has two benefits: 1) the cron job command is now fully displayed and is able to be edited by the user without having to re-enter the entire command and 2) users can make use of the resize textbox feature built-in by browsers to increase the textarea size if the command doesn't fit in the default textarea size.

Screenshots

  • Original command information displayed for context
    screen shot 2016-10-09 at 3 55 13 pm
  • Truncated job command caused by this issue
    screen shot 2016-10-09 at 3 56 28 pm
  • Complete job shown as displayed with proposed changes
    screen shot 2016-10-09 at 3 56 03 pm

@jamesrwhite
Copy link
Owner

Looks good, thank you!

@jamesrwhite jamesrwhite merged commit aca973d into jamesrwhite:develop Oct 15, 2016
@jamesrwhite jamesrwhite added this to the 0.9.7 milestone Oct 15, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants