Commit 33482f29 by Azhan Hannan

validation untuk penambahan role, bila edit, takleh biar role empty

parent f51836bc
...@@ -27,6 +27,36 @@ ...@@ -27,6 +27,36 @@
<button class="center aligned ui teal button" type="button" onclick="window.location.href='{{ route('timesheet::maintenance.senaraiPeranan') }}';"> <button class="center aligned ui teal button" type="button" onclick="window.location.href='{{ route('timesheet::maintenance.senaraiPeranan') }}';">
Back Back
</button> </button>
<div class="ui error message"></div>
</form> </form>
</div> </div>
@endsection @endsection
@push('script')
<script type="text/javascript">
$('.ui.form')
.form({
fields: {
name: {
identifier: 'role',
rules: [
{
type : 'empty',
prompt : 'Please insert a role name'
}
]
},
status: {
identifier: 'status',
rules: [
{
type : 'empty',
prompt : 'Please select a status for the new role'
}
]
},
}
})
;
</script>
@endpush
\ No newline at end of file
...@@ -19,6 +19,36 @@ ...@@ -19,6 +19,36 @@
</select> </select>
</div> </div>
<button class="ui primary button" type="submit">Add</button> <button class="ui primary button" type="submit">Add</button>
<div class="ui error message"></div>
</form> </form>
</div> </div>
@endsection @endsection
@push('script')
<script type="text/javascript">
$('.ui.form')
.form({
fields: {
name: {
identifier: 'role',
rules: [
{
type : 'empty',
prompt : 'Please enter role name'
}
]
},
status: {
identifier: 'status',
rules: [
{
type : 'empty',
prompt : 'Please select a status for the new role'
}
]
},
}
})
;
</script>
@endpush
\ No newline at end of file
...@@ -62,7 +62,6 @@ ...@@ -62,7 +62,6 @@
<button class="ui green button" type="button" onclick="history.back()">Back</button> <button class="ui green button" type="button" onclick="history.back()">Back</button>
<div class="ui error message"></div> <div class="ui error message"></div>
</form> </form>
</div> </div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment