UNPKG

unserver-unify

Version:

118 lines 4.73 kB
<div ng-controller="BBSEditCtrl as ctrl"> <div class="col-md-12"> <div class="alert alert-danger" ng-if="form.$invalid && submitted"> <div ng-if="form.title.$invalid && submitted" translate=""> {{ validStrings.title }} </div> <div ng-if="form.tab.$invalid && submitted"> {{ validStrings.tab }} </div> <div ng-if="form.content.$invalid && submitted"> {{ validStrings.content }} </div> </div> <form class="sky-form" name="form" ng-class='{"shake":shaking}'> <header> {{action | translate}} </header> <fieldset> <div class="row"> <section class="col-md-8 col-sm-8 col-xs-12" ng-class='{"has-error":form.title.$invalid && submitted}'> <label class="label"> <b> {{'Type' | translate}} </b> </label> <div class="inline-group"> <label class="radio"> <input checked="checked" id="type_discuss" ng-model="ctrl.subtab" type="radio" value="Discuss"> <i> </i> <span translate=""> Discussion </span> </input> </label> <label class="radio"> <input id="type_question" ng-model="ctrl.subtab" type="radio" value="Question"> <i> </i> <span translate=""> Question </span> </input> </label> </div> </section> <section class="col-md-8 col-sm-8 col-xs-12" ng-class='{"has-error":form.title.$invalid && submitted}'> <label class="label"> <b> {{'Title' | translate}} </b> </label> <div class="input"> <!-- <span class="input-group-addon" style="border:none;background-color:transparent"></span> --> <i class="icon-append fa fa-header"> </i> <input focus-me="true" id="title" name="title" ng-minlength="1" ng-model="ctrl.topic.title" placeholder="{{'More than 10 Characters' | translate}}" required="" type="text"> </input> </div> </section> <section class="col-md-8 col-sm-8 col-xs-12"> <label class="col-sm-2" style="padding:0"> Attachment </label> <div class="col-sm-8" > <span class="btn btn-primary" ng-click="ctrl.uploadAttachment()"> <span class="glyphicon glyphicon-upload"> </span> upload </span> <span class="btn btn-primary" ng-click="ctrl.uploadAttachment(ctrl.videoSetting)"> <span class="glyphicon glyphicon-facetime-video"> </span> Video </span> </div> <div class="col-sm-offset-2 col-sm-8" ng-repeat="file in ctrl.topic.files" style="border:1px solid #DCDCDC;padding:0.5%;border-radius: 4px;margin-top:0.5%;"> {{file.result}} <a class="pull-right" ng-click="ctrl.deleteAttach(file)" style="font-size:11px;color:grey;cursor: pointer;"> x </a> </div> </section> <section class="col-md-12 col-sm-12 col-xs-12 comment_top"> <label class="label"> <b translate=""> Comments </b> </label> <div class="textarea"> <i class="icon-append fa fa-comment"> </i> <div name="content" ng-model="ctrl.topic.content" text-angular=""> </div> </div> </section> </div> <span class="input-group-addon" style="border:none;background-color:transparent; text-align:left; padding-left:0;"> <span ng-if="ctrl.topic.allowcomment != undefined"> <input ng-model="ctrl.topic.allowcomment" type="checkbox"> {{'Allow Reply for this Comment' | translate}} </input> </span> </span> </fieldset> <footer> <button class="btn btn-u" ng-click="ctrl.submit()" type="submit"> {{ saveButtonTitle }} </button> <button class="btn btn-primary" ng-click="ctrl.uploadFile(ctrl.wikiImgSetting)"> {{'Upload Image'| translate}} <i class="fa fa-picture-o"> </i> </button> </footer> </form> </div> </div>