|
4 | 4 | - {{ $task->exists ? 'Update' : 'Create'}} Task |
5 | 5 | @stop |
6 | 6 | @section('main-panel-before') |
7 | | - <form action="{{ request()->fullUrl() }}" method="POST" class="uk-form-horizontal"> |
| 7 | + <form action="{{ request()->fullUrl() }}" method="POST"> |
8 | 8 | {{csrf_field()}} |
9 | 9 | @stop |
10 | 10 | @section('title') |
|
13 | 13 | </div> |
14 | 14 | @stop |
15 | 15 | @section('main-panel-content') |
16 | | - <div class="uk-margin"> |
17 | | - <label class="uk-form-label">Description</label> |
18 | | - <div class="uk-form-controls"> |
19 | | - <input class="uk-input" placeholder="A brief description" name="description" id="description" value="{{old('description', $task->description)}}" type="text"> |
| 16 | + <div class="uk-grid"> |
| 17 | + <div class="uk-width-1-3"> |
| 18 | + <label class="uk-form-label">Description</label> |
| 19 | + <div class="uk-text-meta">Provide a descriptive name for your task</div> |
| 20 | + </div> |
| 21 | + <div class="uk-width-2-3"> |
| 22 | + <input class="uk-input" placeholder="e.g. Daily Backups" name="description" id="description" value="{{old('description', $task->description)}}" type="text"> |
20 | 23 | @if($errors->has('description')) |
21 | 24 | <p class="uk-text-danger">{{$errors->first('description')}}</p> |
22 | 25 | @endif |
23 | 26 | </div> |
24 | 27 | </div> |
25 | | - <div class="uk-margin"> |
26 | | - <label class="uk-form-label">Command</label> |
27 | | - <div class="uk-form-controls"> |
| 28 | + <div class="uk-grid"> |
| 29 | + <div class="uk-width-1-3"> |
| 30 | + <label class="uk-form-label">Command</label> |
| 31 | + <div class="uk-text-meta">Select an artisan command to schedule</div> |
| 32 | + </div> |
| 33 | + <div class="uk-width-2-3"> |
28 | 34 | <select id="command" name="command" class="uk-select" placeholder="Click here to select one of the available commands"> |
29 | | - <option value="">Click here to select one of the available commands</option> |
| 35 | + <option value="">Select a command</option> |
30 | 36 | @foreach ($commands as $command) |
31 | 37 | <option value="{{$command->getName()}}" {{old('command', $task->command) == $command->getName() ? 'selected' : ''}}>{{$command->getDescription()}}</option> |
32 | 38 | @endforeach |
|
36 | 42 | @endif |
37 | 43 | </div> |
38 | 44 | </div> |
39 | | - <div class="uk-margin"> |
40 | | - <label class="uk-form-label">Parameters</label> |
41 | | - <div class="uk-form-controls"> |
42 | | - <input class="uk-input" placeholder="Any command parameters required to run the selected command" name="parameters" id="parameters" value="{{old('parameters', $task->parameters)}}" type="text"> |
| 45 | + <div class="uk-grid"> |
| 46 | + <div class="uk-width-1-3"> |
| 47 | + <label class="uk-form-label">Parameters (Optional)</label> |
| 48 | + <div class="uk-text-meta">Command parameters required to run the selected command</div> |
| 49 | + </div> |
| 50 | + <div class="uk-width-2-3"> |
| 51 | + <input class="uk-input" placeholder="e.g. --type=all" name="parameters" id="parameters" value="{{old('parameters', $task->parameters)}}" type="text"> |
43 | 52 | </div> |
44 | 53 | </div> |
45 | | - <div class="uk-margin"> |
46 | | - <label class="uk-form-label">Timezone</label> |
47 | | - <div class="uk-form-controls"> |
48 | | - <select id="timezone" name="timezone" class="uk-select" placeholder="Click here to select one of the available commands"> |
| 54 | + <hr class="uk-divider-icon"> |
| 55 | + <div class="uk-grid"> |
| 56 | + <div class="uk-width-1-3"> |
| 57 | + <label class="uk-form-label">Timezone</label> |
| 58 | + <div class="uk-text-meta">Select a timezone for your task. App timezone is selected by default</div> |
| 59 | + </div> |
| 60 | + <div class="uk-width-2-3"> |
| 61 | + <select id="timezone" name="timezone" class="uk-select" placeholder="Select a timezone"> |
49 | 62 | @foreach ($timezones as $key => $timezone) |
50 | 63 | <option value="{{$timezone}}" {{old('timezone', $task->exists ? $task->timezone : config('app.timezone')) == $timezone ? 'selected' : ''}}>{{$timezone}}</option> |
51 | 64 | @endforeach |
52 | 65 | </select> |
53 | 66 | </div> |
54 | 67 | </div> |
55 | 68 | <task-type inline-template current="{{old('type', $task->expression ? 'expression' : 'frequency')}}" :existing="{{old('frequencies') ? json_encode(old('frequencies')) : $task->frequencies}}" > |
56 | | - <div> |
57 | | - <div class="uk-margin"> |
58 | | - <div class="uk-form-label">Type</div> |
59 | | - <div class="uk-form-controls uk-form-controls-text"> |
| 69 | + <div class="uk-margin"> |
| 70 | + <div class="uk-grid"> |
| 71 | + <div class="uk-width-1-3"> |
| 72 | + <div class="uk-form-label">Type</div> |
| 73 | + <div class="uk-text-meta">Choose whether to define a cron expression or to add frequencies</div> |
| 74 | + </div> |
| 75 | + <div class="uk-width-2-3 uk-form-controls-text"> |
60 | 76 | <label> |
61 | 77 | <input type="radio" name="type" v-model="type" value="expression"> Expression |
62 | 78 | </label><br> |
|
65 | 81 | </label> |
66 | 82 | </div> |
67 | 83 | </div> |
68 | | - <div class="uk-margin" v-if="isCron"> |
69 | | - <label class="uk-form-label">Cron Expression</label> |
70 | | - <div class="uk-form-controls"> |
| 84 | + <div class="uk-grid" v-if="isCron"> |
| 85 | + <div class="uk-width-1-3"> |
| 86 | + <label class="uk-form-label">Cron Expression</label> |
| 87 | + <div class="uk-text-meta">Add a cron expression for your task</div> |
| 88 | + </div> |
| 89 | + <div class="uk-width-2-3"> |
71 | 90 | <input class="uk-input" placeholder="e.g * * * * * to run this task all the time" name="expression" id="expression" value="{{old('expression', $task->expression)}}" type="text"> |
72 | 91 | @if($errors->has('expression')) |
73 | 92 | <p class="uk-text-danger">{{$errors->first('expression')}}</p> |
74 | 93 | @endif |
75 | 94 | </div> |
76 | 95 | </div> |
77 | | - <div class="uk-margin" v-if="managesFrequencies"> |
78 | | - <label class="uk-form-label"></label> |
79 | | - <div class="uk-form-controls"> |
| 96 | + <div class="uk-grid" v-if="managesFrequencies"> |
| 97 | + <div class="uk-width-1-3"> |
| 98 | + <label class="uk-form-label">Frequencies</label> |
| 99 | + <div class="uk-text-meta">Add frequencies to your task. These frequencies will be converted into a cron expression while scheduling the task</div> |
| 100 | + </div> |
| 101 | + <div class="uk-width-2-3"> |
80 | 102 | <a class="uk-button uk-button-small uk-button-link" @click.self.prevent="showModal = true">Add Frequency</a> |
81 | 103 | @include('totem::dialogs.frequencies.add') |
82 | 104 | <table class="uk-table uk-table-divider uk-margin-remove"> |
|
128 | 150 | </div> |
129 | 151 | </div> |
130 | 152 | </task-type> |
131 | | - <div class="uk-margin"> |
132 | | - <label class="uk-form-label">Email Notification</label> |
133 | | - <div class="uk-form-controls"> |
134 | | - <input type="text" id="email" name="notification_email_address" value="{{old('notification_email_address', $task->notification_email_address)}}" class="uk-input" placeholder="Leave empty if you do not wish to receive email notifications"> |
| 153 | + <hr class="uk-divider-icon"> |
| 154 | + <div class="uk-grid"> |
| 155 | + <div class="uk-width-1-3"> |
| 156 | + <label class="uk-form-label">Email Notification (optional)</label> |
| 157 | + <div class="uk-text-meta">Add an email address to receive notifications when this task gets executed. Leave empty if you do not wish to receive email notifications</div> |
| 158 | + </div> |
| 159 | + <div class="uk-width-2-3"> |
| 160 | + < input type= "text" id= "email" name= "notification_email_address" value= "{{old('notification_email_address', $task->notification_email_address)}}" class= "uk-input" placeholder= "e.g. [email protected]"> |
135 | 161 | @if($errors->has('notification_email_address')) |
136 | 162 | <p class="uk-text-danger">{{$errors->first('notification_email_address')}}</p> |
137 | 163 | @endif |
138 | 164 | </div> |
139 | 165 | </div> |
140 | | - <div class="uk-margin"> |
141 | | - <label class="uk-form-label">SMS Notification</label> |
142 | | - <div class="uk-form-controls"> |
143 | | - <input type="text" id="phone" name="notification_phone_number" value="{{old('notification_phone_number', $task->notification_phone_number)}}" class="uk-input" placeholder="Leave empty if you do not wish to receive sms notifications"> |
| 166 | + <div class="uk-grid"> |
| 167 | + <div class="uk-width-1-3"> |
| 168 | + <label class="uk-form-label">SMS Notification (optional)</label> |
| 169 | + <div class="uk-text-meta">Add a phone number to receive SMS notifications. Leave empty if you do not wish to receive sms notifications</div> |
| 170 | + </div> |
| 171 | + <div class="uk-width-2-3"> |
| 172 | + <input type="text" id="phone" name="notification_phone_number" value="{{old('notification_phone_number', $task->notification_phone_number)}}" class="uk-input" placeholder="e.g. 18701234567"> |
144 | 173 | @if($errors->has('notification_phone_number')) |
145 | 174 | <p class="uk-text-danger">{{$errors->first('notification_phone_number')}}</p> |
146 | 175 | @endif |
147 | 176 | </div> |
148 | 177 | </div> |
149 | | - <div class="uk-margin"> |
150 | | - <label class="uk-form-label">Slack Notification</label> |
151 | | - <div class="uk-form-controls"> |
152 | | - <input type="text" id="slack" name="notification_slack_webhook" value="{{old('notification_slack_webhook', $task->notification_slack_webhook)}}" class="uk-input" placeholder="Leave empty if you do not wish to receive slack notifications"> |
| 178 | + <div class="uk-grid"> |
| 179 | + <div class="uk-width-1-3"> |
| 180 | + <label class="uk-form-label">Slack Notification (optional)</label> |
| 181 | + <div class="uk-text-meta">Add a slack web hook url to recieve slack notifications. Phone numbers should include country code and are digits only. Leave empty if you do not wish to receive slack notifications</div> |
| 182 | + </div> |
| 183 | + <div class="uk-width-2-3"> |
| 184 | + <input type="text" id="slack" name="notification_slack_webhook" value="{{old('notification_slack_webhook', $task->notification_slack_webhook)}}" class="uk-input" placeholder="e.g. https://hooks.slack.com/TXXXXX/BXXXXX/XXXXXXXXXX"> |
153 | 185 | @if($errors->has('notification_slack_webhook')) |
154 | 186 | <p class="uk-text-danger">{{$errors->first('notification_slack_webhook')}}</p> |
155 | 187 | @endif |
156 | 188 | </div> |
157 | 189 | </div> |
158 | | - <div class="uk-margin"> |
159 | | - <div class="uk-form-label"></div> |
160 | | - <div class="uk-form-controls uk-form-controls-text"> |
| 190 | + <hr class="uk-divider-icon"> |
| 191 | + <div class="uk-grid"> |
| 192 | + <div class="uk-width-1-3"> |
| 193 | + <div class="uk-form-controls">Miscellaneous Options</div> |
| 194 | + <div class="uk-text-meta">Decide whether multiple instances of same task should overlap each other or not.</div> |
| 195 | + <div class="uk-text-meta">Decide whether the task should be executed while the app is in maintenance mode.</div> |
| 196 | + </div> |
| 197 | + <div class="uk-width-2-3 uk-form-controls-text"> |
161 | 198 | <label> |
162 | 199 | <input type="hidden" name="dont_overlap" id="dont_overlap" value="0" {{old('dont_overlap', $task->dont_overlap) ? '' : 'checked'}}> |
163 | 200 | <input type="checkbox" name="dont_overlap" id="dont_overlap" value="1" {{old('dont_overlap', $task->dont_overlap) ? 'checked' : ''}}> |
|
0 commit comments